:root {
  --bg: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --text: #1d1b22;
  --muted: #5f5f6b;
  --faint: #8e8e99;
  --line: #e5e6eb;
  --line-strong: #d5d6dc;
  --card: #ffffff;
  --code: #f5f5f7;
  --prose: #3b3b45;
  --judge: #a23bb2;
  --accent: linear-gradient(135deg, #f8d3ef 0%, #dccdfd 55%, #cdc5fb 100%);
  --accent-hover: linear-gradient(135deg, #f4c2e8 0%, #d0bffc 55%, #c1b7fa 100%);
  --accent-on: #1d1b22;
  --ring: rgba(167, 139, 245, 0.35);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 1px rgba(0, 0, 0, 0.03);
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.07);
  --shadow-3: 0 6px 16px rgba(0, 0, 0, 0.08), 0 24px 56px rgba(0, 0, 0, 0.12);
  --t-bg: #141418;
  --t-bar: #1c1c21;
  --t-line: #2b2b32;
  --t-fg: #dee0e1;
  --mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e0e10;
  --bg-glass: rgba(14, 14, 16, 0.78);
  --text: #f2f2f4;
  --muted: #a6a6b0;
  --faint: #777782;
  --line: #26262c;
  --line-strong: #34343c;
  --card: #141417;
  --code: #1a1a1e;
  --prose: #c9c9d1;
  --judge: #e29bee;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 6px 16px rgba(0, 0, 0, 0.4), 0 24px 56px rgba(0, 0, 0, 0.5);
  --t-bg: #121216;
  --t-bar: #19191e;
  --t-line: #2a2a31;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e10;
    --bg-glass: rgba(14, 14, 16, 0.78);
    --text: #f2f2f4;
    --muted: #a6a6b0;
    --faint: #777782;
    --line: #26262c;
    --line-strong: #34343c;
    --card: #141417;
    --code: #1a1a1e;
  --prose: #c9c9d1;
    --judge: #e29bee;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-3: 0 6px 16px rgba(0, 0, 0, 0.4), 0 24px 56px rgba(0, 0, 0, 0.5);
    --t-bg: #121216;
    --t-bar: #19191e;
    --t-line: #2a2a31;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: 0.9em; }
p { text-wrap: pretty; }
h1, h2 { word-break: keep-all; overflow-wrap: anywhere; }
/* 1248 - 2 x 24: the content edges line up with the floating nav box at every width. */
.wrap { max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.btn:focus-visible, .copy:focus-visible, .pop summary:focus-visible, .star:focus-visible, .tab:focus-visible, .theme button:focus-visible, .replay:focus-visible, a:focus-visible {
  outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: 10px;
}

/* Announcement */
.announce { border-bottom: 1px solid var(--line); font-size: 13px; }
.announce a {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 40px; padding: 8px 16px; text-decoration: none; color: var(--muted); text-align: center;
}
.announce a:hover { color: var(--text); }
.announce .arrow { transition: transform 200ms var(--ease); }
.announce a:hover .arrow { transform: translateX(3px); }
.pill {
  flex: none; padding: 1px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-on);
  font-size: 12px; font-weight: 600;
}

/* Floating nav */
.nav { position: sticky; top: 12px; z-index: 20; padding: 12px 24px 0; }
.nav-box {
  max-width: 1200px; margin: 0 auto; height: 56px; padding: 0 10px 0 16px;
  display: flex; align-items: center; gap: 20px;
  background: var(--bg-glass); border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: var(--shadow-1); transition: box-shadow 240ms var(--ease), border-color 240ms var(--ease);
}
.nav.scrolled .nav-box { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 17px; }
.brand img { width: 26px; height: 26px; border-radius: 7px; transition: transform 300ms var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.links { display: flex; gap: 24px; margin: 0 auto; font-size: 14px; }
.links a { position: relative; text-decoration: none; color: var(--muted); transition: color 160ms var(--ease); }
.links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--ease);
}
.links a:hover { color: var(--text); }
.links a:hover::after, .links a[aria-current="page"]::after { transform: scaleX(1); }
.links a[aria-current="page"] { color: var(--text); }

/* Buttons */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text);
  transition: background 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.primary { background: var(--accent); color: var(--accent-on); border-color: transparent; }
