/* =============================================================================
   Vocabulary Quiz Engine — Design System
   =============================================================================
   Direction: a library card-catalog aesthetic. Vocabulary and dictionaries
   are the actual subject matter here, so the design leans on that directly
   rather than generic SaaS styling — a serif display face for questions
   (the way a dictionary entry reads), quiet card treatments with a thin
   top rule (like a catalog card), and A/B/C options as small lettered
   discs rather than loud colored buttons.

   Color/type tokens are CSS custom properties so dark mode is a single
   attribute swap ([data-theme="dark"] on <html>), not a second stylesheet.
   ============================================================================= */

/* --- Font loading -----------------------------------------------------------
   Self-hosted, not pulled from a CDN — consistent with this project's
   minimal-external-dependency stance (see project README). Font files
   are NOT included in this scaffold (binary assets); download and place
   them at the paths below. See internal/web/static/fonts/README.md for
   exactly what to fetch. Until then, the fallback stacks below already
   read as deliberate choices, not browser defaults, so the app looks
   reasonably composed even with fonts missing.
   ----------------------------------------------------------------------- */
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- Palette (light, default) --- */
  --color-bg: #f3f6f4;            /* cool parchment, not warm cream */
  --color-bg-raised: #ffffff;
  --color-bg-sunken: #e9ede9;
  --color-ink: #24303b;            /* primary text */
  --color-ink-soft: #566370;       /* secondary text */
  --color-rule: #c9d2cb;           /* hairline borders, the catalog-card rule */
  --color-accent: #5c6f91;         /* dusty periwinkle — links, primary actions */
  --color-accent-ink: #33415c;     /* accent, darker, for text-on-light use */
  --color-correct: #4f7d64;        /* sage, deepened for text contrast */
  --color-correct-bg: #e3ede6;
  --color-incorrect: #9c4c40;      /* muted brick-rose, deepened for text contrast */
  --color-incorrect-bg: #f3e4e1;
  --color-focus: #8a5fb0;          /* distinct focus-ring color, plum */

  /* Difficulty tier tabs (library-classification-tab feel) */
  --color-diff-1: #8fb996;
  --color-diff-2: #7fa9c9;
  --color-diff-3: #d9b969;
  --color-diff-4: #cf8f6b;
  --color-diff-5: #a480b8;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --radius: 3px;             /* deliberately small — catalog cards have square corners, not app-style rounded ones */
  --shadow-card: 0 1px 2px rgba(36, 48, 59, 0.06), 0 4px 12px rgba(36, 48, 59, 0.04);
  --max-measure: 42rem;      /* reading-width column, like a printed page */
}

[data-theme="dark"] {
  --color-bg: #1b2229;
  --color-bg-raised: #232b33;
  --color-bg-sunken: #161c22;
  --color-ink: #e7ebe6;
  --color-ink-soft: #a9b4ae;
  --color-rule: #3a444d;
  --color-accent: #93a8d1;
  --color-accent-ink: #b7c5e6;
  --color-correct: #8fc7a4;
  --color-correct-bg: #223327;
  --color-incorrect: #d99a8c;
  --color-incorrect-bg: #3a2621;
  --color-focus: #c6a3e6;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* --- Reset & base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--color-ink);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--color-accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--color-accent); }

/* Visible keyboard focus everywhere — not optional for an app whose
   whole interaction model (A/B/C) is designed to work from the keyboard. */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* --- Layout shell -------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--color-rule);
  background: var(--color-bg-raised);
}
.site-header__inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark:hover { color: var(--color-ink); }
.wordmark small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
  margin-top: 0.15rem;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.92rem;
}
.nav a { color: var(--color-ink-soft); text-decoration: none; }
.nav a:hover { color: var(--color-accent-ink); }

.theme-toggle {
  background: none;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--color-accent); color: var(--color-accent-ink); }

main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
main.measure { max-width: var(--max-measure); }

.site-footer {
  border-top: 1px solid var(--color-rule);
  margin-top: 3rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-ink-soft);
}

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}
.btn:hover { background: var(--color-accent-ink); border-color: var(--color-accent-ink); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--color-accent-ink);
  border-color: var(--color-rule);
}
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent-ink); background: var(--color-bg-sunken); }
.btn-block { display: block; width: 100%; text-align: center; }

