/* TornadoTrack (formerly Stormwatch) — shared tokens and chrome.
   Alert colors are the only saturated colors on the site. Everything else is
   a cool neutral so polygons and radar read instantly. */

:root {
  --bg: #141a26;
  --bg-2: #1b2232;
  --bg-3: #242d40;
  --line: #2f3a52;
  --text: #eef1f6;
  --muted: #98a2b8;
  --faint: #6b7590;
  --link: #cfd7e6;

  --tor: #e9433f;
  --svr: #f2c230;
  --ffw: #2fb06f;
  --smw: #a37bf0;
  --sqw: #7fd1ff;
  --dsw: #d8a070;
  --watch-tor: #ff7b76;
  --watch-svr: #ffe17a;
  --mcd: #ffffff;

  --radius: 6px;
  --panel-w: 400px;
  --font: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-condensed: "Barlow Semi Condensed", "Barlow", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-condensed); font-weight: 600; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Top bar shared by every page */
.topbar {
  display: flex; align-items: center; gap: 18px;
  height: 52px; padding: 0 16px;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-condensed); font-weight: 700; font-size: 22px; letter-spacing: .01em; text-decoration: none; color: var(--text); }
.brand small { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 8px; }
.nav { display: flex; gap: 14px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 2px; }
.nav a[aria-current="page"], .nav a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--bg-3); color: var(--text);
  padding: 9px 14px; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  font-size: 15px; line-height: 1;
}
.btn:hover { background: #2c374d; }
.btn.primary { background: var(--text); color: #0e1320; border-color: var(--text); font-weight: 600; }
.btn.primary:hover { background: #fff; }
.btn.small { padding: 6px 10px; font-size: 14px; }
.btn[aria-pressed="true"] { background: #3a4660; border-color: #55638a; }
.btn:disabled { opacity: .5; cursor: default; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px;
}
.field input:focus { border-color: #7f8db0; outline: none; }
.hint { color: var(--muted); font-size: 14px; }
.error { color: var(--watch-tor); }

.kind-tor { --k: var(--tor); }
.kind-svr { --k: var(--svr); }
.kind-ffw { --k: var(--ffw); }
.kind-smw { --k: var(--smw); }
.kind-sqw { --k: var(--sqw); }
.kind-dsw { --k: var(--dsw); }
.kind-other { --k: var(--muted); }

.page { max-width: 1040px; margin: 0 auto; padding: 32px 20px 64px; }
.page h1 { font-size: 40px; margin-bottom: 8px; }
.lede { font-size: 19px; color: var(--muted); max-width: 60ch; }

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