.btn.primary:hover { background: var(--accent-hover); box-shadow: 0 6px 18px rgba(167, 139, 245, 0.28); }
.btn.primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn.primary:hover::after { transform: translateX(120%); transition: transform 700ms var(--ease); }
.btn.small { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn small { font-weight: 500; opacity: 0.7; }

/* Hero */
.hero { position: relative; text-align: center; padding-top: 84px; padding-bottom: 40px; }
.hero-icon {
  width: 104px; height: 104px; margin: 0 auto 30px;
  filter: drop-shadow(0 10px 24px rgba(120, 96, 220, 0.22)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
  transition: transform 400ms var(--ease);
}
.hero-icon:hover { transform: translateY(-3px) rotate(-4deg) scale(1.04); }
.kicker { min-height: 1.6em; margin: 0 0 14px; font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em; color: var(--faint); }
.hero h1 {
  margin: 0; font-size: clamp(38px, 6.2vw, 68px); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--judge); }
.hero h1 .ch { display: inline-block; }
.lead { max-width: 660px; margin: 22px auto 0; font-size: 18px; color: var(--muted); }
.caret {
  display: inline-block; width: 0.55em; height: 1.1em; margin-left: 2px; vertical-align: -0.18em;
  background: currentColor; opacity: 0.55; animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.cue {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 30px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--faint); text-decoration: none;
}
.cue:hover { color: var(--text); }
.cue .down { display: inline-block; }

/* Install box */
.install {
  max-width: 760px; margin: 40px auto 0; text-align: left;
  border: 1px solid var(--line-strong); border-radius: 16px; background: var(--card); overflow: hidden;
  box-shadow: var(--shadow-2);
}
.tabs { position: relative; display: flex; border-bottom: 1px solid var(--line); background: var(--code); }
.tab {
  position: relative; height: 46px; padding: 0 22px; border: 0; border-right: 1px solid var(--line);
  background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--card); color: var(--text); }
.tab-ink {
  position: absolute; bottom: -1px; left: 0; height: 2px; width: 0; background: var(--accent);
  transition: transform 320ms var(--ease), width 320ms var(--ease);
}
html:not(.js) .tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.tab .sub { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--faint); margin-left: 6px; }
.panel { padding: 22px 22px 20px; }
.panel[hidden] { display: none; }
.motion .panel { animation: panel-in 360ms var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.cmd {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--code);
}
.cmd code { flex: 1; min-width: 0; font-size: 16px; overflow-x: auto; white-space: nowrap; }
.prompt { color: var(--faint); user-select: none; }
.copy {
  flex: none; height: 34px; min-width: 64px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer;
  transition: color 160ms var(--ease), transform 160ms var(--ease), border-color 160ms var(--ease);
}
.copy:hover { color: var(--text); }
.copy:active { transform: scale(0.96); }
.copy.done { color: var(--text); border-color: transparent; background: var(--accent); }
.hint { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.hint code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--code); border: 1px solid var(--line); }
.hint a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.meta { margin: 22px 0 0; font-size: 13px; color: var(--faint); }

/* Story: sticky stage on the left, chapters on the right */
.story-head { padding-top: 96px; }
.label {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--judge);
}
.label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--line-strong); }
h2 { margin: 0; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.25; letter-spacing: -0.015em; font-weight: 700; text-wrap: balance; }
.section-intro { max-width: 720px; margin: 16px 0 0; font-size: 17px; color: var(--muted); }
.story {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 64px; align-items: start;
  padding-top: 48px; padding-bottom: 40px;
}
.stage { position: sticky; top: 104px; }
.stage-inner { display: grid; }
.frame {
  grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden;
  transition: opacity 420ms var(--ease), transform 520ms var(--ease), visibility 0s linear 420ms;
}
.motion .frame { transform: translateY(14px) scale(0.985); }
.frame.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 420ms var(--ease), transform 520ms var(--ease), visibility 0s; }
html:not(.js) .frame:first-child { opacity: 1; visibility: visible; }
.frame figcaption { min-height: 1.6em; margin-top: 12px; font-size: 13px; color: var(--faint); text-align: center; transition: opacity 240ms var(--ease); }
.term {
  container-type: inline-size;
  border-radius: 12px; overflow: hidden; background: var(--t-bg); color: var(--t-fg);
  border: 1px solid var(--t-line); box-shadow: var(--shadow-3);
}
.term-bar {
  position: relative; display: flex; align-items: center; height: 34px; padding: 0 8px 0 14px;
  background: var(--t-bar); border-bottom: 1px solid var(--t-line);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a42; }
