/* OSVerify project site
   Palette follows the logo and paper figures: green #4F7F5C → cream → rose #C9808F. */

:root {
  --bg: #FDFCFA;
  --surface: #FFFFFF;
  --surface-2: #F5F2EC;
  --ink: #2B2724;
  --ink-2: #57504A;
  --line: #E7E0D5;
  --green: #4F7F5C;
  --green-ink: #3E6A4A;
  --green-tint: #EFF5ED;
  --rose: #C9808F;
  --rose-ink: #985064;
  --rose-tint: #FAF0F2;
  --hl-green: #CBE3C6;
  --hl-rose: #F0CFD9;
  --figure-bg: #FFFFFF;
  --focus: #3E6A4A;

  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", "TeX Gyre Pagella", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --col: 48rem; /* single column: text, figures, tables and cards share this width */
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1A18;
    --surface: #23211F;
    --surface-2: #2B2926;
    --ink: #EDE6DA;
    --ink-2: #B7AFA4;
    --line: #3B3834;
    --green: #7FAF8C;
    --green-ink: #97C6A3;
    --green-tint: #22302A;
    --rose: #D99AA8;
    --rose-ink: #E6AFBC;
    --rose-tint: #35262B;
    --hl-green: rgba(127, 175, 140, 0.30);
    --hl-rose: rgba(217, 154, 168, 0.28);
    --figure-bg: #FFFFFF;
    --focus: #97C6A3;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1B1A18;
  --surface: #23211F;
  --surface-2: #2B2926;
  --ink: #EDE6DA;
  --ink-2: #B7AFA4;
  --line: #3B3834;
  --green: #7FAF8C;
  --green-ink: #97C6A3;
  --green-tint: #22302A;
  --rose: #D99AA8;
  --rose-ink: #E6AFBC;
  --rose-tint: #35262B;
  --hl-green: rgba(127, 175, 140, 0.30);
  --hl-rose: rgba(217, 154, 168, 0.28);
  --figure-bg: #FFFFFF;
  --focus: #97C6A3;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: var(--gutter); top: -3rem; z-index: 100;
  padding: 0.5rem 0.9rem; background: var(--ink); color: var(--bg); border-radius: 4px;
}
.skip-link:focus { top: 0.75rem; }

.container { width: 100%; max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 1.5rem; min-height: 3.5rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; color: var(--ink); text-decoration: none; }
.brand img { height: 1.9rem; width: auto; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 0.3rem; font-size: 0.95rem; }
.topnav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.8rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; letter-spacing: 0.02em; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease; }
.topnav a:hover { color: var(--ink); background: var(--surface-2); }
.topnav a[aria-current="page"] { color: var(--green-ink); background: var(--green-tint); }
.topnav a.nav-icon { color: var(--ink-2); }
.topnav a.nav-icon { padding: 0 0.6rem; }
.topnav a.nav-icon:hover { color: var(--ink); }
.topnav a.nav-icon svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
@media (max-width: 480px) {
  html { scroll-padding-top: 7rem; }
  .topbar .container { flex-wrap: wrap; justify-content: center; gap: 0; padding-top: 0.25rem; padding-bottom: 0.25rem; }
  .topnav { width: 100%; margin-left: 0; justify-content: center; gap: 0.4rem; }
}

/* ---------- hero ---------- */

.hero { text-align: center; padding-top: 4.5rem; padding-bottom: 2.5rem; }
.hero-logo { width: min(26rem, 82%); margin: 0 auto 2.25rem; }
.hero h1 {
  font-weight: normal;
  font-size: clamp(1.25rem, 0.6rem + 3.6vw, 1.85rem);
  line-height: 1.2;
  margin: 0 auto 1.2rem;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.tagline { color: var(--ink-2); margin: 0 0 1.6rem; font-size: 1.15rem; }
.authors { color: var(--ink); font-size: 1.15rem; margin: 0 0 0.25rem; }
.authors sup, .equal sup { font-size: 0.65em; margin-left: 0.05em; }
.affil { color: var(--ink-2); font-size: 1.05rem; margin: 0 0 0.2rem; }
.equal { color: var(--ink-2); font-size: 0.85rem; margin: 0 0 1.6rem; }

.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.65rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1.15rem; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  font-size: 1rem; text-decoration: none; line-height: 1.2;
}
.btn:hover { text-decoration: none; opacity: 0.88; }
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; flex: none; }
.btn.secondary { background: transparent; color: var(--ink); }
.btn[aria-disabled="true"] { background: transparent; color: var(--ink-2); border-color: var(--line); border-style: dashed; cursor: default; }
.btn[aria-disabled="true"]:hover { opacity: 1; }
.btn .soon { font-size: 0.8em; font-style: italic; }

