@font-face {
  font-family: Archivo;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62.5% 125%;
  font-display: swap;
}

:root {
  --font: Archivo, "Segoe UI", system-ui, sans-serif;

  /* Papel: el lado del boceto */
  --paper: #f7f5f0;
  --paper-2: #eeebe4;
  --ink: #181a1b;
  --soft-ink: #565853;
  --faint-ink: #77796f;
  --line: #e0dcd2;

  /* Noche: el taller */
  --night: #141516;
  --night-2: #1d1f21;
  --frame: #262b30;
  --night-text: #c9ccc8;
  --night-faint: #8f938f;
  --night-line: #33373a;

  /* Cobre: las piezas de la criatura */
  --copper: #d9823b;
  --copper-hi: #eb9b58;
  --copper-ink: #9a4b22;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --width: 80rem;
  --section: clamp(5rem, 11vw, 10rem);
  --radius: clamp(.5rem, 1.1vw, .9rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--copper); outline-offset: 4px; border-radius: 2px; }
figure, p, h1, h2, h3, blockquote, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
img { display: block; width: 100%; height: auto; }
h1, h2, h3 { min-width: 0; overflow-wrap: break-word; text-wrap: balance; }
p { text-wrap: pretty; }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: .6rem 1rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}
.skip:focus { top: 1rem; }

/* ---------- Tipografía ---------- */

h1 {
  font-size: clamp(3.3rem, 10vw, 9.5rem);
  font-weight: 760;
  font-stretch: 104%;
  line-height: .92;
  letter-spacing: -.055em;
}

h2 {
  font-size: clamp(2.4rem, 5.6vw, 5.4rem);
  font-weight: 720;
  font-stretch: 104%;
  line-height: 1;
  letter-spacing: -.05em;
}

h3 {
  font-size: clamp(1.6rem, 2.7vw, 2.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.04em;
}

.label {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--copper-ink);
  font-size: .78rem;
  font-weight: 650;
  font-stretch: 90%;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.label-light { color: var(--copper); }

.num {
  display: block;
  margin-bottom: .9rem;
  color: var(--copper-ink);
  font-size: .85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}
.num-light { color: var(--copper); }

/* ---------- Botones y enlaces ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3rem;
  padding-inline: 1.35rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: .95rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, transform .2s var(--ease);
}
.button:hover { transform: translateY(-1px); }
.button-small { min-height: 44px; padding-inline: 1.05rem; font-size: .86rem; background: var(--paper); color: var(--night); }
.button-small:hover { background: #fff; }
.button-copper { background: var(--copper); color: var(--night); }
.button-copper:hover { background: var(--copper-hi); }
.button-large { min-height: 3.5rem; padding-inline: 1.8rem; font-size: 1.02rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  font-size: .95rem;
  font-weight: 550;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: .3em; }
.text-link-light { color: var(--night-text); }

/* ---------- Cabecera ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  color: var(--paper);
}

.navigation, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  font-size: 1.18rem;
  font-weight: 720;
  letter-spacing: -.035em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark img { width: 1.65rem; height: 1.65rem; flex: none; }

.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--night-text);
  font-size: .92rem;
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover { color: var(--paper); }
.nav-manual[aria-current] { color: var(--paper); text-decoration: underline; text-underline-offset: .35em; }

/* ---------- Portada ---------- */

.hero {
  --overlap: clamp(5rem, 17vw, 15rem);
  padding-top: 4.5rem;
  background:
    radial-gradient(60rem 30rem at 50% 0%, #23262a 0%, transparent 70%),
    linear-gradient(var(--night) calc(100% - var(--overlap)), var(--paper) 0);
  color: var(--paper);
}

.hero-copy {
  padding-block: clamp(4rem, 9vw, 8rem) clamp(2.75rem, 5vw, 4.5rem);
  text-align: center;
}

.hero-lead {
  max-width: 30rem;
  margin: clamp(1.25rem, 2.5vw, 1.9rem) auto 0;
  color: var(--night-text);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.4;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 1.75rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

.hero-art img {
  box-shadow: 0 2.5rem 6rem -1.5rem rgb(0 0 0 / .55), 0 0 0 1px rgb(255 255 255 / .06);
}
.hero-art figcaption { color: var(--faint-ink); }

.app-image {
  border-radius: var(--radius);
  background: var(--frame);
}

figcaption {
  margin-top: .8rem;
  color: var(--soft-ink);
  font-size: .85rem;
}

/* ---------- Filosofía ---------- */

.philosophy { padding-top: var(--section); }

.manifesto {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  column-gap: clamp(2rem, 7vw, 7rem);
  align-items: start;
}
.manifesto .label { grid-column: 1 / -1; }
.manifesto h2 { font-size: clamp(2.3rem, 4.9vw, 4.6rem); }

.manifesto-body p {
  color: var(--soft-ink);
  font-size: clamp(1.1rem, 1.55vw, 1.3rem);
  line-height: 1.55;
}
.manifesto-body p + p { margin-top: 1.1rem; }
.manifesto-body p:last-child { color: var(--ink); }

.pull {
  margin-block: clamp(4.5rem, 10vw, 9rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  text-align: center;
}
.pull p {
  font-size: clamp(2rem, 5.2vw, 4.75rem);
  font-weight: 300;
  font-stretch: 100%;
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.creature { background: var(--paper-2); padding-block: clamp(3rem, 7vw, 6rem); }
.creature-inner {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4rem);
}
.creature img { border-radius: 4px; box-shadow: 0 1.5rem 4rem -2rem rgb(40 30 20 / .35); }
.creature figcaption { margin: 0; font-size: 1rem; }
.creature-text { display: block; color: var(--soft-ink); line-height: 1.55; }

.principles { padding-block: var(--section); }
.principles > h2 { max-width: 14ch; }

.principles-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.principles-list li { padding-top: 1.4rem; border-top: 1px solid var(--ink); }
.principles-list h3 { font-size: clamp(1.35rem, 1.9vw, 1.7rem); }
.principles-list p { margin-top: .75rem; color: var(--soft-ink); font-size: 1rem; }

.ownership {
  max-width: 44rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  color: var(--soft-ink);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}
.ownership strong { color: var(--ink); font-weight: 650; }

/* ---------- Recorrido ---------- */

.journey { padding-block: var(--section); background: var(--paper-2); }

.journey-intro { max-width: 52rem; margin-inline: auto; text-align: center; }
.journey-intro p:not(.label) {
  max-width: 44ch;
  margin: 1.4rem auto 0;
  color: var(--soft-ink);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
}

.step-copy p { max-width: 44ch; color: var(--soft-ink); }
.step-copy h3 + p { margin-top: .9rem; }
.step-copy p + p { margin-top: .75rem; }

.step-pair, .step-row, .step-wide { margin-top: clamp(4rem, 9vw, 8rem); }

.step-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
}
.step-pair .step-copy { margin-top: 1.5rem; }
.step-pair h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); }

.step-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: center;
  gap: clamp(1.75rem, 5vw, 5rem);
}
.step-row-reverse { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.step-row-reverse .step-copy { grid-area: 1 / 2; }
.step-row-reverse img { grid-area: 1 / 1; }

.step-wide-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.caption-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 1rem; }
.caption-row a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: .2em; }