.term-title {
  position: absolute; left: 0; right: 0; text-align: center; pointer-events: none;
  font-family: var(--mono); font-size: 12px; color: #8b8b96;
}
.term-tools { position: relative; display: flex; align-items: center; gap: 10px; margin-left: auto; }
.steps { display: flex; gap: 5px; }
.steps i { width: 16px; height: 3px; border-radius: 2px; background: #34343c; transition: background 300ms var(--ease); }
.steps i.on { background: linear-gradient(90deg, #f8d3ef, #cdc5fb); }
.replay {
  height: 24px; padding: 0 9px; border: 1px solid #34343c; border-radius: 7px; background: transparent;
  color: #9a9aa6; font: 12px var(--mono); cursor: pointer; transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.replay:hover { color: #e6e6ea; border-color: #50505a; }
html:not(.js) .term-tools { display: none; }
.term-body {
  margin: 0; padding: 14px 16px 16px; overflow-x: auto;
  font-family: var(--mono); line-height: 1.32; white-space: pre;
  font-size: max(6px, calc((100cqw - 34px) / 51));
}
.term-body i { font-style: inherit; display: inline-block; text-align: center; }
.term-body i.w1 { width: 1ch; }
.term-body i.w2 { width: 2ch; }
/* A cell background fills the whole row height, as in a terminal, instead of only the glyph box. */
.term-body span[style*="background"] { display: inline-block; height: 1.36em; margin-bottom: -0.04em; vertical-align: top; }
.shot img { width: 100%; }
.chapter { min-height: 72vh; padding: 8px 0 48px; transition: opacity 360ms var(--ease); }
.chapter:last-child { min-height: 0; }
.motion .story:not(.single) .chapter:not(.is-current) { opacity: 0.38; }
.chapter h2 { font-size: clamp(24px, 2.5vw, 30px); }
.chapter p { margin: 14px 0 0; font-size: 16px; color: var(--muted); }
.chapter p b { color: var(--text); font-weight: 600; }
.chapter code { padding: 1px 6px; border-radius: 6px; background: var(--code); border: 1px solid var(--line); font-size: 13px; }
.chapter .inline-frame { display: none; }
.verdict {
  display: inline-block; margin-top: 16px; padding: 6px 12px; border-radius: 10px;
  font-family: var(--mono); font-size: 13px; color: var(--t-fg); background: var(--t-bg); border: 1px solid var(--t-line);
  transition: box-shadow 400ms var(--ease), border-color 400ms var(--ease);
}
.verdict.lit { border-color: #a798d7; box-shadow: 0 0 0 4px rgba(167, 152, 215, 0.18); }
.verdict .d { color: #a798d7; display: inline-block; }
.verdict.lit .d { animation: spin-in 600ms var(--ease); }
@keyframes spin-in { from { transform: rotate(-180deg) scale(0.4); } }
.verdict .k { color: #a798d7; font-weight: 700; }
.verdict .m { color: #7e888e; }

/* Callout grids */
.callout { padding-top: 96px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.card {
  position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 24px; background: var(--card);
  transition: border-color 200ms var(--ease), transform 260ms var(--ease), box-shadow 260ms var(--ease);
}
.card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--accent) border-box;
}
.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 650; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
.card .num { display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 12px; color: var(--faint); transition: color 200ms var(--ease); }
.card:hover .num { color: var(--judge); }
a.card { text-decoration: none; }
a.card .go { position: absolute; top: 20px; right: 20px; color: var(--faint); transition: color 160ms var(--ease), transform 200ms var(--ease); }
a.card:hover .go { color: var(--text); transform: translate(2px, -2px); }
.list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 28px; }
.list div { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.list b { display: block; color: var(--text); font-size: 16px; font-weight: 650; margin-bottom: 2px; }
.list code { padding: 1px 6px; border-radius: 6px; background: var(--code); border: 1px solid var(--line); font-size: 13px; }
.note { margin: 24px 0 0; font-size: 14px; color: var(--muted); }
.note a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }

/* Footer */
footer { margin-top: 112px; border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--faint); }
.foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px 40px; flex-wrap: wrap; }
.foot p { margin: 6px 0 0; max-width: 560px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; }
.foot-brand img { width: 22px; height: 22px; border-radius: 6px; }
.foot-right { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.flinks { display: flex; gap: 18px; flex-wrap: wrap; }
.theme { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--code); }
.theme button {
  height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent;
  color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; transition: color 160ms var(--ease), background 160ms var(--ease);
}
.theme button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow-1); }

/* ---- Motion: only with JS and without reduced motion ---- */
.motion .intro { animation: rise 820ms var(--ease) both; animation-delay: var(--d, 0ms); }
.motion .nav.intro { animation-name: drop; }
.motion .hero-icon.intro { animation-name: pop; animation-duration: 900ms; }
.motion .hero h1 .ch { animation: char-rise 760ms var(--ease) both; animation-delay: calc(420ms + var(--i) * 34ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.82); filter: blur(6px); } }
@keyframes char-rise { from { opacity: 0; transform: translateY(0.45em); filter: blur(8px); } }
.motion .motion .cue .down { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
.motion [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 760ms var(--ease), transform 760ms var(--ease); transition-delay: var(--d, 0ms); }
.motion [data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .links { display: none; }
  .nav-right { margin-left: auto; }
  html.js .story { display: block; }
  html.js .stage { display: none; }
  html.js .chapter .inline-frame { display: block; margin: 24px 0 8px; }
  html.js .chapter .inline-frame .frame { opacity: 1; visibility: visible; transform: none; }
  .chapter { min-height: 0; padding-bottom: 56px; }
  .motion .story .chapter:not(.is-current) { opacity: 1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav { padding: 10px 16px 0; top: 8px; }
  .announce a { justify-content: flex-start; text-align: left; }
  .hero { padding-top: 60px; padding-bottom: 28px; }
  .hero-icon { width: 84px; height: 84px; margin-bottom: 24px; }
  .hero h1 { font-size: clamp(32px, 9.4vw, 40px); }
  .verdict { font-size: 12px; }
  .lead { font-size: 16px; }
  .tab { flex: 1; padding: 0 10px; }
  .tab .sub { display: none; }
  .panel { padding: 16px; }
  .cmd code { font-size: 14px; }
  .downloads .btn { flex: 1 1 100%; }
  .grid, .list { grid-template-columns: 1fr; }
  .story-head, .callout { padding-top: 72px; }
  .foot-right { align-items: flex-start; }
  .steps { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- Nav: language menu, GitHub star, menu for narrow screens ---- */
.nav-right { display: flex; align-items: center; gap: 8px; }
.pop { position: relative; }
.pop summary {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); font-size: 13px; cursor: pointer; list-style: none; user-select: none;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease);
}
.pop summary::-webkit-details-marker { display: none; }
.pop summary:hover, .pop[open] summary { color: var(--text); border-color: var(--line-strong); }
.pop-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 168px; padding: 6px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-3);
}
.motion .pop[open] .pop-menu { animation: menu-in 200ms var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.pop-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--muted); text-decoration: none;
}
.pop-menu a:hover { background: var(--code); color: var(--text); }
.pop-menu a[aria-current] { color: var(--text); font-weight: 600; }
.pop-menu a[aria-current]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--line-strong); }
.pop.menu { display: none; }
.star {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 4px 0 10px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 160ms var(--ease);
}
.star:hover {
  border-color: transparent; box-shadow: var(--shadow-1); transform: translateY(-1px);
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--accent) border-box;
}
.star-count {
  min-width: 2.2em; padding: 2px 8px; border-radius: 7px; background: var(--code);
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); text-align: center;
  font-variant-numeric: tabular-nums;
}
.star-count:empty { display: none; }
.star-count.bump { animation: bump 520ms var(--ease); }
@keyframes bump { 40% { transform: translateY(-2px); color: var(--judge); } }

