/* Shared by every page: fonts, tokens from design/tokens.md, the glass nav, buttons and footer.
   Fonts are served from this site, so a visit makes no third-party request. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus_jakarta_sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
/* Archivo cut to one style, width 62 and weight 850, by infra/pages/README.md's recipe. */
@font-face {
  font-family: "Archivo Condensed";
  src: url("/fonts/archivo_condensed.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #15161a;
  --ink-2: #26282e;
  --ground: #f3f4f6;
  --night: #0e0f12;
  --night-2: #1b1c21;
  --muted: #5b5f69;
  --body-2: #3a3c44;
  --line: #d5d8de;
  --accent: #d9472b;
  --accent-down: #c23e24;
  --amber: #f5a54a;
  --grad: linear-gradient(90deg, #f5a54a, #d9472b);
  --on-dark-muted: rgba(255, 255, 255, 0.72);
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Archivo Condensed", "Arial Narrow", sans-serif-condensed, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--night);
  color: #fff;
  font: 400 16px/1.55 var(--sans);
  overflow-x: clip;
}
a { color: inherit; }
a:hover { color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
img, svg { display: block; }
.skip {
  position: absolute; left: 16px; top: -80px; z-index: 60;
  padding: 12px 18px; border-radius: 14px; background: #fff; color: var(--ink);
  font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }

.cond {
  font-family: var(--cond);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.84;
}
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.muted { color: var(--on-dark-muted); }
.tone {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1.1px, transparent 1.6px);
  background-size: 7px 7px;
}
.glass {
  background: rgba(20, 21, 26, 0.78);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 58px; padding: 0 28px; border-radius: 29px;
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 19px; text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}
.btn-accent:hover { color: #fff; background: var(--accent-down); transform: translateY(-1px); }
.btn-accent:active { transform: translateY(1px); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; min-width: 48px; padding: 0 14px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.08); color: #fff; border: 0;
  font: 700 14px var(--sans); text-decoration: none; cursor: pointer;
}
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.btn-ghost:active { background: rgba(255, 255, 255, 0.2); }
.btn-ghost.square { width: 48px; padding: 0; }
.btn-ghost.plain { background: transparent; }
.btn-ghost.plain:hover { background: rgba(255, 255, 255, 0.08); }
.btn-ghost[aria-current="page"] { background: rgba(255, 255, 255, 0.12); }

/* Glass nav, shaped like the app's browser toolbar */
.top { position: sticky; top: 0; z-index: 40; padding: 12px clamp(12px, 2vw, 24px) 0; }
.top nav {
  max-width: 1240px; margin: 0 auto; border-radius: 28px; padding: 10px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.chip {
  flex: 1 1 140px; min-width: 0; height: 48px; border-radius: 18px;
  background: var(--ink-2); display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 10px; text-decoration: none;
}
.chip:hover { color: #fff; }
.chip-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-page {
  margin-left: auto; height: 30px; padding: 0 10px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.08); display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.nav-links { display: flex; gap: 4px; }
.nav-get {
  height: 48px; padding: 0 18px; border-radius: 18px; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; font-weight: 800; font-size: 19px; text-decoration: none;
}
.nav-get:hover { color: #fff; background: var(--accent-down); }

/* Reading progress on the right edge, like the reader's scrubber */
.scrub {
  position: fixed; right: 14px; top: 96px; bottom: 28px; width: 6px; z-index: 30;
  border-radius: 3px; background: rgba(255, 255, 255, 0.14);
}
.scrub i { display: block; height: 0; width: 6px; border-radius: 3px; background: linear-gradient(180deg, #f5a54a, #d9472b); }

/* Footer */
.foot { border-top: 1px solid rgba(255, 255, 255, 0.08); background: var(--night); }
.foot .wrap {
  padding-top: 28px; padding-bottom: 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 48px;
}
.foot p { margin: 0; max-width: 34em; font-size: 14px; padding: 10px 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 14px; font-weight: 700; }
.foot nav a { padding: 12px 0; }

@media (max-width: 700px) {
  .scrub { display: none; }
  .hide-sm { display: none !important; }
}