/* --- Forms ------------------------------------------------------------------ */
label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 1rem; }
label > span, label > .label-text { display: block; margin-bottom: 0.3rem; color: var(--color-ink-soft); font-weight: 500; }
input[type="text"], input[type="email"], textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-bg-raised);
  color: var(--color-ink);
}
textarea { min-height: 5rem; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }
.checkbox-row input { width: auto; }
.field-hint { font-size: 0.82rem; color: var(--color-ink-soft); font-weight: 400; margin-top: 0.25rem; }

/* --- Content quality flag control (quiz/spelling question screens) ---------
   Deliberately quiet — this is a low-emphasis, optional escape hatch, not
   a primary action competing with answering the question. */
.flag-details { margin-top: 1.25rem; font-size: 0.85rem; }
.flag-details summary { cursor: pointer; color: var(--color-ink-soft); }
.flag-details summary:hover { color: var(--color-ink); }
.flag-form { margin-top: 0.6rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.flag-form label { flex: 1 1 16rem; margin-bottom: 0; }
.flag-form label > span, .flag-form label > .label-text { font-size: 0.8rem; margin-bottom: 0.15rem; }
.flag-form input[type="text"] { font-size: 0.85rem; padding: 0.35rem 0.5rem; }
.flag-form button { font-size: 0.8rem; padding: 0.3rem 0.65rem; }
.flag-status { font-size: 0.8rem; color: var(--color-ink-soft); }
.flag-status.is-success { color: var(--color-correct); }
.flag-status.is-error { color: var(--color-incorrect); }

kbd {
  font-family: var(--font-mono);
  font-size: 0.75em;
  padding: 0.1em 0.45em;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  background: var(--color-bg-sunken);
  box-shadow: 0 1px 0 var(--color-rule);
}
.form-card { background: var(--color-bg-raised); border: 1px solid var(--color-rule); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-card); }

/* --- Alerts / notices -------------------------------------------------------- */
.notice { border-left: 3px solid var(--color-accent); background: var(--color-bg-raised); padding: 0.8rem 1rem; margin-bottom: 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; }
.notice-error { border-left-color: var(--color-incorrect); background: var(--color-incorrect-bg); color: var(--color-incorrect); }

/* --- Catalog card (the signature element) ------------------------------------
   Used for the quiz question itself. A thin top rule + small uppercase
   mono "eyebrow" label mimics the printed header rule on a library
   index card — the one deliberate visual flourish in this design;
   everything else stays quiet around it. */
.catalog-card {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-rule);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-card);
}
.catalog-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
  margin-bottom: 1rem;
}
.catalog-card__question {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 1.75rem;
}

.answer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.answer-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-bg-raised);
  color: var(--color-ink);
  cursor: pointer;
}
.answer-option:hover { border-color: var(--color-accent); background: var(--color-bg-sunken); }
.answer-option__label {
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  border: 1px solid var(--color-rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-accent-ink);
}

/* --- Word info panel (spelling mode's dictionary metadata) ------------------
   A small definition list beneath the pronunciation cue — quieter than
   the catalog card's own eyebrow/question styling, since this is
   supporting reference material, not the question itself. */
.word-info { margin: 0 0 1.5rem 0; font-size: 0.92rem; }
.word-info > div { display: flex; gap: 0.5rem; padding: 0.3rem 0; border-bottom: 1px dashed var(--color-rule); }
.word-info > div:last-child { border-bottom: none; }
.word-info dt { flex: 0 0 8rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-ink-soft); margin: 0; }
.word-info dd { margin: 0; color: var(--color-ink); }

/* --- Feedback (post-answer) -------------------------------------------------- */
.feedback { border-left: 3px solid var(--color-rule); padding: 0.9rem 1.1rem; margin-bottom: 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; background: var(--color-bg-raised); }
.feedback.is-correct { border-left-color: var(--color-correct); background: var(--color-correct-bg); }
.feedback.is-incorrect { border-left-color: var(--color-incorrect); background: var(--color-incorrect-bg); }
.feedback__headline { font-family: var(--font-body); font-weight: 600; margin-bottom: 0.3rem; }
.feedback.is-correct .feedback__headline { color: var(--color-correct); }
.feedback.is-incorrect .feedback__headline { color: var(--color-incorrect); }
.feedback__explanation { font-size: 0.92rem; color: var(--color-ink-soft); margin-top: 0.5rem; }

