/* The guides are static pages, so they carry a small copy of the app's tokens (web/theme.css) and its
   self-hosted fonts: Schibsted Grotesk and Public Sans, both under the SIL Open Font License 1.1
   (copied from @fontsource). Grey-green paper, one ledger green accent, ruled lines instead of cards,
   2px and 4px corners, no shadows. */

@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url("fonts/public-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #eeefe8;
  --surface: #f7f7f2;
  --surface-2: #e2e4dc;
  --line: #d3d6cd;
  --line-strong: #b3b8ae;
  --ink: #151a17;
  --ink-2: #434a45;
  --ink-3: #5c645e;
  --accent: #17613f;
  --accent-hover: #104d31;
  --accent-ink: #ffffff;
  --accent-soft: #dde8e0;
  --paper: #fbfbf8;
  --paper-ink: #1d211f;
  --font-display: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
  font: 16px/1.6 var(--font-text);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111513;
    --surface: #181d1a;
    --surface-2: #212823;
    --line: #2c332e;
    --line-strong: #444c46;
    --ink: #e9ece6;
    --ink-2: #b3bab4;
    --ink-3: #939b95;
    --accent: #72c79b;
    --accent-hover: #8fd6b1;
    --accent-ink: #111513;
    --accent-soft: #1f3129;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.topbar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 2px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); }
.brand-mark svg { width: 16px; height: 16px; }
.spacer { flex: 1; }
.button { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 2px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.button.quiet { background: transparent; border-color: transparent; color: var(--ink); font-weight: 500; padding: 0 10px; }
.button.quiet:hover { background: var(--surface-2); color: var(--ink); }

main { max-width: 760px; margin: 0 auto; padding: 48px 16px 72px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; color: var(--accent); }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 5vw, 44px); line-height: 1.05; letter-spacing: -0.03em; margin: 8px 0 18px; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 23px; line-height: 1.2; letter-spacing: -0.01em; margin: 44px 0 10px; }
h3 { font-size: 17px; margin: 28px 0 6px; }
p, li { color: var(--ink-2); }
strong { color: var(--ink); }
.lede { font-size: 18px; }
code { font-family: var(--font-mono); font-size: 0.88em; padding: 0 4px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); overflow-wrap: anywhere; }
kbd { font-family: var(--font-mono); font-size: 0.85em; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface); color: var(--ink); }
.updated { font-size: 13.5px; color: var(--ink-3); margin: -6px 0 24px; }

/* The short answer, set like a form's instruction box. */
.answer { margin: 24px 0 8px; padding: 16px 18px; border: 1px solid var(--line-strong); border-top: 2px solid var(--ink); background: var(--surface); }
.answer p { margin: 0; color: var(--ink); }

/* Numbered steps with square counters, as in the app. */
ol.steps { list-style: none; margin: 16px 0 24px; padding: 0; counter-reset: step; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 14px 42px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 2px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink);
}

figure { margin: 24px 0 28px; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: 2px; }
figure svg { display: block; width: 100%; height: auto; }
figcaption { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }

/* Diagrams are drawn on "paper", which stays light in both themes like a printed form. */
.paper { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--line-strong); border-radius: 2px; padding: 12px; }

.table-scroll { overflow-x: auto; margin: 12px 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 13px; color: var(--ink-3); border-bottom: 2px solid var(--ink); }
tbody th { font-weight: 600; color: var(--ink); }
td { color: var(--ink-2); }

.try { margin: 44px 0 0; padding: 20px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.try p { margin: 0 0 14px; }
.guide-list { list-style: none; padding: 0; margin: 20px 0; border-top: 2px solid var(--ink); }
.guide-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.guide-list a { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; text-decoration: none; }
.guide-list a:hover { text-decoration: underline; }
.guide-list p { margin: 4px 0 0; font-size: 15px; }
.more { margin-top: 36px; font-size: 15px; }
.sources { font-size: 14px; }
.sources li { margin-bottom: 4px; }

.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 20px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.footer a { color: var(--ink-2); }

@media (max-width: 520px) {
  .topbar .button.quiet:first-of-type { display: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
