:root {
  --bg: #080e12;
  --ink: #e8e8d9;
  --muted: #a1b1b5;
  --hot: #ff7045;
  --cyan: #48d6f2;
  --green: #52e6aa;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(125deg, #26313144, transparent 35%), repeating-linear-gradient(45deg, #7b898608 0 1px, transparent 1px 4px);
  font: 13px/1.5 ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}
main { max-width: 1000px; margin: auto; padding: 20px 16px 60px; }
header {
  margin: 10px 12px 0;
  border: 1px solid #756e5966;
  background: linear-gradient(0deg, #050c12aa, #35434344 6%, #101b21 11%, #10181d 92%, #6a746444);
  box-shadow: inset 0 0 0 4px #080d11, inset 0 0 0 5px #53616888;
  position: relative;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 26px;
}
header::before, header::after {
  content: '+';
  position: absolute;
  top: 5px;
  font: 13px/12px monospace;
  color: #9c9d8b;
  background: #081117;
  border: 1px solid #5c675f;
  border-radius: 50%;
  width: 13px;
  height: 13px;
  text-align: center;
}
header::before { left: 5px; }
header::after { right: 5px; }
.stripe { width: 9px; height: 42px; transform: skew(-20deg); background: var(--hot); flex-shrink: 0; box-shadow: 0 0 8px var(--hot); }
.heading { min-width: 0; }
h1 { margin: 0; font: 900 29px/1.2 "DejaVu Sans", Arial, sans-serif; letter-spacing: .05em; text-shadow: 1px 2px #000; }
.sub { font-size: 10px; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
.edition { margin-left: auto; font-size: 9px; letter-spacing: .1em; color: var(--muted); text-align: right; line-height: 1.7; }
h2 { font-size: 10px; color: var(--hot); margin: 0 0 8px; letter-spacing: .1em; font-weight: 900; }
.section-title { padding: 0 4px; margin-top: 20px; color: var(--muted); }
p { font-size: 11px; color: var(--muted); line-height: 1.6; margin: 8px 0 0; }
b { color: var(--ink); }
.door, .detail {
  background: linear-gradient(120deg, #090e13e8, #111e22dc), repeating-linear-gradient(45deg, #a1b1b508 0 1px, transparent 1px 4px);
  border: 1px solid #737867;
  box-shadow: inset 0 0 0 4px #080d11, inset 0 0 0 5px #69756766;
  border-radius: 3px;
  position: relative;
}
.door { margin: 16px 0; padding: 14px; }
.door::before { content: ''; position: absolute; left: -1px; top: 25%; width: 2px; height: 50%; background: var(--hot); border-radius: 1px; box-shadow: 0 0 8px var(--hot); }
.feed-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#feed-message { color: var(--muted); font-size: 11px; }
.status { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.status::before { content: '\25CF'; margin-right: 7px; }
.status[data-state="live"] { color: var(--green); }
.status[data-state="stale"] { color: #ffc99e; }
.status[data-state="offline"] { color: var(--hot); }
dl { margin: 0; }
dl > div { min-width: 0; }
dt { font-size: 9px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.timestamps { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 12px; }
.timestamps dd { font-size: 11px; }
.runner-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.model-fact { grid-column: span 2; }
#runner-model, #runner-name { color: var(--cyan); }
.bards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 12px 0 16px; }
.empty-case { grid-column: 1 / -1; padding: 24px 14px; color: var(--muted); border: 1px dashed #65788066; }
.board {
  min-width: 0;
  background: linear-gradient(135deg, #727666 0, #35423e 1%, #131d22 2%, #0a1116 48%, #465652 99%);
  border: 1px solid #849082;
  box-shadow: inset 0 0 0 3px #090e13, inset 0 0 0 5px #505e5866;
  padding: 12px;
  position: relative;
}
.board-header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 0 4px; }
.board-label { min-width: 0; }
.board-title { font-size: 13px; color: var(--ink); font-weight: 700; letter-spacing: .04em; margin: 0; }
.board-name { font-size: 10px; color: var(--muted); letter-spacing: .04em; overflow-wrap: anywhere; }
.board-stat { font-size: 11px; color: var(--muted); text-align: right; flex-shrink: 0; }
.board-stat strong { color: var(--cyan); font-weight: 600; }
.allocation-label { color: var(--green); font-size: 10px; }
.grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 3px;
  aspect-ratio: 8 / 4;
  background: repeating-linear-gradient(0deg, transparent, transparent 29px, #71b7b20b 30px), repeating-linear-gradient(90deg, transparent, transparent 29px, #71b7b20b 30px), #061016;
  border: 1px solid #3a4a55;
  border-radius: 3px;
  padding: 5px;
  box-shadow: inset 0 0 0 4px #02080ba8, inset 0 0 0 5px #3a4a5530;
}
.cell { min-width: 0; min-height: 0; border: 1px solid #61b1a280; background: repeating-linear-gradient(45deg, transparent, transparent 4px, #5a9a5a0c 5px); }
.cell svg { display: block; width: 100%; height: 100%; }
.tile-fill { fill: #3a8a7acc; }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 8px; font-size: 10px; padding: 0 4px; color: var(--muted); }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-swatch { width: 8px; height: 8px; border-radius: 1px; background: #3a8a7a; box-shadow: 0 0 0 1px #ffffff10; }
.detail { padding: 12px; margin-top: 10px; }
.detail h4 { font-size: 10px; color: var(--cyan); margin: 0 0 8px; letter-spacing: .1em; }
.device-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.device-facts dd { font-size: 12px; }
progress { display: block; width: 100%; height: 8px; margin: 10px 0; border: 0; border-radius: 0; background: #061016; accent-color: var(--cyan); }
progress::-webkit-progress-bar { background: #061016; }
progress::-webkit-progress-value { background: var(--cyan); }
progress::-moz-progress-bar { background: var(--cyan); }
[hidden] { display: none !important; }
.host-facts { display: flex; flex-wrap: wrap; gap: 14px 32px; }
footer { margin-top: 24px; padding-top: 12px; border-top: 1px solid #65788066; font-size: 10px; color: var(--muted); line-height: 1.6; }
body[data-feed-state="stale"] .bards, body[data-feed-state="offline"] .bards { border-left: 2px solid #ff704580; padding-left: 6px; }
@media (max-width: 700px) {
  .bards { grid-template-columns: minmax(0, 1fr); }
  header { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; padding: 20px; margin: 10px 0 0; }
  h1 { font-size: 24px; }
  .edition { grid-column: 1 / -1; margin-left: 0; text-align: left; font-size: 10px; }
  .runner-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-fact { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  main { padding: 12px 12px 40px; }
  .board-header { flex-wrap: wrap; }
  .board-stat { text-align: left; }
  .device-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .timestamps { gap: 10px 18px; }
}
