:root {
  /* Brand palette derived from kinglet.svg */
  --ink: #082537;            /* deep teal-black; primary text & dark surfaces */
  --paper: #fbf6ea;          /* softer cream; site background */
  --paper-deep: #f1e6cf;     /* deeper cream for section contrast */
  --rule: #082537;           /* strong hairline */
  --soft: #e4d3b9;           /* soft hairline */
  --line: #e4d3b9;
  --sub: #6b7a81;            /* muted teal-gray for meta */
  --muted: #4d5b62;          /* body-muted; a shade darker than --sub */
  --faint: #9aa4a9;

  --teal: #01628a;           /* primary brand: interactive, links, ledger accents */
  --teal-light: #1390a6;     /* secondary brand; used sparingly */
  --accent: #fe7c01;         /* signal orange; reserved for the single CTA per fold */
  --accent-ink: #082537;

  --white: #ffffff;
  --blue: #01628a;
  --blue-light: #1390a6;
  --navy: #082537;
  --navy-deep: #061a26;
  --orange: #fe7c01;
  --orange-dark: #cb6300;

  --sans: 'Source Serif 4', 'Noto Serif SC', 'Songti SC', 'STSong', ui-serif, Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --shell: 1240px;
  --pad-x: 40px;

  --tracking-eyebrow: 0.14em;
  --tracking-mono: 0.06em;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--paper); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--teal); }

/* --- entrance & idle motion (respects reduced-motion) --- */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes caret-blink {
  0%, 45%   { opacity: 1; }
  55%, 100% { opacity: 0; }
}
.hero-stagger {
  opacity: 0;
  transform: translateY(10px);
  animation: hero-rise 0.55s cubic-bezier(0.2, 0.65, 0.2, 1) forwards;
  animation-delay: calc(var(--stagger, 0) * 90ms + 60ms);
}
.caret {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  margin-left: 4px;
  vertical-align: -0.15em;
  background: var(--teal);
  animation: caret-blink 1.05s steps(1, end) infinite;
  animation-delay: 700ms;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-stagger { opacity: 1; transform: none; }
  .caret { opacity: 1; }
}
p, h1, h2, h3, h4, dl, dd { margin: 0; }
button { font: inherit; }
img, svg { display: block; }

.shell { width: min(100% - calc(var(--pad-x) * 2), var(--shell)); margin-inline: auto; }

/* --- header --- */
.site-header { border-bottom: 1px solid var(--ink); background: var(--paper); }
.header-row { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.wordmark { display: flex; align-items: center; }
.wordmark img { width: auto; height: 40px; }
.primary-nav { display: flex; align-items: center; gap: 32px; font: 500 13.5px/1 var(--sans); letter-spacing: 0.01em; }
.primary-nav a { position: relative; padding: 4px 0; }
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--teal); transform: scaleX(0);
  transform-origin: left; transition: transform 0.2s ease;
}
.primary-nav a:hover { color: var(--teal); }
.primary-nav a:hover::after { transform: scaleX(1); }
.primary-nav a.external span { margin-left: 3px; font-size: .85em; }
.primary-nav a:last-child { padding-left: 0; border-left: 0; }
.github-link { display: flex; align-items: center; color: var(--ink); }
.github-link svg { width: 20px; height: 20px; }
.github-link::after { display: none; }
.github-link:hover { color: var(--teal); }
.nav-soon {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--faint);
  font: 500 13.5px/1 var(--sans);
  letter-spacing: 0.01em;
  padding: 4px 0;
  cursor: not-allowed;
}
.nav-soon b {
  padding: 2px 6px;
  border: 1px solid var(--soft);
  color: var(--faint);
  font: 500 9.5px/1 var(--mono);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: 500;
}
.mobile-soon {
  padding: 18px calc(var(--pad-x, 24px));
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--soft);
  color: var(--faint);
  cursor: not-allowed;
}
.mobile-soon > span { font: 500 17px/1 var(--sans); letter-spacing: -0.005em; }
.mobile-soon b {
  padding: 2px 8px;
  border: 1px solid var(--soft);
  color: var(--faint);
  font: 500 10px/1 var(--mono);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}