/* --- Stat / data tables ------------------------------------------------------ */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-bottom: 1.5rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--color-rule); }
th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-soft); font-weight: 500; }
td.numeric, th.numeric { font-family: var(--font-mono); text-align: right; }

/* --- Difficulty / category tabs ---------------------------------------------- */
.tab {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  color: #fff;
}
.tab-diff-1 { background: var(--color-diff-1); }
.tab-diff-2 { background: var(--color-diff-2); }
.tab-diff-3 { background: var(--color-diff-3); color: #3a3220; }
.tab-diff-4 { background: var(--color-diff-4); }
.tab-diff-5 { background: var(--color-diff-5); }
.tab-neutral { background: var(--color-bg-sunken); color: var(--color-ink-soft); }

/* --- Quiz option grid (dashboard "start a quiz") ----------------------------- */
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.option-card { border: 1px solid var(--color-rule); border-radius: var(--radius); padding: 1.1rem; background: var(--color-bg-raised); }
.option-card.is-unavailable { opacity: 0.55; }
.option-card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.3rem; }
.option-card__meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--color-ink-soft); margin-bottom: 0.8rem; }
.option-card__actions { display: flex; gap: 0.6rem; }
.option-card__actions .btn, .option-card__actions .btn-secondary { flex: 1; text-align: center; padding: 0.45rem 0.6rem; font-size: 0.88rem; }

/* --- Pricing plans ------------------------------------------------------------ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.plan-card { border: 1px solid var(--color-rule); border-top: 3px solid var(--color-accent); border-radius: var(--radius); padding: 1.5rem; background: var(--color-bg-raised); text-align: center; }
.plan-card h2 { margin-bottom: 0.2rem; }
.plan-card__cadence { color: var(--color-ink-soft); font-size: 0.88rem; margin-bottom: 1.25rem; }

/* --- Utility ------------------------------------------------------------------- */
.text-soft { color: var(--color-ink-soft); }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.hr-rule { border: none; border-top: 1px solid var(--color-rule); margin: 2rem 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 640px) {
  .site-header__inner { flex-wrap: wrap; }
  h1 { font-size: 1.6rem; }
  .catalog-card__question { font-size: 1.25rem; }
}

