/* Fire Warden HQ — retro mission-control theme. Self-contained: system fonts
   only (monospace stack does the pixel-era heavy lifting), no external assets. */

:root {
  --bg: #0b1020;
  --panel: #131a30;
  --panel-2: #0e1428;
  --ink: #e6edff;
  --muted: #8291b3;
  --accent: #f97316;      /* Fire Warden orange */
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --border: #2a3554;
  --mono: 'Cascadia Mono', 'Consolas', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

.screen { max-width: 720px; margin: 0 auto; padding: 14px 12px 40px; }

.pixel-border {
  border: 2px solid var(--border);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #1c2440;
  border-radius: 2px;
}

/* ---------- login ---------- */
#login { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
#login[hidden] { display: none; } /* author display:flex otherwise beats the hidden attribute */
.login-card { background: var(--panel); padding: 28px 22px; width: 100%; max-width: 360px; text-align: center; }
.login-card input {
  width: 100%; margin: 16px 0 10px; padding: 10px;
  background: var(--panel-2); border: 2px solid var(--border); color: var(--ink);
  font-family: var(--mono); font-size: 14px; border-radius: 2px;
}
.login-card input:focus { outline: none; border-color: var(--accent); }

/* ---------- header ---------- */
.hq-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 2px 12px; }
.logo-line { font-size: 16px; letter-spacing: 1px; }
.logo-line b { color: var(--accent); }
.head-right { display: flex; gap: 10px; align-items: center; }
.chip {
  background: var(--panel); border: 1px solid var(--border);
  padding: 2px 10px; font-size: 12px; border-radius: 999px; color: var(--muted);
}

/* ---------- office canvas ---------- */
#office {
  width: 100%; height: auto; display: block;
  image-rendering: pixelated;
  border: 2px solid var(--border); border-radius: 2px;
  background: #10182e;
  touch-action: manipulation;
}

.new-intel {
  text-align: center; color: var(--yellow); padding: 6px;
  animation: pulse 1.2s infinite; letter-spacing: 2px; font-size: 13px;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.blink { animation: pulse 1s infinite; color: var(--accent); }

/* ---------- boards & cards ---------- */
.board { background: var(--panel); margin-top: 14px; padding: 14px; }
.board h2 { font-size: 13px; letter-spacing: 2px; color: var(--muted); margin-bottom: 8px; }
.digest { font-size: 14px; }

.squad-card { background: var(--panel); margin-top: 14px; padding: 14px; }
.squad-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.squad-dot { width: 14px; height: 14px; border-radius: 2px; flex-shrink: 0; }
.squad-name { font-size: 13px; letter-spacing: 1.5px; color: var(--muted); }
.squad-headline { font-size: 14px; margin-top: 2px; }
.squad-body { margin-top: 12px; }
.squad-body[hidden] { display: none; }

.wnw { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 10px 0; }
@media (min-width: 560px) { .wnw { grid-template-columns: 1fr 1fr; } }
.wnw ul { list-style: none; }
.wnw li { padding: 3px 0 3px 22px; position: relative; font-size: 13px; }
.wnw .working li::before { content: '✔'; position: absolute; left: 0; color: var(--green); }
.wnw .notworking li::before { content: '✘'; position: absolute; left: 0; color: var(--red); }
.wnw h3 { font-size: 11px; letter-spacing: 1px; color: var(--muted); margin-bottom: 4px; }

.summary { font-size: 13px; color: var(--ink); border-left: 3px solid var(--border); padding-left: 10px; margin: 10px 0; white-space: pre-wrap; }

/* ---------- findings ---------- */
.finding { background: var(--panel-2); border: 1px solid var(--border); border-radius: 2px; padding: 10px 12px; margin-top: 10px; }
.finding.done, .finding.dismissed { opacity: 0.45; }
.finding-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sev { font-size: 10px; letter-spacing: 1px; padding: 1px 8px; border-radius: 999px; flex-shrink: 0; }
.sev.high { background: #3b1219; color: var(--red); border: 1px solid var(--red); }
.sev.medium { background: #33240b; color: var(--yellow); border: 1px solid var(--yellow); }
.sev.low { background: #10291b; color: var(--green); border: 1px solid var(--green); }
.finding-title { font-size: 13.5px; font-weight: 700; }
.finding-detail { font-size: 12.5px; color: var(--muted); margin: 6px 0 8px; white-space: pre-wrap; }
.finding-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  background: var(--accent); color: #17120b; border: none; cursor: pointer;
  font-family: var(--mono); font-weight: 700; font-size: 12.5px;
  padding: 8px 14px; border-radius: 2px; letter-spacing: 0.5px;
  box-shadow: 0 3px 0 #b45309;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #b45309; }
.btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--border); box-shadow: 0 3px 0 #1c2440; }
.btn.small { padding: 5px 10px; font-size: 11.5px; }
.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-family: var(--mono); font-size: 12px; text-decoration: underline; }

/* ---------- mission log ---------- */
.log-row { display: flex; justify-content: space-between; gap: 8px; padding: 7px 2px; border-bottom: 1px dashed var(--border); font-size: 13px; cursor: pointer; }
.log-row:hover { color: var(--accent); }
.log-row .muted { flex-shrink: 0; }

/* ---------- misc ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; margin-top: 24px; }
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #17120b; font-weight: 700;
  padding: 10px 18px; border-radius: 2px; font-size: 13px; z-index: 50;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}
