/* FWC Live — shared styles for the viewer page and the staff dashboard.
   Layout: one calm centered column for viewers; a wide scannable board for staff.
   Palette: spruce greens of the Tobique valley, a brass accent, live-red reserved for "live". */
:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --sunken: #e9eee9;
  --ink: #16241f;
  --muted: #5d6d66;
  --line: #d5ddd7;
  --spruce: #1f4d3f;
  --spruce-ink: #ffffff;
  --brass: #a8741f;
  --live: #d4372c;
  --good: #1f8a5b;
  --idle: #9aa7a1;
  --focus: #3d8c6f;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1714; --surface: #16211d; --sunken: #1d2a25; --ink: #e8efeb; --muted: #9db0a7;
    --line: #2a3a33; --spruce: #4fa585; --spruce-ink: #0b1411; --brass: #d9a54e;
    --live: #ff5a4e; --good: #4cc48d; --idle: #5f6f68; --focus: #6cc5a2; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1714; --surface: #16211d; --sunken: #1d2a25; --ink: #e8efeb; --muted: #9db0a7;
  --line: #2a3a33; --spruce: #4fa585; --spruce-ink: #0b1411; --brass: #d9a54e;
  --live: #ff5a4e; --good: #4cc48d; --idle: #5f6f68; --focus: #6cc5a2; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--font-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--spruce); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.brand { display: flex; align-items: center; gap: 10px; padding-block: 20px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--spruce); color: var(--spruce-ink);
  display: grid; place-items: center; font: 700 14px/1 var(--font-display); letter-spacing: 0.02em;
}
.brand-name { font: 600 15px/1.2 var(--font-display); }
.brand-sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  background: var(--spruce); color: var(--spruce-ink); font-weight: 600; cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--spruce); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-size: 16px;
}
.input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.error { color: var(--live); font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; }
.live-dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--live) 0%, transparent); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .live-dot.pulse { animation: none; } * { transition: none !important; } }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.badge.live { background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live); }
.badge.off { background: var(--sunken); color: var(--muted); }
.badge.new { background: color-mix(in srgb, var(--brass) 18%, transparent); color: var(--brass); }
.tabular { font-variant-numeric: tabular-nums; }

.demo-banner {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 13px;
  background: color-mix(in srgb, var(--brass) 12%, var(--surface)); border: 1px dashed var(--brass);
}
