@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url("/fonts/big-shoulders-display-latin.woff2") format("woff2");
}

:root {
  --paper: #eceef1;
  --ink: #191c22;
  --muted: #4b515c;
  --rule: #c7ccd4;
  --velvet: #7d1a2a;
  --link: #8a1d2f;
  --bulb: #f4d06f;
  --board: #fbfaf6;
  --board-groove: rgba(25, 28, 34, 0.13);
  --letter: #16181d;
  --letter-red: #a3202f;
  --code-bg: #dfe2e7;
  --term-bg: #1c1f26;
  --term-ink: #e4e6ea;
  --term-dim: #8d94a1;
  --term-head: #f4d06f;
  --display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14161b;
    --ink: #e3e5e9;
    --muted: #a4aab4;
    --rule: #2d313a;
    --velvet: #6a1523;
    --link: #f08a9b;
    --board: #f1efe7;
    --code-bg: #1f2229;
    --term-bg: #1b1e25;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 2px; }

code { font-family: var(--mono); font-size: 0.9em; }
p code, dd code { background: var(--code-bg); padding: 0.08em 0.32em; border-radius: 4px; }

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.5rem 0.9rem; border-radius: 4px;
}
.skip:focus { top: 12px; }

/* ---------- Marquee ---------- */

.marquee-wrap {
  padding: clamp(16px, 4vw, 48px) 16px 0;
  max-width: 72rem;
  margin: 0 auto;
}

.marquee {
  position: relative;
  background: var(--velvet);
  border-radius: 10px;
  padding: 26px 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 18px 40px -24px rgba(60, 10, 20, 0.6);
}

/* Bulb rows along the top and bottom edge of the frame. */
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  height: 10px;
  background-image: radial-gradient(circle at center, var(--bulb) 0 3.2px, rgba(244, 208, 111, 0.28) 3.6px 5px, transparent 5.4px);
  background-size: 22px 10px;
  background-repeat: space no-repeat;
  background-position: center;
}
.marquee::before { top: 8px; }
.marquee::after { bottom: 8px; }

.board {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--board);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 40%);
  border-radius: 3px;
  padding: clamp(6px, 1.4vw, 14px) clamp(10px, 3vw, 32px) clamp(10px, 2vw, 18px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), inset 0 0 30px rgba(244, 208, 111, 0.22);
  color: var(--letter);
  font-family: var(--display);
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
}

.row {
  display: block;
  align-self: stretch;
  /* Each line of letters sits on its own rail, like a changeable-letter board. */
  border-bottom: 2px solid var(--board-groove);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  font-weight: 800;
  font-size: clamp(1.15rem, 4.3vw, 2.6rem);
  letter-spacing: 0.06em;
  padding: 0.12em 0 0.1em;
  word-spacing: 0.12em;
}

.row-name {
  font-weight: 900;
  font-size: clamp(2.7rem, 12.5vw, 8.4rem);
  letter-spacing: 0.035em;
  padding-bottom: 0.04em;
}

.row:last-child { border-bottom: 0; box-shadow: none; }

.row-small {
  color: var(--letter-red);
  font-size: clamp(1rem, 3.2vw, 1.9rem);
  letter-spacing: 0.14em;
}

/* ---------- Page layout ---------- */

main, .foot {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  main, .foot { padding: 0 32px; }
  .marquee-wrap { padding-left: 32px; padding-right: 32px; }
}

h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 7.2vw, 4.6rem); max-width: 14ch; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); }

p { margin: 0 0 1em; }

.intro {
  padding: clamp(40px, 7vw, 80px) 0 clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 56px;
}

.lede { font-size: clamp(1.1rem, 2vw, 1.28rem); max-width: 38em; }
.for { color: var(--muted); max-width: 38em; }