/* ---------- sections ---------- */

section { padding: 3.25rem 0; }
section + section { border-top: 1px solid var(--line); }

h2, .collection-title {
  font-weight: normal;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  font-size: 1.85rem;
  line-height: 1.2;
  margin: 0 0 1.4rem;
}
h2::after, .collection-title::after {
  content: ""; display: block; width: 3.25rem; height: 2px; margin-top: 0.55rem;
  background: linear-gradient(90deg, var(--green), var(--rose));
}
h3 { font-size: 1.2rem; margin: 0 0 0.5rem; font-weight: bold; }
p { margin: 0 0 1.05rem; }
code { font-family: var(--mono); font-size: 0.84em; }
#overview { padding-top: 0.5rem; }

/* ---------- home page ---------- */

/* news panel */
.news-section { padding: 0 0 2rem; }
.news-section + section { border-top: 0; }
.news { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(43, 39, 36, 0.05); }
.news-head { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--line); }
h2.news-title { margin: 0; font-size: 0.85rem; font-weight: normal; font-variant: normal; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-2); }
h2.news-title::after { display: none; }
.live { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; color: var(--ink-2); }
.live-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #2E9E67; animation: live-pulse 2.2s ease-out infinite; }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 158, 103, 0.45); }
  70% { box-shadow: 0 0 0 0.45rem rgba(46, 158, 103, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 158, 103, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li + li { border-top: 1px solid var(--line); }
.news-item {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; grid-template-areas: "tag body time";
  align-items: center; gap: 0.4rem 1rem; padding: 0.85rem 1.25rem;
  color: var(--ink); text-decoration: none; transition: background-color 0.15s ease;
}
.news-item:hover { background: var(--surface-2); }
.news-tag { grid-area: tag; justify-self: start; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.72rem; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase; }
.news-tag.discovery { background: var(--green-tint); color: var(--green-ink); }
.news-tag.referee { background: var(--rose-tint); color: var(--rose-ink); }
.news-body { grid-area: body; font-size: 1rem; line-height: 1.5; }
.news-sep { margin: 0 0.45rem; color: var(--ink-2); }
.news-desc { color: var(--ink-2); font-style: italic; }
.news-time { grid-area: time; font-size: 0.9rem; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 640px) {
  .news-item { grid-template-columns: auto 1fr; grid-template-areas: "tag time" "body body"; padding: 0.85rem 1rem; }
  .news-time { justify-self: end; }
  .news-head { padding: 0.75rem 1rem; }
}

.secnum {
  display: inline-block; margin-right: 0.6rem;
  font-variant: normal; font-variant-numeric: lining-nums; letter-spacing: 0.04em;
  color: var(--green-ink);
}
.summary-section { padding-top: 0.75rem; }
.summary { font-size: 1.2rem; line-height: 1.7; margin: 0; }
.more { margin: 1.25rem 0 0; font-size: 1rem; }
.more a:not(.btn) { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: bold; text-decoration: none; }
.more a:not(.btn):hover { color: var(--ink); text-decoration: none; }
.subhead { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
h2 + .subhead { margin-top: 0; }
.paper-list.featured { margin-top: 1.25rem; }

/* conjectures resolved with OSVerify */
ol.resolved { list-style: none; counter-reset: resolved; display: grid; gap: 0.8rem; margin: 1.25rem 0 0; padding: 0; }
ol.resolved > li { counter-increment: resolved; display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); column-gap: 1rem; padding: 1.15rem 1.3rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 8px; box-shadow: 0 1px 2px rgba(43, 39, 36, 0.04); }
ol.resolved > li.latest { border-left-color: var(--rose); }
ol.resolved > li.latest::before { border-color: var(--rose); color: var(--rose-ink); }
ol.resolved > li::before { content: counter(resolved); grid-row: 1 / span 2; display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1px solid var(--green); color: var(--green-ink); font-size: 1rem; }
ol.resolved > li > * { grid-column: 2; }
.resolved-title { margin: 0 0 0.5rem; font-size: 1.1rem; font-weight: bold; line-height: 1.8rem; }
.resolved-meta { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); gap: 0.3rem 0.75rem; margin: 0; font-size: 0.98rem; line-height: 1.55; }
.resolved-meta dt { font-variant: small-caps; letter-spacing: 0.06em; color: var(--ink-2); }
.resolved-meta dd { margin: 0; }
.tag { display: inline-block; margin-left: 0.35rem; padding: 0 0.45rem; border-radius: 4px; background: var(--rose-tint); color: var(--rose-ink); font-size: 0.78rem; font-weight: normal; line-height: 1.6; vertical-align: 0.15em; }
@media (max-width: 560px) {
  ol.resolved > li { padding: 1rem; column-gap: 0.75rem; }
  .resolved-meta { grid-template-columns: 1fr; gap: 0; }
  .resolved-meta dd { margin-bottom: 0.45rem; }
}

.box ul.contacts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; }
.contacts li { margin: 0; }
.contacts b { margin-right: 0.4rem; }
.post-hero { padding-top: 3.5rem; }

