/* ── Tokens ────────────────────────────────────────────────────────────────
   Light-only, deliberately. The design this follows is a light tracker page,
   and an automatic dark flip would be a different design rather than the same
   one inverted — so `color-scheme: light` is declared explicitly and every
   colour is painted, rather than leaving the page to inherit a dark host.

   Series colours were validated with the dataviz validator against a pure
   white chart surface; all six checks pass. Re-run it rather than nudging. */
:root {
  color-scheme: light;
  --bg:            #ffffff;
  --panel:         #f4f5f7;
  --panel-edge:    #e3e6ea;
  --border:        #dcdfe3;
  --ink:           #24292f;
  --ink-soft:      #57606a;
  --ink-mute:      #8b949e;
  --accent:        #0a84c2;   /* the big numbers */
  --link:          #0f9488;
  --live:          #d1383d;
  --series-1:      #0a84c2;   /* observed */
  --series-2:      #e8590c;   /* forecast */
  --band:          rgba(232, 89, 12, 0.15);
  --surface-1:     #ffffff;   /* chart surface, read by chart.js */
  --border-strong: #b9c0c8;
  --text-primary:  #24292f;
  --text-secondary:#57606a;
  --text-muted:    #8b949e;
  --surface-2:     #eef0f3;
  --good:          #1a7f37;
  --bad:           #cf222e;
  --sans: "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink-soft);
  font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { max-width: 1080px; margin: 0 auto; padding: 22px 20px 64px; }

/* ── Masthead ─────────────────────────────────────────────────────────────── */
.masthead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.wordmark { margin: 0; font-size: 30px; font-weight: 300; letter-spacing: -0.02em; color: var(--ink); }
.subtitle { margin: 0; font-size: 16px; font-weight: 400; color: var(--ink-soft); }
.credit { margin: 4px 0 0; font-size: 13px; color: var(--ink-mute); }
.controls { display: flex; gap: 8px; }
select, input[type="search"] {
  font: inherit; font-size: 14px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 6px 9px; min-height: 34px;
}
select:focus-visible, input:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ── The headline: oversized numbers inline in a sentence ─────────────────── */
.headline {
  margin: 18px 0 6px; font-size: 19px; line-height: 1.45; color: var(--ink-soft);
}
.headline b { font-size: 30px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.headline .sep, .statusline .sep { color: var(--ink-mute); margin: 0 6px; }
.headline .up { color: var(--good); } .headline .down { color: var(--bad); }

.statusline { margin: 0 0 20px; font-size: 14px; color: var(--ink-soft); max-width: 76ch; }
.live {
  color: var(--live); font-weight: 700; font-size: 12px; letter-spacing: .06em;
  border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; margin-right: 6px;
}

/* ── Panels ───────────────────────────────────────────────────────────────── */
.panel {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: 4px; padding: 16px 18px 18px; margin-bottom: 16px;
}
.panel-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--ink); }
.caption { margin: 0 0 12px; font-size: 13.5px; font-style: italic; color: var(--ink-soft); }
.caption #chart-title { font-style: normal; font-weight: 600; color: var(--ink); }

/* ── Chart ────────────────────────────────────────────────────────────────── */
.chart-scroll { overflow-x: auto; background: var(--surface-1);
  border: 1px solid var(--panel-edge); border-radius: 4px; padding: 10px 12px 4px; }
.chart-host { position: relative; min-width: min(320px, 100%); }
.chart-host svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 2px 0;
  font-size: 12.5px; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend span[hidden] { display: none; }
