:root {
  --slate: #4a5c66;
  --water: #3d7a8c;
  --paper: #e8ece8;
  --ink: #1c2a30;
  --mute: #5a6a70;
  --warn: #b45a2a;
  --line: rgba(28, 42, 48, 0.12);
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 16px; line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.app-link { color: var(--water); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
code { font-family: var(--mono); background: rgba(61, 122, 140, 0.1); padding: 0 0.3em; }
.grain { pointer-events: none; position: fixed; inset: 0; z-index: 5; opacity: 0.1; background-image: url("images/texture.webp"); mix-blend-mode: multiply; background-size: 480px auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; z-index: 60; background: #fff; padding: 8px; }
.nav { position: sticky; top: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 22px; background: rgba(232, 236, 232, 0.94); border-bottom: 3px solid var(--water); }
.brand { font-weight: 700; }
.brand small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--mute); font-weight: 400; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--water); color: var(--water); padding: 6px 10px; }
.nav-links { display: flex; gap: 14px; font-size: 13px; }
.nav-links a { color: var(--mute); }
.nav-links a.is-active, .nav-links a:hover { color: var(--water); }
.nav-links a.live { background: var(--water); color: #fff; padding: 6px 10px; }
.hero { position: relative; min-height: 90vh; display: grid; align-items: end; color: #eef4f4; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,42,48,0.15), rgba(28,42,48,0.88)); }
.hero-inner { position: relative; z-index: 1; padding: 8vh 7vw 8vh; max-width: 860px; }
.kicker, .vlabel { font-family: var(--mono); letter-spacing: 0.14em; font-size: 11px; color: #9ec4cc; margin: 0 0 10px; }
.vlabel { color: var(--water); }
h1, h2, h3 { margin: 0 0 14px; font-weight: 700; line-height: 1.12; }
h1 { font-size: clamp(38px, 7vw, 78px); }
h2 { font-size: clamp(24px, 3.2vw, 36px); }
h3 { font-size: 19px; }
.lead { font-size: 17px; max-width: 46em; }
.gauge { margin: 18px 0 16px; max-width: 280px; }
.gauge-track { height: 140px; width: 36px; border: 2px solid #c5d4d6; position: relative; background: rgba(255,255,255,0.08); }
.gauge-track b { position: absolute; left: 0; right: 0; bottom: 0; height: 80%; background: var(--water); }
.gauge p { font-family: var(--mono); font-size: 13px; margin: 8px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; padding: 10px 16px; border: 1px solid currentColor; font-size: 14px; }
.btn-fill { background: var(--water); color: #fff; border-color: var(--water); }
.btn-ghost { background: transparent; color: inherit; }
.wrap { width: min(1080px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0; }
.section-head { display: grid; grid-template-columns: 140px 1fr; gap: 20px; margin-bottom: 32px; }
.section-head p:last-child { color: var(--mute); margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card, .bench, .io-grid > div { background: #f4f6f4; border: 1px solid var(--line); padding: 18px; }
.card { min-height: 200px; }
.stamp { display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--water); border: 1px solid var(--water); padding: 2px 6px; margin-bottom: 8px; }
.card ul, .io-grid ul, .rule-list { margin: 0; padding-left: 1.1em; }
.alt { background: linear-gradient(180deg, #d5e0e2, var(--paper)); }
.step { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; margin-bottom: 56px; }
.step.reverse { direction: rtl; }
.step.reverse > * { direction: ltr; }
.num { font-family: var(--mono); color: var(--water); display: block; margin-bottom: 6px; }
figure { margin: 0; }
figure img { width: 100%; height: 300px; object-fit: cover; }
figcaption { margin-top: 8px; font-size: 13px; color: var(--mute); }
.bench-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bench p { margin: 0; color: var(--mute); font-size: 14px; }
.rule-list { font-size: 17px; max-width: 46em; }
.io-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
footer { background: #243238; color: #c5d0d2; }
.footer-inner { padding: 24px 0; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
footer .app-link { color: #9ec4cc; }
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; margin-left: auto; position: relative; z-index: 60; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 12px 16px; background: var(--paper); z-index: 55; }
  .nav-links.open { display: flex; }
  .section-head, .grid-3, .step, .step.reverse, .io-grid, .bench-grid { grid-template-columns: 1fr; direction: ltr; }
  .footer-inner { flex-direction: column; }
  h1 { font-size: 36px; }
  figure img { height: 200px; }
  .wrap { width: min(1080px, calc(100% - 28px)); padding: 48px 0; }
}
