:root {
  color-scheme: light;
  --bg: #f4f4ee;
  --search-backdrop: rgba(40, 40, 32, .25);
  --search-shadow: rgba(30, 30, 20, .18);
  --fg: #111;
  --link: #00c;
  --muted: #77776f;
  --rule: #666;
  --rule-dot: #aaa;
  --panel: #ecece4;
  --panel-edge: #b0b0a4;
  --nav-border: #bbb;
  --jump: rgba(230, 195, 92, .32);
  --kind-function: #1a4a9c;
  --kind-type: #1a6b52;
  --kind-struct: #8a5a12;
  --kind-callback: #6b3d9c;
  --kind-macro: #9a4b12;
  --kind-constant: #9a4b12;
  --kind-field: #1a6b52;
  --kind-heading: #666;
}

html.dark {
  color-scheme: dark;
  --bg: #0b0a09;
  --search-backdrop: rgba(0, 0, 0, .6);
  --search-shadow: rgba(0, 0, 0, .45);
  --fg: #d1ccc4;
  --link: #9eb4cc;
  --muted: #7a756c;
  --rule: #3a3428;
  --rule-dot: #2a2620;
  --panel: #141210;
  --panel-edge: #3a3428;
  --nav-border: #22201c;
  --jump: rgba(158, 193, 255, .14);
  --kind-function: #9eb4cc;
  --kind-type: #8aaa90;
  --kind-struct: #c4a06e;
  --kind-callback: #b09cc4;
  --kind-macro: #c49a7a;
  --kind-constant: #c49a7a;
  --kind-field: #8aaa90;
  --kind-heading: #8a8580;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 14px; }
html, body { background: var(--bg); overflow-x: hidden; }
body {
  margin: 0;
  color: var(--fg);
  font: 13px/1.4 "Courier New", Courier, "Liberation Mono", monospace;
  position: relative;
}
button, input { font: inherit; }
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link); }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
a:has(code), a:has(code):hover { text-decoration: none; }
:focus-visible { outline: 1px solid var(--link); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: 6px;
  left: 90px;
  z-index: 20;
  padding: 4px 8px;
  background: var(--panel);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

#page-tools {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
}
#theme-toggle, #search-toggle, #to-top {
  color: var(--fg);
  appearance: none;
  background: var(--bg);
  border: 0;
  padding: 2px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
#theme-toggle:hover, #search-toggle:hover, #to-top:hover { opacity: .65; }
html.no-js #theme-toggle, html.no-js #search-toggle { display: none; }

#navigation { display: none; }
html.no-js #navigation {
  display: block;
  max-height: 45vh;
  overflow: auto;
  border-bottom: 1px solid var(--nav-border);
  padding: 12px 16px;
  background: var(--panel);
}
#navigation ul { padding-left: 5ch; }
#navigation h2 { font-size: 13px; text-transform: uppercase; }

#contents {
  max-width: 100ch;
  margin: 0 auto;
  padding: 16px 16px 64px;
  position: relative;
  outline: none;
}
#contents > h1, #contents > h2, #contents section > h2,
#contents section > h3, #contents dt { scroll-margin-top: 14px; }

h1, h2, h3 {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0;
}
h1 > a, h2 > a, h3 > a,
h1 > a:visited, h2 > a:visited, h3 > a:visited {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}
h1 > a:hover, h2 > a:hover, h3 > a:hover { text-decoration: underline; }

#contents > .doc-title {
  margin: 0;
  padding: 0;
  border: 0;
}
.doc-version {
  font-weight: normal;
  text-transform: none;
  color: var(--muted);
  margin-left: 1ch;
}
#contents .doc-subtitle {
  margin: 5px 0 26px;
  color: var(--muted);
}