.legend i { width: 22px; display: inline-block; }
.legend i.solid  { border-top: 2px solid var(--series-1); }
.legend i.dashed { border-top: 2px dashed var(--series-2); }
.legend i.swatch { width: 14px; height: 12px; border-radius: 2px; background: var(--band); }
.tip {
  position: absolute; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: 4px; padding: 9px 11px; font-size: 12.5px; min-width: 156px;
  box-shadow: 0 4px 14px rgba(27,31,36,.15); z-index: 5;
}
.tip .d { color: var(--ink-mute); margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.tip .r { display: flex; justify-content: space-between; gap: 14px; }
.tip .r b { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.tip .r em { font-style: normal; display: inline-flex; align-items: center; gap: 6px; }
.tip .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.note { font-size: 12.5px; color: var(--ink-mute); margin: 12px 2px 0; }

/* ── Listings ─────────────────────────────────────────────────────────────── */
.filters { display: grid; grid-template-columns: 1.8fr 1fr 1.2fr 1.1fr 1.1fr; gap: 8px; margin-bottom: 12px; }
.filters input, .filters select { width: 100%; }
.table-scroll { overflow-x: auto; background: var(--bg);
  border: 1px solid var(--panel-edge); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { position: sticky; top: 0; background: var(--panel); z-index: 1;
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-mute); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.title { font-weight: 600; color: var(--ink); max-width: 320px; }
td.co { max-width: 190px; }
.pill { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 10px;
  border: 1px solid var(--border-strong); color: var(--ink-soft); white-space: nowrap; }
.pill.remote { border-color: var(--link); color: var(--link); }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.pager button { font: inherit; font-size: 13px; cursor: pointer; color: var(--ink);
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 7px 14px; }
.pager button:disabled { opacity: .45; cursor: default; }
.pager button:not(:disabled):hover { border-color: var(--border-strong); }
.empty { padding: 40px 16px; text-align: center; color: var(--ink-mute); }

details.method { margin-top: 22px; font-size: 13px; }
details.method summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
details.method p { color: var(--ink-mute); max-width: 82ch; line-height: 1.55; }
footer { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 15px; line-height: 1.7; color: var(--ink-soft); }
footer a { font-weight: 600; }

/* ── Phone: cards instead of a seven-column table ─────────────────────────── */
@media (max-width: 700px) {
  .page { padding: 16px 14px 44px; }
  .wordmark { font-size: 24px; }
  .subtitle { font-size: 14.5px; }
  .credit { font-size: 12.5px; }
  footer { font-size: 14px; }
  .headline { font-size: 17px; }
  .headline b { font-size: 25px; }
  .filters { grid-template-columns: 1fr; }
  select, input[type="search"] { font-size: 16px; min-height: 42px; }  /* stops iOS zooming */

  .table-scroll { overflow-x: visible; border: 0; background: transparent; }
  #jobs, #jobs tbody, #jobs tr, #jobs td { display: block; width: 100%; }
  #jobs thead { display: none; }
  #jobs tr { background: var(--bg); border: 1px solid var(--panel-edge);
    border-radius: 4px; padding: 11px 13px; margin-bottom: 9px; }
  #jobs tr:hover { background: var(--bg); }
  #jobs td { border: 0; padding: 3px 0; max-width: none; }
  #jobs td.title { font-size: 15px; margin-bottom: 5px; }
  #jobs td[data-l]:not(.title):not(.actions)::before {
    content: attr(data-l); display: inline-block; min-width: 76px;
    color: var(--ink-mute); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  }
  #jobs td.actions { margin-top: 7px; display: flex; gap: 12px; align-items: center; }
  #jobs td.actions:empty { display: none; }
  .pager { justify-content: stretch; }
  .pager button { flex: 1 1 0; min-height: 44px; }

  /* Touch targets. "Open" is the primary action on every card and was 21px
     tall — half the 44px minimum — because it is an inline link inside a
     table cell. Give it real height without turning it into a full-width
     block, and match the controls to the same floor. */
  select, input[type="search"] { min-height: 44px; }
  #jobs td.actions { gap: 16px; min-height: 44px; }
  #jobs td.actions a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
    font-weight: 600;
  }
  #jobs td.actions .pill { padding: 6px 10px; }
}
