:root {
  /* Page chrome: cool neutral paper, one oxblood accent for typography only. */
  --paper: #F7F7F5;
  --paper-2: #EFEFEB;
  --ink: #1F2327;
  --ink-soft: #5F666D;
  --ink-faint: #8E949A;
  --rule: #DEDED8;
  --accent: #7A241B;
  --accent-deep: #5A1912;

  /* Data ink is inherited from the paper's figures so plates and native charts
     agree, and so green keeps meaning "covered" rather than meaning "accent". */
  --d-cov: #3F7364;
  --d-unc: #DFA441;
  --d-unc-ink: #8F6013;
  --d-wrg: #C9CED2;

  --sans: "IBM Plex Sans", -apple-system, "Helvetica Neue", sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --rail-w: 208px;
  --plate: 880px;
  /* Rail plus column is one unit. Past its full width the pair is centred
     rather than pinned left, so a wide monitor does not leave a dead margin on
     one side only. Both the fixed rail and the column read the same expression
     so they cannot drift apart. */
  --shell: 1184px;
  --gutter: max(0px, calc((100vw - var(--shell)) / 2));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------------- left rail */

.rail {
  position: fixed;
  top: 0;
  left: var(--gutter);
  width: var(--rail-w);
  height: 100vh;
  padding: 30px 0 26px 30px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}

.rail-mark {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.rail-nav { margin-top: 30px; display: flex; flex-direction: column; gap: 9px; }

.rail-nav a {
  font-size: 13.5px;
  color: var(--ink-soft);
  display: flex;
  gap: 9px;
  align-items: baseline;
  transition: color 0.15s ease;
}

.rail-nav a:hover, .rail-nav a.on { color: var(--accent); }

.rn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.rail-nav a:hover .rn, .rail-nav a.on .rn { color: var(--accent); }

.rail-foot { margin-top: auto; opacity: 0.5; }

/* ------------------------------------------------------------ main column */

.column {
  margin-left: calc(var(--gutter) + var(--rail-w));
  padding: 0 40px 0 56px;
  max-width: calc(var(--plate) + 96px);
}

section { padding: 40px 0; border-top: 1px solid var(--rule); }

/* Constrain and centre the box itself, and do it after any earlier rule that
   might zero these margins, so the cascade cannot pin the block to the left. */
.column > * { max-width: var(--plate); margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- masthead */

.head { padding: 58px 0 40px; }

.venue {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.wordmark {
  font-family: var(--sans);
  font-size: 62px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: 14px;
  color: var(--accent);
}

.subtitle {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.34;
  margin-top: 14px;
  max-width: 30ch;
}

.authors { margin-top: 26px; font-size: 15px; line-height: 1.85; max-width: 62ch; }
.authors sup { font-size: 10px; color: var(--ink-faint); }

.affils { margin-top: 4px; font-size: 13.5px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 18px; }
.affils sup { font-size: 10px; color: var(--ink-faint); }

.mk { color: var(--accent); }
.marks { margin-top: 12px; font-size: 12.5px; color: var(--ink-faint); }

.links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  transition: background-color 0.15s ease, color 0.15s ease;
}

a.btn:hover { background: var(--accent); color: var(--paper); }

.btn-off { border-color: var(--rule); color: var(--ink-faint); cursor: default; }
.bn { font-family: var(--mono); font-size: 11px; }

/* ------------------------------------------------------------- typography */

h2 {
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-bottom: 18px;
  max-width: 38ch;
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.sn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--accent);
  flex: none;
  padding-top: 3px;
}

section p {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.72;
  max-width: 64ch;
}

section p + p { margin-top: 13px; }
section em { font-style: italic; }

.n {
  font-family: var(--mono);
  font-size: 0.88em;
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 18px;
  font-family: var(--sans) !important;
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  color: var(--ink-soft);
  border-left: 2px solid var(--rule);
  padding-left: 14px;
}

/* ------------------------------------------------------------ claim + plates */

.claim { border-top: none; padding-top: 8px; }

.claim-text {
  font-family: var(--serif) !important;
  font-size: 20px !important;
  line-height: 1.55 !important;
  max-width: 40ch;
}

.plate { margin-top: 26px; }

.plate img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: #fff;
}

figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 72ch;
}