/* compact three-step cards on the home page */
.steps.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1.5rem 0 1.25rem; }
.steps.compact .step { display: block; padding: 1.1rem 1.15rem 1rem; }
.steps.compact .step::before { display: inline-grid; margin-bottom: 0.6rem; }
.steps.compact .labels { margin-bottom: 0; }
@media (max-width: 720px) { .steps.compact { grid-template-columns: 1fr; } }
#overview figure { margin-top: 0; }

.lead { font-size: 1.2rem; }
strong, b { font-weight: bold; color: var(--ink); }

/* marker-style highlight */
mark.hl {
  color: inherit;
  background: linear-gradient(to top, var(--hl-green) 0, var(--hl-green) 0.6em, transparent 0.6em);
  padding: 0 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark.hl.rose { background: linear-gradient(to top, var(--hl-rose) 0, var(--hl-rose) 0.6em, transparent 0.6em); }

/* boxed notes: TL;DR, key insight, highlights */
.box {
  margin: 1.5rem 0; padding: 1rem 1.25rem 1.05rem;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 8px;
}
.box.rose { border-left-color: var(--rose); }
.box .label {
  display: block; margin-bottom: 0.35rem;
  font-variant: small-caps; letter-spacing: 0.07em; font-weight: bold; font-size: 1rem;
  color: var(--green-ink);
}
.box.rose .label { color: var(--rose-ink); }
.box p { margin-bottom: 0.6rem; }
.box p:last-child { margin-bottom: 0; }
.box ul { margin: 0; padding-left: 1.15rem; }
.box li { margin-bottom: 0.45rem; }
.box li:last-child { margin-bottom: 0; }
.tldr { font-size: 1.08rem; margin-top: 0; }
.muted { color: var(--ink-2); }

/* ---------- figures ---------- */

figure { margin: 2rem 0; }
.figure-frame {
  display: block;
  background: var(--figure-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(0.4rem, 1.5vw, 0.9rem);
}
a.figure-frame { cursor: zoom-in; }
a.figure-frame:hover { border-color: var(--ink-2); }
.zoom-hint { display: none; font-size: 0.85rem; color: var(--ink-2); margin: 0.4rem 0 0; text-align: center; }
@media (max-width: 760px) { .zoom-hint { display: block; } }
figcaption { color: var(--ink-2); font-size: 0.95rem; line-height: 1.55; margin: 0.85rem 0 0; }
figcaption b { color: var(--ink); }

/* ---------- key numbers ---------- */

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin: 2.25rem 0 0.5rem; }
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; gap: 0.6rem; }
  .stat { padding: 0.9rem 1rem; }
  .stat .num { font-size: 1.8rem; }
}
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.15rem 1.15rem; }
.stat .num { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--green-ink); margin-bottom: 0.4rem; font-variant-numeric: lining-nums; }
.stat.rose .num { color: var(--rose-ink); }
.stat p { margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--ink-2); }

/* ---------- objective / formulas ---------- */

.objective {
  margin: 1.6rem 0; padding: 1.1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 6px; text-align: center; font-size: 1.2rem;
}
.objective .math { white-space: normal; }
.objective .def { display: block; margin-top: 0.5rem; font-size: 0.95rem; color: var(--ink-2); text-align: left; }
.math { white-space: nowrap; }
.sc { font-variant: small-caps; letter-spacing: 0.03em; }

/* ---------- method steps ---------- */

