/* Almanac — the knowledge base on the shared design standard.

   Tokens, base rules and the primitives (eyebrow, brand, header, page head,
   cards, buttons, chips, tags, notes, forms, tables, footer) come from
   design.css: a vendored copy of luxe/design/design.css, loaded before this
   file and checked for drift by scripts/check-design.sh. This file holds
   only what is Almanac's own — reading density, the header search, question
   lists, search results, the article body, the key and review screens.
   Hand-written, no build step. */

/* A reading tool: the standard lets exactly these two move. */
:root { --text: 14.5px; --leading: 1.6; }

body > main { width: 100%; max-width: 68rem; margin: 0 auto; padding: 26px 20px 56px; }

/* ── Header: brand, search, the caller's navigation ────────── */
.site-header { flex-wrap: wrap; justify-content: flex-start; gap: 18px; padding: 12px 20px; }

.search {
  flex: 1; min-width: 220px; max-width: 520px; margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); padding: 6px 0; }
.search input::placeholder { color: var(--ink-faint); }
.search button { flex-shrink: 0; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--accent); color: var(--surface-warm); cursor: pointer; display: grid; place-items: center; transition: background .15s ease; }
.search button:hover { background: var(--accent-deep); }
.search button svg { display: block; }

.site-nav { margin-left: auto; gap: 16px; }
.site-nav span { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.site-nav .who { color: var(--ink-soft); letter-spacing: 0.08em; text-transform: none; font-size: 12px; }
.site-nav .who b { font-weight: 600; color: var(--ink); }
.site-nav .signin { color: var(--accent); }

/* The lede reads at the tool's density, like the body. */
.page-head .lede { font-size: 14.5px; }

/* ── Cards and grids ───────────────────────────────────────── */
.card + .card, section + section { margin-top: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .grid { grid-template-columns: repeat(2, 1fr); } }
.grid > * { margin: 0; min-width: 0; }
.grid.grid--wide { grid-template-columns: 1fr; }

/* Question lists inside cards: a vertical list of link rows. */
.qlist { list-style: none; margin: 8px 0 0; padding: 0; }
.qlist li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.qlist li:first-child { border-top: 0; }
.qlist a { color: var(--ink); font-weight: 500; }
.qlist a:hover { color: var(--accent); }
.qlist small, .meta small { color: var(--ink-muted); font-size: 11.5px; white-space: nowrap; }
.qlist .tag { margin-left: 8px; }

.chips { margin-top: 10px; }

/* Audience tags, on the standard's three tag tones. */
.tag--internal { background: var(--good-bg); color: var(--good-ink); }
.tag--admin { background: var(--ink); color: var(--surface-warm); }
.tag--guest { background: var(--warn-bg); color: var(--warn-label); }

.meta { margin: 0; font-size: 12px; color: var(--ink-muted); line-height: 1.7; }
.meta code { background: var(--surface-soft); padding: .1rem .35rem; border-radius: 5px; color: var(--ink-quiet); }
.meta a { font-weight: 600; }

.note { margin: 14px 0 0; font-size: 12.5px; }
p.empty { text-align: left; font-size: 13px; color: var(--ink-muted); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions--after { margin-top: 16px; }
.eyebrow--group { margin-top: 16px; }

/* ── Search results ────────────────────────────────────────── */
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.results li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; }
.results h2 { font-size: 19px; margin-bottom: 4px; }
.results h2 a { color: var(--ink); }
.results h2 a:hover { color: var(--accent); }
.results p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); }

/* ── Article ───────────────────────────────────────────────── */
.article { max-width: 46rem; }
.article > .eyebrow { display: block; margin-bottom: 8px; }
.article h1 { font-size: 32px; text-wrap: balance; }
.article .meta { margin-top: 10px; }
.article .body { margin-top: 22px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.article .body > :first-child { margin-top: 0; }
.article .body h2 { font-size: 22px; margin: 26px 0 8px; }
.article .body h3 { font-size: 17px; margin: 20px 0 6px; font-family: var(--body); font-weight: 600; }
.article .body p { margin: 0 0 12px; }
.article .body ul, .article .body ol { padding-left: 1.3em; margin: 0 0 12px; }
.article .body table { border-collapse: collapse; width: 100%; margin: 12px 0 16px; font-size: 13.5px; }
.article .body th, .article .body td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.article .body th { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; }
.article .body pre { background: var(--surface-soft); padding: 12px 14px; overflow-x: auto; border-radius: var(--r-control); font-size: 13px; }
.article .body code { background: var(--surface-soft); padding: .1rem .35rem; border-radius: 5px; }
.article .body pre code { background: none; padding: 0; }
.article .body blockquote { margin: 12px 0; padding-left: 14px; border-left: 3px solid var(--gold-soft); color: var(--ink-soft); }
.article .body hr { border: 0; height: 1px; background: var(--line); margin: 20px 0; }
.article .body strong { font-weight: 600; }
.article .related { margin-top: 26px; }

/* ── Keys and review lists ─────────────────────────────────── */
.table tr.revoked td { color: var(--ink-faint); text-decoration: line-through; }
pre.key { margin: 10px 0 0; padding: 14px 16px; background: var(--ink); color: var(--surface-warm); border-radius: var(--r-control); font-size: 14px; overflow-x: auto; user-select: all; }
pre.cmd { margin: 8px 0 0; padding: 12px 14px; background: var(--surface-soft); border-radius: var(--r-control); font-size: 12.5px; overflow-x: auto; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { padding: 30px 20px 40px; text-align: center; }
.site-footer .brand__name { font-size: 16px; }
.site-footer p { margin: 8px 0 0; }

/* ── Small screens ─────────────────────────────────────────── */
@media (max-width: 40rem) {
  .site-header { padding: 10px 14px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  body > main { padding: 18px 14px 44px; }
  .qlist li { flex-direction: column; gap: 2px; }
}
