:root {
  --ink: #17182b;
  --muted: #65697a;
  --line: #e6e8f0;
  --paper: #ffffff;
  --soft: #f6f7fb;
  --violet: #6557ee;
  --indigo: #3349d7;
  --cyan: #1fc8d5;
  --orange: #ffbb62;
  --navy: #101334;
  --radius: 22px;
  --shadow: 0 18px 55px rgba(25, 27, 75, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.62; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.hero { position: relative; min-height: 900px; overflow: hidden; color: white; background: radial-gradient(circle at 78% 78%, rgba(26, 204, 210, .52), transparent 34%), radial-gradient(circle at 18% 12%, rgba(72, 99, 255, .58), transparent 38%), linear-gradient(135deg, #17183f 8%, #3938a4 52%, #5745a5 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 170px; background: linear-gradient(180deg, transparent, rgba(8, 12, 40, .32)); pointer-events: none; }
.hero-grid { position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom, black, transparent 80%); }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .42; }
.orb-one { width: 360px; height: 360px; right: -90px; top: 120px; background: #875be9; }
.orb-two { width: 260px; height: 260px; left: -90px; bottom: 70px; background: #15328f; }
.nav { position: relative; z-index: 4; height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.16); }
.brand { display: flex; gap: 11px; align-items: center; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #1f2368; background: white; }
.nav-links { display: flex; gap: 30px; font-size: 14px; color: rgba(255,255,255,.76); }
.nav-links a:hover { color: white; }
.nav-github { padding: 9px 15px; border: 1px solid rgba(255,255,255,.28); border-radius: 10px; font-size: 14px; }
.hero-content { position: relative; z-index: 2; padding-top: 68px; }
.eyebrows { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.eyebrows span { padding: 8px 14px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: rgba(255,255,255,.88); background: rgba(255,255,255,.06); font-size: 13px; backdrop-filter: blur(8px); }
.eyebrows span:first-child { color: #ffd18b; border-color: rgba(255,187,98,.62); }
.hero-kicker { margin: 0 0 5px; color: #b9ddff; font-size: 15px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.hero h1 { max-width: 1080px; margin: 0; font-size: clamp(64px, 7.7vw, 106px); line-height: 1; letter-spacing: -.065em; }
.hero h1 span { margin-left: .04em; color: var(--orange); }
.hero-subtitle { display: flex; flex-direction: column; max-width: 1100px; margin: 26px 0 16px; font-size: clamp(27px, 3.25vw, 44px); line-height: 1.18; letter-spacing: -.035em; }
.hero-subtitle strong { color: #ffd08a; }
.subtitle-tail { margin-top: 4px; color: rgba(255,255,255,.88); font-size: .86em; font-weight: 400; letter-spacing: -.025em; }
.hero-copy { max-width: 760px; color: rgba(255,255,255,.74); font-size: 17px; }
.authors { display: flex; flex-direction: column; gap: 3px; margin: 28px 0 30px; font-size: 14px; }
.authors strong { color: rgba(255,255,255,.94); }
.authors span, .authors small { color: rgba(255,255,255,.64); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 19px; border-radius: 12px; font-weight: 700; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-light { color: #202238; background: white; box-shadow: 0 10px 30px rgba(8,10,35,.2); }
.button-ghost { border: 1px solid rgba(255,255,255,.28); color: white; background: rgba(255,255,255,.05); }
.button-dark { color: white; background: var(--navy); }

.stats-wrap { position: relative; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -78px; }
.stat-card { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(21,26,72,.08); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.stat-card strong { color: var(--violet); font-size: 40px; letter-spacing: -.04em; }
.stat-card span { font-weight: 800; }
.stat-card small { margin-top: 4px; color: #8a8d99; }
.stat-accent { color: white; border: 0; background: linear-gradient(145deg, #5c5df6, #23bfda); }
.stat-accent strong, .stat-accent small { color: white; }
.stat-accent small { opacity: .72; }

.section { padding: 110px 0; scroll-margin-top: 20px; }
.section-tint { background: var(--soft); }
.section-heading { display: flex; align-items: baseline; gap: 14px; margin-bottom: 30px; }
.section-heading span { color: var(--violet); font-family: "DM Mono", monospace; font-weight: 500; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.045em; }
.section-heading.light span { color: #6de6e6; }
.section-heading.light h2 { color: white; }
.section-intro { max-width: 780px; margin: -14px 0 42px; color: var(--muted); font-size: 18px; }
.light-copy { color: rgba(255,255,255,.66); }
.lead { font-size: 22px; line-height: 1.48; letter-spacing: -.015em; }
.overview-grid { display: grid; grid-template-columns: .9fr 1.25fr; gap: 54px; align-items: center; }
.feature-list { margin: 28px 0 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding: 13px 0 13px 27px; border-bottom: 1px solid var(--line); }
.feature-list li::before { content: "→"; position: absolute; left: 0; color: var(--violet); font-weight: 800; }
.figure-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 16px 45px rgba(27,31,81,.08); }
.figure-card img { width: 100%; }
.figure-card figcaption { padding: 14px 18px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.overview-figure img { aspect-ratio: 1772/384; object-fit: contain; padding: 24px; }

.task-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.task-card { padding: 26px 23px; border: 1px solid var(--line); border-radius: 18px; background: white; transition: transform .2s, box-shadow .2s; }
.task-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.task-card > span { color: #8a8d99; font: 500 11px "DM Mono", monospace; text-transform: uppercase; }
.task-card h3 { min-height: 52px; margin: 15px 0 8px; font-size: 19px; line-height: 1.35; }
.task-card p { margin: 0; color: var(--muted); font-size: 14px; }
.task-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 14px; color: white; font-weight: 800; }
.task-icon.q { background: linear-gradient(145deg, #6857ed, #474bd7); }
.task-icon.a { background: linear-gradient(145deg, #13b8c9, #2b8fdb); }

.distribution-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.distribution-grid .figure-card img { aspect-ratio: 1; object-fit: contain; padding: 16px; }
.quality-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 34px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.quality-strip div { display: flex; flex-direction: column; padding: 20px; background: white; }
.quality-strip strong { color: var(--violet); font-size: 18px; }
.quality-strip span { color: var(--muted); font-size: 13px; }

.explorer-section { color: white; background: linear-gradient(145deg, #15183c, #292667 56%, #124c63); }
.explorer { overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 22px; background: rgba(255,255,255,.06); box-shadow: 0 24px 70px rgba(0,0,0,.24); backdrop-filter: blur(12px); }
.tabs { display: flex; gap: 5px; padding: 9px; border-bottom: 1px solid rgba(255,255,255,.13); }
.tab, .result-tab { border: 0; border-radius: 10px; color: rgba(255,255,255,.65); background: transparent; cursor: pointer; padding: 11px 16px; font-weight: 700; }
.tab.active { color: #20213d; background: white; }
.sample-panel { padding: 40px; }
.sample-panel h3 { max-width: 800px; margin: 18px 0 10px; font-size: 28px; }
.sample-panel > p { max-width: 890px; color: rgba(255,255,255,.72); }
.sample-meta { display: flex; gap: 8px; }
.badge { padding: 4px 9px; border-radius: 999px; font: 500 11px "DM Mono", monospace; }
.badge.simple { color: #aeeceb; background: rgba(31,200,213,.15); }
.badge.challenging { color: #d8c8ff; background: rgba(132,103,243,.18); }
.badge.error { color: #ffd69b; background: rgba(255,187,98,.14); }
.diagnosis { display: grid; grid-template-columns: 180px 1fr; gap: 18px; margin-top: 28px; padding: 20px; border-left: 3px solid #ffbe64; border-radius: 0 12px 12px 0; background: rgba(0,0,0,.14); }
.diagnosis b { color: #ffd08a; }
.diagnosis span { color: rgba(255,255,255,.78); }
.code-panel pre { margin: 0; overflow-x: auto; color: #b9f6ef; font: 14px/1.8 "DM Mono", monospace; }

.taxonomy-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.taxonomy-column { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; }
.taxonomy-title { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; color: white; }
.question-taxonomy .taxonomy-title { background: linear-gradient(130deg, #544ce6, #7b60ee); }
.answer-taxonomy .taxonomy-title { background: linear-gradient(130deg, #149cbf, #35c9c5); }
.taxonomy-title span { font-size: 20px; font-weight: 800; }
.taxonomy-title strong { font: 500 12px "DM Mono", monospace; }
.taxonomy-column article { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 17px 24px; border-bottom: 1px solid var(--line); }
.taxonomy-column article p { margin: 0; color: var(--muted); font-size: 14px; }
.taxonomy-note { margin: 18px; padding: 18px; border-radius: 12px; color: #286c75; background: #eafafb; font-size: 13px; }

.results-section { color: white; background: linear-gradient(150deg, #3734b2, #4b3f9f 56%, #207d9a); }
.results-card { padding: 22px; border-radius: 22px; color: var(--ink); background: white; box-shadow: 0 24px 80px rgba(11,12,51,.25); }
.result-tabs { justify-content: center; border: 0; }
.result-tab { color: #727586; }
.result-tab.active { color: white; background: var(--violet); }
.chart { display: grid; gap: 14px; margin: 24px auto; max-width: 850px; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 65px; align-items: center; gap: 14px; }
.bar-row > span { font-size: 13px; text-align: right; }
.bar-track { height: 26px; overflow: hidden; border-radius: 7px; background: #f0f1f7; }
.bar { height: 100%; width: 0; border-radius: inherit; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.bar.closed { background: linear-gradient(90deg, #584ee8, #8571f0); }
.bar.open { background: linear-gradient(90deg, #12a5bf, #24c8c8); }
.bar-row b { color: #333752; font-family: "DM Mono", monospace; }
.chart-legend { display: flex; align-items: center; justify-content: center; gap: 22px; color: var(--muted); font-size: 12px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.chart-legend i.closed { background: var(--violet); }
.chart-legend i.open { background: var(--cyan); }
.chart-legend small { margin-left: auto; }
.finding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.finding-grid article { padding: 24px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.08); }
.finding-grid strong { color: #7af0eb; font-size: 28px; }
.finding-grid p { margin: 8px 0 0; color: rgba(255,255,255,.72); font-size: 14px; }

.correction-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: center; }
.takeaway { display: flex; gap: 13px; margin-top: 28px; padding: 18px; border-radius: 14px; color: #41388f; background: #f0efff; }
.takeaway span { color: var(--violet); font-size: 24px; }
.takeaway p { margin: 0; }
.gain-card { padding: 28px; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.gain-title { display: flex; justify-content: space-between; margin-bottom: 14px; }
.gain-title span { font-weight: 800; }
.gain-title small, .gain-card > small { color: var(--muted); }
.gain-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-top: 1px solid var(--line); }
.gain-row span { color: var(--muted); }
.gain-row b { min-width: 60px; color: #168e9c; font: 700 18px "DM Mono", monospace; text-align: right; }

.access-section { background: var(--soft); }
.access-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.access-grid a { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: white; transition: transform .2s, border-color .2s; }
.access-grid a:hover { transform: translateY(-4px); border-color: #a9a5ed; }
.access-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: white; background: linear-gradient(145deg, var(--violet), var(--cyan)); }
.access-grid h3 { margin: 18px 0 7px; }
.access-grid p { min-height: 68px; color: var(--muted); font-size: 14px; }
.access-grid b { color: var(--violet); font-size: 13px; }

.paper-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 26px; }
.paper-card, .bibtex-card { padding: 30px; border-radius: 20px; }
.paper-card { border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.paper-label { color: var(--violet); font: 500 12px "DM Mono", monospace; text-transform: uppercase; }
.paper-card h3 { margin: 15px 0; font-size: 25px; line-height: 1.35; }
.paper-card p { color: var(--muted); font-size: 14px; }
.bibtex-card { overflow: hidden; color: #e9edff; background: #171a36; }
.bibtex-card > div { display: flex; justify-content: space-between; align-items: center; }
.bibtex-card button { padding: 6px 12px; border: 1px solid rgba(255,255,255,.23); border-radius: 8px; color: white; background: transparent; cursor: pointer; }
.bibtex-card pre { overflow-x: auto; margin: 20px 0 0; color: #b8e8e8; font: 12px/1.65 "DM Mono", monospace; white-space: pre-wrap; }

footer { color: rgba(255,255,255,.72); background: #101225; }
footer .shell { min-height: 130px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 28px; }
footer div > div { display: flex; flex-direction: column; }
footer b { color: white; }
footer span, footer p { font-size: 12px; }
footer p { grid-column: 1 / -1; margin: -35px 0 0; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { min-height: 920px; }
  .hero-content { padding-top: 58px; }
  .stats-wrap { grid-template-columns: 1fr 1fr; margin-top: -70px; }
  .overview-grid, .correction-grid, .paper-grid { grid-template-columns: 1fr; }
  .task-grid { grid-template-columns: 1fr 1fr; }
  .quality-strip { grid-template-columns: 1fr 1fr; }
  .taxonomy-column article { grid-template-columns: 1fr; gap: 3px; }
  .bar-row { grid-template-columns: 145px 1fr 55px; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 26px, 1160px); }
  .hero { min-height: 970px; }
  .nav { height: 70px; }
  .nav-github { display: none; }
  .hero h1 { font-size: 50px; letter-spacing: -.055em; }
  .hero-subtitle { font-size: 27px; }
  .hero-copy { font-size: 15px; }
  .authors { font-size: 12px; }
  .button { width: calc(50% - 6px); padding: 0 10px; font-size: 13px; }
  .stats-wrap { margin-top: -55px; gap: 10px; }
  .stat-card { min-height: 135px; text-align: center; }
  .stat-card strong { font-size: 30px; }
  .stat-card small { padding: 0 7px; font-size: 11px; }
  .section { padding: 78px 0; }
  .task-grid, .distribution-grid, .taxonomy-layout, .finding-grid, .access-grid { grid-template-columns: 1fr; }
  .quality-strip { grid-template-columns: 1fr; }
  .sample-panel { padding: 26px 20px; }
  .tabs { overflow-x: auto; }
  .tab, .result-tab { white-space: nowrap; }
  .diagnosis { grid-template-columns: 1fr; gap: 5px; }
  .results-card { padding: 12px; }
  .result-tabs { justify-content: flex-start; overflow-x: auto; }
  .bar-row { grid-template-columns: 100px 1fr 45px; gap: 8px; }
  .bar-row > span { font-size: 10px; }
  .bar-track { height: 20px; }
  .chart-legend { flex-wrap: wrap; gap: 10px; }
  .chart-legend small { width: 100%; margin: 0; text-align: center; }
  footer .shell { grid-template-columns: 1fr; padding: 28px 0; }
  footer p { grid-column: auto; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