.guide-page { display: contents; }
#contents > h1, #contents > .guide-page > h1 {
  margin: 2.4em 0 .7em;
  padding-top: 1.15em;
  border-top: 1px solid var(--rule);
}
.section-no {
  display: inline-block;
  min-width: 4.5ch;
  margin-right: 1ch;
  font-variant-numeric: tabular-nums;
}
#contents h2 { margin: 1.55em 0 .45em; padding-top: .2em; }
#contents h3 { margin: 1.1em 0 .35em; }
#contents p, #contents ul, #contents ol, #contents dl,
#contents pre, #contents .table-scroll { margin-left: 7ch; }
#contents p { margin-top: 0; margin-bottom: 8px; }
#contents ul, #contents ol { padding-left: 3ch; margin-top: 0; margin-bottom: 8px; }
li + li { margin-top: 2px; }
strong { font-weight: bold; }

.site-header {
  min-height: calc(100svh - 32px);
  padding: 48px 0 24px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.hero-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .13em;
  animation: hero-reveal .7s .05s both;
}
#contents > .site-header > .wordmark {
  margin: auto 0 0;
  padding: 48px 0 0;
  border: 0;
  font-family: inherit;
  font-size: clamp(100px, 18vw, 220px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: normal;
  text-transform: lowercase;
  animation: wordmark-in .9s .12s cubic-bezier(.2, .75, .25, 1) both;
}
#contents .hero-subtitle {
  margin: 30px 0 34px;
  font-size: 16px;
  line-height: 1.3;
  animation: hero-reveal .7s .35s both;
}
.hero-pipeline {
  display: grid;
  grid-template-columns: auto minmax(60px, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
  font-size: 12px;
  font-weight: bold;
  animation: hero-reveal .7s .48s both;
}
.pipeline-output span { font-weight: normal; color: var(--muted); }
.pipeline-track {
  display: block;
  height: 84px;
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.pipeline-graph { width: 100%; height: 100%; display: block; overflow: hidden; }
.pipeline-graph path { fill: none; vector-effect: non-scaling-stroke; }
#pipeline-grid path { stroke: var(--rule-dot); stroke-width: .5; opacity: .28; }
.pipeline-axis { stroke: var(--rule-dot); stroke-width: 1; opacity: .4; }
.pipeline-wave { animation: wave-flow 12s linear infinite; }
.pipeline-wave path { stroke: var(--fg); stroke-width: 1.4; opacity: .7; }
.pipeline-wave.wave-1 { animation-duration: 18s; }
.pipeline-wave.wave-1 path { stroke: var(--link); stroke-width: 1; opacity: .4; }
.pipeline-wave.wave-2 { animation-duration: 9s; }
.pipeline-wave.wave-2 path { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 5; opacity: .45; }
@keyframes wave-flow {
  from { transform: translateX(-600px); }
  to { transform: translateX(0); }
}
#contents .hero-description p {
  margin-left: 0;
  color: var(--muted);
  max-width: none;
  animation: hero-reveal .7s .58s both;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin-top: 18px;
  animation: hero-reveal .7s .68s both;
}
.hero-links a, .hero-links button {
  display: inline-flex;
  gap: 22px;
  justify-content: space-between;
  min-width: 180px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule-dot);
  color: var(--fg);
}
.hero-links button {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule-dot);
  text-align: left;
}
.hero-links button:disabled { color: var(--muted); cursor: not-allowed; }
.hero-links a:hover { border-bottom-color: var(--fg); text-decoration: none; }
.hero-links a span { color: var(--muted); transition: transform .2s ease; }
.hero-links a:hover span { transform: translate(2px, 2px); }
.hero-links .hero-link-featured {
  padding: 9px 16px;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  font-weight: bold;
  box-shadow: 3px 3px 0 var(--panel-edge);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hero-links .hero-link-featured span { color: inherit; }
.hero-links .hero-link-featured:hover {
  transform: translateY(-2px);
  box-shadow: 3px 5px 0 var(--panel-edge);
}
.community-links a, .community-links button { align-items: center; gap: 10px; }
.community-links a > span, .community-links button > span { margin-left: auto; }
.community-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: currentColor; }
.hero-scroll {
  margin-top: auto;
  padding-top: 42px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  animation: hero-reveal .7s .8s both;
}
.hero-scroll:hover { color: var(--fg); text-decoration: none; }
.manual-label {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.manual-label + .guide-page > h1 { margin-top: 1.5em; padding-top: 0; border-top: 0; }

@keyframes wordmark-in {
  from { opacity: 0; transform: translateY(.22em); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
}
@keyframes hero-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 720px) {
  .site-header { min-height: calc(100svh - 32px); padding-top: 44px; }
  .hero-topline { font-size: 9px; letter-spacing: .08em; }
  #contents > .site-header > .wordmark { font-size: clamp(88px, 29vw, 128px); padding-top: 36px; }
  #contents .hero-subtitle { margin: 24px 0 28px; font-size: 14px; }
  .hero-pipeline { gap: 12px; font-size: 11px; }
  .hero-links a { min-width: 150px; flex: 1; }
  .manual-label { font-size: 10px; }

}

@media (prefers-reduced-motion: reduce) {
  .hero-topline, #contents > .site-header > .wordmark, #contents .hero-subtitle,
  .hero-pipeline, .pipeline-track, #contents .hero-description p,
  .hero-links, .hero-scroll { animation: none; }
  .pipeline-wave { animation: none; }
  .hero-links a span { transition: none; }
}

code {
  font-family: inherit;
  font-weight: bold;
  background: none;
  padding: 0;
}
a code { color: var(--link); }
pre {
  margin-top: 0;
  margin-bottom: 8px;
  max-width: 100%;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  tab-size: 4;
}
pre > code {
  display: block;
  font-weight: normal;
  color: var(--fg);
  line-height: 1.35;
  white-space: inherit;
}
.guide-page pre, .api-page pre.declaration {
  background: var(--panel);
  border-left: 3px solid var(--panel-edge);
  padding: .65em 1.5ch .7em;
  white-space: pre;
  overflow-x: auto;
  overflow-wrap: normal;
}
.table-scroll { overflow-x: auto; max-width: 100%; margin-bottom: 8px; }
table { border-collapse: collapse; min-width: 45ch; }
th, td { border: 0; padding: 0 2ch .35em 0; vertical-align: top; }
th { text-align: left; font-weight: bold; }
td code { white-space: nowrap; }

.api-page {
  margin: 1.7em 0 0;
  padding: 1.05em 0 .85em;
  border-top: 1px solid var(--rule);
  border-bottom: 1px dotted var(--rule-dot);
  min-width: 0;
}
h2.api-title, h2.api-title > a, h2.api-title > a:visited {
  text-transform: none;
}
.api-page > h2.api-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5ch 1.5ch;
  margin: 0 0 .7em;
  padding: 0;
}
.api-kind { font-weight: normal; text-transform: none; white-space: nowrap; }
.api-kind-function { color: var(--kind-function); }
.api-kind-type { color: var(--kind-type); }
.api-kind-struct { color: var(--kind-struct); }
.api-kind-callback { color: var(--kind-callback); }
.api-kind-macro { color: var(--kind-macro); }
.api-kind-constant { color: var(--kind-constant); }
.api-kind-field { color: var(--kind-field); }
.api-kind-page { color: var(--muted); }
.api-kind-heading { color: var(--kind-heading); }
h2 > a.view-source, h2 > a.view-source:visited {
  color: var(--muted);
  font-weight: normal;
  text-transform: none;
  margin-left: auto;
  white-space: nowrap;
}
h2 > a.view-source:hover { color: var(--link); text-decoration: underline; }
.api-page > p { max-width: 83ch; }
.api-page h3.api-member-title {
  margin: 14px 0 3px 7ch;
  padding: 0;
  text-transform: none;
}
.api-page h3.api-member-title + p { margin-top: 0; }

