/* Project Overrun: shared tokens, type and controls. Fonts: Barlow and Barlow Semi Condensed (SIL OFL 1.1, fonts/OFL-Barlow.txt). */
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/barlow-semi-condensed-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/barlow-semi-condensed-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/barlow-semi-condensed-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #e6ece9;
  --bg-deep: #dbe3df;
  --surface: #fbfcfb;
  --raised: #f0f4f2;
  --line: #c2d0cb;
  --line-strong: #8fa5a0;
  --ink: #0f252c;
  --muted: #45606a;
  --brass: #7a5800;
  --brass-soft: #f3e6c4;
  --coral: #b23a22;
  --coral-soft: #f7ddd5;
  --ok: #17714f;
  --focus: #0f6aa8;
  --grat: rgba(15, 37, 44, 0.07);
  --plate-a: 0.10;
  --c-blue: #1170b3;
  --c-yellow: #dcc000;
  --c-green: #0e9a70;
  --c-orange: #df8700;
  --c-purple: #b95d96;
  --c-grey: #8a9a98;
  --cube-stroke: #0f252c;
  --band-red: #c8432a;
  --band-amber: #c98a00;
  --band-green: #1d8a5f;
  --shadow: 0 1px 0 rgba(15, 37, 44, 0.06), 0 6px 20px -12px rgba(15, 37, 44, 0.35);
  --radius-s: 6px;
  --radius-m: 10px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-cond: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0d1d23; --bg-deep: #0a171c; --surface: #132a32; --raised: #19363f; --line: #2b4c56; --line-strong: #4f7480;
    --ink: #e9f1ef; --muted: #a2bcba; --brass: #e2bd69; --brass-soft: #3a3320; --coral: #ff8b74; --coral-soft: #44251f;
    --ok: #5fd0a0; --focus: #f2d27a; --grat: rgba(233, 241, 239, 0.06); --plate-a: 0.13;
    --c-blue: #5ab0e8; --c-yellow: #eadf4a; --c-green: #33c496; --c-orange: #ee9f2a; --c-purple: #d98bbe; --c-grey: #7f9593;
    --cube-stroke: #0a171c; --band-red: #ff7a62; --band-amber: #f0b43c; --band-green: #4fd39b;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0d1d23; --bg-deep: #0a171c; --surface: #132a32; --raised: #19363f; --line: #2b4c56; --line-strong: #4f7480;
  --ink: #e9f1ef; --muted: #a2bcba; --brass: #e2bd69; --brass-soft: #3a3320; --coral: #ff8b74; --coral-soft: #44251f;
  --ok: #5fd0a0; --focus: #f2d27a; --grat: rgba(233, 241, 239, 0.06); --plate-a: 0.13;
  --c-blue: #5ab0e8; --c-yellow: #eadf4a; --c-green: #33c496; --c-orange: #ee9f2a; --c-purple: #d98bbe; --c-grey: #7f9593;
  --cube-stroke: #0a171c; --band-red: #ff7a62; --band-amber: #f0b43c; --band-green: #4fd39b;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.8);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.45;
  font-variant-numeric: tabular-nums lining-nums;
}
h1, h2, h3, h4 { font-family: var(--font-cond); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 44px; padding: 0.55em 1.1em;
  border-radius: var(--radius-s); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 600 1rem/1.15 var(--font); cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* a hover that still reads as enabled (the old grey looked disabled, and sticks after a tap on phones) */
@media (hover: hover) { .btn-primary:hover { background: color-mix(in srgb, var(--ink) 82%, var(--brass)); border-color: var(--brass); } }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-danger { border-color: var(--coral); color: var(--coral); }

input[type='text'], select {
  font: 500 1.05rem var(--font); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s); min-height: 48px; padding: 0.4em 0.7em; width: 100%;
}
label { font-weight: 600; }

/* Colour-and-shape swatches */
.swatch { display: inline-block; vertical-align: -0.12em; flex: none; }
.swatch path, .cube { stroke: var(--cube-stroke); stroke-width: 1.4; stroke-linejoin: round; }
.c-blue { fill: var(--c-blue); --c: var(--c-blue); }
.c-yellow { fill: var(--c-yellow); --c: var(--c-yellow); }
.c-green { fill: var(--c-green); --c: var(--c-green); }
.c-orange { fill: var(--c-orange); --c: var(--c-orange); }
.c-purple { fill: var(--c-purple); --c: var(--c-purple); }
.c-grey { fill: var(--c-grey); --c: var(--c-grey); }

/* Dial */
.dial .seg { fill: none; stroke-width: 11; }
.dial .seg-red { stroke: var(--band-red); }
.dial .seg-amber { stroke: var(--band-amber); }
.dial .seg-green { stroke: var(--band-green); }
.dial.b-none .seg, .dial.is-grey .seg { stroke: var(--line); }
.dial .needle { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; transition: transform 700ms cubic-bezier(.3,.7,.2,1); transform-box: view-box; }
.dial .needle.ghost { stroke: var(--muted); stroke-width: 3; stroke-dasharray: 4 4; }
.dial.b-none .needle { opacity: 0; }
.dial .hub { fill: var(--ink); }

.wordmark { font-family: var(--font-cond); font-weight: 700; letter-spacing: -0.01em; }
.wordmark-mark { display: inline-block; vertical-align: middle; }

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