/* GoNoGo base: fonts, colour tokens and shared components for every page (site and app).
   "Parchment & ledger" design.
   Sharp corners, hairline rules, warm paper, British racing green; serif headlines,
   sans interface, monospace for figures only. Change the look here, in the tokens. */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --paper: #f9f8f5;        /* page */
  --panel: #ffffff;        /* cards, forms */
  --panel-alt: #f3f2ed;    /* table heads, alternate sections */
  --ink: #18221d;
  --muted: #56615b;
  --line: #e2e0d8;         /* hairlines */
  --line-strong: #18221d;
  --accent: #1e3a2b;       /* British racing green */
  --accent-hover: #14271d;
  --accent-ink: #f9f8f5;
  --go: #18633d;       --go-bg: #f0fdf4;
  --marginal: #b45309; --marginal-bg: #fffbeb;
  --nogo: #991b1b;     --nogo-bg: #fef2f2;
  --idle: #64748b;     --idle-bg: #f8fafc;
  --overlay-shadow: 2px 2px 0 0 rgb(24 34 29 / 0.12);
  --wrap: 1140px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  /* Kept for older rules and the admin/legal pages. */
  --bg: var(--paper);
  --bg-alt: var(--panel-alt);
  --radius: 0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1511; --panel: #151d19; --panel-alt: #19211d; --ink: #dce5de; --muted: #a9b2ab;
    --line: #2e3732; --line-strong: #dce5de; --accent: #aeceb9; --accent-hover: #c8e3d1; --accent-ink: #0d1511;
    --go: #7fd1a1; --go-bg: #0f2a1c; --marginal: #f2b05e; --marginal-bg: #2c1d0a;
    --nogo: #f39a9a; --nogo-bg: #2e1212; --idle: #a5b1c2; --idle-bg: #1a1f26;
    --overlay-shadow: 2px 2px 0 0 rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1511; --panel: #151d19; --panel-alt: #19211d; --ink: #dce5de; --muted: #a9b2ab;
  --line: #2e3732; --line-strong: #dce5de; --accent: #aeceb9; --accent-hover: #c8e3d1; --accent-ink: #0d1511;
  --go: #7fd1a1; --go-bg: #0f2a1c; --marginal: #f2b05e; --marginal-bg: #2c1d0a;
  --nogo: #f39a9a; --nogo-bg: #2e1212; --idle: #a5b1c2; --idle-bg: #1a1f26;
  --overlay-shadow: 2px 2px 0 0 rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

/* Verdict stamps: colour + word + shape, never colour alone. */
.stamp {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border: 1px solid currentColor; font-family: var(--mono); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
/* Shapes are drawn in CSS so they look the same on every device: diamond, half-disc, octagon, bar. */
.stamp::before { content: ""; flex: none; width: 9px; height: 9px; background: currentColor; }
.stamp-go { color: var(--go); background: var(--go-bg); }
.stamp-go::before { transform: rotate(45deg) scale(0.85); }
.stamp-marginal { color: var(--marginal); background: var(--marginal-bg); }
.stamp-marginal::before { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.stamp-nogo { color: var(--nogo); background: var(--nogo-bg); }
.stamp-nogo::before { width: 10px; height: 10px; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.stamp-idle { color: var(--idle); background: var(--idle-bg); }
.stamp-idle::before { width: 10px; height: 2px; }

/* Tooltips ("?" buttons explaining a term; see src/client/tips.ts). */
.tip {
  display: inline-grid; place-items: center; width: 16px; height: 16px; min-height: 0; padding: 0; margin-left: 2px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--muted);
  font: 600 10px/1 var(--sans); cursor: help; vertical-align: 1px;
}
.tip:hover, .tip:focus-visible { border-color: var(--accent); color: var(--accent); }
.tip-bubble {
  position: absolute; z-index: 60; padding: 10px 12px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); box-shadow: var(--overlay-shadow); font: 13px/1.45 var(--sans);
  display: flex; flex-direction: column; gap: 4px; text-align: left; text-transform: none; letter-spacing: 0;
}
.tip-bubble[hidden] { display: none; }
.tip-bubble strong { font-weight: 600; }
.nowrap { white-space: nowrap; }

/* Brand mark: a site boundary with a tick, beside the wordmark. Sized in ems so it follows each page's .brand. */
.brand { display: inline-flex; align-items: center; }
.brand-mark { width: 1.1em; height: 1.1em; margin-right: 0.34em; flex-shrink: 0; overflow: visible; }
.bm-line { fill: none; stroke: currentColor; stroke-width: 30; stroke-linejoin: round; }
.bm-tick { fill: none; stroke: var(--go); stroke-width: 40; stroke-linecap: round; stroke-linejoin: round; }