.jump-target { animation: jump-flash 1.6s ease-out; }
@keyframes jump-flash {
  0%, 35% { background: var(--jump); box-shadow: 0 0 0 5px var(--jump); }
  100% { background: transparent; box-shadow: 0 0 0 5px transparent; }
}

body::after {
  content: "type to search";
  position: fixed;
  right: 12px;
  bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}
html.no-js body::after, body:has(#search-overlay:not([hidden]))::after { content: none; }

#search-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--search-backdrop);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
}
#search-overlay[hidden] { display: none !important; }
.search-panel {
  width: min(640px, 100%);
  max-height: 76vh;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--panel-edge);
  box-shadow: 0 12px 40px var(--search-shadow);
  font: 13px/1.25 "Segoe UI", Tahoma, "Lucida Grande", sans-serif;

}
.search-tabs {
  display: flex;
  flex-wrap: wrap;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-edge);
  padding: 0 6px;
}
.search-tabs button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  margin: 0;
  padding: 8px 10px 6px;
}
.search-tabs button:hover { color: var(--fg); }
.search-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--link); }
.search-query {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--panel-edge);
}
.search-query::before { content: ""; width: 3px; align-self: stretch; background: var(--link); }
#search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--fg);
  font: 14px/1.4 "Segoe UI", Tahoma, sans-serif;
  padding: 9px 4px 9px 0;
  caret-color: var(--link);
}
#search-input::placeholder { color: var(--muted); }
#search-count { color: var(--muted); font-size: 11px; padding-right: 10px; white-space: nowrap; }
#search-results {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 48vh;
  overflow: auto;
}
#search-results li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 5px 10px 5px 12px;
  cursor: pointer;
  color: var(--fg);
}
#search-results li[aria-selected="true"], #search-results li:hover { background: var(--jump); }
#search-results .search-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#search-results .search-name em { font-style: normal; font-weight: 700; color: var(--link); }
#search-results li[aria-selected="true"] .search-name em { color: var(--link); }
#search-results .search-kind { font-size: 11px; flex: 0 0 auto; }
#search-empty { padding: 10px 12px 12px; color: var(--muted); font-size: 12px; }
.search-foot { border-top: 1px solid var(--panel-edge); color: var(--muted); font-size: 11px; padding: 6px 10px; margin: 0; }

