@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');
:root {
  --bg: #eef2f6; --surface: #ffffff; --surface-2: #e3e9f0; --border: #c9d3de;
  --ink: #16233a; --ink-soft: #4b5a71; --ink-faint: #7c8aa0;
  --accent: #2b5f8a; --accent-ink: #ffffff; --highlight: #d9722a; --highlight-soft: #fbe6d3;
  --good: #2f7a4f; --good-soft: #dcf0e3; --warn: #b5460c; --warn-soft: #fde3d3;
  --shadow: 0 1px 2px rgba(22,35,58,0.06), 0 4px 14px rgba(22,35,58,0.05);
}
:root:not([data-theme="light"]) { @media (prefers-color-scheme: dark) {
  --bg: #0e2a47; --surface: #123256; --surface-2: #163a63; --border: #2a5580;
  --ink: #dcecf7; --ink-soft: #a9c3db; --ink-faint: #7f9cb8;
  --accent: #6fb6e8; --accent-ink: #08233c; --highlight: #f0a860; --highlight-soft: #2e3f2c;
  --good: #7cd6a0; --good-soft: #163c2a; --warn: #f0906a; --warn-soft: #3f2416;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 14px rgba(0,0,0,0.25);
}}
:root[data-theme="dark"] {
  --bg: #0e2a47; --surface: #123256; --surface-2: #163a63; --border: #2a5580;
  --ink: #dcecf7; --ink-soft: #a9c3db; --ink-faint: #7f9cb8;
  --accent: #6fb6e8; --accent-ink: #08233c; --highlight: #f0a860; --highlight-soft: #2e3f2c;
  --good: #7cd6a0; --good-soft: #163c2a; --warn: #f0906a; --warn-soft: #3f2416;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 14px rgba(0,0,0,0.25);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'IBM Plex Sans', -apple-system, Segoe UI, sans-serif; line-height: 1.55; }
code, .mono { font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; }
.wrap { max-width: 800px; margin: 0 auto; padding: 2.25rem 2rem 4rem; }
a.back { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink-soft); text-decoration: none; font-size: 0.85rem; margin-bottom: 1.1rem; }
a.back:hover { color: var(--accent); }
.eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
h1 { margin: 0.35rem 0 0.5rem; font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 700; text-wrap: balance; }
p.sub { margin: 0 0 1.75rem; color: var(--ink-soft); max-width: 65ch; }
h2.section { font-size: 1.1rem; margin: 2rem 0 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
h2.section:first-of-type { border-top: none; padding-top: 0; margin-top: 1rem; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.1rem 1.3rem; margin-bottom: 0.9rem; box-shadow: var(--shadow); display: flex; gap: 1rem;
}
.step-num {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700; color: var(--accent-ink);
  background: var(--accent); border-radius: 50%; width: 1.9rem; height: 1.9rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.step > div:last-child { min-width: 0; flex: 1; }
.step h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.step p { margin: 0 0 0.5rem; color: var(--ink-soft); font-size: 0.92rem; }
.step p:last-child { margin-bottom: 0; }
.step pre { background: var(--surface-2); border-radius: 6px; padding: 0.6rem 0.8rem; font-size: 0.78rem; overflow-x: auto; margin: 0.5rem 0; }
.aside { background: var(--surface-2); border-radius: 8px; padding: 0.7rem 0.9rem; font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.6rem; }
.aside strong { color: var(--ink); }
/* NOT display:flex. The house style uses flex here, which works only when the box holds a <b>
   and one plain text node - any <strong> or <em> inside becomes its own flex item and the
   paragraph shatters into one narrow column per inline element. Block layout lets the text
   wrap normally whatever it contains. */
.verdict { border-radius: 8px; padding: 0.7rem 0.9rem; font-size: 0.88rem; margin-top: 0.6rem; display: block; }
.verdict.good { background: var(--good-soft); color: var(--good); }
.verdict.warn { background: var(--warn-soft); color: var(--warn); }
.verdict b { display: block; color: var(--ink); font-size: 0.85rem; margin-bottom: 0.15rem; }
.status-list { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.3rem; box-shadow: var(--shadow); }
.status-list ul { margin: 0; padding-left: 1.2rem; }
.status-list li { margin-bottom: 0.5rem; font-size: 0.92rem; color: var(--ink-soft); }
.status-list li:last-child { margin-bottom: 0; }
.status-list li strong { color: var(--ink); }
table.grant-table { width: 100%; border-collapse: collapse; margin-top: 0.6rem; font-size: 0.88rem; }
table.grant-table th, table.grant-table td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.grant-table th { color: var(--ink-faint); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
table.grant-table td.num { text-align: right; font-family: 'IBM Plex Mono', monospace; white-space: nowrap; }
table.grant-table tr.sub td { padding-top: 0.15rem; padding-left: 1.6rem; color: var(--ink-soft); font-size: 0.84rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
/* A LITERAL bullet, not an escape. "B3" is the obvious sub-item arrow and IBM Plex Sans
   has no glyph there, so it published as an empty box; the replacement written as "&#92;2022"
   then went through Python, where &#92;202 is an OCTAL escape, and what reached the file was
   U+0082 followed by the digit 2. The character itself cannot be mistranslated. */
table.grant-table tr.sub td:before { content: "•"; margin-left: -1rem; margin-right: 0.5rem; color: var(--ink-faint); }
/* Wide tables scroll inside their own card rather than dragging the whole page sideways.
   The markup already wraps them in <div class="scroll">; the rule was missing. */
.scroll { overflow-x: auto; }
/* A route like /division/{id}/players is one unbreakable token, and on a narrow screen it
   pushes the whole page sideways rather than wrapping. */
code { overflow-wrap: anywhere; }
.demo { width: 100%; border-collapse: collapse; font-size: 0.8rem; font-family: 'IBM Plex Mono', monospace; margin: 0.6rem 0; }
.demo th, .demo td { border: 1px solid var(--border); padding: 0.3rem 0.5rem; text-align: right; white-space: nowrap; }
.demo th { background: var(--surface-2); color: var(--ink-faint); font-weight: 600; }
.demo td.lab, .demo th.lab { text-align: left; }
.demo tr.tot td { font-weight: 700; background: var(--surface-2); }
.demo tr.sel td { background: var(--highlight-soft); }
footer.page { margin-top: 2rem; padding-top: 1.5rem; color: var(--ink-faint); font-size: 0.8rem; border-top: 1px solid var(--border); }
/* A table wider than the screen scrolls within itself rather than off the edge of the page.
   Without this, on a phone, either the page drags sideways taking the headings with it, or the
   overflowing columns cannot be reached at all. Verified both, at 375px. No desktop effect. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
