/* ZimWatt design tokens - shared by the website and the admin portal. */
@font-face {
  font-family: "Archivo";
  src: url("../vendor/archivo/archivo-wdth.woff2") format("woff2-variations"),
       url("../vendor/archivo/archivo-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  /* status scale (the product's core idea) */
  --s-unknown: #8a948f;
  --s-unconfirmed: #e0a100;
  --s-likely: #ea6a12;
  --s-high: #d4282c;
  --s-on: #10b981;
  --s-conflict: #8b5cf6;

  /* brand (sampled from logos/): lime wordmark, yellow bolt, banner navy-charcoal */
  --brand-lime: #8fd400;
  --brand-lime-deep: #72b501;
  --brand-yellow: #ffd21f;
  --brand-night: #171d25;

  --charcoal: #171d25;
  --ink: #1b2420;
  --ink-2: #44514b;
  --ink-3: #6b7872;
  --paper: #f3f5f2;
  --surface: #ffffff;
  --line: #d9dfdb;
  --line-2: #e8ece9;
  --action: #3a7d0a;
  --action-ink: #ffffff;
  --action-soft: #eaf5dc;
  --danger: #b42318;
  --focus: #0b6cff;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --r-1: 6px;
  --r-2: 12px;
  --shadow: 0 1px 2px rgb(27 36 32 / .06), 0 8px 24px rgb(27 36 32 / .08);
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #e8eeea;
  --ink-2: #b8c4be;
  --ink-3: #8c9a93;
  --paper: #11161c;
  --surface: #1c232c;
  --line: #2f3a35;
  --line-2: #26302b;
  --action: #8fd400;
  --action-ink: #10160b;
  --action-soft: #1f2d12;
  --danger: #f97066;
  --focus: #6aa8ff;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* the hidden attribute must win over component display rules (.field { display: grid } hid nothing) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--paper); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
a { color: var(--action); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.display { font-family: var(--display); font-stretch: 118%; font-weight: 800; letter-spacing: -.01em; line-height: 1.02; }

/* status chips */
.chip { display: inline-flex; align-items: center; gap: .4em; font-size: .82rem; font-weight: 600; padding: .15em .6em .15em .45em; border-radius: 999px; background: var(--line-2); color: var(--ink); white-space: nowrap; }
.chip::before { content: ""; width: .62em; height: .62em; border-radius: 50%; background: var(--c, var(--s-unknown)); }
.st-unconfirmed_outage { --c: var(--s-unconfirmed); }
.st-likely_outage { --c: var(--s-likely); }
.st-high_confidence_outage { --c: var(--s-high); }
.st-partially_restored, .st-restored { --c: var(--s-on); }
.st-conflicting { --c: var(--s-conflict); }
.st-stale, .st-closed, .st-unknown { --c: var(--s-unknown); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: 600 .95rem/1 var(--body); padding: .75em 1.15em; border-radius: var(--r-1); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { border-color: var(--ink-3); }
.btn-primary { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--action); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn[disabled], .btn.busy { opacity: .6; cursor: progress; }

.field { display: grid; gap: .35rem; margin: 0 0 1rem; font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea, input.input, select.input { font: 400 1rem var(--body); padding: .7em .8em; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); color: var(--ink); min-height: 44px; width: 100%; }
.field .hint { font-weight: 400; color: var(--ink-3); font-size: .85rem; }
.invalid { border-color: var(--danger) !important; }
/* wordmark: "Zim" in the surrounding colour, "Watt" in brand lime (as in the logo) */
.wordmark { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-style: italic; letter-spacing: -.01em; }
.wordmark b { font-weight: inherit; color: var(--brand-lime); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