/* ---------- El juego ---------- */

.game { background: var(--night); color: var(--paper); }
.game-art img { width: 100%; max-height: 92vh; object-fit: cover; }
.game-copy {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  column-gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem);
}
.game-copy .num { grid-column: 1 / -1; }
.game-copy p { max-width: 46ch; color: var(--night-text); font-size: clamp(1.05rem, 1.45vw, 1.2rem); }

/* ---------- Al abrir el taller ---------- */

.toolbox {
  padding-block: clamp(1rem, 3vw, 2rem) var(--section);
  background: var(--night);
  color: var(--paper);
  border-top: 1px solid var(--night-line);
}
.toolbox-intro { padding-top: clamp(4rem, 8vw, 7rem); }
.toolbox-intro h2 { max-width: 18ch; font-size: clamp(2.2rem, 4.6vw, 4.3rem); }

.toolbox-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.toolbox-art img { box-shadow: 0 0 0 1px var(--night-line); }
.toolbox-art figcaption { margin-top: 1.1rem; max-width: 52ch; color: var(--night-text); font-size: 1rem; }
.toolbox-art strong { display: block; margin-bottom: .3rem; color: var(--paper); font-size: 1.15rem; font-weight: 650; letter-spacing: -.02em; }

.toolbox-list > div { padding-block: 1.05rem; border-top: 1px solid var(--night-line); }
.toolbox-list > div:last-child { border-bottom: 1px solid var(--night-line); }
.toolbox-list dt { font-weight: 650; letter-spacing: -.015em; }
.toolbox-list dd { margin-top: .2rem; color: var(--night-text); font-size: .98rem; }

.note { margin-top: clamp(2.5rem, 5vw, 4rem); color: var(--night-faint); font-size: .85rem; }

/* ---------- Beta ---------- */

