/* Fonts are served from this site (no Google Fonts request), which keeps visitors private and lets the app work offline. */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/barlow-semi-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/barlow-semi-condensed-latin-700-normal.woff2) format("woff2"); }
:root {
  --bg: #F1F3EF;
  --surface: #FFFFFF;
  --surface-2: #F6F7F4;
  --ink: #142019;
  --muted: #5A665F;
  --faint: #8A948D;
  --line: #D8DDD5;
  --accent: #0A6A3A;
  --accent-ink: #FFFFFF;
  --accent-soft: #DCEEE2;
  --good: #006300;
  --critical: #C23434;
  --critical-soft: #FBE3E1;
  --map: #FAFBF8;
  --grid: #E7EAE4;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1310; --surface: #161C18; --surface-2: #1C241F; --ink: #EDF2EE; --muted: #9DAAA2; --faint: #6F7B74; --line: #2A342E;
    --accent: #43C07C; --accent-ink: #04120A; --accent-soft: #15301F; --good: #0ca30c; --critical: #EF6A6A; --critical-soft: #3A1717;
    --map: #111713; --grid: #1F2823;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1310; --surface: #161C18; --surface-2: #1C241F; --ink: #EDF2EE; --muted: #9DAAA2; --faint: #6F7B74; --line: #2A342E;
  --accent: #43C07C; --accent-ink: #04120A; --accent-soft: #15301F; --good: #0ca30c; --critical: #EF6A6A; --critical-soft: #3A1717;
  --map: #111713; --grid: #1F2823;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: inherit; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.brand b { font-family: var(--font-cond); font-size: 1.45rem; line-height: 1; display: block; }
.brand small { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.2; }
.btn { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.btn.ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.icon-btn { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); display: inline-grid; place-items: center; padding: 0; color: var(--ink); }
main.doc { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; }
.doc h1 { font-family: var(--font-cond); font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1.1; margin: 0 0 6px; }
.doc .updated { color: var(--muted); margin: 0 0 24px; font-size: 0.92rem; }
.doc h2 { font-family: var(--font-cond); font-size: 1.3rem; margin: 30px 0 6px; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 22px; }
.doc .callout { background: var(--accent-soft); border-radius: var(--r); padding: 14px 16px; margin: 18px 0; }
.site-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); font-size: 0.85rem; color: var(--muted); }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot nav { display: flex; gap: 14px; flex-wrap: wrap; }
.nf { flex: 1; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.nf .code { font-family: var(--font-cond); font-size: clamp(4rem, 18vw, 7rem); line-height: 1; color: var(--accent); margin: 0; }
.nf h1 { font-family: var(--font-cond); font-size: 1.8rem; margin: 8px 0; }
.nf p { color: var(--muted); max-width: 44ch; margin: 0 auto 20px; }
.nf .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 560px) { .brand small { display: none; } .site-foot { justify-content: center; text-align: center; } }
@media print { .top .icon-btn, .site-foot nav, .skip { display: none; } body { background: #fff; } }
