:root {
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #5f6368;
  --accent: #b02d3a;
  --accent-soft: #fcdee0;
  --line: #e3e3e6;
  --row-alt: #fafafb;
  --code-bg: #f5f5f7;
  --btn-bg: #da291c;
  --btn-fg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141416;
    --fg: #ececee;
    --muted: #a1a1a8;
    --accent: #f07a86;
    --accent-soft: #3a1d21;
    --line: #2c2c31;
    --row-alt: #19191c;
    --code-bg: #1c1c20;
    --btn-bg: #da291c;
    --btn-fg: #ffffff;
  }
}
:root[data-theme="dark"] {
  --bg: #141416;
  --fg: #ececee;
  --muted: #a1a1a8;
  --accent: #f07a86;
  --accent-soft: #3a1d21;
  --line: #2c2c31;
  --row-alt: #19191c;
  --code-bg: #1c1c20;
  --btn-bg: #da291c;
  --btn-fg: #ffffff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
section.wrap { margin-top: 48px; }
img { max-width: 100%; height: auto; display: block; margin: 0 auto; background: #fff; border-radius: 6px; }

.hero { padding: 56px 0 8px; text-align: center; }
.title { font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.25; margin: 0 0 20px; font-weight: 700; }
.brand { color: var(--accent); }
.authors, .affils { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 8px 0; }
.authors { font-size: 1.1rem; }
.affils, .notes { color: var(--muted); font-size: 0.95rem; }
.notes { margin: 6px 0 0; }
sup { font-size: 0.7em; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 24px 0 0; }
.btn {
  display: inline-block; padding: 8px 20px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.btn:hover { background: #b8221a; }

h2 { font-size: 1.6rem; text-align: center; margin: 0 0 16px; }
.abstract { text-align: justify; hyphens: auto; }
.caption { color: var(--muted); font-size: 0.92rem; text-align: center; margin-top: 10px; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--row-alt); font-weight: 600; }
tr.group td { background: var(--row-alt); color: var(--muted); font-style: italic; text-align: left; }
tr.ours td { background: var(--accent-soft); }
td.tbd, .tbd-key { color: var(--accent); font-weight: 700; letter-spacing: 0.04em; }

.bibtex { background: var(--code-bg); border-radius: 8px; padding: 16px; overflow-x: auto; font-size: 0.85rem; }
.footer { color: var(--muted); font-size: 0.85rem; text-align: center; padding: 48px 16px; }

/* figures, cases, table rows */
figure { margin: 0; }
figure img { border: 1px solid var(--line); }
figcaption { color: var(--muted); font-size: 0.92rem; text-align: center; margin-top: 10px; }
.teaser { margin-top: 32px; }
.lead { text-align: center; color: var(--muted); margin: -4px 0 20px; }
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.cases .page img { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
@media (max-width: 640px) { .cases { grid-template-columns: 1fr; } }
tr.sep td { border-top: 2px solid var(--line); }
tr.delta td { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.82rem; }
.table-scroll:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
b { font-weight: 700; }
/* keep the model name visible while the table scrolls sideways on phones */
th:first-child, td:first-child { position: sticky; left: 0; background: var(--bg); z-index: 1; }
thead th:first-child { background: var(--row-alt); }
tr.group td { position: static; }

/* logo badge: the artwork has a white background, so it sits on a white disc in both themes */
.logo { display: inline-block; margin-bottom: 14px; }
.logo img {
  width: 96px; height: 96px; border-radius: 50%; background: #fff;
  border: 1px solid var(--line); padding: 6px; box-sizing: border-box;
}
@media (max-width: 640px) { .logo img { width: 76px; height: 76px; } }

/* release status */
.btn small { font-weight: 500; opacity: 0.75; font-size: 0.78em; margin-left: 4px; }
.btn.soon { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: default; }
.btn.soon:hover { opacity: 1; }
.release-note { color: var(--muted); font-size: 0.92rem; margin: 14px 0 0; }
.release-note a { color: var(--accent); }
.highlights { margin: 0; padding-left: 1.2em; }
.highlights li { margin: 0 0 10px; }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:hover { background: var(--btn-bg); }

/* light motion: fade-in on scroll, gentle hover zoom on figures */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
figure img { transition: transform .35s ease, box-shadow .35s ease; }
figure:hover img { transform: scale(1.015); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12); }
.btn { transition: background-color .15s ease, transform .15s ease; }
.btn:not([aria-disabled="true"]):hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  figure img, .btn { transition: none; }
  figure:hover img, .btn:hover { transform: none; }
}
.authors .row-break { flex-basis: 100%; height: 0; }

/* report examples: tabs + page carousel */
.reports { margin-top: 8px; }
.report-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.report-tabs [role="tab"] {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid #da291c; background: transparent; color: #da291c;
  transition: background-color .15s ease, color .15s ease;
}
.report-tabs [role="tab"][aria-selected="true"] { background: #da291c; color: #fff; }
.report-tabs [role="tab"]:hover { background: rgba(218, 41, 28, 0.08); }
.report-tabs [role="tab"][aria-selected="true"]:hover { background: #b8221a; }
:root[data-theme="dark"] .report-tabs [role="tab"]:not([aria-selected="true"]) { color: #f08a80; border-color: #f08a80; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .report-tabs [role="tab"]:not([aria-selected="true"]) { color: #f08a80; border-color: #f08a80; }
}

.report-viewer { position: relative; outline: none; border-radius: 10px; }
.report-viewer:focus-visible { box-shadow: 0 0 0 2px #da291c; }
.report-viewer .viewport {
  overflow: hidden; height: min(74vh, 900px); border-radius: 10px;
  background: var(--row-alt); border: 1px solid var(--line);
}
.report-viewer .track { display: flex; height: 100%; transition: transform .45s ease; }
.report-viewer .slide {
  flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 14px; box-sizing: border-box;
}
.report-viewer .slide a { display: flex; height: 100%; max-width: 100%; align-items: center; justify-content: center; cursor: zoom-in; }
.report-viewer .slide img {
  max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain;
  background: #fff; border-radius: 4px; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12); margin: 0;
}
.report-viewer .nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: #da291c; color: #fff; font-size: 28px; line-height: 40px; padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); transition: background-color .15s ease, opacity .15s ease;
}
.report-viewer .nav:hover { background: #b8221a; }
.report-viewer .nav:disabled { opacity: 0.3; cursor: default; background: #da291c; }
.report-viewer .prev { left: 10px; }
.report-viewer .next { right: 10px; }

.report-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin-top: 12px; }
.report-meta .counter { font-weight: 700; color: #da291c; font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: center; }
.report-meta .dots { display: flex; gap: 6px; }
.report-meta .dot {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: var(--line); transition: background-color .15s ease, transform .15s ease;
}
.report-meta .dot[aria-current="true"] { background: #da291c; transform: scale(1.25); }
.report-meta .hint { color: var(--muted); font-size: 0.82rem; }

@media (max-width: 640px) {
  .report-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .report-tabs [role="tab"] { padding: 7px 8px; font-size: 0.8rem; }
  .report-viewer .viewport { height: min(70vh, calc((100vw - 32px) * 1.36)); }
  .report-viewer .nav { opacity: 0.85; }
  .report-viewer .nav:disabled { opacity: 0.25; }
  .report-viewer .slide { padding: 8px; }
  .report-viewer .nav { width: 36px; height: 36px; font-size: 24px; line-height: 32px; }
  .report-viewer .prev { left: 4px; }
  .report-viewer .next { right: 4px; }
  .report-meta .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .report-viewer .track, .report-meta .dot, .report-tabs [role="tab"] { transition: none; }
}
