/* Goat Wahala website
   The page runs from late afternoon (hero) to night (footer), like a round in the game.
   The sun in the header sets as you scroll. */

@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colours taken from the game's art */
  --ink: #4a2410;        /* brown outline on every sprite */
  --ink-soft: #6b3a1e;
  --cream: #fff1dc;      /* menu text fill */
  --parchment: #fbe6c4;
  --earth: #c4502b;      /* laterite road */
  --earth-deep: #8f3519;
  --sunset: #f5913a;
  --gold: #ffc93c;       /* "Hometown Hustle" ribbon */
  --leaf: #6cc233;       /* Play button / "GOAT" */
  --leaf-deep: #3d8a17;
  --wood: #8a4b25;
  --wood-deep: #5c2c10;
  --dusk: #3d2452;
  --night: #1f1533;

  --font-display: "Fredoka", "Baloo 2", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --header-h: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Game-style type ---------- */

/* Cream letters with the thick brown outline used on the in-game buttons */
.outlined {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cream);
  -webkit-text-stroke: 0.14em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.09em 0 var(--ink);
  letter-spacing: 0.005em;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

/* ---------- Buttons (in-game look: pill, brown rim, hard drop) ---------- */

.btn {
  --face: var(--leaf);
  --rim: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 26px 12px;
  border: 3px solid var(--rim);
  border-radius: 20px;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 48%) ,
    var(--face);
  box-shadow: 0 6px 0 var(--rim), 0 10px 18px rgba(30, 10, 0, 0.25);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--cream);
  -webkit-text-stroke: 0.16em var(--ink);
  paint-order: stroke fill;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 var(--rim), 0 3px 8px rgba(30, 10, 0, 0.25);
}
.btn--wood { --face: var(--wood); }
.btn--small {
  min-height: 42px;
  padding: 6px 16px 8px;
  font-size: 1rem;
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--rim);
}
.btn--small:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--rim); }
.btn img { width: 26px; height: 26px; flex: none; }
.btn--small img { width: 22px; height: 22px; }

/* ---------- Header with the sunset tracker ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.site-header.is-solid {
  background: rgba(46, 22, 10, 0.92);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.brand img { width: 40px; height: 40px; }
.brand span { font-size: 1.3rem; }

.sun-track {
  position: relative;
  flex: 1 1 auto;
  max-width: 360px;
  height: 14px;
  margin: 0 auto;
  border: 3px solid var(--ink);
  border-radius: 99px;
  background: #2b1a3a;
  box-shadow: 0 2px 0 var(--ink);
}
.sun-track__fill {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #ffe07a, var(--sunset) 55%, var(--earth));
  clip-path: inset(0 calc((1 - var(--sun, 0)) * 100%) 0 0 round 99px);
}
.sun-track__sun {
  position: absolute;
  top: 50%;
  left: calc(var(--sun, 0) * 100%);
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px rgba(255, 201, 60, 0.8));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}
.site-nav a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(74, 36, 16, 0.8);
}
.site-nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 640px) {
  :root { --header-h: 58px; }
  .brand span { display: none; }
  .brand img { width: 38px; height: 38px; }
  .site-header .wrap { gap: 14px; }
  .site-nav { gap: 12px; }
  .site-nav .btn span { display: none; }
  .site-nav .btn { padding: 6px 10px 8px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 24px) 0 72px;
  overflow: hidden;
  isolation: isolate;
  background: var(--earth);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
/* Darken the left so the copy reads, and fade the road into the next section */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(60, 20, 6, 0.62) 0%, rgba(60, 20, 6, 0.3) 45%, rgba(60, 20, 6, 0) 70%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, var(--earth) 100%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 24px;
}

.hero__copy { max-width: 560px; }

.hero__logo {
  width: min(440px, 88%);
  margin: 0 0 18px -8px;
  filter: drop-shadow(0 10px 18px rgba(40, 10, 0, 0.35));
}

