/* live-surfaces.css — departure-board-grid (32nd flavor).
 * Airport flip-flap arrivals board: deep teal-black, green destinations,
 * amber updates, red delays. Monospace card-as-row, hard-edged borders,
 * tabular alignment. */

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: #0d1814;
  color: #d8e6dd;
}
body {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  line-height: 1.4;
  font-size: 13px;
  letter-spacing: 0.02em;
}
a { color: inherit; text-decoration: none; }
code { font-family: inherit; color: #f5d76e; }

/* HEADER — the board frame */
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
  background: #07120e;
  border-bottom: 2px solid #1b3a2a;
  color: #d3f0d8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.board-head-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.callsign {
  color: #5dffa2;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.sep {
  color: #2a503c;
  font-weight: 500;
}
.title {
  font-family: "Familjen Grotesk", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #f5d76e;
}
.subtitle {
  color: #6a8c7a;
  font-size: 11px;
}
.board-head-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 11px;
}
.back-link {
  color: #5dffa2;
  border: 1px solid #1b3a2a;
  padding: 4px 10px;
  border-radius: 2px;
}
.back-link:hover { background: #122a1d; }
.generated {
  color: #f5d76e;
  font-variant-numeric: tabular-nums;
}

/* SUMMARY — score-cards across the top */
.board-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 24px;
  background: #0a1b14;
  border-bottom: 1px solid #1b3a2a;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #1b3a2a;
  background: #0d1814;
  min-width: 0;
}
.metric-label {
  color: #6a8c7a;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.metric-value {
  color: #5dffa2;
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.metric-loading .metric-value { color: #f5d76e; }
.metric.metric-warn .metric-value { color: #f5d76e; }
.metric.metric-stale .metric-value { color: #e55b5b; }
.metric.metric-dead .metric-value { color: #e55b5b; }
.metric.metric-missing .metric-value { color: #6a8c7a; }

/* FILTER ROW */
.board-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 24px;
  background: #0d1814;
  border-bottom: 1px solid #1b3a2a;
}
.filter-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  background: #0a1b14;
  color: #6a8c7a;
  border: 1px solid #1b3a2a;
  border-radius: 2px;
  cursor: pointer;
}
.filter-btn:hover {
  border-color: #5dffa2;
  color: #d8e6dd;
}
.filter-btn.active {
  background: #122a1d;
  color: #5dffa2;
  border-color: #5dffa2;
}
.filter-sep {
  align-self: center;
  color: #2a503c;
  margin: 0 4px;
}

/* GRID — the actual board rows */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px;
  padding: 16px 24px 24px;
}
.board-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: #f5d76e;
  padding: 40px 0;
  letter-spacing: 0.2em;
}

/* CARD — the flap row */
.surface-card {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 4px;
  padding: 10px 12px;
  background: #0a1b14;
  border: 1px solid #1b3a2a;
  border-left-width: 4px;
  border-radius: 2px;
  color: #d8e6dd;
  font-size: 12px;
  transition: background-color 0.15s, border-color 0.15s;
}
.surface-card:hover {
  background: #122a1d;
  border-color: #5dffa2;
}
.surface-card.f-fresh   { border-left-color: #5dffa2; }
.surface-card.f-warn    { border-left-color: #f5d76e; }
.surface-card.f-stale   { border-left-color: #e55b5b; }
.surface-card.f-missing { border-left-color: #6a8c7a; }
.surface-card.f-dead    { border-left-color: #e55b5b; background: #1b0a0a; }

.card-row-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.card-name {
  color: #f5d76e;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-type {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  padding: 2px 5px;
  border: 1px solid #1b3a2a;
  border-radius: 1px;
  color: #6a8c7a;
  text-transform: uppercase;
}
.card-type.t-income      { color: #5dffa2; border-color: #2c6a48; }
.card-type.t-credibility { color: #7ac6ff; border-color: #2c4e6a; }
.card-type.t-dashboard   { color: #f5d76e; border-color: #6a5b2c; }
.card-type.t-nav         { color: #d8e6dd; border-color: #2a503c; }
.card-type.t-meta        { color: #ff8fd0; border-color: #6a2c52; }

.card-url {
  color: #6a8c7a;
  font-size: 10px;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #6a8c7a;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card-freshness-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.f-fresh .card-freshness-dot   { background: #5dffa2; box-shadow: 0 0 6px rgba(93, 255, 162, 0.5); }
.f-warn .card-freshness-dot    { background: #f5d76e; box-shadow: 0 0 6px rgba(245, 215, 110, 0.5); }
.f-stale .card-freshness-dot   { background: #e55b5b; }
.f-missing .card-freshness-dot { background: #6a8c7a; }
.f-dead .card-freshness-dot    { background: #e55b5b; }

.card-age {
  font-variant-numeric: tabular-nums;
  color: #d8e6dd;
}
.card-linked {
  color: #7ac6ff;
  font-size: 9px;
}

/* DEAD-LINKS PANEL — below the grid */
.board-deadlinks {
  padding: 20px 24px;
  border-top: 1px solid #1b3a2a;
  background: #0a1b14;
}
.deadlinks-title {
  margin: 0 0 12px;
  color: #e55b5b;
  font-family: "Familjen Grotesk", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.deadlinks-title .muted {
  color: #6a8c7a;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}
.deadlinks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}
.deadlinks-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #1b0a0a;
  border: 1px solid #4a2020;
  color: #f5b7b7;
  font-size: 11px;
}
.deadlinks-list .name { color: #f5d76e; font-weight: 600; }
.deadlinks-list .marked { color: #5dffa2; font-size: 10px; letter-spacing: 0.06em; }
.deadlinks-list .unmarked { color: #e55b5b; font-size: 10px; letter-spacing: 0.06em; }

/* FOOT */
.board-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px 20px;
  font-size: 10px;
  color: #6a8c7a;
  letter-spacing: 0.06em;
  border-top: 1px solid #1b3a2a;
}

@media (max-width: 920px) {
  .board-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .board-grid { grid-template-columns: 1fr; }
  .board-foot { flex-direction: column; gap: 4px; }
}
