/* The Big Board: dark war-room console. This project is deliberately dark;
   the rest of the site stays light. Colors come from the dataviz skill's
   validated dark-surface set (surface #1a1a19, ink tokens, status palette,
   series blue #3987e5), so contrast is pre-checked, not eyeballed. */

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

:root {
  --page: #0d0d0d;
  --surface: #1a1a19;
  --ink: #ffffff;
  --ink-soft: #c3c2b7;
  --ink-faint: #898781;
  --hairline: #2c2c2a;
  --ring: rgba(255, 255, 255, 0.10);
  --series: #3987e5;      /* single-series marks (sparkline) */
  --track: #184f95;       /* meter track: darker step of the same blue ramp */
  --good: #0ca30c;
  --warn: #fab219;
  --bad: #d03b3b;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Public Sans", system-ui, sans-serif;
}

html { color-scheme: dark; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  min-height: 100vh;
}

/* faint CRT scanlines, decoration only */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(255, 255, 255, 0.015) 2px 3px
  );
  z-index: 2;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  position: relative;
  z-index: 1;
}

.back {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}
.back:hover { color: var(--ink-soft); }

.head { margin: 36px 0 28px; }

.wordmark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3rem);
  letter-spacing: 0.06em;
  text-shadow: 0 0 24px rgba(12, 163, 12, 0.25);
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.95em;
  margin-left: 0.18em;
  vertical-align: text-bottom;
  background: var(--good);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.statusline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.status { display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0.08em; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.dot.idle { background: var(--ink-faint); }
.dot.ok   { background: var(--good); box-shadow: 0 0 10px rgba(12, 163, 12, 0.6); animation: pulse 2.4s ease-in-out infinite; }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px rgba(250, 178, 25, 0.5); }
@keyframes pulse { 50% { opacity: 0.55; } }

#sys-text.ok   { color: var(--good); }
#sys-text.warn { color: var(--warn); }

.clock { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.tag {
  margin-top: 12px;
  color: var(--ink-soft);
  max-width: 56ch;
  font-size: 0.98rem;
}

/* the board */
.board {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.panel {
  grid-column: span 4;
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: 10px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-wide { grid-column: span 12; }

.feed-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}
.feed-id { color: var(--good); margin-right: 6px; }

.panel-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
}

.value {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.value-sm { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }

.value-xl {
  /* sized so the full 22-character debt figure fits a 320px phone */
  font-size: clamp(1rem, 5.8vw, 3.4rem);
  letter-spacing: 0.01em;
}

.value .unit { font-size: 0.5em; font-weight: 500; color: var(--ink-soft); }

.sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.sub .delta-up { color: var(--good); }
.sub .delta-down { color: var(--bad); }

.caveat {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  font-size: 0.74rem;
  color: var(--ink-faint);
  line-height: 1.45;
}

.feed-down { color: var(--warn); font-size: 1.1rem; font-family: var(--mono); }

/* rat desk mini log */
.mini-log {
  list-style: none;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
  display: grid;
  gap: 3px;
}
.mini-log li::before { content: "\25B8 "; color: var(--good); }

/* cold desk */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duo-item { display: grid; gap: 4px; }
.duo-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* burger meter: blue fill on a darker step of the same ramp */
.meter {
  height: 8px;
  border-radius: 4px;
  background: var(--track);
  overflow: hidden;
}
.meter-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--series);
  transition: width 0.8s ease;
}

/* market desk sparkline */
.spark {
  width: 100%;
  height: 44px;
  display: block;
}

/* morale desk */
.joke {
  font-size: 1.02rem;
  color: var(--ink);
  line-height: 1.5;
  min-height: 3em;
}

.btn {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--good);
  background: transparent;
  border: 1px solid var(--good);
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--good); color: var(--page); }

.foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 8px;
}
.foot .mono {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}
.foot-note {
  font-size: 0.76rem;
  color: var(--ink-faint);
  max-width: 72ch;
  line-height: 1.5;
}

@media (max-width: 940px) {
  .panel { grid-column: span 6; }
  .panel-wide { grid-column: span 12; }
}

@media (max-width: 600px) {
  .panel, .panel-wide { grid-column: span 12; }
  .wrap { padding: 22px 16px 40px; }
}
