/* ════════════════════════════════════════════════════════════════════════
   The manual's own sheet.

   site.css does the page - the bands, the hero, the tokens. This does
   only what the manual has and nothing else does: the chapter list, the
   chapter cards, the figures, the fold-out questions. Every colour here
   comes from site.css; nothing invents one.

   Generated with the pages by tools/build_web_manual.py. The app's
   webapp/manual*.html is the source - edit there, then run it again.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── the page: the chapters, and a list of them alongside ───────── */
.man-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.man-toc { position: sticky; top: 68px; }
.man-toc__title { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 10px; }
.man-toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-3); font-size: 13px; text-decoration: none; transition: background .15s ease, color .15s ease; }
.man-toc a:hover { background: rgba(var(--primary-rgb), .12); color: var(--ink); }
.man-toc a.on { background: rgba(var(--primary-rgb), .16); color: var(--primary-light); }

/* Once there is no room beside the text the list becomes a row of chips
   above it, rather than a column squeezing the chapters into a gutter. */
@media (max-width: 900px) {
  .man-wrap { grid-template-columns: 1fr; gap: 18px; }
  .man-toc { position: static; }
  .man-toc nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .man-toc a { border: 1px solid var(--line); padding: 5px 9px; font-size: 12px; }
}

/* ── the language picker, in the hero ─────────────────────── */
.man-lang { margin-top: 18px; }
.man-lang select {
  font: inherit; font-size: 13px; color: var(--ink-2);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px; cursor: pointer;
}
.man-lang select:hover { border-color: rgba(var(--primary-rgb), .45); color: var(--ink); }
.man-lang option { background: #0d1c36; color: var(--ink-2); }

/* ── a chapter ─────────────────────────────────────── */
.man-card { background: var(--apex-bg); border: var(--apex-border); border-radius: var(--apex-radius); box-shadow: var(--apex-shadow); padding: 20px 22px; }
.man-card + .man-card { margin-top: 18px; }
.man-section { scroll-margin-top: 72px; }
.man-section h2 { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin: 0 0 14px; }
.man-section h2 .material-icons { font-size: 18px; }
.man-section h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 16px 0 6px; }
.man-section p, .man-section li { font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.man-section p + p { margin-top: 8px; }
.man-section ol, .man-section ul { padding-left: 20px; margin: 8px 0; }
.man-section ol { list-style: decimal; }
.man-section ul { list-style: disc; }
.man-section li + li { margin-top: 5px; }
.man-section b, .man-section strong { color: var(--ink); font-weight: 600; }
.man-section a { color: var(--primary-light); }
.man-section table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13.5px; }
.man-section th, .man-section td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.man-section th { color: var(--ink-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* ── a key: what a colour, a marker or a button means ──────────── */
.man-key { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 9px; padding: 16px 18px; margin: 12px 0; }
.man-key__row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
/* the name, then the line about it */
.man-key__row > :nth-child(2) { flex: none; font-weight: 600; color: var(--ink); }
.man-key__row > :last-child { color: var(--ink-4); font-size: 12px; line-height: 1.45; }
.man-key__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; border-radius: 6px; border: 1px solid rgba(var(--primary-rgb), .40); background: rgba(var(--primary-rgb), .15); }
.man-key__icon--bare { width: 20px; height: auto; border: 0; background: none; }
.man-key__icon .material-icons { font-size: 16px; }
.man-sw { flex: none; display: inline-block; width: 16px; height: 4px; border-radius: 2px; }
.man-sw--dash { height: 0; border-radius: 0; border-bottom: 2px dashed var(--ink-3); }
.man-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.man-sw--green, .man-dot--green { background: var(--good); }
.man-sw--red, .man-dot--red { background: var(--bad); }
.man-sw--yellow, .man-dot--yellow { background: var(--warn); }
.man-sw--blue, .man-dot--blue { background: var(--primary); }
.man-sw--grey, .man-dot--grey { background: var(--ink-4); }
.man-q { display: inline-flex; align-items: center; gap: 8px; }

/* One column once two would leave the descriptions a few words wide. */
@media (max-width: 760px) {
  .man-key { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .man-key__row { flex-wrap: wrap; }
  .man-key__row > :last-child { flex-basis: 100%; }
}

/* ── a figure ──────────────────────────────────────── */
.man-fig { margin: 16px 0 4px; }
.man-fig img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid rgba(var(--primary-rgb), .22); background: #0b1120; }
.man-fig figcaption { font-size: 13px; color: var(--ink-3); line-height: 1.55; margin-top: 8px; }

/* ── an aside, and the "new in ..." notes ──────────────────── */
.man-tip { border-left: 3px solid var(--primary); padding: 10px 12px; background: rgba(var(--primary-rgb), .08); border-radius: 0 8px 8px 0; margin: 12px 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.man-tip b { color: var(--ink); font-weight: 600; }

/* ── the questions, and the driving guide: fold-outs ───────────── */
.man-faq-group + .man-faq-group { margin-top: 22px; }
.man-faq-h { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin: 0 0 10px; }
.man-faq-h .material-icons { font-size: 16px; }
.man-faq details { background: rgba(255, 255, 255, .03); border: 1px solid rgba(var(--primary-rgb), .16); border-radius: 9px; overflow: hidden; }
.man-faq details + details { margin-top: 8px; }
.man-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.man-faq summary::-webkit-details-marker { display: none; }
.man-faq summary:hover { background: rgba(var(--primary-rgb), .06); }
.man-faq .faq-chevron { flex: none; color: var(--ink-4); font-size: 20px; transition: transform .2s ease; }
.man-faq details[open] .faq-chevron { transform: rotate(180deg); }
.man-faq details > div { padding: 12px 14px 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.man-faq details > div > * + * { margin-top: 9px; }
.man-faq details ol, .man-faq details ul { padding-left: 20px; }
.man-faq details ol { list-style: decimal; }
.man-faq details ul { list-style: disc; }
.man-faq details li + li { margin-top: 5px; }
.man-faq details b { color: var(--ink); font-weight: 600; }
.man-faq .faq-badge { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; vertical-align: -4px; margin-right: 4px; }
.man-faq .faq-badge .material-icons { font-size: 13px; line-height: 1; }
.man-faq .faq-badge--amber { background: rgba(225, 202, 23, .12); border: 1px solid rgba(225, 202, 23, .40); color: #e1ca17; }
.man-faq .faq-badge--red { background: rgba(239, 67, 67, .14); border: 1px solid rgba(239, 67, 67, .45); color: var(--bad); }
.man-faq .faq-badge--blue { background: rgba(var(--primary-rgb), .12); border: 1px solid rgba(var(--primary-rgb), .45); color: var(--primary-light); }

/* A phone: the card's padding comes in, and the question keeps its
   chevron without the text turning into a two-word column. */
@media (max-width: 520px) {
  .man-card { padding: 16px; }
  .man-section h2 { font-size: 12px; }
  .man-faq summary { font-size: 13px; padding: 10px 12px; }
}