.fnum {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-right: 7px;
}

/* -------------------------------------------------------------- spec lists */

.spec { margin-top: 24px; }

.spec > div {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.spec > div:last-child { border-bottom: 1px solid var(--rule); }

.spec dt { font-size: 13.5px; font-weight: 500; }

.spec dd { font-family: var(--serif); font-size: 15px; line-height: 1.65; color: var(--ink-soft); }

.spec dd.pending { font-family: var(--sans); color: var(--ink-faint); }

.act {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ------------------------------------------------------------------ tables */

.tw { margin-top: 24px; overflow-x: auto; }

.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.data th, .data td { text-align: right; padding: 7px 10px; white-space: nowrap; }

.data thead th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--ink);
}

/* The row-label column is left-aligned, so its header has to be too. */
.data thead th:first-child { text-align: left; padding-left: 0; }

.data tbody th[scope="row"] { text-align: left; font-weight: 400; padding-left: 0; }

.data td { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-soft); }

.data tr.grp th {
  text-align: left;
  padding: 16px 0 5px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--rule);
}

.data tr.ours th[scope="row"] { font-weight: 600; color: var(--accent); }
.data tr.ours td { color: var(--ink); }
.data td.best { color: var(--ink); font-weight: 500; }
.data tbody tr:not(.grp):hover { background: var(--paper-2); }

.data-tight { max-width: 620px; }

/* ------------------------------------------------- native stacked buckets */

.bk { margin-top: 26px; max-width: 700px; }

.bk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  padding-left: 104px;
}

.bk-legend span { display: inline-flex; align-items: center; gap: 7px; }

.bk-key { width: 10px; height: 10px; display: inline-block; }
.k-cov { background: var(--d-cov); }
.k-unc { background: var(--d-unc); }
.k-wrg { background: var(--d-wrg); }

.bk-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 7px; }

.bk-name { font-size: 13px; text-align: right; color: var(--ink); }
.bk-row.is-ours .bk-name { color: var(--accent); font-weight: 600; }

.bk-bar { display: flex; width: 100%; height: 26px; overflow: visible; }

.bk-seg {
  flex: 0 0 var(--w);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-style: normal;
}

.bk-seg b {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.bk-seg.k-wrg b { color: var(--ink); }

/* A segment too narrow to hold its own number sets it just outside the right
   edge, in the segment's own dark ink, with nothing painted behind it. */
.bk-seg.narrow b { position: absolute; left: 100%; margin-left: 4px; color: var(--d-unc-ink); }
.bk-seg.k-cov.narrow b { color: var(--d-cov); }

.bk-axis {
  display: flex;
  justify-content: space-between;
  margin: 10px 0 0 104px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------- citation */

.cite { margin-top: 18px; border: 1px solid var(--rule); max-width: 700px; }

.cite-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}

.cite-file { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }

.copy {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--accent);
  background: none;
  border: 1px solid var(--rule);
  padding: 3px 11px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.copy:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

#bib { padding: 14px; overflow-x: auto; }

#bib code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.62;
  color: var(--ink-soft);
  white-space: pre;
}

/* ------------------------------------------------------------------ footer */

.foot {
  padding: 26px 0 50px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-faint);
}

/* ------------------------------------------------------------------ motion */

[data-anim] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .rail {
    position: static;
    width: auto;
    height: auto;
    padding: 24px 24px 18px;
    border-right: none;
    border-bottom: 1px solid var(--rule);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .rail-nav { display: none; }
  .rail-foot { margin-top: 0; }
  .column { margin-left: 0; padding: 0 24px; max-width: none; }
}

@media (max-width: 640px) {
  .wordmark { font-size: 46px; }
  .subtitle { font-size: 21px; max-width: none; }
  .claim-text { font-size: 18px !important; }
  h2 { font-size: 19px; }
  .spec > div { grid-template-columns: 1fr; gap: 5px; }
  .bk-legend { padding-left: 0; }
  .bk-row { grid-template-columns: 74px minmax(0, 1fr); }
  .bk-axis { margin-left: 82px; }
  .head { padding-top: 34px; }
}