.purchase { background: var(--night-2); color: var(--night-text); padding-block: clamp(3.5rem, 8vw, 6rem); }
.purchase-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 2.5rem; align-items: center; }
.purchase h2 { color: var(--paper); }
.purchase p { margin-top: .9rem; max-width: 45ch; }
.purchase-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.purchase-links a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: .2em; }

.beta {
  background:
    radial-gradient(48rem 26rem at 50% 32rem, rgb(217 130 59 / .14), transparent 70%),
    var(--night-2);
  color: var(--paper);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}
.beta-inner { padding-block: clamp(5rem, 11vw, 9.5rem) clamp(3.5rem, 7vw, 6rem); text-align: center; }
.beta-mark { width: 3rem; height: 3rem; margin: 0 auto 1.75rem; color: var(--copper); }
.beta h2 { font-size: clamp(2.8rem, 7vw, 6.2rem); }
.beta-inner > p { max-width: 38ch; margin: 1.4rem auto 2.1rem; color: var(--night-text); font-size: clamp(1.05rem, 1.5vw, 1.2rem); text-wrap: balance; }
.beta-inner > p.beta-after { max-width: 44ch; margin: 1.4rem auto 0; color: var(--night-faint); font-size: .92rem; }

.terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--night-line);
}
.terms h3 { margin-bottom: .9rem; color: var(--copper); font-size: .78rem; font-weight: 650; font-stretch: 90%; letter-spacing: .14em; text-transform: uppercase; }
.terms ul { margin: 0; padding: 0; list-style: none; }
.terms li, .spec > div { padding-block: .55rem; border-bottom: 1px solid var(--night-line); color: var(--night-text); font-size: .98rem; }
.spec dt { color: var(--night-faint); font-size: .8rem; }
.spec dd { margin: 0; }
.contract { margin-top: clamp(1.75rem, 3vw, 2.5rem); color: var(--night-text); font-size: .95rem; }
.contract a, .site-footer a { text-underline-offset: .25em; }
.contract a:hover { color: var(--paper); }

/* ---------- Cabecera de las páginas interiores ---------- */

.site-header-solid { position: static; background: var(--night); border-bottom: 1px solid var(--night-line); }
.nav-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--night-text);
  font-size: .82rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-decoration: none;
}
.nav-lang:hover { color: var(--paper); }

/* ---------- Pie ---------- */

