@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --paper: #f6f2e8;
  --card: #fffdf7;
  --ink: #1c1a16;
  --muted: #6e685b;
  --faint: #a49d8d;
  --line: #e3ddcd;
  --line-strong: #cfc8b5;
  --hover: #efeadc;
  --amber: #f0a830;
  --accent: #a85f08;
  --good: #3f7d4e;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 14px;
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #131210;
  --card: #1b1916;
  --ink: #f1ecdf;
  --muted: #a69f8f;
  --faint: #6f6a5e;
  --line: #2b2823;
  --line-strong: #3d3932;
  --hover: #23201c;
  --accent: #f0b24a;
  --good: #7fc08d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
main.wrap { flex: 1; padding-top: 56px; padding-bottom: 96px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.92em; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.link { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--accent); }

/* owl */
.owl-body, .owl-pupil, .owl-lid { fill: var(--ink); }
.owl-eye, .owl-beak { fill: var(--amber); }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 24px; letter-spacing: -0.01em; }
.brand .owl { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.nav-links a { padding: 6px 12px; border-radius: 999px; color: var(--muted); }
.nav-links a:hover, .nav-links a.on { color: var(--ink); }
.nav-links a.on { background: var(--hover); }
.icon-btn { margin-left: 8px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* type */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(44px, 6.4vw, 76px); line-height: 1.02; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
h2 { font-size: 34px; line-height: 1.1; }
h3 { font-size: 24px; line-height: 1.2; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 640px; margin: 20px 0 0; }

/* home */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: center; padding: 24px 0 72px; }
.hero .owl-big { width: 100%; max-width: 300px; justify-self: end; }
.cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 32px; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 500; }
.cta:hover { opacity: 0.88; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--ink); padding-top: 18px; margin: 0 0 24px; }
.bench-card { display: grid; grid-template-columns: 96px 1fr auto; gap: 28px; align-items: center; padding: 30px 32px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
a.bench-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.bench-no { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--accent); }
.bench-card p { margin: 6px 0 0; color: var(--muted); max-width: 620px; }
.bench-stats { display: flex; gap: 28px; text-align: right; }
.bench-stats b { display: block; font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1; }
.bench-stats span { font-size: 12px; color: var(--muted); }
.bench-card.ghost { grid-template-columns: 96px 1fr; background: transparent; border-style: dashed; margin-top: 14px; }
.bench-card.ghost .bench-no { color: var(--faint); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 80px; }
.principles p { color: var(--muted); margin: 10px 0 0; }
.principles .n { font-family: var(--mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 10px; }

/* benchmark page */
.crumb { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; margin-bottom: 22px; }
.crumb:hover { color: var(--ink); }
.b-head { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: end; }
.b-head h1 { font-size: clamp(40px, 5.4vw, 64px); }
.facts { border-top: 1px solid var(--ink); font-size: 13px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.tabs { display: flex; gap: 4px; margin: 48px 0 28px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 14px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--ink); font-weight: 500; }
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border: 1px solid var(--line-strong); border-left: 3px solid var(--amber); border-radius: 10px; background: var(--card); margin-bottom: 24px; font-size: 14px; }
.notice b { font-weight: 600; }
.notice .owl { width: 26px; height: 26px; flex: none; margin-top: 1px; }

/* tables */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 14px 18px; text-align: left; white-space: nowrap; }
thead th { font: 500 11px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); vertical-align: bottom; }
th.r, td.r { text-align: right; }
th.c, td.c { text-align: center; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover, th.sorted { color: var(--ink); }
th .arr { margin-left: 4px; opacity: 0; }
th.sorted .arr { opacity: 1; }
tbody tr { border-bottom: 1px solid var(--line); }
tbody tr:last-child { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--hover); }
tr.baseline td { color: var(--muted); }
tr.divider td { padding: 8px 18px; background: var(--paper); font: 500 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.rank { width: 52px; font-family: var(--serif); font-size: 22px; color: var(--faint); }
.rank.top { color: var(--accent); }
.t-name { font-weight: 550; }
.t-sub { font-size: 12.5px; color: var(--muted); }
.pill { display: inline-block; font: 500 11px var(--mono); letter-spacing: 0.02em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); vertical-align: 1px; }
.pill.wait { border-style: dashed; }
.pill.oss { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.bar-cell { min-width: 170px; }
.bar { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.bar i { display: block; height: 8px; border-radius: 2px; background: var(--ink); }
.bar.best i { background: var(--amber); }
.track { flex: 1; max-width: 110px; height: 8px; background: var(--hover); border-radius: 2px; overflow: hidden; }
.heat { text-align: center; font-family: var(--mono); font-size: 13px; }
.heat span { display: inline-block; min-width: 52px; padding: 5px 0; border-radius: 6px; }
.heat span.hot { color: #1c1a16; font-weight: 500; }
td.heat, th.heat-h { padding-left: 8px; padding-right: 8px; }
.dash { color: var(--faint); }
.yes { color: var(--good); font-weight: 600; }
.no { color: var(--faint); }
.wrap-cell { white-space: normal; min-width: 220px; max-width: 320px; font-size: 13px; color: var(--muted); }
.caption { font-size: 12.5px; color: var(--muted); margin: 12px 4px 0; }

/* scenario cards */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 28px; }
.sc { padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.sc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sc p { margin: 8px 0 12px; color: var(--muted); font-size: 14px; }
.sc q { display: block; font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.3; quotes: "“" "”"; }

/* prose */
.prose { max-width: 720px; }
.prose section { padding: 28px 0; border-top: 1px solid var(--line); }
.prose section:first-child { border-top: 0; padding-top: 0; }
.prose h3 { margin-bottom: 12px; }
.prose p, .prose li { color: var(--muted); }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
pre { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; overflow-x: auto; font: 13px/1.6 var(--mono); margin: 0 0 12px; }
code { font-family: var(--mono); font-size: 0.9em; }

/* tool page */
.t-grid { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; margin-top: 8px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.metric { padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.metric b { display: block; font-family: var(--serif); font-size: 32px; font-weight: 400; line-height: 1.1; margin-top: 4px; }
.metric span { font-size: 12.5px; color: var(--muted); }
.metric small { color: var(--muted); font-family: var(--sans); font-size: 12px; margin-left: 4px; }
.empty { padding: 36px; text-align: center; color: var(--muted); }

.footer { color: var(--faint); font-size: 12.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0 36px; border-top: 1px solid var(--line); }
.footer a:hover { color: var(--ink); }
.fade { animation: fade .3s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 860px) {
  .hero, .b-head, .t-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero .owl-big { max-width: 160px; justify-self: start; grid-row: 1; }
  .bench-card { grid-template-columns: 1fr; gap: 14px; padding: 24px; }
  .bench-card.ghost { grid-template-columns: 1fr; }
  .bench-stats { text-align: left; }
  .principles { grid-template-columns: 1fr; gap: 28px; margin-top: 56px; }
  .wrap { padding: 0 18px; }
  main.wrap { padding-top: 36px; }
}

table.dense th, table.dense td { padding: 12px 10px; }
table.dense th:first-child, table.dense td:first-child { padding-left: 18px; }
table.dense .wrap-sm { white-space: normal; max-width: 150px; font-size: 12px; }
table.dense .wrap-cell { min-width: 200px; max-width: 240px; font-size: 12.5px; }