body.source-page::after { content: none; }
#source-main { margin: 0; padding: 16px 0 56px; }
.source-nav { margin: 0 16px 14px 8ch; color: var(--muted); }
.source-nav span { margin-left: 1ch; }
.source-page .doc-title { margin: 0 16px 18px 8ch; }
.source { margin: 0; max-width: none; }
.src-line { display: flex; padding: 0 16px 0 0; scroll-margin-top: 12px; }
.src-line .n { flex: 0 0 7ch; text-align: right; padding-right: 2ch; color: var(--muted); user-select: none; }
.src-line .line { flex: 1; min-width: 0; font-weight: normal; white-space: pre; }
.src-line.src-hl { background: var(--jump); }
.src-line.src-hl .n { color: var(--fg); }
.c-cm { color: var(--muted); }
.c-pp { color: #7a3ea0; }
html.dark .c-pp { color: #b09cc4; }

@media (max-width: 720px) {
  body { font-size: 12px; }
  #contents { padding: 16px 14px 56px; }
  #contents p, #contents ul, #contents ol, #contents dl,
  #contents pre, #contents .table-scroll { margin-left: 2ch; }
  #contents ul, #contents ol { padding-left: 2.5ch; }
  .section-no { min-width: 3ch; margin-right: .5ch; }
  .doc-version { display: block; margin: 3px 0 0; }
  #contents .doc-subtitle { margin-bottom: 22px; }
  .api-page h3.api-member-title { margin-left: 2ch; }
  h2 > a.view-source { margin-left: 0; }
  #page-tools { left: auto; right: 10px; top: 6px; }
  #page-tools > * { background: var(--bg); }
  #source-main { padding-top: 40px; }
  .source-nav, .source-page .doc-title { margin-left: 16px; }
  body::after { content: "/ to search"; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .jump-target { animation: none; background: var(--jump); }
}

@media print {
  :root { --bg: white; --fg: black; }
  #page-tools, #search-overlay, body::after { display: none; }
  #contents { max-width: none; }
  .api-page { break-inside: avoid; }
}

/* Engines: one-pagers comparing zdxc with DXC inside real engines. */
:root { --race-dxc: #a9a99c; --race-zdxc: #111; --race-accent: #b8860b; }
html.dark { --race-dxc: #3f3a31; --race-zdxc: #d1ccc4; --race-accent: #e6c35c; }

.engines { display: block; }
#contents > .engines > h1 { margin: 2.4em 0 .7em; padding-top: 1.15em; border-top: 0; }
#contents .engines-intro p { color: var(--muted); max-width: 72ch; }
.engine-page { margin: 34px 0 10px; padding-top: 22px; border-top: 1px solid var(--rule); }
#contents h2.engine-title {
  margin: 0;
  padding: 0;
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 400;
  line-height: 1;
  text-transform: lowercase;
}
.engine-vs { color: var(--muted); }
#contents .engine-subtitle {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.race { margin: 22px 0 26px 7ch; }
.race-row { margin-bottom: 16px; }
.race-label { display: flex; justify-content: space-between; gap: 2ch; margin-bottom: 4px; }
.race-speedup { color: var(--race-accent); font-weight: bold; white-space: nowrap; transition: opacity .4s ease; }
.race-lane {
  display: grid;
  grid-template-columns: 5ch minmax(0, 1fr) 16ch;
  align-items: center;
  gap: 1ch;
  min-height: 15px;
}
.race-name { color: var(--muted); }
.race-zdxc .race-name { color: var(--fg); font-weight: bold; }
.race-track { display: block; height: 7px; border-bottom: 1px dotted var(--rule-dot); }
.race-bar { display: block; height: 100%; background: var(--race-dxc); }
.race-zdxc .race-bar { background: var(--race-zdxc); }
.race-time { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.race-zdxc .race-time { color: var(--fg); }
.race-row.zdxc-done .race-zdxc .race-time { color: var(--race-accent); font-weight: bold; }
.race-ready .race-row:not(.zdxc-done) .race-speedup { opacity: 0; }
.race figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.race-replay {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  cursor: pointer;
}
.race-replay:hover { text-decoration: underline; }

.compare { margin: 14px 0 22px 7ch; }
.compare-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule-dot);
  touch-action: pan-y;
}
.compare-frame img { display: block; width: 100%; height: auto; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.compare-before img { width: 100%; height: 100%; object-fit: cover; }
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.compare-handle::after {
  content: "↔";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  padding: 2px 6px;
  background: #111;
  color: #f4f4ee;
  font-size: 12px;
}
.compare-tag {
  position: absolute;
  top: 8px;
  padding: 2px 6px;
  background: rgba(17, 17, 17, .78);
  color: #f4f4ee;
  font-size: 11px;
  pointer-events: none;
}
.compare-tag-before { left: 8px; }
.compare-tag-after { right: 8px; }
.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare-frame:has(.compare-range:focus-visible) { outline: 1px solid var(--link); outline-offset: 3px; }
.compare figcaption { margin-top: 6px; color: var(--muted); font-size: 11px; }

@media (max-width: 720px) {
  .race, .compare { margin-left: 2ch; }
  .race-lane { grid-template-columns: 4.5ch minmax(0, 1fr) 16ch; }
  .race figcaption { flex-direction: column; }
}

/* Landing: why zdxc. */
.points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 2ch;
  margin: 26px 0 6px !important;
  padding: 0 !important;
  list-style: none;
  animation: hero-reveal .7s .64s both;
}
.points li { display: flex; flex-direction: column; gap: 4px; margin: 0; padding-top: 10px; border-top: 1px solid var(--rule); }
.point-figure { font-size: clamp(26px, 4vw, 40px); line-height: 1; }
.point-title { font-weight: bold; text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.point-text { color: var(--muted); }
#contents .hero-description .points p { margin: 0; }
@media (max-width: 900px) {
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 2ch; }
}
@media (prefers-reduced-motion: reduce) { .points { animation: none; } }

/* Landing: quick start. */
.quickstart { margin-top: 30px; animation: hero-reveal .7s .72s both; }
.quickstart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 3ch;
  margin-bottom: 10px;
}
#contents h2.quickstart-heading {
  margin: 0;
  padding: 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .1em;
}
.quickstart-tabs { display: flex; gap: 3ch; }
.quickstart-tabs button {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.quickstart-tabs button:hover { color: var(--fg); }
.quickstart-tabs button[aria-selected="true"] { color: var(--fg); font-weight: bold; border-bottom-color: var(--fg); }
html.no-js .quickstart-tabs { display: none; }
#contents h3.quickstart-panel-title { display: none; }
html.no-js #contents h3.quickstart-panel-title { display: block; margin: 14px 0 8px; font-size: 11px; }
.quickstart-panel[hidden] { display: none; }
.quickstart ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 2ch;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  counter-reset: step;
}
.quickstart li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  counter-increment: step;
  min-width: 0;
}
.quickstart-title { font-weight: bold; text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.quickstart-title::before { content: counter(step) ". "; color: var(--muted); }
#contents .quickstart pre {
  margin: 0;
  padding: 7px 9px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.quickstart pre code { font-weight: normal; }
.quickstart-text { color: var(--muted); }
.quickstart-links { display: flex; flex-wrap: wrap; gap: 8px 30px; margin-top: 14px; }
.quickstart-links a {
  display: inline-flex;
  gap: 22px;
  justify-content: space-between;
  min-width: 160px;
  padding: 4px 0;
  border-bottom: 1px solid var(--rule-dot);
  color: var(--fg);
}
.quickstart-links a:hover { border-bottom-color: var(--fg); text-decoration: none; }
.quickstart-links a span { color: var(--muted); }
@media (max-width: 900px) {
  .quickstart ol { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { .quickstart { animation: none; } }

/* Shared navigation between the landing page and the manual. */
.site-nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 70px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 3ch;
  font-size: 12px;
}
.site-nav a { color: var(--muted); }
.site-nav a[aria-current="page"] { color: var(--fg); font-weight: bold; }
.engine-tabs { margin: 24px 0 0; overflow-x: auto; }
.engine-tabs button { white-space: nowrap; padding: 10px 0; }
.engine-page[hidden] { display: none; }
@media (max-width: 600px) {
  .site-nav { padding-left: 14px; }
}

.why-page { padding-top: 36px; }
.why-page .section-no { display: none; }
#contents .why-page p { max-width: 72ch; margin-left: 0; line-height: 1.7; margin-bottom: 18px; }
#contents .why-page h1 { font-size: clamp(32px, 6vw, 56px); margin: 0 0 36px; }
#contents .why-page h2 { margin-top: 48px; font-size: 22px; text-transform: none; }
#contents .why-page h3 { margin-top: 28px; font-size: 15px; text-transform: none; }

#contents .hero-subtitle:has(+ .hero-byline) { margin-bottom: 8px; }
#contents .hero-byline {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Plain HTML remains usable when scripts are disabled or blocked. */
html.no-js #navigation {
  max-width: 100ch;
  max-height: none;
  margin: 20px auto 0;
}
html.no-js #navigation:not(:has(nav)) { display: none; }
#navigation summary { cursor: pointer; font-weight: bold; }
.compare-static { display: none; }
html.no-js .compare-frame,
html.no-js .compare-interactive-caption { display: none; }
html.no-js .compare-static { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare-static figure { margin: 0; min-width: 0; }
.compare-static img { display: block; width: 100%; height: auto; }
@media (max-width: 720px) {
  html.no-js .compare-static { grid-template-columns: 1fr; }
}
