:root {
  --lime: #d8d2c4;
  --paper: #f3eee4;
  --ink: #1c2420;
  --moss: #3d5a45;
  --cinnabar: #a33a32;
  --mute: #5c675e;
  --line: rgba(28, 36, 32, 0.14);
  --serif: "Noto Serif SC", serif;
  --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.75; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.app-link { color: var(--cinnabar); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
code { font-family: var(--mono); background: rgba(61, 90, 69, 0.08); padding: 0 0.3em; }
.grain { pointer-events: none; position: fixed; inset: 0; z-index: 40; opacity: 0.16; 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: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 22px; background: rgba(243, 238, 228, 0.92); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-weight: 700; }
.brand small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--mute); font-weight: 400; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--moss); color: var(--moss); 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(--moss); }
.nav-links a.live { background: var(--moss); color: var(--paper); padding: 6px 10px; }
.hero { position: relative; min-height: 92vh; display: grid; align-items: end; color: var(--paper); 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,36,32,0.15), rgba(28,36,32,0.88)); }
.hero-inner { position: relative; z-index: 1; padding: 8vh 7vw 8vh; max-width: 880px; }
.kicker, .vlabel { font-family: var(--mono); letter-spacing: 0.16em; font-size: 11px; color: #c5d4c4; margin: 0 0 10px; }
.vlabel { color: var(--moss); }
h1, h2, h3 { font-family: var(--serif); margin: 0 0 14px; line-height: 1.15; }
h1 { font-size: clamp(38px, 7vw, 80px); }
h2 { font-size: clamp(24px, 3.3vw, 38px); }
h3 { font-size: 20px; }
.lead { font-size: 17px; max-width: 46em; }
.grid-demo { display: grid; grid-template-columns: repeat(8, 18px); gap: 4px; margin: 18px 0 8px; }
.grid-demo i { width: 18px; height: 18px; display: block; background: #c5cdc4; }
.grid-demo i.occ { background: #2a3d34; }
.grid-demo i.bad { background: var(--cinnabar); }
.grid-demo i.now { outline: 2px solid #f3eee4; }
.grid-note { font-family: var(--mono); font-size: 13px; margin: 0 0 16px; }
.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(--moss); color: var(--paper); border-color: var(--moss); }
.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: #faf6ee; border: 1px solid var(--line); padding: 18px; }
.card { min-height: 200px; }
.stamp { display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--cinnabar); border: 1px solid var(--cinnabar); padding: 2px 6px; margin-bottom: 8px; }
.card ul, .io-grid ul, .rule-list { margin: 0; padding-left: 1.1em; }
.alt { background: linear-gradient(180deg, #e4e0d4, 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(--moss); 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: #24332c; color: #d8d2c4; }
.footer-inner { padding: 24px 0; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
footer .app-link { color: #e8c4b8; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 12px 16px; background: var(--paper); }
  .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; }
}