.steps { display: grid; gap: 0.9rem; margin: 1.75rem 0 1rem; counter-reset: step; }
.step { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); column-gap: 1rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.15rem 1.3rem 1.05rem; }
.step > * { grid-column: 2; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  border: 1px solid var(--green); color: var(--green-ink); font-size: 1rem;
  grid-column: 1; grid-row: 1 / span 6;
}
.step h3 { line-height: 1.8rem; margin-bottom: 0.3rem; }
.step p { font-size: 1rem; line-height: 1.55; margin-bottom: 0.6rem; }
.step p:last-child { margin-bottom: 0; }

.labels { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0.7rem; padding: 0; list-style: none; }
.labels li { font-size: 0.82rem; padding: 0.15rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); font-variant: small-caps; letter-spacing: 0.04em; }
.labels .sub { background: var(--rose-tint); border-color: var(--rose); color: var(--rose-ink); }


/* ---------- results table ---------- */

.table-wrap { overflow-x: auto; margin: 1.75rem 0 0.5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.table-wrap:focus-visible { outline-offset: 2px; }
table.results { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 44rem; font-size: 0.9rem; font-variant-numeric: lining-nums tabular-nums; }
.results caption { caption-side: bottom; text-align: left; padding: 0.8rem 1rem; font-size: 0.9rem; color: var(--ink-2); border-top: 1px solid var(--line); }
.results th, .results td { padding: 0.45rem 0.4rem; text-align: right; white-space: nowrap; }
.results thead th { font-weight: normal; color: var(--ink-2); }
.results thead tr:first-child th { color: var(--ink); font-weight: bold; border-bottom: 1px solid var(--line); text-align: center; }
.results thead tr:last-child th { border-bottom: 1px solid var(--ink-2); }
.results th[scope="row"] { text-align: left; font-weight: normal; padding-left: 0.75rem; }
.results .group th { text-align: center; font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); background: var(--surface-2); padding: 0.4rem; }
.results .dsep { border-left: 1px solid var(--line); }
.results th[scope="row"], .results thead tr:last-child th:first-child, .results thead tr:first-child td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.results .ours { background: var(--green-tint); }
.results .ours th[scope="row"] { background: var(--green-tint); }
.results .trained th[scope="row"] { background: var(--rose-tint); }
.results .ours th[scope="row"] { font-weight: bold; }
.results .trained { background: var(--rose-tint); }
.results .trained th[scope="row"] { font-weight: bold; }
.results td .sd { color: var(--ink-2); font-size: 0.72em; margin-left: 0.1rem; }
.results td strong { font-weight: bold; }
@media (max-width: 760px) {
  /* the table scrolls sideways here, so keep the backbone label pinned at the left */
  .results .group th { text-align: left; padding-left: 0.75rem; }
  .results .group th span { position: sticky; left: 0.75rem; }
}
.table-note { color: var(--ink-2); font-size: 0.9rem; line-height: 1.5; margin: 0.7rem 0 0; }
.table-note b { color: var(--ink); }
.scroll-hint { display: none; font-size: 0.85rem; color: var(--ink-2); margin: 0.4rem 0 0; }
@media (max-width: 760px) { .scroll-hint { display: block; } }

/* ---------- case study ---------- */

.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 1.75rem; }
@media (max-width: 720px) { .cases { grid-template-columns: 1fr; } }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.3rem 1.35rem; }
.case p, .case li { font-size: 1rem; line-height: 1.55; }