.hero__tagline {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero__lede {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  max-width: 34ch;
  color: var(--cream);
  text-shadow: 0 1px 2px rgba(40, 10, 0, 0.6);
  margin-bottom: 30px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 16px;
  align-items: center;
}

.coming-soon {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 99px;
  background: rgba(46, 22, 10, 0.55);
  font-size: 0.98rem;
}
.coming-soon img { width: 28px; height: 28px; }

.hero__goat {
  position: absolute;
  right: max(-40px, calc((100vw - var(--max)) / 2 - 80px));
  bottom: -40px;
  width: min(46vw, 600px);
  pointer-events: none;
  z-index: -1;
}
.hero__goat img { width: 100%; filter: drop-shadow(0 18px 30px rgba(40, 10, 0, 0.4)); }

@media (max-width: 860px) {
  .hero {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0;
  }
  .hero__inner { grid-template-columns: 1fr; }
  .hero::before {
    background:
      linear-gradient(to bottom, rgba(60, 20, 6, 0.55), rgba(60, 20, 6, 0.35) 55%, rgba(60, 20, 6, 0.1) 75%, var(--earth) 100%);
  }
  .hero__copy { max-width: none; }
  .hero__logo { width: min(340px, 80%); margin-left: -6px; }
  .hero__goat {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(78vw, 420px);
    margin: 8px -20px -6px auto;
  }
}

/* One orchestrated entrance: the logo drops in, then the goat pops up from the bottom
   (the same beat as the main menu in the game). */
@media (prefers-reduced-motion: no-preference) {
  .hero__logo { animation: logo-drop 700ms cubic-bezier(0.2, 1.4, 0.4, 1) both; }
  .hero__goat img {
    transform-origin: 60% 100%;
    animation: goat-pop 900ms 350ms cubic-bezier(0.25, 1.5, 0.45, 1) both;
  }
  @keyframes logo-drop {
    from { opacity: 0; transform: translateY(-40px) scale(0.92) rotate(-3deg); }
    to { opacity: 1; transform: none; }
  }
  @keyframes goat-pop {
    from { opacity: 0; transform: translateY(60%) rotate(6deg); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Shared section bits ---------- */

.section { position: relative; padding: clamp(72px, 10vw, 128px) 0; }

.section__title {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  margin-bottom: 18px;
}
.section__intro {
  font-size: 1.15rem;
  max-width: 52ch;
}

/* ---------- How it plays (on the red road) ---------- */

.errand { background: var(--earth); }
.errand::after {
  /* the road darkens toward evening */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--earth-deep));
  pointer-events: none;
}

.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  counter-reset: step;
  position: relative;
  z-index: 1;
}
.step {
  position: relative;
  padding-top: 8px;
}
.step__icon {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 28px;
  background: var(--parchment);
  border: 3px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink);
}
.step__icon img { width: 70%; height: 70%; object-fit: contain; }
.step__icon::after {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
}
.step h3 { font-size: 1.45rem; margin-bottom: 8px; }
.step p { color: #ffe7cc; }

/* the rope that ties the steps together */
.steps::before {
  content: "";
  position: absolute;
  top: 56px;
  left: 48px;
  right: 12%;
  height: 8px;
  border-radius: 8px;
  background: repeating-linear-gradient(115deg, #d9a35a 0 7px, #a86c2c 7px 12px);
  border: 2px solid var(--ink);
  z-index: -1;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }
  .steps::before { display: none; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { display: grid; grid-template-columns: 84px 1fr; gap: 4px 20px; align-items: start; }
  .step__icon { width: 80px; height: 80px; grid-row: span 2; margin: 0; border-radius: 24px; }
  .step__icon::after { width: 32px; height: 32px; font-size: 1rem; top: -10px; right: -10px; }
  .step h3 { margin: 4px 0 2px; }
}

/* ---------- The herd (on parchment) ---------- */

.herd {
  background: var(--parchment);
  color: var(--ink);
}
.herd .section__title { color: var(--ink); }
.herd__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.herd__goat { position: relative; }
.herd__goat img { width: min(100%, 420px); margin: 0 auto; }
.herd__goat figcaption {
  position: absolute;
  top: -6%;
  right: -2%;
  max-width: 13ch;
  padding: 10px 14px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--cream);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
  transform: rotate(4deg);
  box-shadow: 0 4px 0 var(--ink);
}

.personalities {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  gap: 22px;
}
.personality {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 18px;
  align-items: baseline;
  padding-bottom: 22px;
  border-bottom: 2px dashed rgba(74, 36, 16, 0.25);
}
.personality:last-child { border-bottom: 0; padding-bottom: 0; }

/* the in-game goat tag: brown bubble with a little tail */
.tag {
  position: relative;
  justify-self: start;
  display: inline-block;
  padding: 6px 14px 8px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.2;
  white-space: nowrap;
}
.tag::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -8px;
  border: 8px solid transparent;
  border-bottom: 0;
  border-top-color: var(--ink);
}
.tag--calm { background: var(--leaf-deep); }
.tag--calm::after { border-top-color: var(--leaf-deep); }
.tag--flee { background: #b8361d; }
.tag--flee::after { border-top-color: #b8361d; }
.tag--food { background: #b9780f; }
.tag--food::after { border-top-color: #b9780f; }

.personality p { font-size: 1.08rem; }

@media (max-width: 820px) {
  .herd__inner { grid-template-columns: 1fr; }
  .herd__goat { order: 2; max-width: 360px; margin: 0 auto; }
  .personality { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Features (dusk) ---------- */

.features {
  background:
    radial-gradient(120% 70% at 85% 0%, rgba(245, 145, 58, 0.35), rgba(245, 145, 58, 0) 60%),
    linear-gradient(to bottom, #7a3326 0%, var(--dusk) 55%, var(--night) 100%);
}
.features__list {
  list-style: none;
  margin: 52px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 56px;
}
.feature {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  align-items: start;
}
.feature img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(20, 8, 30, 0.5));
}
.feature h3 { font-size: 1.5rem; margin: 6px 0 6px; }
.feature p { color: #f3dcc8; }

@media (max-width: 760px) {
  .features__list { grid-template-columns: 1fr; gap: 32px; }
  .feature { grid-template-columns: 56px 1fr; gap: 16px; }
  .feature img { width: 56px; height: 56px; }
}

/* ---------- Final call (night) ---------- */

.finale {
  background: var(--night);
  text-align: center;
  overflow: hidden;
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: 0;
}
.finale::before {
  /* a few stars now the sun is down */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff6 50%, transparent 51%),
    radial-gradient(2px 2px at 28% 42%, #fff5 50%, transparent 51%),
    radial-gradient(2px 2px at 46% 12%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 63% 30%, #fff6 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 16%, #fff5 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 44%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 60%, #fff4 50%, transparent 51%),
    radial-gradient(2px 2px at 95% 70%, #fff4 50%, transparent 51%);
  pointer-events: none;
}
.finale .wrap { position: relative; }
.finale .section__title { margin: 0 auto 16px; max-width: 16ch; }
.finale .section__intro { margin: 0 auto 32px; }
.finale .cta-row { justify-content: center; }
.finale__goat {
  width: min(300px, 62vw);
  margin: 56px auto 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #150e24;
  border-top: 3px solid var(--ink);
  padding: 28px 0 36px;
  font-size: 0.95rem;
  color: #d9c8e6;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--cream); text-underline-offset: 3px; }

/* ---------- Privacy policy page ---------- */

.doc-hero {
  padding: calc(var(--header-h) + 56px) 0 120px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(245, 145, 58, 0.45), rgba(245, 145, 58, 0) 60%),
    linear-gradient(to bottom, var(--earth-deep), var(--dusk));
}
.doc-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 14px; }
.doc-hero p { font-size: 1.1rem; color: #fbe3cf; max-width: 60ch; }

.doc {
  --doc-bg: var(--cream);
  --doc-text: #3a1f10;
  --doc-muted: #7a4f35;
  --doc-rule: rgba(74, 36, 16, 0.18);
  --doc-link: #a8331a;
  --doc-callout: #ffe2b0;
  background: var(--dusk);
  padding-bottom: 96px;
}
.doc__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: -72px;
}

.doc__toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 20px 18px;
  border-radius: 20px;
  background: rgba(21, 14, 36, 0.6);
  border: 2px solid rgba(255, 241, 220, 0.12);
  font-size: 0.95rem;
}
.doc__toc summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
}
.doc__toc summary::-webkit-details-marker { display: none; }
.doc__toc ol { margin: 12px 0 0; padding-left: 1.3em; display: grid; gap: 6px; }
.doc__toc a { color: #f3dcc8; text-decoration: none; }
.doc__toc a:hover { color: var(--cream); text-decoration: underline; }

.doc__paper {
  background: var(--doc-bg);
  color: var(--doc-text);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 0 8px 0 var(--ink), 0 30px 60px rgba(10, 4, 20, 0.45);
  padding: clamp(24px, 5vw, 56px);
}
.doc__paper > * { max-width: 68ch; }
.doc__paper h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  color: var(--ink);
  margin: 2.4em 0 0.6em;
  padding-top: 1.4em;
  border-top: 2px solid var(--doc-rule);
}
.doc__paper h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.6em; }
.doc__paper h3 {
  font-size: 1.22rem;
  color: var(--ink);
  margin: 1.6em 0 0.4em;
}
.doc__paper p,
.doc__paper ul,
.doc__paper ol { margin: 0 0 1em; line-height: 1.7; }
.doc__paper ul,
.doc__paper ol { padding-left: 1.3em; }
.doc__paper li { margin-bottom: 0.45em; }
.doc__paper a { color: var(--doc-link); text-underline-offset: 3px; font-weight: 700; overflow-wrap: anywhere; }
.doc__paper strong { color: var(--ink); }

.summary {
  padding: 22px 26px 8px;
  border-radius: 20px;
  background: var(--doc-callout);
  border: 2px solid rgba(74, 36, 16, 0.25);
}
.summary h2 {
  margin: 0 0 0.6em !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 1.4rem !important;
}

.providers {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6em 0 1.4em;
  font-size: 0.98rem;
}
.providers th,
.providers td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--doc-rule);
}
.providers th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
}
.table-scroll { overflow-x: auto; max-width: 68ch; }
.providers a { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 520px) { .providers a { white-space: normal; } }

.delete-box {
  padding: 20px 24px 6px;
  border-radius: 20px;
  border: 3px dashed rgba(168, 51, 26, 0.5);
  background: #fff7ea;
}

.updated { color: var(--doc-muted); font-size: 0.95rem; }

@media (max-width: 900px) {
  .doc__layout { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: -84px; }
  .doc__toc { position: static; }
  .doc__toc ol { columns: 2; display: block; }
  .doc__toc li { margin-bottom: 6px; break-inside: avoid; }
}
@media (max-width: 520px) {
  .doc__toc ol { columns: 1; }
  .doc__paper { border-radius: 22px; }
  .providers thead { display: none; }
  .providers tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--doc-rule); }
  .providers td { display: block; border: 0; padding: 2px 0; }
  .providers td:first-child { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.05rem; }
}

@media (prefers-color-scheme: dark) {
  .doc {
    --doc-bg: #2a1c3c;
    --doc-text: #f6e6d6;
    --doc-muted: #cbb3c9;
    --doc-rule: rgba(255, 241, 220, 0.16);
    --doc-link: #ffbf73;
    --doc-callout: #3a2850;
  }
  .doc__paper { border-color: #120a1f; box-shadow: 0 8px 0 #120a1f, 0 30px 60px rgba(0, 0, 0, 0.5); }
  .doc__paper h2, .doc__paper h3, .doc__paper strong, .providers th,
  .providers td:first-child { color: var(--cream) !important; }
  .summary { border-color: rgba(255, 241, 220, 0.18); }
  .delete-box { background: #33213f; border-color: rgba(255, 191, 115, 0.45); }
}

/* ---------- 404 ---------- */

.lost {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 32px) var(--gutter) 64px;
  background: linear-gradient(to bottom, var(--earth-deep), var(--dusk));
}
.lost img { width: min(260px, 60vw); margin: 0 auto 24px; }
.lost h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 12px; }
.lost p { margin: 0 auto 28px; max-width: 40ch; font-size: 1.1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