.lang-pill {
  display: inline-flex; align-items: center;
  padding: 4px 0;
  color: var(--ink);
  font: 500 12px/1 var(--mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  position: relative;
}
.lang-pill::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.lang-pill:hover { color: var(--teal); }
.lang-pill:hover::after { transform: scaleX(1); }

/* keep the mobile-details nav workable; will replace visuals in a later pass */
.mobile-nav { display: none; position: relative; }
.mobile-nav summary {
  list-style: none;
  width: 40px; height: 40px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.15s ease;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary:hover { color: var(--teal); }
.mobile-nav summary > span { display: none; }
.mobile-nav summary i {
  position: relative;
  width: 22px; height: 14px;
  display: block;
}
.mobile-nav summary i b {
  position: absolute;
  left: 0;
  width: 22px; height: 1.75px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}
.mobile-nav summary i b:first-child { top: 3px; }
.mobile-nav summary i b:last-child { top: 10px; }
.mobile-nav[open] summary i b:first-child { top: 6px; transform: rotate(45deg); }
.mobile-nav[open] summary i b:last-child { top: 6px; transform: rotate(-45deg); }
.mobile-nav nav {
  position: fixed;
  z-index: 20;
  top: 72px; left: 0; right: 0;
  padding: 8px 0 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 12px 24px -18px rgba(8, 37, 55, 0.35);
}

/* Open/close animation (no JS). Uses max-height + fade/slide. */
.mobile-nav { --menu-ease: cubic-bezier(0.32, 0.72, 0, 1); }
.mobile-nav nav {
  max-height: 0;
  padding-block: 0;
  overflow: hidden;
  border-bottom-color: transparent;
  box-shadow: none;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    max-height 0.36s var(--menu-ease),
    opacity 0.22s ease,
    transform 0.36s var(--menu-ease),
    padding-block 0.36s var(--menu-ease),
    border-bottom-color 0.25s ease,
    box-shadow 0.25s ease;
}
.mobile-nav[open] nav {
  max-height: 320px;
  padding-block: 8px 12px;
  border-bottom-color: var(--ink);
  box-shadow: 0 12px 24px -18px rgba(8, 37, 55, 0.35);
  opacity: 1;
  transform: translateY(0);
}
/* Staggered link fade on open. */
.mobile-nav nav > a,
.mobile-nav nav > span,
.mobile-nav nav > div {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.3s var(--menu-ease);
}
.mobile-nav[open] nav > a,
.mobile-nav[open] nav > span,
.mobile-nav[open] nav > div {
  opacity: 1;
  transform: translateY(0);
}
.mobile-nav[open] nav > a:nth-of-type(1) { transition-delay: 0.05s; }
.mobile-nav[open] nav > a:nth-of-type(2) { transition-delay: 0.09s; }
.mobile-nav[open] nav > a:nth-of-type(3) { transition-delay: 0.13s; }
.mobile-nav[open] nav > span:nth-of-type(1) { transition-delay: 0.17s; }
.mobile-nav[open] nav > div { transition-delay: 0.21s; }

/* Respect reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav nav,
  .mobile-nav nav > *,
  .footer-col > ul,
  .footer-col > summary::after {
    transition: none !important;
  }
}
.mobile-nav nav a {
  padding: 18px calc(var(--pad-x, 24px));
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--soft);
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.mobile-nav nav a:last-child { border-bottom: 0; }
.mobile-nav nav a:hover { background: var(--paper-deep); color: var(--teal); }
.mobile-nav nav span { font: 500 17px/1 var(--sans); letter-spacing: -0.005em; }
.mobile-nav nav a > b { display: none; }
.mobile-nav__actions {
  padding: 14px calc(var(--pad-x, 24px));
  display: flex; align-items: center; gap: 20px;
  border-bottom: 0;
}
.mobile-nav nav a.mobile-nav__github,
.mobile-nav nav a.mobile-nav__lang {
  padding: 8px 0;
  border-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
}
.mobile-nav nav a.mobile-nav__github { color: var(--ink); transition: color 0.15s ease; }
.mobile-nav nav a.mobile-nav__github svg { width: 24px; height: 24px; }
.mobile-nav nav a.mobile-nav__github:hover { color: var(--teal); background: transparent; }
.mobile-nav nav a.mobile-nav__lang {
  padding-left: 20px;
  color: var(--ink);
  font: 500 13px/1 var(--mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  border-left: 1px solid var(--soft);
  transition: color 0.15s ease;
}
.mobile-nav nav a.mobile-nav__lang:hover { color: var(--teal); background: transparent; }

/* --- hero: code as poster --- */
.hero { }
.hero-grid { min-height: unset; display: block; padding-block: 72px 96px; }
.hero-copy { display: contents; }
.eyebrow, .section-number {
  font: 500 12px/1 var(--mono);
  color: var(--sub);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}
.hero .eyebrow { display: block; margin-bottom: 28px; }

.hero-editor {
  border: 1px solid var(--ink);
  background: var(--paper);
  margin-top: 56px;
  overflow: hidden;
  box-shadow: 8px 8px 0 0 var(--ink);
}
.hero-editor__head {
  height: 40px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ink);
  border-bottom: 1px solid var(--ink);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: var(--tracking-mono);
  color: rgba(251, 246, 234, 0.55);
}
.hero-editor__head span:last-child { color: var(--paper); }
.hero-editor__actions { display: flex; align-items: center; gap: 6px; }
.hero-editor__btn {
  appearance: none;
  border: 1px solid rgba(251, 246, 234, 0.25);
  background: transparent;
  color: rgba(251, 246, 234, 0.75);
  padding: 5px 12px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.hero-editor__btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hero-editor__btn[disabled],
.hero-editor__btn[aria-disabled="true"] {
  cursor: not-allowed;
  color: rgba(251, 246, 234, 0.35);
  border-color: rgba(251, 246, 234, 0.12);
}
.hero-editor__btn[disabled]:hover,
.hero-editor__btn[aria-disabled="true"]:hover {
  background: transparent;
  color: rgba(251, 246, 234, 0.35);
  border-color: rgba(251, 246, 234, 0.12);
}
.hero-editor__output { border-top: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.hero-editor__output-head {
  height: 32px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(251, 246, 234, 0.12);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: var(--tracking-mono);
  color: rgba(251, 246, 234, 0.55);
}
.hero-editor__preview-tag {
  padding: 2px 8px;
  border: 1px solid rgba(251, 246, 234, 0.25);
  color: rgba(251, 246, 234, 0.55);
  font-size: 9.5px;
  text-transform: uppercase;
}
.hero-editor pre.hero-editor__stdout,
.editor pre.hero-editor__stdout {
  margin: 0;
  padding: 20px clamp(20px, 3vw, 44px) 22px;
  color: var(--paper);
  font: 400 clamp(13px, 1.2vw, 15px)/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-x: visible;
}
.hero-editor pre {
  margin: 0;
  padding: 32px clamp(20px, 3vw, 44px) 34px;
  overflow-x: auto;
  color: var(--ink);
  font: 400 clamp(14px, 1.35vw, 17px)/1.6 var(--mono);
  letter-spacing: 0;
  tab-size: 2;
}
.hero-editor code { font: inherit; }
.kw { color: var(--teal); font-weight: 500; }
.ty { color: var(--ink); }
.fn { color: var(--ink); }
.num { color: var(--orange-dark); }
.cm { color: var(--sub); }

.hero h1 {
  max-width: 22ch;
  color: var(--ink);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 60;
}
.hero h1 em { font-style: italic; color: var(--teal); font-weight: 500; }

/* Chinese characters read larger at the same size; scale down headings for lang=zh. */
html[lang="zh"] .hero h1 {
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: 0;
  line-height: 1.18;
}
html[lang="zh"] .section-intro h2,
html[lang="zh"] .code-copy h2,
html[lang="zh"] .start-grid h2 {
  font-size: clamp(24px, 2.2vw, 32px);
  letter-spacing: 0;
  line-height: 1.35;
}
html[lang="zh"] .feature-list h3 { font-size: 21px; }
html[lang="zh"] .hero h1 em { font-style: normal; }
.lede { display: none; }
.hero-actions { margin-top: 30px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 30px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 16px/1 var(--sans);
  letter-spacing: 0.01em;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.button[disabled], .button[aria-disabled="true"] {
  cursor: not-allowed; opacity: 0.55;
}
.button[disabled]:hover, .button[aria-disabled="true"]:hover {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}

.text-link {
  color: var(--teal);
  font: 500 16px/1 var(--sans);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--teal);
}
.text-link:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* --- feature list: dictionary rows --- */
.section-grid { padding-block: 112px; display: block; }
.section-intro { max-width: 960px; margin-bottom: 56px; }
.section-intro h2, .code-copy h2, .start-grid h2 {
  margin-top: 20px;
  font-size: clamp(28px, 2.7vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  font-variation-settings: "opsz" 40;
  text-wrap: balance;
}
.section-intro h2 { max-width: none; }
.code-copy h2, .start-grid h2 { max-width: none; }
.section-intro > p:last-child { margin-top: 20px; max-width: 60ch; color: var(--muted); font-size: 17px; line-height: 1.55; }

.feature-list { border-top: 1px solid var(--ink); }
.feature-list article {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 48px;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--soft);
  align-items: baseline;
}
.feature-list article > span { display: none; }
.feature-list h3 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.feature-list p { margin-top: 0; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 60ch; }

/* --- toolchain: honest sequence --- */
.compiler { border-top: 1px solid var(--ink); }
.compiler .section-grid { padding-block: 112px; display: grid; grid-template-columns: 1fr; gap: 64px; }
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.pipeline > div {
  display: grid;
  gap: 8px;
  padding: 28px 24px;
  border-right: 1px solid var(--soft);
  align-content: start;
}
.pipeline > div:last-child { border-right: 0; }
.pipeline > i { display: none; }
.pipeline strong {
  font: 500 11px/1 var(--mono);
  color: var(--sub);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}
.pipeline span {
  font: 400 17px/1.3 var(--sans);
  color: var(--ink);
  letter-spacing: -0.005em;
}
.project-links { grid-column: 1; display: grid; gap: 0; }
.project-links a {
  padding: 22px 0;
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 48px;
  border-bottom: 1px solid var(--soft);
  align-items: baseline;
}
.project-links a:first-child { border-top: 1px solid var(--soft); }
.project-links a:hover { color: var(--ink); background: transparent; }
.project-links a:hover span { color: var(--teal); }
.project-links span {
  font: 500 17px/1.3 var(--sans);
  color: var(--ink);
  letter-spacing: -0.005em;
}
.project-links small {
  color: var(--muted);
  font: 400 13px/1.5 var(--mono);
  letter-spacing: 0;
}

/* --- code-section: keep dark contrast, but flatten --- */
.code-section { background: var(--ink); color: var(--paper); border-top: 1px solid var(--ink); }
.code-grid {
  padding-block: 112px;
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 72px;
  align-items: start;
}
.code-section .eyebrow, .code-section .section-number { color: rgba(251, 246, 234, 0.55); }
.code-section h2 { color: var(--paper); }
.code-copy p:not(.section-number) { margin-top: 20px; color: rgba(251, 246, 234, 0.6); max-width: 40ch; font-size: 17px; line-height: 1.55; }
.code-copy a {
  display: inline-block; margin-top: 28px;
  color: var(--paper);
  font: 500 14px/1 var(--sans);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--paper);
}
.code-copy a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.editor {
  min-width: 0;
  border: 1px solid rgba(251, 246, 234, 0.2);
  background: transparent;
  box-shadow: none;
}
.editor-head {
  height: 40px; padding: 0 20px;
  border-bottom: 1px solid rgba(251, 246, 234, 0.2);
  display: flex; align-items: center; justify-content: space-between;
  color: rgba(251, 246, 234, 0.5);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: var(--tracking-mono);
}
.editor pre {
  margin: 0; padding: 26px 24px 30px;
  overflow-x: auto; color: var(--paper);
  font: 400 14px/1.85 var(--mono);
  tab-size: 2;
}
.editor code { font: inherit; }
.code-section .kw { color: var(--accent); font-weight: 500; }
.code-section .ty { color: var(--paper); }
.code-section .fn { color: var(--paper); }
.code-section .num { color: rgba(251, 246, 234, 0.55); }

/* --- get started: one command --- */
.get-started { background: var(--paper); border-top: 1px solid var(--ink); }
.start-grid { padding-block: 112px; display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 72px; align-items: start; }
.install-block { align-self: start; min-width: 0; }
.install-console { min-width: 0; }
.platform-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--ink);
  border-bottom: 0;
}
.platform-tab {
  min-width: 0;
  min-height: 54px;
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--paper);
  color: var(--muted);
  font: 500 11px/1 var(--mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  cursor: pointer;
}
.platform-tab:last-child { border-right: 0; }
.platform-tab:hover { color: var(--ink); background: rgba(1, 98, 138, 0.06); }
.platform-tab[aria-selected="true"] { color: var(--paper); background: var(--ink); }
.platform-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.platform-tab img,
.platform-icon { width: 19px; height: 19px; flex: 0 0 19px; }
.platform-tab img { display: block; }
.platform-tab[aria-selected="true"] img { filter: brightness(0) invert(1); }
.platform-icon--windows {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1.5px;
  transform: skewY(-4deg);
}
.platform-icon--windows i { display: block; background: currentColor; }
.install-panel {
  border: 1px solid var(--ink);
  background: var(--ink);
}
.install-panel__head {
  min-height: 38px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(251, 246, 234, 0.16);
  background: rgba(251, 246, 234, 0.06);
  color: rgba(251, 246, 234, 0.62);
  font: 500 10.5px/1 var(--mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}
.install-panel__head button {
  border: 0;
  padding: 6px 0;
  background: none;
  color: rgba(251, 246, 234, 0.52);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.install-panel__head button:hover { color: var(--accent); }
.install-command {
  min-height: 58px; padding: 17px 18px;
  display: flex; align-items: baseline; gap: 14px;
  background: var(--ink); color: var(--paper);
  position: relative;
}
.install-command > span { color: var(--accent); font: 500 13px/1 var(--mono); flex-shrink: 0; }
.install-command code {
  min-width: 0; flex: 1;
  overflow-x: auto; color: var(--paper);
  white-space: nowrap;
  font: 400 13.5px/1.55 var(--mono);
  letter-spacing: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(to right, black calc(100% - 32px), transparent);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 32px), transparent);
}
.install-command code::-webkit-scrollbar { display: none; }
.start-links { margin-top: 26px; display: flex; gap: 28px; flex-wrap: wrap; }
.start-links a {
  color: var(--teal);
  font: 500 14px/1 var(--sans);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--teal);
}
.start-links a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* --- footer: brand band + ledger columns --- */
.site-footer {
  background: var(--ink);
  color: rgba(251, 246, 234, 0.72);
  border-top: 1px solid var(--ink);
  margin-top: 64px;
}
.footer-grid { padding-block: 52px 28px; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px;
}
.footer-col h4 {
  color: var(--paper);
  font: 500 11px/1 var(--mono);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  margin: 0 0 16px;
}
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 8px;
}
.footer-col a {
  color: rgba(251, 246, 234, 0.68);
  font: 400 14px/1.5 var(--sans);
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-col a.footer-soon {
  color: rgba(251, 246, 234, 0.32);
  cursor: not-allowed;
}
.footer-col a.footer-soon:hover { color: rgba(251, 246, 234, 0.32); }

.footer-meta {
  padding-block: 16px;
  border-top: 1px solid rgba(251, 246, 234, 0.12);
}
.footer-meta p {
  color: rgba(251, 246, 234, 0.42);
  font: 400 11px/1.5 var(--mono);
  letter-spacing: var(--tracking-mono);
  margin: 0;
  text-transform: uppercase;
}

@media (max-width: 1080px) {
  :root { --pad-x: 32px; }
  .section-grid, .compiler .section-grid, .code-grid, .start-grid { padding-block: 96px; }
}
@media (max-width: 960px) {
  .code-grid, .start-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
}
@media (max-width: 720px) {
  :root { --pad-x: 24px; }
  .primary-nav { display: none; }
  .mobile-nav { display: block; }
  .header-row { min-height: 72px; }
  .wordmark img { height: 34px; }
  .hero-grid { padding-block: 56px 68px; }
  .hero h1 { font-size: clamp(34px, 8vw, 44px); }
  .hero-editor pre { padding: 22px 20px 24px; font-size: 12.5px; line-height: 1.7; }
  .hero-editor__head { height: 32px; padding: 0 14px; font-size: 10.5px; }
  .section-grid, .compiler .section-grid { padding-block: 72px; }
  .code-grid, .start-grid { padding-block: 72px; }
  .platform-tab {
    min-height: 50px;
    padding-inline: 8px;
    gap: 7px;
    font-size: 10px;
  }
  .platform-tab img,
  .platform-icon { width: 17px; height: 17px; flex-basis: 17px; }
  .install-panel__head { padding-inline: 16px; }
  .install-command {
    min-height: 0;
    padding: 15px 16px 17px;
    align-items: flex-start;
    gap: 10px;
  }
  .install-command code {
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    mask-image: none;
    -webkit-mask-image: none;
    font-size: 12.5px;
    line-height: 1.65;
  }
  .feature-list article, .project-links a { grid-template-columns: 1fr; gap: 6px; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline > div { border-right: 0; border-bottom: 1px solid var(--soft); }
  .pipeline > div:nth-child(odd) { border-right: 1px solid var(--soft); }
  .pipeline > div:last-child, .pipeline > div:nth-last-child(2) { border-bottom: 0; }
  .footer-grid { padding-block: 8px 12px; }

  /* Mobile: single-column groups, heading on its own row, links flow horizontally. */
  .footer-cols {
    display: block;
    gap: 0;
  }
  .footer-col {
    display: block;
    padding-block: 13px;
    border-top: 1px solid rgba(251, 246, 234, 0.1);
  }
  .footer-col:first-child { border-top: 0; }
  .footer-col h4 { margin: 0 0 8px; }
  .footer-col ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
  }
  .footer-col a { font-size: 14px; }
  .footer-meta { padding-block: 14px; }
}
@media (max-width: 480px) {
  :root { --pad-x: 20px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .button { width: 100%; }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline > div { border-right: 0; border-bottom: 1px solid var(--soft); }
  .pipeline > div:last-child { border-bottom: 0; }
  .install-command { padding: 14px 16px; gap: 10px; }
  .install-command code { font-size: 12px; }
}

/* --- differentiated content sections (unchanged from prior commit) --- */
.subpage-hero { border-bottom: 1px solid var(--line); }
.subpage-hero__grid { min-height: 390px; padding-block: 72px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 96px; align-items: end; }
.subpage-hero h1, .blog-masthead h1 { margin-top: 18px; color: var(--ink); font-size: clamp(40px, 4vw, 56px); font-weight: 500; line-height: 1.08; letter-spacing: -.032em; }
.subpage-hero__grid > p, .news-intro > p { max-width: 460px; color: var(--muted); font-size: 18px; }

.docs-hero { background: var(--paper-deep); }
.docs-index-layout { padding-block: 76px 110px; display: grid; grid-template-columns: 210px 1fr; gap: 90px; align-items: start; }
.docs-index-nav { position: sticky; top: 28px; padding-top: 4px; }
.docs-index-nav > p { color: var(--faint); font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.docs-index-nav nav { margin-top: 18px; display: grid; border-top: 1px solid var(--line); }
.docs-index-nav nav a { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 500; text-transform: capitalize; }
.docs-source { display: block; margin-top: 24px; color: var(--ink); font-size: 12px; }
.docs-groups { display: grid; gap: 64px; }
.docs-group { scroll-margin-top: 24px; }
.docs-group > header { display: grid; grid-template-columns: 48px 1fr; align-items: baseline; padding-bottom: 17px; border-bottom: 1px solid var(--ink); }
.docs-group > header span { color: var(--sub); font: 500 11px var(--mono); }
.docs-group > header h2 { color: var(--ink); font-size: 25px; font-weight: 500; text-transform: capitalize; }
.docs-group ol { list-style: none; margin: 0; padding: 0; }
.docs-group li { border-bottom: 1px solid var(--line); }
.docs-group li a { display: grid; grid-template-columns: 48px 1fr 24px; gap: 16px; align-items: center; padding: 22px 0; }
.docs-group li a > span { color: var(--faint); font: 500 11px var(--mono); }
.docs-group h3 { color: var(--ink); font-size: 18px; font-weight: 500; }
.docs-group li p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.docs-group li b { color: var(--accent); font-weight: 500; }
.docs-reader { padding-block: 66px 110px; display: grid; grid-template-columns: 230px minmax(0, 760px); gap: 88px; align-items: start; }
.docs-article { min-width: 0; }
.docs-article .prose { max-width: 100%; overflow-wrap: anywhere; }
.docs-article .prose pre { max-width: 100%; }
.docs-article .prose table { display: block; max-width: 100%; overflow-x: auto; }
.docs-sidebar { position: sticky; top: 28px; }
.docs-sidebar__home { display: block; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 500; }
.docs-sidebar section { margin-top: 25px; }
.docs-sidebar h2 { color: var(--faint); font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.docs-sidebar nav { margin-top: 10px; display: grid; }
.docs-sidebar nav a { padding: 7px 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: 13px; }
.docs-sidebar nav a.active { border-left-color: var(--accent); background: var(--paper-deep); color: var(--ink); font-weight: 500; }
.docs-article > header { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.docs-article h1 { margin-top: 14px; color: var(--ink); font-size: clamp(38px, 4vw, 52px); font-weight: 500; line-height: 1.1; letter-spacing: -.028em; }
.docs-article .lede { margin-top: 16px; font-size: 18px; }
.docs-pager { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.docs-pager a { display: grid; gap: 5px; color: var(--ink); }
.docs-pager a.next { text-align: right; }
.docs-pager small { color: var(--faint); font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.docs-pager span { font-size: 14px; font-weight: 500; }

.news-hero { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.news-hero h1 { color: var(--paper); }
.news-hero .eyebrow { color: var(--accent); }
.news-intro { display: grid; gap: 24px; }
.news-intro > p { color: rgba(251, 246, 234, 0.6); }
.news-intro a { color: var(--paper); font: 500 12px var(--mono); }
.news-timeline { padding-block: 74px 112px; }
.news-timeline article { display: grid; grid-template-columns: 190px 1fr; border-top: 1px solid var(--line); }
.news-timeline article:last-of-type { border-bottom: 1px solid var(--line); }
.news-date { padding: 27px 30px 27px 0; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-content: start; border-right: 1px solid var(--line); }
.news-date span { color: var(--sub); font: 500 11px var(--mono); }
.news-date time { color: var(--faint); font: 500 11px/1.5 var(--mono); text-transform: uppercase; }
.news-timeline article > a { padding: 26px 0 31px 48px; }
.news-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.news-tags span { color: var(--sub); font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.news-timeline h2 { margin-top: 11px; color: var(--ink); font-size: 28px; font-weight: 500; line-height: 1.2; }
.news-timeline p { margin-top: 8px; max-width: 700px; color: var(--muted); font-size: 15px; }
.news-timeline b { display: inline-block; margin-top: 16px; color: var(--ink); font-size: 13px; font-weight: 500; }
.news-article > header { padding-block: 76px; background: var(--ink); color: var(--paper); }
.news-article__head { display: grid; grid-template-columns: 190px minmax(0, 760px); gap: 48px; }
.news-article__head > div:first-child { display: grid; align-content: start; gap: 18px; }
.back-link { color: var(--ink); font-size: 13px; font-weight: 500; }
.news-article .back-link { color: rgba(251, 246, 234, 0.6); }
.news-article__head time { color: rgba(251, 246, 234, 0.55); font: 500 11px/1.5 var(--mono); }
.news-article h1 { margin-top: 16px; font-size: clamp(38px, 4vw, 54px); font-weight: 500; line-height: 1.1; letter-spacing: -.028em; }
.news-article__head > div:last-child > p { margin-top: 18px; color: rgba(251, 246, 234, 0.6); font-size: 18px; }
.news-article__body { max-width: 760px; padding-block: 56px 110px; }

.blog-masthead { padding-block: 100px 78px; border-bottom: 1px solid var(--line); }
.blog-masthead > p:last-child { margin-top: 25px; max-width: 600px; color: var(--muted); font-size: 18px; }
.essay-list { max-width: 900px; padding-block: 50px 110px; }
.essay-list article { border-bottom: 1px solid var(--line); }
.essay-list article a { display: grid; padding: 32px 0; }
.essay-list article div, .essay-meta { display: flex; gap: 16px; color: var(--faint); font: 500 11px var(--mono); }
.essay-list h2 { margin-top: 12px; color: var(--ink); font-size: 30px; font-weight: 500; }
.essay-list p { margin-top: 8px; color: var(--muted); }
.essay-list b { margin-top: 16px; color: var(--ink); font-size: 13px; }
.empty-state { padding: 34px 0; color: var(--muted); }
.empty-state strong { color: var(--ink); }
.essay-head { max-width: 840px; padding-block: 84px 54px; border-bottom: 1px solid var(--line); }
.essay-meta { margin-top: 36px; }
.essay-head h1 { margin-top: 20px; color: var(--ink); font-size: clamp(42px, 4.5vw, 60px); font-weight: 500; line-height: 1.08; letter-spacing: -.032em; }
.essay-head > p { margin-top: 20px; color: var(--muted); font-size: 20px; }
.essay-body { max-width: 760px; padding-block: 24px 110px; }

.prose { margin-top: 32px; }
.prose h2 { margin-top: 48px; color: var(--ink); font-size: 27px; font-weight: 500; }
.prose h3 { margin-top: 32px; font-size: 20px; }
.prose p, .prose ul, .prose ol { margin-block: 14px; line-height: 1.75; font-size: 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose code { font: 500 14px var(--mono); background: var(--paper-deep); padding: 2px 5px; border-radius: 0; }
.prose pre { padding: 20px 22px; margin-block: 20px; overflow-x: auto; border-radius: 0; background: var(--ink); }
.prose pre code { background: none; padding: 0; color: var(--paper); font-size: 13.5px; line-height: 1.6; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 820px) {
  .subpage-hero__grid { min-height: 330px; grid-template-columns: 1fr; gap: 28px; align-content: center; }
  .docs-index-layout, .docs-reader { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .docs-index-nav, .docs-sidebar { position: static; }
  .docs-index-nav nav { grid-template-columns: repeat(2, 1fr); }
  .docs-sidebar { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .docs-sidebar section { display: none; }
  .news-article__head { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 560px) {
  .subpage-hero__grid { min-height: 290px; padding-block: 52px; }
  .subpage-hero h1, .blog-masthead h1 { font-size: 38px; }
  .docs-index-layout { padding-block: 48px 80px; }
  .docs-group li a { grid-template-columns: 30px 1fr 18px; gap: 10px; }
  .docs-reader { padding-block: 38px 80px; }
  .docs-article h1 { font-size: 38px; }
  .news-timeline { padding-block: 40px 80px; }
  .news-timeline article { grid-template-columns: 1fr; }
  .news-date { padding: 18px 0 10px; border-right: 0; }
  .news-timeline article > a { padding: 8px 0 26px; }
  .news-timeline h2 { font-size: 24px; }
  .news-article > header { padding-block: 52px; }
  .news-article h1 { font-size: 38px; }
  .blog-masthead { padding-block: 64px 52px; }
  .essay-list h2 { font-size: 25px; }
  .essay-head { padding-block: 55px 42px; }
  .essay-head h1 { font-size: 40px; }
}
