/*
  Aria documentation — the stylesheet.

  🔴 THE TOKENS ARE NOT INVENTED HERE. They are copied from site/index.html, which Chozai
  approved after two rebuilds and one verdict of "pretty much just plain boring". A docs site
  that looks like a different product is a docs site people do not trust, so the room, the ink,
  the accent and both typefaces are the same values, not similar ones.

  🔑 WHAT IS DIFFERENT, AND WHY. The marketing page is a dark sanctuary you scroll through; this
  is a manual somebody reads at 9am on a Sunday with a service starting in twenty minutes. So:
  a fixed contents rail they can scan, generous line height, numbered steps that look like
  steps, and a measure capped at 68 characters. Same room, different furniture.
*/

:root {
  /* from site/index.html — do not diverge */
  --room:       #07080C;
  --room-1:     #0E1016;
  --room-2:     #161A24;
  --ink:        #F4F6FA;
  --ink-soft:   #97A1B2;
  --ink-dim:    #6B7484;
  --line:       rgb(255 255 255 / .09);
  --line-2:     rgb(255 255 255 / .16);
  --accent:     oklch(0.70 0.15 240);
  --accent-dim: oklch(0.55 0.12 240);
  --accent-wash: oklch(0.70 0.15 240 / 0.14);

  --rail: 16.5rem;
  --measure: 68ch;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--room);
  color: var(--ink);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ── the masthead ─────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.25rem;
  padding: .85rem 1.5rem;
  background: color-mix(in oklab, var(--room) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .mark {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.15rem; font-weight: 500; letter-spacing: -.01em;
  text-decoration: none;
}
.top .mark .dot {
  display: inline-block; width: .5rem; height: .5rem; margin-right: .5rem;
  border-radius: 2px; background: var(--accent); vertical-align: middle;
}
.top nav { margin-left: auto; display: flex; gap: 1.4rem; font-size: .9rem; }
.top nav a { color: var(--ink-soft); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

/* ── the shell ────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 3.5rem;
         max-width: 78rem; margin: 0 auto; padding: 2.5rem 1.5rem 6rem; }

.rail { position: sticky; top: 5rem; align-self: start; max-height: calc(100vh - 7rem);
        overflow-y: auto; font-size: .9rem; }
.rail h2 { font-family: "Instrument Sans", sans-serif; font-size: .7rem; font-weight: 600;
           letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim);
           margin: 1.75rem 0 .6rem; }
.rail h2:first-child { margin-top: 0; }
.rail a { display: block; padding: .3rem 0 .3rem .75rem; color: var(--ink-soft);
          text-decoration: none; border-left: 1px solid var(--line); }
.rail a:hover { color: var(--ink); border-left-color: var(--line-2); }
.rail a[aria-current="page"] { color: var(--ink); border-left-color: var(--accent); }

/* ── the page ─────────────────────────────────────────────────────────────── */
/* 🔑 THE MEASURE BELONGS TO THE TEXT, NOT THE COLUMN. Capping `main` at 68ch also caps every
   screenshot at 68ch, and a console shrunk to the width of a paragraph shows a volunteer
   nothing. So the prose is held to a readable line length and the figures are free. */
main { max-width: 52rem; }
main > p, main > ul, main > ol, main > table, main > .note, main > h2, main > h3,
main > .standfirst { max-width: var(--measure); }
main h1 { font-family: "Newsreader", Georgia, serif; font-weight: 400;
          font-size: clamp(2rem, 4.5vw, 2.9rem); line-height: 1.12; letter-spacing: -.02em;
          margin: 0 0 .75rem; }
main .standfirst { color: var(--ink-soft); font-size: 1.08rem; margin: 0 0 2.75rem; }
main h2 { font-family: "Newsreader", Georgia, serif; font-weight: 400; font-size: 1.6rem;
          line-height: 1.25; letter-spacing: -.01em; margin: 3rem 0 .85rem;
          padding-top: 1.75rem; border-top: 1px solid var(--line); }
main h3 { font-size: 1rem; font-weight: 600; margin: 2rem 0 .5rem; }
main p { margin: 0 0 1.1rem; }
main strong { font-weight: 600; }

/* Steps look like steps: the number is the affordance, not a bullet. */
ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 1.1rem 2.75rem; }
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.1rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--accent); background: var(--accent-wash);
}

ul.plain { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
ul.plain > li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
ul.plain > li:last-child { border-bottom: 0; }

kbd {
  font: inherit; font-size: .85em; font-variant-numeric: tabular-nums;
  padding: .12em .45em; border: 1px solid var(--line-2); border-radius: 4px;
  background: var(--room-2); color: var(--ink);
}

/* A note is a full-bordered block. Not a left stripe. */
.note {
  margin: 1.5rem 0; padding: 1rem 1.15rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--room-1);
  color: var(--ink-soft); font-size: .95rem;
}
.note strong { color: var(--ink); }

table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.75rem; font-size: .95rem; }
th { text-align: left; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
     color: var(--ink-dim); font-weight: 600; padding: 0 1rem .6rem 0;
     border-bottom: 1px solid var(--line-2); }
td { padding: .7rem 1rem .7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }

.next { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 3.5rem;
        padding-top: 1.75rem; border-top: 1px solid var(--line); }
.next a { display: inline-block; padding: .55rem 1rem; border: 1px solid var(--line-2);
          border-radius: 7px; text-decoration: none; font-size: .92rem; color: var(--ink-soft); }
.next a:hover { color: var(--ink); border-color: var(--accent-dim); }

@media (max-width: 62rem) {
  .shell { grid-template-columns: 1fr; gap: 2rem; }
  .rail { position: static; max-height: none; padding-bottom: 1.5rem;
          border-bottom: 1px solid var(--line); }
  .rail h2 { margin-top: 1.1rem; }
}

/* ── screenshots ──────────────────────────────────────────────────────────────
   Real captures of the running console, not mockups: a manual illustrated with
   something that does not match what the operator is looking at is worse than no
   picture, because they stop trusting the page. Full-bordered, never a left stripe,
   and allowed to break the text measure because a console shot at 68ch is unreadable. */
figure.shot { margin: 1.75rem 0 2rem; max-width: min(100%, 52rem); }
figure.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 9px; background: var(--room-1);
}
figure.shot figcaption {
  margin-top: .6rem; font-size: .85rem; color: var(--ink-dim);
}
