:root {
  --ink: #0f172a;
  --text: #334155;
  --muted: #5b677a;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --lilac: #f6f5ff;
  --line: #e2e8f0;
  --edge: #cbd5e1;
  --container: 1000px;
  --wide: 1044px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; color: var(--text); background: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.65; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #818cf8; outline-offset: 4px; }
.container { max-width: var(--container); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wide-container { width: calc(100% - 48px); max-width: var(--wide); margin-left: auto; margin-right: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 50; padding: 10px 18px; border-radius: 8px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 10px; }
.site-nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; max-width: var(--wide); min-height: 68px; margin: 0 auto; padding: 10px 24px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 750; letter-spacing: .12em; text-decoration: none; }
.brand img { display: block; width: 36px; height: 36px; }
.nav-links { display: flex; align-items: center; gap: 24px; min-width: 0; overflow-x: auto; white-space: nowrap; }
.nav-links a { padding: 10px 0; color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: none; }
.nav-links a:hover { color: var(--primary); }
.hero-inner { max-width: 1140px; margin: 0 auto; padding: 68px 24px 44px; text-align: center; }
h1 { margin: 0 auto; color: var(--ink); font-size: clamp(1.9rem, 3.15vw, 2.75rem); line-height: 1.23; letter-spacing: -.035em; font-weight: 750; text-wrap: balance; }
h1 span { display: block; }
.authors { margin: 26px 0 4px; color: var(--text); font-size: 1.125rem; line-height: 1.8; }
.affiliation { margin: 0; color: var(--muted); font-size: .9375rem; }
.hero-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 19px; border: 1px solid var(--edge); border-radius: 999px; color: var(--text); background: #fff; font: inherit; font-size: .875rem; font-weight: 550; text-decoration: none; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.btn:hover:not(:disabled) { border-color: var(--primary); background: var(--lilac); color: var(--primary-dark); }
.btn:disabled { color: var(--muted); border-color: var(--line); background: #f8fafc; cursor: not-allowed; }
.tldr-box { padding: 24px 30px; border: 1px solid #c7c3fa; border-radius: 14px; background: var(--lilac); }
.tldr-text { margin: 0; color: var(--text); font-size: 1.0625rem; font-weight: 500; line-height: 1.7; text-align: center; text-wrap: pretty; }
.figure-frame { margin: 30px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.figure-link { display: block; position: relative; border-radius: 4px; cursor: zoom-in; }
.figure-link img { display: block; width: 100%; }
.zoom-label { position: absolute; right: 7px; bottom: 7px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: rgba(255,255,255,.95); font-size: .75rem; line-height: 1.5; opacity: 0; transition: opacity .15s; }
.figure-link:hover .zoom-label, .figure-link:focus-visible .zoom-label { opacity: 1; }
.figure-frame figcaption { padding: 12px 4px 2px; color: var(--muted); font-size: .875rem; line-height: 1.6; text-align: left; }
.teaser-frame { margin: 28px auto 0; max-width: 900px; }
.abstract-band { margin-top: 64px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--lilac); }
.abstract-inner { padding-top: 48px; padding-bottom: 48px; }
.abstract-inner p { margin: 24px 0 0; font-size: 1.0625rem; line-height: 1.85; }
.section { padding-top: 64px; padding-bottom: 64px; border-bottom: 1px solid var(--line); }
.section-title { margin: 0 0 24px; color: var(--primary-dark); font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -.025em; font-weight: 700; }
.section-intro { margin: 0; color: var(--text); font-size: 1rem; line-height: 1.8; }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px; margin-top: 32px; }
.method-item { padding-top: 20px; border-top: 2px solid #e0ddff; }
.item-heading { display: flex; align-items: center; gap: 10px; }
.item-number { color: var(--primary); font-size: .875rem; font-weight: 700; }
.method-item h3, .result-copy h3 { margin: 0; color: var(--ink); font-size: 1.125rem; line-height: 1.4; }
.method-item p, .result-copy p { margin: 12px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.results-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; margin-top: 36px; }
.results-grid .figure-frame { margin: 0; }
.result-copy h3 { font-size: 1.35rem; }
.table-card { margin-top: 36px; padding: 22px 20px 16px; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap { overflow-x: auto; }
.table-title { margin: 0 0 16px; color: var(--ink); font-size: 1rem; font-weight: 650; }
.table-hint { display: none; margin: -4px 0 14px; color: var(--muted); font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
table { width: 100%; border-collapse: collapse; text-align: right; font-size: .875rem; font-variant-numeric: tabular-nums; }
caption { margin-bottom: 16px; color: var(--ink); font-size: 1rem; font-weight: 650; text-align: left; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { color: var(--muted); background: #f8fafc; font-weight: 600; }
thead th:first-child, tbody th { text-align: left; }
tbody th { color: var(--text); font-weight: 550; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.table-note { min-width: 250px; margin: 16px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.citation-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.citation-heading .section-title { margin: 0; }
.citation-note { margin: 18px 0; color: var(--muted); font-size: .875rem; }
pre { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; color: var(--text); background: #f8fafc; font: .875rem/1.75 "SFMono-Regular", Consolas, monospace; }
footer { display: flex; justify-content: space-between; gap: 16px; max-width: var(--container); margin: 0 auto; padding: 26px 24px 36px; color: var(--muted); font-size: .875rem; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: calc(100vw - 40px); z-index: 50; padding: 12px 18px; border-radius: 9px; color: #fff; background: var(--ink); font-size: .875rem; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.image-dialog { width: min(1440px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: white; }
.image-dialog::backdrop { background: rgba(15,23,42,.78); }
.dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; font-size: .875rem; font-weight: 600; }
.expanded-figure { display: block; width: 100%; height: auto; }
.expanded-caption { margin: 18px 0 0; font-size: .875rem; }
body:has(.image-dialog[open]) { overflow: hidden; }
@media (max-width: 820px) {
  .nav-inner { gap: 20px; }
  .nav-links { gap: 16px; }
  .hero-inner { padding-top: 48px; }
  .method-grid { grid-template-columns: 1fr; gap: 20px; }
  .results-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 132px; }
  .container { padding-left: 20px; padding-right: 20px; }
  .wide-container { width: calc(100% - 40px); }
  .nav-inner { flex-wrap: wrap; gap: 2px; padding: 10px 20px 4px; }
  .nav-links { flex-basis: 100%; justify-content: space-between; gap: 8px; }
  .nav-links a { padding: 9px 0; }
  .hero-inner { padding: 38px 20px 32px; }
  h1 { font-size: clamp(1.65rem,6.4vw,2.15rem); line-height: 1.3; }
  .authors { margin-top: 22px; font-size: 1rem; }
  .hero-buttons { gap: 9px; margin-top: 24px; }
  .btn { padding-left: 15px; padding-right: 15px; }
  .tldr-box { padding: 20px; }
  .tldr-text { font-size: 1rem; }
  .figure-frame { padding: 8px; }
  .figure-frame figcaption { padding: 10px 2px 2px; }
  .zoom-label { opacity: 1; font-size: .75rem; }
  .abstract-band { margin-top: 44px; }
  .abstract-inner { padding-top: 38px; padding-bottom: 38px; }
  .abstract-inner p { font-size: 1rem; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .table-card { padding: 16px 12px; }
  .table-hint { display: block; }
  .citation-heading { gap: 12px; }
  .image-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 12px; }
  footer { flex-direction: column; gap: 4px; padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
