@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/AtkinsonHyperlegibleNext-Latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --palette-ink: #111018;
  --palette-wine: #633436;
  --palette-red: #bd4444;
  --palette-paper: #f3f1f4;
  --brand: #d65353;
  --accent-text: color-mix(in srgb, var(--brand) 85%, var(--palette-paper));
  --backdrop-deep: #090607;
  --text-soft: color-mix(in srgb, var(--palette-paper) 76%, var(--palette-ink));
  --line: color-mix(in srgb, var(--palette-paper) 19%, var(--palette-ink));
  --surface: color-mix(in srgb, var(--palette-paper) 5%, var(--palette-ink));
  --radius-s: 4px;
  --radius-m: 8px;
  --font-body: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--palette-paper);
  background: var(--palette-ink);
  font-family: var(--font-body);
  font-synthesis: none;
  line-height: 1.55;
  scrollbar-color: var(--palette-wine) var(--palette-ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; min-width: 320px; }
::selection { color: var(--palette-ink); background: var(--brand); }
a { color: inherit; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 5px; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
code { font-family: var(--font-mono); font-size: 0.86em; }
.wrap { width: min(100% - 6rem, 1280px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 1rem; left: 1rem; padding: 0.8rem 1rem; color: var(--palette-ink); background: var(--palette-paper); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { flex: 0 0 auto; }
.brand span { font-size: 1.9rem; line-height: 1; font-weight: 700; letter-spacing: -0.04em; }
.site-header nav { display: flex; align-items: center; gap: 2rem; }
.site-header nav a { display: inline-flex; align-items: center; gap: 0.65rem; min-height: 44px; font-size: 0.95rem; text-decoration: none; }
.site-header nav a:hover { color: var(--brand); }
.site-header .nav-source { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0.6rem 1rem; }

.hero { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; column-gap: 2rem; padding-top: 5.2rem; }
.hero-copy { padding-block: 3rem 6rem; position: relative; z-index: 2; }
h1 { font-size: clamp(3.8rem, 6.7vw, 6rem); line-height: 1; letter-spacing: -0.04em; font-weight: 650; }
h1 span { color: var(--brand); }
.hero-copy > p:not(.beta-note) { max-width: 36rem; margin-top: 1.9rem; color: var(--text-soft); font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.65; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.65rem; margin-top: 2.3rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1.4rem; min-height: 52px; padding: 0.9rem 1.3rem; border-radius: var(--radius-s); font-size: 1rem; font-weight: 700; text-decoration: none; transition: background-color 180ms ease, color 180ms ease; }
.primary { color: var(--palette-ink); background: var(--brand); }
.primary:hover { background: color-mix(in srgb, var(--brand) 75%, var(--palette-paper)); }
.text-link { display: inline-flex; align-items: center; gap: 0.65rem; min-height: 44px; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.hero-copy .beta-note { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; margin-top: 2.25rem; color: var(--text-soft); font-size: 0.82rem; }
.status-label { border: 1px solid var(--line); padding: 0.14rem 0.5rem; border-radius: var(--radius-s); color: var(--palette-paper); font-size: 0.8rem; }
.hero-stage { min-height: 570px; position: relative; isolation: isolate; }
.stage-field { position: absolute; z-index: -1; inset: 0 2% 14% 16%; background: var(--palette-wine); border-radius: 48% 48% 4px 4px; }
.hero-icon { position: absolute; z-index: 1; width: 61%; top: 3%; right: 14%; transform: rotate(6deg); animation: stage-arrive 900ms var(--ease-out) both; }
.stage-shelf { position: absolute; z-index: 2; display: grid; place-items: end center; bottom: 19%; left: 3%; right: 0; }
.stage-cover { grid-area: 1 / 1; width: 180px; height: 240px; aspect-ratio: 3 / 4; object-fit: cover; transform-origin: center bottom; border-radius: 3px; box-shadow: 0 14px 30px rgb(9 6 7 / 35%); border: 1px solid color-mix(in srgb, var(--palette-paper) 24%, transparent); }
.stage-cover:first-child:not(:only-child) { transform: translate(-55%, 8%) rotate(-18deg); }
.stage-cover:nth-child(2) { z-index: 2; }
.stage-cover:nth-child(3) { transform: translate(55%, 8%) rotate(18deg); }
.hero-stage figcaption { position: absolute; bottom: 5%; right: 0; font-size: 0.75rem; color: var(--text-soft); text-align: right; }
.hero-foundation { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 1.5rem; padding-block: 1.5rem; border-block: 1px solid var(--line); color: var(--text-soft); font-size: 0.9rem; }
.hero-foundation > span { display: flex; gap: 1rem; white-space: nowrap; }
.hero-foundation > span > span { color: var(--palette-wine); }
@keyframes stage-arrive { from { transform: translateY(20px) rotate(1deg); } to { transform: translateY(0) rotate(6deg); } }

.imports-section { padding-top: 7rem; }
.import-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin: 0; }
.import-methods > div { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.import-methods dt { font-size: 1.35rem; font-weight: 600; line-height: 1.25; }
.import-methods dd { margin: 0.75rem 0 0; color: var(--text-soft); max-width: 65ch; }
.import-jobs { display: grid; grid-template-columns: 1fr 2fr; gap: 2.5rem; margin-top: 2.5rem; padding-block: 1.5rem; border-block: 1px solid var(--line); }
.import-jobs h3 { font-size: 1.35rem; font-weight: 600; }
.import-jobs p { max-width: 65ch; color: var(--text-soft); }
.collection-section { padding-block: 7rem 8rem; }
.section-intro { display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 5rem; margin-bottom: 2.8rem; }
h2 { font-size: clamp(2.2rem, 3.7vw, 3.45rem); line-height: 1.12; font-weight: 600; letter-spacing: -0.035em; }
.section-intro p { color: var(--text-soft); max-width: 65ch; }
/* Preserve the former illustration's footprint; the real UI scrolls inside it. */
.library-example { display: flex; flex-direction: column; height: 654px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.example-toolbar { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 1rem; min-height: 61px; padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.example-brand { font-size: 0.9rem; font-weight: 600; }
.example-label { font-size: 0.76rem; color: var(--text-soft); }
.no-script-note { padding: 1rem; color: var(--text-soft); }
.library-preview { display: block; width: 100%; min-height: 0; flex: 1; border: 0; background: var(--backdrop-deep); }

.grouped-section { background: var(--palette-red); color: var(--palette-paper); }
.grouped-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 7rem; align-items: center; padding-block: 5.5rem; }
.grouped-copy h2 { font-size: clamp(3rem, 5vw, 4.8rem); }
.grouped-copy > p { max-width: 34rem; margin-top: 1.8rem; line-height: 1.7; }
.grouped-copy .text-link { margin-top: 1.5rem; font-weight: 600; }
.grouped-section :focus-visible { outline-color: var(--palette-paper); }
.file-example { padding: 1.9rem; background: var(--palette-ink); border-radius: var(--radius-m); box-shadow: 0 24px 50px rgb(17 16 24 / 20%); }
.file-example-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.file-example-heading > span:first-child { font-size: 1.5rem; font-weight: 600; }
.file-pill { font-size: 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0.3rem 0.55rem; }
.file-example-caption { font-size: 0.8rem; color: var(--text-soft); margin-top: 0.4rem; }
.launch-file { display: flex; align-items: center; gap: 0.6rem; padding: 1rem 0; margin-top: 1.5rem; border-bottom: 1px solid var(--line); }
.launch-file > svg { color: var(--brand); }
.launch-file > span { margin-left: auto; color: var(--brand); font-size: 0.78rem; }
.file-tree { margin-top: 0.25rem; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.file-tree summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--text-soft); font-size: 0.86rem; }
.file-tree summary:hover { color: var(--palette-paper); }
.file-tree ul { margin: 0; padding: 0; list-style: none; }
.file-tree li { display: flex; align-items: center; gap: 0.6rem; min-height: 38px; }
.tree-elbow { width: 13px; height: 15px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: -8px 0 0 0.35rem; flex-shrink: 0; }
.handoff { display: flex; align-items: flex-start; gap: 0.7rem; padding-top: 1.4rem; margin-top: 1.4rem; border-top: 1px solid var(--line); }
.handoff svg { color: var(--brand); margin-top: 3px; }
.handoff p { font-size: 0.85rem; color: var(--text-soft); }
.handoff strong { font-weight: 500; color: var(--palette-paper); }

.underneath-section { display: grid; grid-template-columns: 1fr 1.1fr; gap: 7rem; padding-block: 8rem; }
.underneath-intro p { max-width: 26rem; color: var(--text-soft); margin-top: 1.5rem; }
.underneath-intro img { margin-top: 3rem; }
.capabilities { margin: 0; }
.capabilities > div { padding-block: 1.8rem; border-bottom: 1px solid var(--line); }
.capabilities > div:first-child { padding-top: 0; }
.capabilities dt { font-size: 1.35rem; font-weight: 600; line-height: 1.25; }
.capabilities dd { margin: 0.75rem 0 0; color: var(--text-soft); max-width: 65ch; }

.source-section { color-scheme: light; background: var(--palette-paper); color: var(--palette-ink); }
.source-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 6rem; padding-block: 6rem; }
.source-copy h2 { font-size: clamp(2.8rem, 4.8vw, 4.5rem); }
.source-copy > p { margin-top: 1.6rem; max-width: 65ch; }
.publication-status { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid color-mix(in srgb, var(--palette-ink) 22%, var(--palette-paper)); }
.publication-status h3 { font-size: 1.1rem; color: var(--palette-wine); font-weight: 700; }
.publication-status p { margin-top: 0.65rem; font-size: 0.95rem; }
.repository-address { display: block; margin-top: 1.3rem; overflow-wrap: anywhere; font-size: 0.86rem; }
.source-copy .source-note { margin-top: 2rem; font-size: 0.86rem; }
.setup-guide > h3 { font-size: 1.6rem; font-weight: 600; line-height: 1.25; }
.setup-guide > p { margin-top: 1rem; }
.setup-steps { counter-reset: steps; list-style: none; padding: 0; margin: 2rem 0 0; }
.setup-steps > li { position: relative; padding: 0 0 2rem 2.4rem; counter-increment: steps; }
.setup-steps > li::before { content: counter(steps); position: absolute; top: 0.05rem; left: 0; width: 1.55rem; height: 1.55rem; display: grid; place-items: center; border: 1px solid var(--palette-wine); border-radius: 50%; color: var(--palette-wine); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.setup-steps h4 { font-size: 1.05rem; font-weight: 650; }
.setup-steps p { margin-top: 0.55rem; font-size: 0.9rem; }
.setup-steps pre { margin: 0.8rem 0; padding: 0.85rem 1rem; border-radius: var(--radius-s); color: var(--palette-paper); background: var(--palette-ink); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.setup-steps pre code { font-size: 0.8rem; }
.setup-guide .security-note { padding-top: 1.3rem; margin-top: 0; border-top: 1px solid color-mix(in srgb, var(--palette-ink) 22%, var(--palette-paper)); font-size: 0.86rem; }
.security-note strong { display: block; margin-bottom: 0.4rem; color: var(--palette-wine); }

.documentation-section { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 5rem; padding-block: 6.5rem; border-bottom: 1px solid var(--line); }
.documentation-intro p { margin-top: 1.5rem; max-width: 38ch; color: var(--text-soft); }
.documentation-intro .text-link { margin-top: 1.4rem; color: var(--accent-text); }
.documentation-links { list-style: none; padding: 0; margin: 0; }
.documentation-links li { border-bottom: 1px solid var(--line); }
.documentation-links li:first-child { border-top: 1px solid var(--line); }
.documentation-links a { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.5rem; text-decoration: none; }
.documentation-links strong { display: block; font-size: 1.35rem; font-weight: 600; }
.documentation-links span span { display: block; margin-top: 0.5rem; color: var(--text-soft); font-size: 0.95rem; }
.documentation-links svg { color: var(--accent-text); }
.documentation-links a:hover strong { color: var(--accent-text); text-decoration: underline; }
.questions-section { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 5rem; padding-block: 6.5rem; }
.questions-section h2 { max-width: 10em; font-size: clamp(2.2rem, 3.2vw, 3rem); }
.questions details { border-bottom: 1px solid var(--line); }
.questions summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 72px; padding-block: 1rem; font-size: 1.03rem; font-weight: 600; }
.questions details:first-child summary { padding-top: 0; min-height: 56px; }
.questions summary:hover { color: var(--brand); }
details[open] > summary svg { transform: rotate(180deg); }
.questions details > p { padding-bottom: 1.5rem; max-width: 65ch; color: var(--text-soft); }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; border-top: 1px solid var(--line); padding-block: 2rem; }
.site-footer .brand span { font-size: 1.55rem; }
.site-footer p, .site-footer .copyright-link { color: var(--text-soft); font-size: 0.8rem; }
.site-footer .trademark-notice { flex-basis: 100%; max-width: 90ch; order: 2; margin-top: 0.25rem; font-size: 0.78rem; line-height: 1.6; }

@media (min-width: 1600px) {
  .hero-stage { min-height: 610px; }
}
@media (max-width: 1100px) {
  .wrap { width: min(100% - 4rem, 1280px); }
  .hero { padding-top: 3.4rem; column-gap: 1rem; }
  .hero-stage { min-height: 520px; }
  .hero-copy { padding-top: 2rem; }
  .stage-shelf { bottom: 23%; }
  .stage-cover { width: 114px; height: 152px; }
  .hero-stage figcaption { bottom: 10%; font-size: 0.75rem; }
  .stage-field { bottom: 20%; }
  .section-intro, .grouped-inner, .underneath-section, .source-inner, .questions-section { gap: 3rem; }
  .library-example { height: 636px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 2.5rem); }
  .site-header { min-height: 82px; gap: 1rem; }
  .brand span { font-size: 1.6rem; }
  .brand img { width: 36px; }
  .site-header nav { gap: 0.8rem; }
  .site-header nav a:not(.nav-docs) { display: none; }
  .site-header nav .nav-docs { font-size: 0.9rem; }
  .site-header .nav-source { font-size: 0.85rem; padding: 0.55rem 0.8rem; }
  .hero { grid-template-columns: 1fr; padding-top: 2.8rem; }
  .hero-copy { padding: 0; }
  h1 { font-size: clamp(3.55rem, 10.8vw, 5.3rem); }
  .hero-copy > p:not(.beta-note) { max-width: 31rem; font-size: 1.08rem; margin-top: 1.4rem; }
  .hero-actions { margin-top: 1.7rem; gap: 1.4rem; }
  .hero-copy .beta-note { margin-top: 1.4rem; font-size: 0.78rem; }
  .hero-stage { width: min(100%, 470px); min-height: 0; aspect-ratio: 1.03; justify-self: center; margin-block: 2rem 1.8rem; }
  .stage-field { inset: 0 7% 15% 16%; }
  .hero-icon { width: 55%; top: 1%; right: 17%; }
  .stage-shelf { bottom: 19%; left: 5%; right: 5%; }
  .hero-stage figcaption { bottom: 0; right: 3%; font-size: 0.75rem; }
  .hero-foundation { flex-direction: column; gap: 0.4rem; font-size: 0.8rem; padding-block: 1.2rem; }
  .hero-foundation > span { gap: 0.7rem; }
  .imports-section { padding-top: 4.5rem; }
  .import-methods, .import-jobs { grid-template-columns: 1fr; gap: 1.5rem; }
  .import-jobs { gap: 0.75rem; margin-top: 1.5rem; }
  .collection-section { padding-block: 4.5rem; }
  .section-intro, .grouped-inner, .underneath-section, .source-inner, .questions-section { grid-template-columns: 1fr; gap: 1.7rem; }
  .section-intro { margin-bottom: 2rem; }
  .section-intro p { max-width: 65ch; }
  .library-example { height: 575px; }
  .example-toolbar { padding: 0.8rem 1rem; flex-wrap: wrap; gap: 0.4rem; }
  .example-label { font-size: 0.75rem; }
  .grouped-inner { padding-block: 3.5rem; gap: 2.5rem; }
  .grouped-copy h2 { font-size: clamp(3.2rem, 12vw, 4.3rem); }
  .grouped-copy > p { margin-top: 1.3rem; }
  .file-example { padding: 1.4rem; }
  .file-example code { font-size: 0.76rem; overflow-wrap: anywhere; }
  .file-pill { font-size: 0.75rem; }
  .underneath-section { padding-block: 4.5rem; gap: 2.5rem; }
  .underneath-intro img { display: none; }
  .underneath-intro p { margin-top: 1.2rem; }
  .capabilities > div { padding-block: 1.5rem; }
  .capabilities dt { font-size: 1.25rem; }
  .source-inner { padding-block: 3.5rem; gap: 3.5rem; }
  .source-copy h2 { font-size: 3rem; }
  .setup-steps > li { padding-left: 2.1rem; }
  .documentation-section { grid-template-columns: 1fr; padding-block: 4.5rem; gap: 2rem; }
  .questions-section { padding-block: 4.5rem; gap: 2rem; }
  .questions-section h2 { max-width: 13em; }
  .questions summary { font-size: 1rem; }
  .site-footer { gap: 1rem; }
  .site-footer p { width: 100%; order: 1; }
}
@media (max-width: 370px) {
  .stage-shelf { bottom: 25%; }
  .stage-cover { width: 96px; height: 128px; }
  .library-example { height: 716px; }
  h1 { font-size: 3.25rem; }
  .hero-actions { gap: 0.6rem; }
  .hero-actions .text-link { font-size: 0.88rem; }
  .button { padding-inline: 1rem; gap: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