table.mini { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 0.6rem 0 0.9rem; font-variant-numeric: lining-nums tabular-nums; }
.mini th, .mini td { padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mini thead th { font-weight: normal; color: var(--ink-2); border-bottom-color: var(--ink-2); }
.mini td.n { text-align: right; }
.mini td.n strong { color: var(--green-ink); }
.mini .venue { display: block; font-size: 0.85rem; color: var(--ink-2); font-style: italic; }

ol.conj { margin: 0.4rem 0 0.9rem; padding-left: 1.3rem; }
ol.conj li { margin-bottom: 0.5rem; }

/* ---------- case studies page ---------- */

.case-link { margin-bottom: 0; }
.eyebrow { color: var(--green-ink); font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem; }
.study-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.35rem 1rem; margin-bottom: 0.75rem; font-size: 0.9rem; color: var(--ink-2); }
.collection-note { font-size: 1rem; color: var(--ink-2); }
.collection-stats { font-size: 1.05rem; margin: -0.25rem 0 0; }
.collection-stats .severity { font-size: 0.95rem; font-weight: bold; }
.paper-list { display: grid; gap: 1rem; margin-top: 1.75rem; }
.paper-card { padding: 1.4rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.paper-card h2, .paper-card h4 { font-size: 1.4rem; font-weight: normal; font-variant: normal; letter-spacing: normal; line-height: 1.3; margin: 0 0 0.5rem; }
.paper-card h2::after, .paper-card h4::after { display: none; }
.paper-card h2 a, .paper-card h4 a { color: var(--ink); text-decoration: none; }
.paper-card h2 a:hover, .paper-card h4 a:hover { color: var(--green-ink); text-decoration: underline; }
.paper-card p { font-size: 1rem; color: var(--ink-2); margin: 0.7rem 0; }
.paper-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-top: 1.1rem; font-size: 0.95rem; }
.paper-links a { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 44px; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.paper-links svg { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.paper-link-primary { padding: 0.65rem 1rem; border: 1px solid var(--green-ink); border-radius: 6px; background: var(--green-ink); color: var(--bg); }
.paper-link-primary:hover { background: var(--ink); border-color: var(--ink); }
.paper-link-primary:focus-visible { border-radius: 6px; }
.paper-link-secondary { padding: 0.5rem 0.15rem; color: var(--ink-2); }
.paper-link-secondary:hover { color: var(--green-ink); }
.paper-link-secondary:hover span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.finding-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.severity { display: inline-block; border-radius: 4px; padding: 0.15rem 0.5rem; font-size: 0.85rem; line-height: 1.5; white-space: nowrap; }
.severity.major { color: var(--rose-ink); background: var(--rose-tint); }
.severity.minor { color: var(--green-ink); background: var(--green-tint); }
.review-status { color: var(--ink-2); font-size: 0.85rem; font-style: italic; }
.paper-intro { padding-top: 2rem; padding-bottom: 2.5rem; }
.back-link { margin-bottom: 1.75rem; }
.paper-intro h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: normal; line-height: 1.15; margin: 0 0 1rem; text-wrap: balance; }
.file-kind { font-size: 0.75em; }
.review-note { font-size: 0.92rem; color: var(--ink-2); }
.issue-group { border-top: 1px solid var(--line); }
.group-count { color: var(--ink-2); font-size: 0.65em; margin-left: 0.3rem; }
.issue-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 8px; padding: 1.5rem 1.75rem; margin-top: 1.5rem; }
.issue-card.major { border-top-color: var(--rose); }
.issue-masthead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; font-size: 0.85rem; }
.issue-masthead a { display: inline-flex; align-items: center; min-height: 44px; gap: 0.4rem; color: var(--ink-2); }
.issue-card h3 { font-size: 1.55rem; line-height: 1.25; font-weight: normal; }
.issue-card h4 { margin: 1.2rem 0 0.4rem; font-size: 0.95rem; font-weight: bold; color: var(--green-ink); }
.issue-card p { font-size: 1.05rem; overflow-wrap: anywhere; }
.issue-card .issue-location { margin: 0.5rem 0 1.4rem; font-size: 0.9rem; color: var(--ink-2); }
.issue-equations { overflow-x: auto; background: var(--surface-2); border-radius: 4px; padding: 0.9rem 1rem; margin: 1rem 0; font-size: 1.1rem; line-height: 1.8; }
.issue-equations > div { white-space: nowrap; }
.expert-comment { margin-top: 1.4rem; padding: 0.9rem 1.1rem; background: var(--green-tint); border-left: 3px solid var(--green); border-radius: 4px; }
.expert-comment h4 { margin: 0 0 0.35rem; }
.issue-card .expert-comment p { margin: 0; font-size: 1rem; line-height: 1.6; }
.issue-repair p { font-size: 0.95rem; line-height: 1.6; }
.issue-repair, .issue-context { margin-top: 1.25rem; font-size: 0.9rem; color: var(--ink-2); }
.issue-repair + .issue-context { margin-top: 0; }
.issue-repair { border-top: 1px solid var(--line); padding-top: 0.2rem; }
.issue-repair summary, .issue-context summary { list-style: none; display: flex; align-items: center; gap: 0.6rem; cursor: pointer; padding: 0.55rem 0; min-height: 44px; font-size: 0.95rem; font-weight: bold; color: var(--ink-2); }
.issue-repair summary::-webkit-details-marker, .issue-context summary::-webkit-details-marker { display: none; }
.issue-repair summary::before, .issue-context summary::before { content: ""; flex: none; width: 0.42rem; height: 0.42rem; margin: 0 0.15rem 0 0.1rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s ease; }
.issue-repair[open] > summary::before, .issue-context[open] > summary::before { transform: rotate(45deg); }
.issue-repair summary:hover, .issue-context summary:hover { color: var(--green-ink); }
.issue-context p { font-size: 0.9rem; margin: 0.6rem 0; }
.issue-context .source-location { font-size: 0.85rem; }
@media (max-width: 480px) {
  .paper-card, .issue-card { padding: 1.1rem; }
  .paper-intro { padding-top: 1rem; }
  .back-link { margin-bottom: 1.25rem; }
  .issue-card h3 { font-size: 1.35rem; }
}

