/* The site's stylesheet, written by hand: a conference site set like a
   typeset programme book. Computer Modern from jsDelivr (cm-web-fonts,
   pinned to a commit); a cover, a contents sidebar, numbered sections,
   booktabs tables, framed boxes and numbered figures. No build step. */

/* ── Fonts ─────────────────────────────────────────────────────────────── */
/* Computer Modern Unicode (SIL OFL) from github.com/aaaakshat/cm-web-fonts,
   commit 333f55e, served by jsDelivr. Only the faces the site uses. */

@font-face {
  font-family: 'Computer Modern Serif';
  src: url('https://cdn.jsdelivr.net/gh/aaaakshat/cm-web-fonts@333f55ec19733c28cdc43567ecf72eafd6b0af61/font/Serif/cmunrm.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Computer Modern Serif';
  src: url('https://cdn.jsdelivr.net/gh/aaaakshat/cm-web-fonts@333f55ec19733c28cdc43567ecf72eafd6b0af61/font/Serif/cmunbx.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Computer Modern Serif';
  src: url('https://cdn.jsdelivr.net/gh/aaaakshat/cm-web-fonts@333f55ec19733c28cdc43567ecf72eafd6b0af61/font/Serif/cmunti.woff') format('woff');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Computer Modern Typewriter';
  src: url('https://cdn.jsdelivr.net/gh/aaaakshat/cm-web-fonts@333f55ec19733c28cdc43567ecf72eafd6b0af61/font/Typewriter/cmuntt.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ────────────────────────────────────────────────────────────── */
/* Ink on white, a deep red for the accents (rules, kickers, keynotes) and
   a blue for links. The figures (the SVG reads the --c-* names as RGB
   triplets) use ink and shades of the accent red only: --c-ember dark,
   --c-river medium, --c-sun light, --c-river-soft palest, far enough
   apart in lightness to tell the parts of a figure apart. */

:root {
  --serif: 'Computer Modern Serif', 'Latin Modern Roman', 'CMU Serif', Georgia, 'Times New Roman', serif;
  --mono: 'Computer Modern Typewriter', 'Latin Modern Mono', 'CMU Typewriter Text', ui-monospace, 'Courier New', monospace;

  --c-bg:           255 255 255;
  --c-surface:      255 255 255;
  --c-surface-2:    245 243 238;
  --c-line:         218 214 206;
  --c-line-strong:  150 146 138;
  --c-ink:           20  20  20;
  --c-ink-2:         70  70  70;
  --c-muted:        118 114 108;
  --c-link:          28  72 140;
  --c-accent:       150  30  36;
  --c-ember:        112  20  26;
  --c-river:        176  58  62;
  --c-sun:          216 142 144;
  --c-river-soft:   247 230 230;

  --wide: 74rem;
  --prose: 42rem;
}

/* ── Base ──────────────────────────────────────────────────────────────── */

html {
  background: rgb(var(--c-bg));
  color: rgb(var(--c-ink));
  font-family: var(--serif);
  font-size: 112.5%;
  line-height: 1.5;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
  /* Keep the scrollbar's room on short pages too, so moving between pages
     does not shift everything sideways. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
}

::selection {
  background: rgb(var(--c-river-soft));
}

:focus-visible {
  outline: 2px solid rgb(var(--c-link));
  outline-offset: 2px;
}

a {
  color: rgb(var(--c-link));
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

code,
.tt {
  font-family: var(--mono);
  font-size: 0.95em;
}

.sc {
  font-variant-caps: small-caps;
  letter-spacing: 0.03em;
}

.muted {
  color: rgb(var(--c-muted));
}

.small {
  font-size: 0.85rem;
}

/* Paragraphs as LaTeX sets them: justified and hyphenated, each after the
   first indented. */
p {
  max-width: var(--prose);
  margin: 0;
  text-align: justify;
  hyphens: auto;
}

p + p {
  text-indent: 1.5em;
}

/* Something not confirmed yet. */
.tba {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  color: rgb(var(--c-muted));
}

/* ── Page frame ────────────────────────────────────────────────────────── */

.page {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

/* The masthead: name, pages, and the tickets button, over a double rule
   (thick, then thin), as at the head of a programme. */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
  padding: 1.1rem 0 0.7rem;
  border-bottom: 3px double rgb(var(--c-ink));
}

.masthead .name {
  color: rgb(var(--c-ink));
  font-size: 1.15rem;
  font-weight: bold;
  font-variant-caps: small-caps;
  letter-spacing: 0.06em;
}

.masthead nav {
  flex: 1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-variant-caps: small-caps;
  letter-spacing: 0.03em;
}

.nav a {
  color: rgb(var(--c-ink-2));
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: rgb(var(--c-accent));
  text-decoration: none;
}

/* On a phone the line of name, pages and button no longer fits, and
   wrapping left it ragged. Instead: the name with the tickets button on
   one line, then the pages under a thin rule, in three even columns. */
@media (max-width: 40rem) {
  .masthead {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem 1rem;
    padding-top: 0.9rem;
  }

  .masthead .btn {
    grid-row: 1;
    grid-column: 2;
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
  }

  .masthead nav {
    grid-column: 1 / -1;
    padding-top: 0.5rem;
    border-top: 0.75px solid rgb(var(--c-line));
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: space-between;
    gap: 0.35rem 1rem;
  }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid rgb(var(--c-ink));
  color: rgb(var(--c-ink));
  font-variant-caps: small-caps;
  letter-spacing: 0.05em;
  line-height: 1.2;
  white-space: nowrap;
}

.btn:hover {
  background: rgb(var(--c-surface-2));
  text-decoration: none;
}

.btn.primary {
  background: rgb(var(--c-ink));
  color: rgb(var(--c-bg));
}

.btn.primary:hover {
  background: rgb(var(--c-accent));
  border-color: rgb(var(--c-accent));
}

/* A button for something not available yet. */
.btn.off {
  border-style: dashed;
  border-color: rgb(var(--c-line-strong));
  color: rgb(var(--c-muted));
}

.btn.small {
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* A line of plain links: "Full schedule →". */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 1rem 0 0;
}

/* ── Cover ─────────────────────────────────────────────────────────────── */
/* The front page's title block, set like the cover of a proceedings
   volume; inner pages use a smaller one with their figure beside it. */

.cover {
  padding: 4.5rem 0 3rem;
  text-align: center;
  border-bottom: 0.75px solid rgb(var(--c-ink));
}

.kicker {
  margin: 0 auto;
  color: rgb(var(--c-accent));
  font-size: 0.95rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.35em;
  text-align: center;
}

.cover .title {
  margin: 0.6rem 0 0;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: normal;
  line-height: 1.05;
}

.cover p {
  text-indent: 0;
}

.cover .subtitle {
  margin: 1rem auto 0;
  font-size: 1.25rem;
  font-style: italic;
  text-align: center;
}

.cover .when {
  margin: 1.1rem auto 0;
  font-size: 1.2rem;
  text-align: center;
}

.cover .buttons {
  justify-content: center;
  margin-top: 2rem;
}

/* "3 days · 33 sessions · 3 keynotes", between two rules. */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 2rem;
  max-width: 40rem;
  margin: 2.5rem auto 0;
  padding: 0.6rem 0;
  border-top: 0.75px solid rgb(var(--c-line-strong));
  border-bottom: 0.75px solid rgb(var(--c-line-strong));
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
}

.stats strong {
  font-weight: bold;
}

/* Inner pages: title left, figure right on wide screens. */
.cover.inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0 2.5rem;
  text-align: left;
}

.cover.inner .kicker,
.cover.inner .when {
  margin-left: 0;
  text-align: left;
}

.cover.inner .title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.cover.inner .buttons {
  justify-content: flex-start;
}

.cover.inner figure.figure {
  margin: 0;
}

@media (min-width: 52rem) {
  .cover.inner.with-figure {
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  }
}

/* ── Contents and sections ─────────────────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
}

.toc {
  display: none;
}

@media (min-width: 64rem) {
  .layout.with-toc {
    grid-template-columns: 12rem minmax(0, 1fr);
  }

  .toc {
    display: block;
    position: sticky;
    top: 1.5rem;
    align-self: start;
    padding-top: 2.5rem;
    font-size: 0.92rem;
  }
}

.toc h2 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: rgb(var(--c-accent));
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  display: flex;
  gap: 0.6rem;
  padding: 0.2rem 0;
  border-bottom: 0.5px dotted rgb(var(--c-line-strong));
}

.toc .n {
  min-width: 1.2rem;
  color: rgb(var(--c-muted));
  font-variant-numeric: tabular-nums;
}

.toc a {
  color: rgb(var(--c-ink));
}

.section {
  padding-top: 3rem;
}

.section > h2 {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1.1rem;
  padding-bottom: 0.4rem;
  border-bottom: 0.75px solid rgb(var(--c-ink));
  font-size: 1.55rem;
  font-weight: bold;
  line-height: 1.2;
}

.secnum {
  color: rgb(var(--c-accent));
  font-variant-numeric: tabular-nums;
}

.section h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.15rem;
}

.lead {
  font-size: 1.1rem;
}

/* ── Grids, boxes and cards ────────────────────────────────────────────── */

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem 2.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
}

@media (min-width: 52rem) {
  .grid-2 {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

/* A framed box with a title bar, like a highlighted block in a programme. */
.box {
  border: 1.5px solid rgb(var(--c-ink));
}

.box-title {
  padding: 0.35rem 0.9rem;
  background: rgb(var(--c-ink));
  color: rgb(var(--c-bg));
  font-variant-caps: small-caps;
  letter-spacing: 0.06em;
}

.box-body {
  padding: 0.9rem;
}

.box-body > table.booktabs {
  margin-top: 0;
}

/* A speaker or package card: a rule above, a label, a name. */
.card {
  padding-top: 0.7rem;
  border-top: 3px solid rgb(var(--c-ink));
}

.card .label {
  display: block;
  color: rgb(var(--c-accent));
  font-size: 0.85rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
}

.card .name {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1.2;
}

.card .org {
  display: block;
  font-style: italic;
  color: rgb(var(--c-ink-2));
}

.card .talk {
  display: block;
  margin-top: 0.6rem;
}

/* ── Programme at a glance ─────────────────────────────────────────────── */
/* One column per day; each slot a time and a title. Keynotes and panels
   in the accent. */

.programme {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem 2rem;
}

.programme .day-head {
  margin: 0 0 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1.5px solid rgb(var(--c-ink));
  font-size: 1.05rem;
  font-weight: bold;
}

.programme .day-head .sc {
  font-weight: normal;
  color: rgb(var(--c-accent));
}

.slots {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}

.slots li {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.3rem 0;
  border-bottom: 0.5px solid rgb(var(--c-line));
}

.slots .t {
  color: rgb(var(--c-muted));
  font-variant-numeric: tabular-nums;
}

.slots a {
  color: rgb(var(--c-ink));
}

.slots .featured a {
  font-weight: bold;
}

.slots .gap {
  color: rgb(var(--c-muted));
}

/* ── Tables (booktabs) ─────────────────────────────────────────────────── */

table.booktabs {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.booktabs th,
.booktabs td {
  padding: 0.35rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.booktabs th:first-child,
.booktabs td:first-child {
  padding-left: 0;
}

.booktabs th:last-child,
.booktabs td:last-child {
  padding-right: 0;
}

.booktabs thead th {
  font-weight: bold;
  border-top: 1.5px solid rgb(var(--c-ink));
  border-bottom: 0.75px solid rgb(var(--c-ink));
}

/* A table without a head starts with the top rule. */
.booktabs.nohead tbody tr:first-child > * {
  border-top: 1.5px solid rgb(var(--c-ink));
  padding-top: 0.5rem;
}

.booktabs tbody tr:last-child > * {
  border-bottom: 1.5px solid rgb(var(--c-ink));
  padding-bottom: 0.5rem;
}

.booktabs tbody th {
  font-weight: normal;
}

.booktabs .num {
  text-align: right;
  white-space: nowrap;
}

.booktabs .time {
  width: 7.5rem;
  white-space: nowrap;
}

.booktabs .label {
  width: 38%;
  font-variant-caps: small-caps;
  letter-spacing: 0.03em;
}

/* A session in the full schedule: title, who, then the abstract. */
.session-title {
  display: block;
  font-weight: bold;
}

.session-who {
  display: block;
  font-style: italic;
}

.session-text {
  display: block;
  max-width: var(--prose);
  margin-top: 0.35rem;
  color: rgb(var(--c-ink-2));
  text-align: justify;
  hyphens: auto;
}

/* "Add to calendar" under a session. */
.ics {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

.kind {
  margin-left: 0.5rem;
  font-weight: normal;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  color: rgb(var(--c-accent));
}

.overflow {
  overflow-x: auto;
}

/* ── Figures ───────────────────────────────────────────────────────────── */
/* Numbered per page: "Figure 1: ...". */

main {
  counter-reset: figure;
}

figure.figure {
  margin: 1.75rem 0;
  counter-increment: figure;
}

figure.figure > figcaption {
  margin: 0.6rem 1rem 0;
  font-size: 0.85rem;
  text-align: center;
}

figure.figure > figcaption::before {
  content: 'Figure ' counter(figure) ': ';
  font-weight: bold;
}

.map {
  display: block;
  width: 100%;
  height: auto;
  border: 0.75px solid rgb(var(--c-line-strong));
}

/* ── Lists ─────────────────────────────────────────────────────────────── */

.plain {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.plain li + li {
  margin-top: 0.25rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.15rem 0.7rem;
  border: 0.75px solid rgb(var(--c-ink));
  font-variant-caps: small-caps;
  letter-spacing: 0.03em;
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
/* Spaced with margins, not grid gaps: a fieldset's legend sits outside
   its grid, so gaps there are unreliable. */

.form {
  max-width: var(--prose);
  margin-top: 1.5rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.form .field + .field {
  margin-top: 1.5rem;
}

.field label {
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgb(var(--c-ink));
  border-radius: 0;
  background: rgb(var(--c-bg));
  color: rgb(var(--c-ink));
  font: inherit;
}

.field textarea {
  resize: vertical;
  line-height: 1.45;
}

.field [aria-invalid='true'] {
  border-color: rgb(var(--c-accent));
  border-width: 2px;
}

.problem {
  color: rgb(var(--c-accent));
  font-size: 0.88rem;
}

.hint {
  color: rgb(var(--c-muted));
  font-size: 0.88rem;
}

.notice {
  margin: 1.25rem 0 0;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid rgb(var(--c-accent));
  background: rgb(var(--c-surface-2));
}

/* A group of fields under a title (Speaker, Proposal). The legend floats so
   it lays out like an ordinary heading. */
.form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form fieldset + fieldset {
  margin-top: 2.5rem;
}

.form legend {
  float: left;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 0 0 0.3rem;
  border-bottom: 0.75px solid rgb(var(--c-ink));
  font-size: 1.1rem;
  font-weight: bold;
}

.form legend + .field {
  clear: both;
}

.form .buttons {
  margin-top: 2rem;
}

/* A ticked box to confirm, e.g. withdrawing a proposal. */
.field.check label {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  font-variant-caps: normal;
  letter-spacing: 0;
}

.field.check input {
  width: auto;
  padding: 0;
}

/* A speaker's private link, shown once: long, so it may break anywhere. */
.secret-link code {
  display: block;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgb(var(--c-ink));
  overflow-wrap: anywhere;
}

/* The organiser pages' menu, under the signed-in line. */
.admin-menu {
  padding: 0.4rem 0 0;
  font-size: 0.95rem;
  text-align: right;
}

/* A list's search box: label, field and button on one line. */
.search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 1.5rem 0 1rem;
}

.search input {
  flex: 1;
  min-width: 12rem;
  max-width: 28rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgb(var(--c-ink));
  border-radius: 0;
  font: inherit;
}

/* An organiser's decision on a proposal, above its log. */
.status-form,
.review-form {
  margin-bottom: 1.5rem;
}

/* A proposal's answers, and reviewers' notes, keep their line breaks. */
.proposal td,
#reviews td {
  white-space: pre-line;
}

/* ── Organiser pages ──────────────────────────────────────────────────── */

.form.login {
  max-width: 22rem;
  margin: 0 auto;
}

.signed-in {
  padding-top: 1rem;
  font-size: 0.9rem;
  text-align: right;
  color: rgb(var(--c-ink-2));
}

/* A button that looks like a link (Sign out). */
button.link {
  padding: 0;
  border: 0;
  background: none;
  color: rgb(var(--c-link));
  font: inherit;
  cursor: pointer;
}

button.link:hover {
  text-decoration: underline;
}

/* ── Dashboard (/admin/stats) ──────────────────────────────────────────── */

.titlepage {
  margin: 2.5rem 0 2rem;
  text-align: center;
}

.titlepage .title {
  margin: 0;
  font-size: 2.2rem;
  font-weight: normal;
}

.titlepage .author,
.titlepage .date {
  margin-top: 0.6rem;
}

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.figures > div {
  border-top: 3px solid rgb(var(--c-ink));
  padding-top: 0.4rem;
}

.figures .value {
  display: block;
  font-size: 1.6rem;
}

.chart {
  display: block;
  width: 100%;
  height: 10rem;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0 2rem;
}

/* ── Small screens and print ───────────────────────────────────────────── */

@media (max-width: 30rem) {
  html {
    font-size: 106%;
  }

  .page {
    padding: 0 1rem 2rem;
  }

  .cover {
    padding: 3rem 0 2rem;
  }

  .kicker {
    letter-spacing: 0.2em;
  }

  .booktabs .time {
    width: auto;
  }
}

/* Each page prints like a programme page: no navigation, no buttons,
   links in ink. */
@page {
  size: A4;
  margin: 2cm;
}

@media print {
  html {
    font-size: 10.5pt;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .masthead nav,
  .masthead .btn,
  .toc,
  .buttons,
  .actions,
  .noprint {
    display: none;
  }

  .layout.with-toc {
    grid-template-columns: minmax(0, 1fr);
  }

  a {
    color: inherit;
  }

  .btn.primary,
  .box-title {
    background: none;
    color: inherit;
  }

  .section > h2,
  .section h3,
  .day-head {
    break-after: avoid;
  }

  figure.figure,
  table.booktabs tr,
  .card,
  .box {
    break-inside: avoid;
  }
}
