/* ============================================================================
   CONTENT PAGES  (app/guides/**)

   The app is one screen; these are documents. They borrow base.css only for the
   design tokens and the topbar, and then set their own measure and rhythm —
   nothing in the app's layout CSS is meant for a column of prose.

   Generated pages link this file. It is hand-written; scripts/build-guides.mjs
   writes the markup that uses it.
   ============================================================================ */

body.doc { background: var(--paper); }

/* The app's topbar carries step tabs; here the same bar carries document links. */
.doc .topbar a.step,
.doc .topbar a.cta { text-decoration: none; }
.doc .topbar .step {
  appearance: none; background: none; border: 0; padding: 7px 13px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .01em;
  display: flex; align-items: center;
}
.doc .topbar .step:hover { color: var(--ink); background: var(--surface-2); }
.doc .topbar .step[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.doc .topbar .cta {
  margin-left: auto; background: var(--brand); color: var(--brand-ink);
  font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: var(--r-sm);
  white-space: nowrap;
}
.doc .topbar .cta:hover { filter: brightness(1.12); }
.doc .topbar .links { display: flex; gap: 2px; margin-left: 18px; }

.crumbs {
  max-width: 90ch; margin: 0 auto; padding: 16px 20px 0;
  font-size: 12px; color: var(--ink-3);
}
.crumbs a { color: var(--ink-3); }
.crumbs span { padding: 0 6px; }

/* The column is wider than the prose measure on purpose: paragraphs and lists cap
   themselves at 68ch below, and the extra width belongs to the tables, which carry
   most of the argument on these pages and scroll if squeezed. */
.doc-wrap { max-width: 90ch; margin: 0 auto; padding: 10px 20px 72px; }

.doc-wrap h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.7rem); line-height: 1.1; letter-spacing: -.035em;
  margin: 14px 0 0;
}
.doc-wrap .lede {
  font-size: 1.12rem; line-height: 1.55; color: var(--ink-2); margin: 14px 0 0; max-width: 62ch;
}
.doc-wrap .updated {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  margin: 22px 0 0; font-weight: 600;
}

.doc-wrap h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.55rem); margin: 44px 0 0; padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.doc-wrap h3 { font-size: 1.02rem; margin: 28px 0 0; }
.doc-wrap p { margin: 12px 0 0; font-size: 15px; line-height: 1.68; max-width: 68ch; }
.doc-wrap ul, .doc-wrap ol { margin: 12px 0 0; padding-left: 22px; max-width: 68ch; }
.doc-wrap li { margin: 7px 0; font-size: 15px; line-height: 1.62; }
.doc-wrap a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
.doc-wrap a:hover { text-decoration-color: currentColor; }
.doc-wrap strong { font-weight: 700; }
.doc-wrap code {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .9em;
  background: var(--surface-2); padding: 1px 5px; border-radius: 4px;
}

/* Tables carry most of the load on these pages, so they get real treatment —
   and their own scroller, because a wide table must never scroll the page. */
.tablewrap { overflow-x: auto; margin: 18px 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.doc-wrap table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.doc-wrap th, .doc-wrap td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.doc-wrap th { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; background: var(--surface-2); }
.doc-wrap tbody tr:last-child td { border-bottom: 0; }
.doc-wrap td.wrap { white-space: normal; min-width: 20ch; }
.doc-wrap td.num, .doc-wrap th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* A position chip, same encoding as the app: colour plus its own label. */
.pos {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 4px; font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.pos.QB { color: var(--qb); background: var(--qb-bg); }
.pos.RB { color: var(--rb); background: var(--rb-bg); }
.pos.WR { color: var(--wr); background: var(--wr-bg); }
.pos.TE { color: var(--te); background: var(--te-bg); }
.pos.K  { color: var(--k);  background: var(--k-bg); }
.pos.DST, .pos.DL, .pos.LB, .pos.DB { color: var(--dst); background: var(--dst-bg); }

.note {
  margin: 22px 0 0; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand);
}
.note p:first-child { margin-top: 0; }

/* Guide cards on the hub. */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 22px 0 0; }
.card {
  display: block; text-decoration: none; padding: 16px 17px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card:hover { border-color: var(--ink-3); }
.card h3 { font-size: 1.02rem; margin: 0; letter-spacing: -.02em; }
.card p { font-size: 13.5px; color: var(--ink-2); margin: 7px 0 0; line-height: 1.55; }

/* The one thing every guide is for: getting someone onto the board. */
.startcta {
  margin: 44px 0 0; padding: 22px; border-radius: var(--r); text-align: center;
  background: var(--brand); color: var(--brand-ink);
}
.startcta h2 { border: 0; padding: 0; margin: 0; font-size: 1.3rem; color: var(--brand-ink); }
.startcta p { margin: 8px auto 0; color: var(--brand-ink); opacity: .82; max-width: 52ch; }
.startcta a {
  display: inline-block; margin-top: 16px; background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 14px; padding: 11px 20px; border-radius: var(--r-sm); text-decoration: none;
}

.doc-foot {
  max-width: 90ch; margin: 0 auto; padding: 26px 20px 40px;
  border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-3);
}
.doc-foot a { color: var(--ink-2); }
.doc-foot .row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }

details.faq { border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
details.faq summary { cursor: pointer; font-weight: 700; font-size: 15px; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "+ "; color: var(--ink-3); font-family: "IBM Plex Mono", monospace; }
details.faq[open] summary::before { content: "− "; }
details.faq p { margin-top: 10px; }

/* The document topbar carries a logo, two links and a button, which is more than
   fits beside a 360 px phone. The subtitle and the "Draft board" link both have
   somewhere else to go — the crest is already a link home, and every page ends in
   a footer full of them — so they are the two that give way. */
@media (max-width: 640px) {
  .doc .topbar { gap: 10px; padding: 0 12px; }
  .doc .topbar .logo small { display: none; }
  .doc .topbar .links { margin-left: 4px; }
  .doc .topbar .step { padding: 7px 8px; }
  .doc .topbar .cta { padding: 7px 11px; }
  .doc-wrap { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 420px) {
  .doc .topbar .links a[href="/"] { display: none; }
  .doc .topbar .logo span:not(.mark) { font-size: 14px; }
}