/* ---- Star call to action, at the end of every page ---- */
.star-cta { padding-top: 112px; }
.star-cta-box {
  display: flex; align-items: center; gap: 24px; padding: 28px 32px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--card);
}
.star-cta-box img { flex: none; width: 56px; height: 56px; border-radius: 14px; }
.star-cta-text { flex: 1; min-width: 0; }
.star-cta-text h2 { font-size: clamp(20px, 2.2vw, 24px); }
.star-cta-text p { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.star-cta-btn { flex: none; height: 46px; padding: 0 8px 0 18px; }
.star-cta-btn .star-count { background: rgba(255, 255, 255, 0.55); color: var(--accent-on); }
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.foot-langs a[aria-current] { color: var(--text); }
.principles-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; font-size: 15px; color: var(--text); text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.principles-more:hover { text-decoration-color: currentColor; }

/* ---- Reading pages: decision points, docs, changelog ---- */
.page-head { padding-top: 72px; }
.page-head h1 { margin: 0; font-size: clamp(34px, 4.8vw, 52px); line-height: 1.14; letter-spacing: -0.02em; font-weight: 700; }
.page-lead { max-width: 720px; margin: 16px 0 0; font-size: 18px; color: var(--muted); }
.page-note { margin: 14px 0 0; font-size: 13px; color: var(--faint); }
.page-note a { color: var(--muted); text-underline-offset: 3px; }
.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 64px; align-items: start; padding-top: 48px; }
.toc { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow-y: auto; font-size: 14px; }
.toc summary { display: none; }
.toc-title { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--faint); }
.toc a {
  display: block; padding: 5px 0 5px 14px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; line-height: 1.45;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.toc a.sub { padding-left: 26px; font-size: 13px; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); border-left-color: #c4b5fb; }
.prose { min-width: 0; max-width: 840px; color: var(--prose); font-size: 16px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 72px 0 0; font-size: clamp(24px, 2.6vw, 30px); color: var(--text); scroll-margin-top: 96px; }
.prose h3 { margin: 40px 0 0; font-size: 18px; font-weight: 650; color: var(--text); scroll-margin-top: 96px; }
.prose h2 + p, .prose h3 + p, .prose h3 + .table-wrap { margin-top: 14px; }
.prose p, .prose ul, .prose ol { margin: 16px 0 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--faint); }
.prose strong, .prose b { color: var(--text); font-weight: 650; }
.prose a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.prose a:hover { text-decoration-color: currentColor; }
.prose code { padding: 1px 6px; border-radius: 6px; background: var(--code); border: 1px solid var(--line); font-size: 0.84em; color: var(--text); }
.prose pre {
  margin: 18px 0 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--code);
  overflow-x: auto; font-size: 13.5px; line-height: 1.6; color: var(--text);
}
.prose p code, .prose li code, .release li code { overflow-wrap: anywhere; }
.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.prose pre .c { color: var(--faint); }
/* The widest diagram line is about 120 columns: fit it on wide screens, scroll on phones. */
.prose { container-type: inline-size; }
.prose pre.diagram { font-size: clamp(9px, calc((100cqw - 38px) / 73), 12.5px); line-height: 1.45; }
.prose pre.diagram i { display: inline-block; font-style: normal; text-align: center; }
.prose pre.diagram i.w1 { width: 1ch; }
.prose pre.diagram i.w2 { width: 2ch; }
.table-wrap { margin: 18px 0 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.6; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--code); color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child code { white-space: nowrap; }
.prose blockquote { margin: 18px 0 0; padding: 2px 0 2px 16px; border-left: 3px solid #d9cdfc; color: var(--muted); }
.prose blockquote p { margin: 0; }
.prose details { margin: 22px 0 0; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; }
.prose details[open] { padding-bottom: 18px; }
.prose summary { padding: 12px 0; cursor: pointer; font-weight: 600; color: var(--text); }
.prose .figure { margin: 26px 0 0; }
.prose .figure img, .prose .figure video { margin: 0 auto; border-radius: 12px; }
.prose .figure.shot img { border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.prose video { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #000; }
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
  :root:not([data-theme="light"]) .only-light { display: none !important; }
}
.ref-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; padding: 0; list-style: none; }
.prose .ref-list li { margin: 0; }
.ref-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color 200ms var(--ease), transform 200ms var(--ease);
}
.ref-list a:hover { transform: translateY(-1px); border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--accent) border-box; }
.ref-list a span { color: var(--faint); }