/* ---- Dashboard: mode switch, tiles, panel, progress, sub-tabs -------------- */
.switch, .subtabs { display: flex; gap: 0.25rem; margin: 1rem 0; }
.switch a, .subtabs a {
  padding: 0.45rem 1.1rem; border: 1px solid var(--color-border, #ccc); border-radius: 999px;
  text-decoration: none; color: var(--color-accent-ink); background: transparent;
}
.subtabs a { border-radius: 6px 6px 0 0; border-bottom: 2px solid transparent; }
.switch a.is-active, .subtabs a.is-active { background: var(--color-accent-ink); color: var(--color-bg, #fff); font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.tile-box { border: 1px solid var(--color-border, #ccc); border-radius: 8px; padding: 0.75rem 1rem; }
.tile-box__value { font-size: 1.6rem; font-weight: 600; }
.tile-box__label { font-size: 0.85rem; }
.tile-box__sub { font-size: 0.75rem; opacity: 0.7; }
.panel { border: 1px solid var(--color-border, #ccc); border-radius: 8px; padding: 1rem 1.25rem; margin: 1rem 0 1.5rem; }
.progress { height: 0.5rem; border-radius: 999px; background: rgba(128,128,128,0.2); overflow: hidden; margin: 0.5rem 0 1rem; }
.progress__bar { height: 100%; background: var(--color-accent-ink); }

/* ---- My Stats charts (inline SVG; classes so dark mode just works) --------- */
.chart-wrap { max-width: 36rem; margin: 0.5rem 0 1rem; }
.chart { width: 100%; height: auto; display: block; }
.chart-bar { fill: var(--color-accent-ink); opacity: 0.85; }
.chart-bar:hover { opacity: 1; }
.chart-axis { stroke: currentColor; opacity: 0.3; stroke-width: 1; }
.chart-label { fill: currentColor; font-size: 11px; opacity: 0.7; }

/* ---- Dashboard encouragement line ------------------------------------------ */
.encourage { font-style: italic; margin: -0.25rem 0 0.75rem; opacity: 0.85; }

/* ---- Site announcement banner (above <main>, on every page) ---------------- */
.announcement { padding: 0.6rem 1rem; border-bottom: 1px solid var(--color-border, #ccc); background: rgba(120, 160, 200, 0.18); }
.announcement--warning { background: rgba(230, 180, 60, 0.28); }
.announcement__inner { max-width: 60rem; margin: 0 auto; }

/* ---- Badges ---------------------------------------------------------------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.5rem 0 1rem; }
.badge-chip { display: inline-block; padding: 0.15rem 0.6rem; border: 1px solid var(--color-border, #ccc); border-radius: 999px; font-size: 0.8rem; background: rgba(120, 160, 200, 0.15); }
tr.badge-locked td { opacity: 0.55; }

/* ---- Streamlined dashboard (compact picker, slim header and footer) --------- */
.dash-head { margin-bottom: 0.25rem; }
.dash-head h1 { margin-bottom: 0.15rem; }
.dash-head .encourage { margin: 0 0 0.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section-title { font-size: 1.05rem; margin: 1.25rem 0 0.4rem; }

/* The picker: one line per pool; the buttons stay on the same line as the count. */
table.picker { margin: 0.25rem 0 0.5rem; }
table.picker th[scope="row"] { font-weight: 500; white-space: nowrap; }
table.picker thead th { font-size: 0.8rem; font-weight: 600; }
table.picker td { white-space: nowrap; }
.picker__hint { display: block; font-weight: 400; opacity: 0.65; }
.picker__count { display: inline-block; min-width: 4.5rem; font-size: 0.85rem; margin-right: 0.35rem; }
.picker__none { opacity: 0.45; }
.btn.picker__go, .btn-secondary.picker__go { padding: 0.2rem 0.65rem; font-size: 0.85rem; margin-right: 0.2rem; text-decoration: none; }
.picker__legend { font-size: 0.8rem; margin: 0 0 1.5rem; }
.plain-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--color-rule); }

/* Footer: a single summary line, the last session folded away, small print. */
.dash-foot { margin-top: 1.5rem; padding-top: 0.75rem; border-top: 1px solid var(--color-rule); }
.dash-summary { margin: 0 0 0.5rem; }
.last-session { margin: 0 0 0.5rem; }
.last-session summary { cursor: pointer; color: var(--color-accent-ink); }
.last-session p { margin: 0.4rem 0; }
.dash-small { font-size: 0.8rem; margin: 0.5rem 0 0; }

/* Admin links live in one dropdown (native <details>, no script). */
.nav-menu { position: relative; display: inline-block; }
.nav-menu summary { cursor: pointer; list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after { content: " \25BE"; }
.nav-menu__panel { position: absolute; right: 0; z-index: 20; min-width: 10rem; margin-top: 0.4rem; padding: 0.4rem;
  display: flex; flex-direction: column; gap: 0.15rem; background: var(--color-bg, #fff); border: 1px solid var(--color-rule); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.nav-menu__panel a { padding: 0.3rem 0.6rem; white-space: nowrap; }
/* Group captions inside the admin menu (Content / People / Site). */
.nav-menu__group { padding: 0.45rem 0.6rem 0.1rem; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-soft); }
.nav-menu__group:first-child { padding-top: 0.1rem; }

@media (max-width: 600px) {
  table.picker td, table.picker th { padding: 0.4rem 0.3rem; }
  table.picker th[scope="row"] { white-space: normal; font-size: 0.72rem; }
  .picker__hint { display: none; }
  .picker__count { display: block; min-width: 0; font-size: 0.8rem; }
  .btn.picker__go, .btn-secondary.picker__go { padding: 0.2rem 0.5rem; margin-right: 0.1rem; }
  /* Let the top navigation wrap onto a second line instead of overflowing. */
  .site-header__inner { flex-wrap: wrap; }
  .nav { flex-wrap: wrap; gap: 0.4rem 0.9rem; }
}
.btn-secondary.picker__go { border: 1px solid var(--color-accent, #5b6b8c); }

/* ---- Help & FAQ page ---- */
.help-toc { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0 0 1.5rem; padding: 0.6rem 0; border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule); font-size: 0.9rem; }
.help-section { margin: 0 0 2rem; scroll-margin-top: 1rem; }
.help-section h3 { font-size: 1rem; margin: 1.25rem 0 0.35rem; }
.help-dl dt { font-weight: 600; margin-top: 0.75rem; }
.help-dl dd { margin: 0.2rem 0 0 1rem; }
.help-keys { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.help-keys th, .help-keys td { text-align: left; padding: 0.4rem 0.6rem 0.4rem 0; border-bottom: 1px solid var(--color-rule); vertical-align: top; }
.faq { border-bottom: 1px solid var(--color-rule); padding: 0.55rem 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { margin: 0.5rem 0 0.25rem 1rem; }


/* ==========================================================================
   Utility classes
   --------------------------------------------------------------------------
   These replace what used to be inline style="..." attributes in the
   templates. The Content-Security-Policy (style-src 'self', see
   internal/server/middleware/security_headers.go) forbids inline styles, so
   browsers silently ignored every one of them. Do NOT add 'unsafe-inline' to
   the policy and do NOT put style="..." back in a template (a test,
   TestTemplatesHaveNoInlineStyles, fails if you do): add a class here instead.

   Naming: the number in a spacing/size class is the value in rem with the
   decimal point removed (mt-075 = margin-top 0.75rem, maxw-26 = max-width
   26rem, fs-085 = font-size 0.85rem); an "n" means negative (mt-n05 =
   margin-top -0.5rem).

   !important is deliberate and confined to this block: an inline style beat
   every selector, and these classes must keep winning over component rules
   (e.g. a button's own padding) exactly as the inline styles did.
   ========================================================================== */
.mt-0 { margin-top:0 !important; }
.mt-025 { margin-top:0.25rem !important; }
.mt-05 { margin-top:0.5rem !important; }
.mt-075 { margin-top:0.75rem !important; }
.mt-1 { margin-top:1rem !important; }
.mt-125 { margin-top:1.25rem !important; }
.mt-15 { margin-top:1.5rem !important; }
.mt-n05 { margin-top:-0.5rem !important; }
.mb-0 { margin-bottom:0 !important; }
.mb-025 { margin-bottom:0.25rem !important; }
.mb-04 { margin-bottom:.4rem !important; }
.mb-05 { margin-bottom:0.5rem !important; }
.mb-075 { margin-bottom:0.75rem !important; }
.mb-1 { margin-bottom:1rem !important; }
.mb-15 { margin-bottom:1.5rem !important; }
.mb-2 { margin-bottom:2rem !important; }
.ml-05 { margin-left:0.5rem !important; }
.mx-0 { margin-left:0 !important;margin-right:0 !important; }
.mx-auto { margin-left:auto !important;margin-right:auto !important; }
.border-0 { border:0 !important; }
.btn-sm { padding:0.3rem 0.6rem !important;font-size:0.85rem !important; }
.btn-sm-wide { padding:0.35rem 0.75rem !important;font-size:0.85rem !important; }
.flex { display:flex !important; }
.flex-1 { flex:1 !important; }
.flex-row { flex-direction:row !important; }
.flex-wrap { flex-wrap:wrap !important; }
.font-display { font-family:var(--font-display) !important; }
.font-serif { font-family:var(--font-serif,serif) !important; }
.fs-08 { font-size:0.8rem !important; }
.fs-085 { font-size:0.85rem !important; }
.fs-09 { font-size:0.9rem !important; }
.fs-092 { font-size:0.92rem !important; }
.fs-105 { font-size:1.05rem !important; }
.fs-115 { font-size:1.15rem !important; }
.fs-14 { font-size:1.4rem !important; }
.fs-2 { font-size:2rem !important; }
.fw-400 { font-weight:400 !important; }
.fw-500 { font-weight:500 !important; }
.gap-05 { gap:0.5rem !important; }
.grid-auto-14 { grid-template-columns:repeat(auto-fit, minmax(14rem, 1fr)) !important; }
.inline-form { display:inline !important; }
.justify-center { justify-content:center !important; }
.maxw-24 { max-width:24rem !important; }
.maxw-26 { max-width:26rem !important; }
.maxw-28 { max-width:28rem !important; }
.maxw-30 { max-width:30rem !important; }
.maxw-32 { max-width:32rem !important; }
.maxw-36 { max-width:36rem !important; }
.maxw-40 { max-width:40rem !important; }
.nowrap { white-space:nowrap !important; }
.pad-0 { padding:0 !important; }
.pad-2-0-1 { padding:2rem 0 1rem !important; }
.self-center { align-self:center !important; }
.self-end { align-self:flex-end !important; }
.text-left { text-align:left !important; }
.is-disabled { opacity: 0.6; }   /* a switched-off row in an admin list */