/* ---------- bibtex ---------- */

.bib { position: relative; }
.bib pre {
  margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--mono); font-size: 0.85rem; line-height: 1.55; color: var(--ink);
}
.copy {
  position: absolute; top: 0.55rem; right: 0.55rem;
  font: inherit; font-size: 0.85rem; padding: 0.25rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); cursor: pointer;
}
.copy:hover { color: var(--ink); border-color: var(--ink-2); }

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

.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 1rem; font-size: 0.95rem; color: var(--ink-2); }
.site-footer .footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.footer-brand { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .mark { height: 1.6rem; width: auto; }

.global-footer { margin-top: 1.5rem; padding: 1.25rem 0 1.75rem; background: var(--surface-2); font-size: 0.85rem; color: var(--ink-2); }
.global-footer nav ul { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; list-style: none; margin: 0 0 0.6rem; padding: 0; }
.global-footer a { color: var(--ink-2); }
.global-footer a:hover { color: var(--ink); }
.global-footer p { margin: 0; }

.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- icons and pill links ---------- */

svg.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn svg.icon { fill: none; }
.icon.go, .icon.back { transition: transform 0.15s ease; }
a:hover > .icon.go { transform: translateX(3px); }
a:hover > .icon.back { transform: translateX(-3px); }
@media (prefers-reduced-motion: reduce) { .icon.go, .icon.back { transition: none; } }

.back-link, .pill-link {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px;
  padding: 0 1rem 0 0.8rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font-size: 0.95rem; text-decoration: none;
}
.back-link:hover, .pill-link:hover { color: var(--ink); border-color: var(--ink-2); text-decoration: none; }
.pill-link svg.gh { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.paper-meta { margin: 0 0 1.25rem; font-size: 0.98rem; color: var(--ink-2); }
.paper-meta .dot { margin: 0 0.5rem; }
.paper-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin: 0 0 1.25rem; }
.issue-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.issue-jump .severity { display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.95rem; border-radius: 999px; font-size: 0.95rem; }
.issue-jump a.severity { text-decoration: none; transition: background-color 0.15s ease; }
.issue-jump a.severity.major:hover { background: color-mix(in srgb, var(--rose) 22%, var(--surface)); }
.issue-jump a.severity.minor:hover { background: color-mix(in srgb, var(--green) 20%, var(--surface)); }
.issue-jump .severity.empty { opacity: 0.6; }
.pill-link.trail { padding: 0 0.85rem 0 1rem; }
.paper-intro .review-note.disclaimer { margin: 0; font-size: 0.88rem; }
.issue-masthead a.issue-link { text-decoration: none; }
.issue-masthead a.issue-link:hover { color: var(--green-ink); }

/* Quote the disputed passage separately from supporting references. */
.issue-passages { padding: 0; margin: 1.35rem 0 1.6rem; }
.issue-passage + .issue-passage { margin-top: 1.4rem; }
.issue-card .passage-location { font-size: 0.9rem; line-height: 1.55; color: var(--ink-2); margin: 0.4rem 0 0.65rem; }
.paper-quote { margin: 0; padding: 0.8rem 1rem; border-left: 3px solid var(--line); background: var(--bg); }
.issue-card .paper-quote p { margin: 0; font-size: 1rem; line-height: 1.65; white-space: pre-line; }
.issue-card .passage-explanation { margin: 0.65rem 0 0; font-size: 0.9rem; color: var(--ink-2); }
.issue-context ul { padding-left: 1.25rem; }
.issue-context li + li { margin-top: 1rem; }
.context-role { display: block; font-size: 0.75rem; font-family: system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.04em; }
