:root {
  --paper: #f3f4f6;
  --ink: #1e2937;
  --blue: #1f5ea8;
  --amber: #d97706;
  --ok: #15803d;
  --display: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 64px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--display); font-size: 16px; line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.app-link { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
code { font-family: var(--mono); background: #e5e7eb; padding: 0.05em 0.35em; }
.frost { pointer-events: none; position: fixed; inset: 0; z-index: 5; opacity: 0.2; background-image: url("images/texture.webp"); background-size: 420px auto; mix-blend-mode: multiply; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; z-index: 80; background: var(--amber); padding: 8px; }
.glass-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; min-height: 58px; background: rgba(255,255,255,0.92); border-bottom: 1px solid #d1d5db; }
.brand { font-weight: 700; }
.brand small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--blue); }
.desk-links { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 14px; }
.desk-links a.is-active { color: var(--blue); }
.desk-links .live { background: var(--blue); color: #fff; padding: 6px 12px; font-weight: 700; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--blue); color: var(--blue); padding: 6px 12px; }
.hero { position: relative; }
.hero > img { width: 100%; height: 78vh; object-fit: cover; }
.slip { position: absolute; left: 6vw; bottom: 24px; max-width: 560px; background: #fff; padding: 28px; border: 1px solid #e5e7eb; box-shadow: 0 12px 30px rgba(0,0,0,0.08); }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--blue); margin: 0 0 8px; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: clamp(32px, 5vw, 52px); }
h1 em { font-style: normal; color: var(--amber); }
h2 { font-size: clamp(24px, 3vw, 36px); }
.quiet { color: #4b5563; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn { display: inline-block; padding: 10px 16px; border: 1px solid var(--blue); font-weight: 700; }
.btn.fill { background: var(--blue); color: #fff; }
.btn.ghost { background: transparent; }
.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; }
.paper { background: #fff; }
.three, .four, .io { display: grid; gap: 16px; }
.three { grid-template-columns: repeat(3, 1fr); }
.four { grid-template-columns: repeat(4, 1fr); }
.three article, .four article, .io > div { background: #f9fafb; border: 1px solid #e5e7eb; padding: 18px; }
.three .warn { border-color: var(--amber); }
ul { margin: 0; padding-left: 1.1em; }
li + li { margin-top: 6px; }
.row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; list-style: none; padding: 0; margin: 0 0 36px; }
.row li { padding: 12px 8px; background: #f3f4f6; border-bottom: 3px solid var(--blue); font-size: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; margin-bottom: 40px; }
.pair.flip figure { order: -1; }
.num { font-family: var(--mono); color: var(--amber); font-size: 12px; }
figure { margin: 0; }
figcaption { color: #4b5563; font-size: 13px; margin-top: 8px; }
.lights { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lights button { background: #fff; border: 1px solid #d1d5db; padding: 8px 12px; }
.lights button.on { border-color: var(--ok); color: var(--ok); }
.bound { padding-left: 1.2em; }
.io { grid-template-columns: 1fr 1fr; }
footer { padding: 24px 20px 40px; background: #1e2937; color: #cbd5e1; font-size: 14px; }
footer .app-link { color: #93c5fd; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .desk-links { display: none; position: absolute; top: 58px; left: 0; right: 0; background: #fff; padding: 12px 18px; flex-direction: column; align-items: flex-start; }
  .desk-links.open { display: flex; }
  .hero > img { height: 48vh; }
  .slip { position: relative; left: 0; bottom: 0; max-width: none; }
  .three, .four, .pair, .pair.flip, .io, .row { grid-template-columns: 1fr; }
  .pair.flip figure { order: 0; }
}