.site-footer { background: var(--night); color: var(--paper); border-top: 1px solid var(--night-line); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-tag { margin-top: .4rem; color: var(--night-faint); font-size: .92rem; }
.footer-k { display: block; margin-bottom: .6rem; color: var(--night-faint); font-size: .75rem; font-weight: 650; font-stretch: 90%; letter-spacing: .12em; text-transform: uppercase; }
.footer-v, .footer-docs a { color: var(--night-text); font-size: .95rem; overflow-wrap: anywhere; }
.footer-docs { margin: 0; padding: 0; list-style: none; }
.footer-docs a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.fine { padding-block: 1.5rem 2rem; border-top: 1px solid var(--night-line); color: var(--night-faint); font-size: .8rem; line-height: 1.5; }

/* ---------- Documentos legales ---------- */

.doc { padding-block: clamp(3rem, 7vw, 6rem); }
.doc-inner { display: grid; grid-template-columns: 15rem minmax(0, 46rem); gap: clamp(2rem, 5vw, 5rem); }
.doc aside nav { position: sticky; top: 2rem; display: grid; gap: .15rem; }
.doc aside a { padding: .5rem 0 .5rem .9rem; border-left: 1px solid var(--line); color: var(--soft-ink); font-size: .95rem; text-decoration: none; }
.doc aside a[aria-current='page'] { border-left-color: var(--copper); color: var(--ink); font-weight: 650; }
.doc aside a:hover { color: var(--ink); }
.doc aside .doc-back { margin-top: 1rem; border-left-color: transparent; color: var(--copper-ink); }

.prose { min-width: 0; overflow-wrap: break-word; }
.prose h1 { margin-bottom: 1.25rem; font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 720; font-stretch: 104%; line-height: 1; letter-spacing: -.05em; }
.prose h2 { margin: 2.75rem 0 .75rem; font-size: 1.4rem; font-weight: 700; line-height: 1.25; letter-spacing: -.025em; }
.prose h3 { margin: 2rem 0 .5rem; font-size: 1.12rem; letter-spacing: -.015em; }
.prose p, .prose li { color: var(--soft-ink); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: .9rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: .35rem; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--copper-ink); overflow-wrap: anywhere; text-underline-offset: .2em; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--copper); border-radius: 0 .5rem .5rem 0; background: var(--paper-2); }
.prose blockquote p { font-size: .97rem; }
.prose code { padding: .05em .3em; border-radius: 4px; background: var(--paper-2); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .86em; }
.prose table { display: block; width: 100%; margin: 1.25rem 0; overflow-x: auto; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { min-width: 8rem; padding: .7rem .8rem .7rem 0; border-top: 1px solid var(--line); color: var(--soft-ink); text-align: left; vertical-align: top; }
.prose th { color: var(--faint-ink); font-size: .76rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Manual ---------- */

.manual article { grid-column: 2; grid-row: 1; }
.manual aside { grid-column: 1; grid-row: 1; }
.manual .manual-version { color: var(--faint-ink); font-size: .85rem; margin-bottom: .75rem; }
.manual-intro { font-size: 1.2rem; max-width: 52ch; }
.manual ol { padding-left: 1.5rem; }
.manual li::marker { color: var(--copper-ink); font-weight: 650; }
.manual .manual-index { margin-top: 1rem; padding-left: 0; list-style: none; }
.manual-index li { border-top: 1px solid var(--line); padding: .65rem 0 .85rem .25rem; }
.manual-index a { display: inline-block; padding-block: .3rem; font-weight: 650; }
.manual-figure { margin-block: 1.75rem; }
.manual-figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
.manual-figure figcaption { color: var(--soft-ink); font-size: .9rem; margin-top: .5rem; }
.manual-placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .35rem;
  aspect-ratio: 16 / 9;
  padding: 1.5rem;
  border: 1.5px dashed var(--faint-ink);
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--soft-ink);
  text-align: center;
}
.manual-placeholder svg { width: 2.25rem; height: 2.25rem; margin-bottom: .35rem; color: var(--copper-ink); }
.manual-placeholder strong { color: var(--ink); font-size: 1.05rem; font-weight: 650; }
.manual-placeholder span { font-size: .92rem; }
.manual aside nav { max-height: calc(100vh - 4rem); overflow-y: auto; overscroll-behavior: contain; }
.manual-nav-group { margin: 1.1rem 0 .3rem; color: var(--faint-ink); font-size: .72rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.manual .prose h3 { margin-top: 1.75rem; }
.manual-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.manual-pager a { display: grid; gap: .2rem; max-width: 48%; font-weight: 650; text-decoration: none; }
.manual-pager a:hover { text-decoration: underline; }
.manual-pager small { color: var(--faint-ink); font-size: .78rem; font-weight: 500; letter-spacing: .04em; }
.manual-next { margin-left: auto; text-align: right; }

/* ---------- Aparición suave ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .button { transition: none; }
}

/* ---------- Adaptación ---------- */

@media (max-width: 64rem) {
  .principles-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbox-grid { grid-template-columns: minmax(0, 1fr); }
  .creature-inner { grid-template-columns: minmax(0, 1fr); }
  .creature figcaption { max-width: 48ch; }
}

@media (max-width: 48rem) {
  .manifesto, .step-pair, .step-row, .step-row-reverse, .step-wide-copy, .game-copy { grid-template-columns: minmax(0, 1fr); }
  .manifesto h2 { margin-bottom: 1.6rem; }
  .step-row-reverse .step-copy, .step-row-reverse img { grid-area: auto; }
  .step-row img { order: -1; }
  .step-wide-copy { gap: .9rem; }
  .game-copy p { margin-top: 1.1rem; }
  .game-art img { aspect-ratio: 4 / 3; object-position: 30% 50%; }
}

@media (max-width: 64rem) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 48rem) {
  .doc-inner { grid-template-columns: minmax(0, 1fr); }
  .doc aside nav { position: static; display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line); }
  .doc aside a { flex: none; padding: .7rem .9rem; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .doc aside a[aria-current='page'] { border-bottom-color: var(--copper); }
  .doc aside .doc-back { margin-top: 0; }
  .manual article { grid-column: 1; }
  .manual aside { grid-row: 2; }
  .manual aside nav { display: grid; overflow: visible; max-height: none; }
  .manual-placeholder { aspect-ratio: 4 / 3; }
  .manual aside a { white-space: normal; }
  .terms { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 34rem) {
  .principles-list { grid-template-columns: minmax(0, 1fr); }
  .nav-link { display: none; }
  .nav-manual { display: inline-flex; }
  .nav-links { gap: .5rem; }
  .navigation { min-height: 4rem; }
  .hero { padding-top: 4rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 26rem) {
  .navigation .button-small { display: none; }
}
