:root {
  --bg: #0f1115;
  --panel: #181b22;
  --panel-2: #20242e;
  --fg: #e6e8ee;
  --muted: #8b93a7;
  --accent: #4da3ff;
  --border: #2a2f3a;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fa;
    --panel: #ffffff;
    --panel-2: #eef1f6;
    --fg: #1a1d24;
    --muted: #5c6474;
    --accent: #2563eb;
    --border: #d5dbe5;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.doc {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

/* P0026: six items have to fit a 375px phone without pushing the document
   wider than the viewport, so the row wraps instead of overflowing. The
   roadmap page used to patch this inline; the shared rule owns it now. */
.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 28px;
  font-size: 13px;
}

.doc-nav a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

.doc-nav a:hover,
.doc-nav a.active {
  color: var(--fg);
  border-color: var(--accent);
}

/* P0026: the return route out of a guide page. Reading as a filled action
   rather than another peer pill is deliberate — a visitor who arrived from the
   landing page needs to see the way back, not hunt for it among five siblings. */
.doc-nav__home {
  background: var(--panel-2);
  color: var(--fg);
  font-weight: 600;
}

.doc-nav__home::before {
  content: "\2190";
  margin-right: 6px;
  color: var(--accent);
}

h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  margin: 0 0 6px;
}

h2 {
  font-size: 20px;
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 16px;
  color: var(--accent);
  margin: 24px 0 8px;
}

p {
  color: var(--fg);
  margin: 10px 0;
}

.intro {
  color: var(--muted);
  font-size: 15px;
}

ul {
  padding-left: 20px;
}

li {
  margin: 8px 0;
}

li strong {
  color: var(--fg);
}

code {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  color: var(--accent);
}

a {
  color: var(--accent);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 18px 0;
}

.section-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.hero {
  padding: 34px 0 24px;
  max-width: 860px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero__lead {
  color: var(--muted);
  font-size: 19px;
  max-width: 760px;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.feature-pills span {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  font-size: 12px;
  padding: 5px 11px;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
}

.toc strong { margin-right: 8px; }
.toc a { font-size: 13px; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.steps li > span {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #07111f;
  font-weight: 800;
}

.callout {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 3px solid #54d18b;
  background: rgba(84, 209, 139, .08);
  border-radius: 4px 10px 10px 4px;
  color: var(--muted);
}

.callout--warning {
  border-left-color: #f2b84b;
  background: rgba(242, 184, 75, .08);
}

.screenshot {
  margin: 22px 0 30px;
}

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .3);
}

.screenshot figcaption {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.guide-grid article {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}

.guide-grid h3 { margin-top: 0; }
.guide-grid p { margin-bottom: 0; color: var(--muted); }

.check-list li::marker { color: #54d18b; content: "✓  "; }

/* P0026: the first layer each deep page opens with. A reader who is not an
   engineer gets the whole answer here in a few lines; the page below stays
   exactly as long and as technical as it was. */
.first-layer {
  border-color: var(--accent);
}

.first-layer h2 {
  margin: 0 0 4px;
  padding-bottom: 0;
  font-size: 18px;
  border-bottom: 0;
}

.first-layer ul {
  margin: 12px 0 14px;
}

.first-layer > p:last-child {
  margin-bottom: 0;
}

/* P0026: the verdict vocabulary, mirroring src/components/CoverKpiVerdict.tsx.
   Glyph and word together, because colour alone is never the signal. */
.verdict-legend {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.verdict-legend > div {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 4px 16px;
  align-items: baseline;
}

.verdict-legend dt {
  font-weight: 700;
}

.verdict-legend dd {
  margin: 0;
  color: var(--muted);
}

/* The three rated states are the colours the app itself uses, so the legend
   teaches the vocabulary rather than describing it. The withheld state stays
   neutral on purpose: it is not a fourth verdict. */
.verdict-glyph {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border: 1px solid currentcolor;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  vertical-align: -4px;
}

/* Base is the dark palette, matching the :root default at the top of this
   file; the light overrides sit in the same prefers-color-scheme block style. */
.verdict-glyph--good { color: #54d18b; }
.verdict-glyph--warn { color: #f2b84b; }
.verdict-glyph--bad { color: #f2777a; }

@media (prefers-color-scheme: light) {
  .verdict-glyph--good { color: #2f8f5b; }
  .verdict-glyph--warn { color: #a8710a; }
  .verdict-glyph--bad { color: #c2413d; }
}

@media (max-width: 700px) {
  .verdict-legend > div { grid-template-columns: 1fr; }
}

section { scroll-margin-top: 18px; }

@media (max-width: 700px) {
  .doc { padding: 24px 16px 64px; }
  .guide-grid { grid-template-columns: 1fr; }
  .hero__lead { font-size: 17px; }
  .toc strong { flex-basis: 100%; }
}

@media print {
  :root { --bg: #fff; --panel: #f5f6f8; --panel-2: #eee; --fg: #16181d; --muted: #555; --border: #ccc; }
  .doc { max-width: none; padding: 0; }
  .doc-nav, .toc { display: none; }
  .screenshot img { box-shadow: none; }
  section, figure, article { break-inside: avoid; }
}