/* Changelog */
.releases { padding-top: 40px; }
.releases > * { max-width: 920px; }
.release { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: 88px; }
.release-meta h2 { font-size: 24px; }
.release-meta h2 a { text-decoration: none; }
.release-meta time { display: block; margin-top: 4px; font-family: var(--mono); font-size: 13px; color: var(--faint); }
.release-meta .agent { display: inline-block; margin-top: 12px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.release-meta .dl { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-size: 13px; color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.release:first-child .release-meta h2::after {
  content: attr(data-latest); margin-left: 10px; padding: 1px 9px; border-radius: 999px; vertical-align: 4px;
  background: var(--accent); color: var(--accent-on); font-size: 12px; font-weight: 600;
}
.release ul { margin: 0; padding-left: 1.1em; }
.release li { color: var(--prose); }
.release li + li { margin-top: 12px; }
.release li b { color: var(--text); font-weight: 650; }
.release li code { padding: 1px 6px; border-radius: 6px; background: var(--code); border: 1px solid var(--line); font-size: 0.86em; }
.release li a { color: var(--text); text-underline-offset: 3px; }
.release-foot { padding: 28px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.release-foot a { color: var(--text); text-underline-offset: 3px; }

@media (max-width: 980px) {
  .pop.menu { display: block; }
  .doc { display: block; padding-top: 32px; }
  .toc { position: static; max-height: none; margin-bottom: 36px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
  .toc summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; cursor: pointer; list-style: none; font-weight: 600; color: var(--text); }
  .toc summary::-webkit-details-marker { display: none; }
  .toc summary::after { content: "+"; font-family: var(--mono); color: var(--faint); }
  .toc[open] summary::after { content: "−"; }
  .toc[open] { padding-bottom: 12px; }
  .toc-title { display: none; }
  .release { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .install-btn { display: none; }
  .lang-name, .star-label { display: none; }
  .nav-right { gap: 6px; }
  .star { padding-left: 9px; }
  .page-head { padding-top: 48px; }
  .page-head h1 { font-size: clamp(30px, 8.6vw, 38px); }
  .page-lead { font-size: 16px; }
  .prose h2 { margin-top: 56px; }
  .prose pre { padding: 14px; font-size: 12.5px; }
  .ref-list { grid-template-columns: 1fr; }
  .star-cta { padding-top: 80px; }
  .star-cta-box { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 20px; }
  .star-cta-btn { width: 100%; }
}

/* Monospace fonts carry no Hangul: the fallback plus wide mono spaces pulls Korean labels apart. */
html:lang(ko) .label, html:lang(ko) .cue, html:lang(ko) .toc-title { font-family: inherit; letter-spacing: 0.02em; }

/* ---- Decision points page ---- */
.dp-how, .dp-map, .dp-catalog, .dp-judges, .dp-measured { padding-top: 96px; }
.dp-steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dp-step { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.dp-step .num { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.dp-step h3 { margin: 12px 0 6px; font-size: 17px; font-weight: 650; }
.dp-step p { flex: 1; margin: 0; font-size: 15px; color: var(--muted); }
.dp-step-demo { margin-top: 18px; }
.demo-msg { display: block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; background: var(--code); font-size: 14px; }
.demo-verdict {
  display: inline-block; padding: 7px 12px; border: 1px solid var(--t-line); border-radius: 10px; background: var(--t-bg);
  color: var(--t-fg); font-family: var(--mono); font-size: 12.5px;
}
.demo-verdict .d, .ex-verdict .d, .dp-ask-k .d { color: #a798d7; }
.demo-verdict .m { color: #7e888e; }
.demo-result { display: block; padding: 4px 0 4px 14px; border-left: 3px solid #d9cdfc; font-size: 14px; color: var(--prose); }
.dp-modes { margin-top: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; }
.dp-modes h3 { margin: 0 0 16px; font-size: 16px; font-weight: 650; }
.dp-mode-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dp-mode-name { display: inline-block; padding: 1px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 600; }
.dp-mode-name.mode-active { border-color: transparent; background: var(--accent); color: var(--accent-on); }
.dp-mode-name.mode-shadow { border-style: dashed; color: var(--muted); }
.dp-mode-name.mode-off { color: var(--faint); }
.dp-mode code { margin-left: 8px; font-size: 12px; color: var(--faint); }
.dp-mode p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.dp-rules { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* Group marks: pink to lavender, as small dots only. */
.gdot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.g-input { background: #f5b3d6; }
.g-context { background: #ebb0ec; }
.g-tools { background: #d9b4fa; }
.g-turn { background: #c5bbfc; }
.g-team { background: #b5c3f8; }

.lanes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
.lane { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.lane-head { display: flex; align-items: center; gap: 8px; }
.lane-step { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.lane-head h3 { display: flex; flex: 1; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 650; }
.lane-count { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.lane p { margin: 10px 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--code);
  font-size: 12.5px; line-height: 1.5; color: var(--text); text-decoration: none;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease);
}
.chip:hover { border-color: transparent; transform: translateY(-1px); background: linear-gradient(var(--code), var(--code)) padding-box, var(--accent) border-box; }

.dp-bar {
  position: sticky; top: 84px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-top: 28px; padding: 8px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-glass); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.dp-filters { display: flex; flex: 1; flex-wrap: wrap; gap: 4px; }
.dp-filter {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.dp-filter > span:last-child { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.dp-filter:hover { background: var(--code); color: var(--text); }
.dp-filter[aria-pressed="true"] { border-color: var(--line-strong); background: var(--card); color: var(--text); box-shadow: var(--shadow-1); }
.dp-filter:focus-visible, .dp-search:focus-within { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.dp-search { display: flex; align-items: center; gap: 8px; min-width: 240px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--faint); }
.dp-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.dp-search input::-webkit-search-cancel-button { cursor: pointer; }
.dp-group { margin-top: 44px; }
.dp-group-title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.dp {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; padding: 26px 0;
  border-top: 1px solid var(--line); scroll-margin-top: 160px;
}
.dp[hidden], .dp-group[hidden] { display: none; }
.dp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.dp-head h4 { margin: 0; font-size: 19px; font-weight: 650; line-height: 1.4; }
.dp-head h4 a { text-decoration: none; transition: color 300ms var(--ease); }
.dp.flash .dp-head h4 a { color: var(--judge); }
.dp-id { padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--code); font-size: 12.5px; color: var(--muted); }
.dp-flag { padding: 0 8px; border: 1px dashed var(--line-strong); border-radius: 999px; font-size: 12px; color: var(--muted); }
.dp-ask { margin: 14px 0 0; font-size: 16px; color: var(--text); }
.ex-row p code { white-space: nowrap; }
.dp-ask code, .dp-sum code, .ex-row p code { padding: 1px 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--code); font-size: 0.86em; }
.dp-ask-k { display: inline-block; margin-right: 8px; font-size: 13px; font-weight: 600; color: var(--judge); }
.dp-sum { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); }
.dp-meta { margin: 10px 0 0; font-size: 12.5px; color: var(--faint); }
.dp-meta a { color: inherit; text-decoration: none; }
.dp-meta code { font-size: 12px; }
.dp-meta a:hover code { color: var(--text); }
.dp-ex { align-self: start; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.ex-row { display: grid; grid-template-columns: 4.8em minmax(0, 1fr); gap: 12px; padding: 12px 16px; }
.ex-row + .ex-row { border-top: 1px solid var(--line); }
.ex-k { padding-top: 2px; font-size: 12px; color: var(--faint); }
.ex-row p { margin: 0; font-size: 14.5px; color: var(--prose); }
.ex-verdict .ex-k { padding-top: 5px; }
.vchip {
  display: inline-block; padding: 4px 10px; border: 1px solid var(--t-line); border-radius: 9px; background: var(--t-bg);
  color: var(--t-fg); font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
}
.dp-empty { margin: 36px 0 0; color: var(--muted); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.four .card { display: flex; flex-direction: column; }
.grid.four .card p { flex: 1; }
.card-code { display: block; margin-top: 16px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--code); font-size: 12.5px; overflow-wrap: anywhere; }
.dp-measured .prose { max-width: 960px; }
.dp-measured .prose h2 { margin-top: 0; }

/* ---- Documentation ---- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr) 196px; gap: 56px; align-items: start; padding-top: 48px; }
.docs-nav { position: sticky; top: 100px; max-height: calc(100vh - 124px); overflow-y: auto; font-size: 14px; }
.docs-nav summary { display: none; }
.docs-nav a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--muted); line-height: 1.4; text-decoration: none; transition: color 160ms var(--ease), background 160ms var(--ease); }
.docs-nav a:hover { background: var(--code); color: var(--text); }
.docs-nav a.on { background: var(--code); color: var(--text); font-weight: 600; }
.docs-nav .docs-home { color: var(--text); font-weight: 600; }
.docs-nav-title { margin: 22px 0 6px; padding: 0 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--faint); }
.docs-main { min-width: 0; }
.docs-head h1 { margin: 0; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.docs-head .page-lead { margin-top: 12px; }
.docs-main .prose { margin-top: 36px; }
.docs-main .prose h2 { margin-top: 60px; }
.docs-main .prose > h2:first-child { margin-top: 0; }
.docs-toc { position: sticky; top: 100px; max-height: calc(100vh - 124px); overflow-y: auto; font-size: 13px; }
.docs-toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); color: var(--muted); line-height: 1.45; text-decoration: none; transition: color 160ms var(--ease), border-color 160ms var(--ease); }
.docs-toc a:hover { color: var(--text); }
.docs-toc a.on { border-left-color: #c4b5fb; color: var(--text); }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); }
.docs-pager a {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  font-weight: 600; text-decoration: none; transition: border-color 200ms var(--ease), transform 200ms var(--ease);
}
.docs-pager a span { font-size: 12px; font-weight: 500; color: var(--faint); }
.docs-pager .next { grid-column: 2; text-align: right; }
.docs-pager a:hover { transform: translateY(-1px); border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--accent) border-box; }
.docs-section { padding-top: 64px; }
.docs-section h2 { font-size: 22px; }
.docs-section .grid { margin-top: 20px; }
.docs-section .card h3 { padding-right: 24px; }
.ref-list.wide { max-width: 760px; }
kbd { padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--card); font-family: var(--mono); font-size: 0.8em; }
.opt-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0 !important; font-size: 13px; color: var(--muted); }
.opt-flag { padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; }
.opt-flag.on { border-color: transparent; background: var(--accent); color: var(--accent-on); }
.opt-flag.beta { border-style: dashed; }
.opt-points a { text-decoration: none; }
.opt-points code { font-size: 12px !important; }
.prose h2 .opt-name { margin-left: 6px; border: 0; background: none; padding: 0; font-size: 0.55em; font-weight: 500; color: var(--faint); vertical-align: middle; }
.opt-help { color: var(--muted); }
.opt-choices { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.opt-range { font-size: 13px; color: var(--faint); }
.opt-def { white-space: nowrap; }
.opt-none { color: var(--faint); font-size: 14px; }

@media (max-width: 1180px) {
  .docs { grid-template-columns: 200px minmax(0, 1fr); gap: 44px; }
  .docs-toc { display: none; }
  .lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .docs { display: block; padding-top: 24px; }
  .docs-nav { position: static; max-height: none; margin-bottom: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 12px; }
  .docs-nav summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px; list-style: none; font-weight: 600; color: var(--text); cursor: pointer; }
  .docs-nav summary::-webkit-details-marker { display: none; }
  .docs-nav summary::after { content: "+"; font-family: var(--mono); color: var(--faint); }
  .docs-nav[open] summary::after { content: "−"; }
  .docs-nav[open] { padding-bottom: 10px; }
  .docs-nav .docs-home { display: none; }
  .dp-steps, .dp-mode-list { grid-template-columns: 1fr; }
  .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp { grid-template-columns: 1fr; gap: 16px; }
  .dp-bar { top: 76px; }
}
@media (max-width: 640px) {
  .dp-how, .dp-map, .dp-catalog, .dp-judges, .dp-measured { padding-top: 72px; }
  .lanes, .grid.four { grid-template-columns: 1fr; }
  .dp-bar { position: static; padding: 8px; }
  .dp-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -2px; padding: 0 2px; scrollbar-width: none; }
  .dp-filters::-webkit-scrollbar { display: none; }
  .dp-search { width: 100%; min-width: 0; }
  .ex-row { grid-template-columns: 1fr; gap: 2px; }
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager .next { grid-column: 1; }
}

/* Hangul in the mono font comes out widely spaced: Korean labels and verdicts use the body font. */
html:lang(ko) .docs-nav-title, html:lang(ko) .vchip, html:lang(ko) .demo-verdict { font-family: inherit; letter-spacing: 0; }