@media (min-width: 960px) {
  .intro {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
  }
  .intro h1 { grid-column: 1 / -1; max-width: none; }
  .intro .lede, .intro .for { grid-column: 1; }
  .intro .install { grid-column: 2; grid-row: 2 / span 2; padding-top: 0.35em; }
}

.install-label { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.5em; }

.cmd {
  margin: 0 0 1.1rem;
  background: var(--code-bg);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  /* Long commands wrap instead of hiding off the edge; copying still gives one line. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
  line-height: 1.55;
}
.cmd code { font-size: inherit; }
.prompt { color: var(--muted); user-select: none; -webkit-user-select: none; }
.sel { user-select: all; -webkit-user-select: all; }

.install .cmd {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  border-left: 4px solid var(--velvet);
  border-radius: 0 6px 6px 0;
}

.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; align-items: baseline; }
.license { color: var(--muted); }

/* ---------- Terminal sample ---------- */

.reel { padding: 0 0 clamp(48px, 8vw, 96px); }

.term {
  margin: 0;
  background: var(--term-bg);
  color: var(--term-ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 24px 50px -30px rgba(10, 12, 20, 0.7);
}

.term-bar { display: flex; gap: 7px; padding: 12px 14px 0; }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a3f4a; }

.term-body {
  margin: 0;
  padding: 16px 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.45vw, 0.88rem);
  line-height: 1.7;
  tab-size: 2;
}
.term-body code { font-size: inherit; }
/* Inset and light so the ring stays visible on the dark panel and isn't clipped by it. */
.term-body:focus-visible { outline-color: var(--term-head); outline-offset: -3px; }
.term-body .prompt { color: var(--term-dim); }
.term-body b { color: var(--term-head); font-weight: 600; }

.term figcaption {
  padding: 10px 18px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--term-dim);
  font-size: 0.85rem;
}

/* ---------- Ask your agent ---------- */

.ask {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px 64px;
  padding: 0 0 clamp(48px, 8vw, 96px);
}
.ask-text { max-width: 36em; min-width: 0; }
.aside { color: var(--muted); font-size: 0.95rem; }

.questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.questions li {
  position: relative;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  padding: 0.55em 0 0.6em 1.25em;
  border-bottom: 1px solid var(--rule);
}
.questions li:last-child { border-bottom: 0; }
.questions li::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: 0.38em;
  color: var(--link);
  font-size: 1.5em;
  line-height: 1;
}

@media (min-width: 900px) {
  .ask { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .questions { padding-top: 0.6rem; }
}

/* ---------- Detail blocks ---------- */

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px 64px;
  padding: clamp(40px, 6vw, 64px) 0;
  border-top: 1px solid var(--rule);
}
@media (min-width: 900px) {
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.block { max-width: 36em; min-width: 0; }
.h2-next { margin-top: 1.4em; }

.sources { margin: 1.4rem 0 0; }
.sources dt { font-weight: 650; margin-top: 1rem; }
.sources dt:first-child { margin-top: 0; }
.sources dd { margin: 0.15rem 0 0; color: var(--muted); }

/* ---------- Data note and footer ---------- */

.data {
  padding: clamp(40px, 6vw, 64px) 0 clamp(32px, 5vw, 48px);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
}
.data > * { max-width: 44rem; }
.data h2 { color: var(--ink); font-size: clamp(1.5rem, 3vw, 1.9rem); }

.foot {
  padding-top: 0;
  padding-bottom: 48px;
  /* A rule across the content box only, so it lines up with the sections above. */
  background: linear-gradient(var(--rule), var(--rule)) top / 100% 1px no-repeat;
  background-origin: content-box;
  background-clip: content-box;
  color: var(--muted);
  font-size: 0.95rem;
}
.foot p { margin-bottom: 0.4em; }
.foot p:first-child { padding-top: 24px; }

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

.lost {
  padding: clamp(48px, 8vw, 96px) 0;
  max-width: 36em;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

@media print {
  .marquee::before, .marquee::after { display: none; }
}
