:root {
  color-scheme: light;
  --bg: #fbf7ef;
  --panel: #fffdf8;
  --text: #171717;
  --muted: #5c5c5c;
  --line: #ded6c8;
  --accent: #0f5f3e;
  --accent-soft: #dcecdf;
  --focus: #005fcc;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: #064f9e; }
a:focus-visible, button:focus-visible, th[tabindex]:focus-visible, .table-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.site-header, main, footer { width: min(1500px, calc(100% - 32px)); margin: 0 auto; }
.site-header { padding: 32px 0 12px; }
h1 { margin: 0; font-size: clamp(2.25rem, 6vw, 5rem); line-height: .95; letter-spacing: -0.06em; }
h2 { margin: 0 0 12px; }
.status-block { margin: 12px 0; color: var(--muted); }
.status-block.error { color: #9d1c1c; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 10px; margin: 18px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.stat b { display: block; font-size: clamp(1.25rem, 2.6vw, 2rem); }
.stat span { color: var(--muted); font-size: .9rem; }
.chart-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.chart svg { width: 100%; height: min(360px, 45vh); display: block; }
.axis { stroke: #6f6a60; stroke-width: 1; }
.history-line { fill: none; stroke: var(--accent); stroke-width: 3; }
.projection-line { fill: none; stroke: #6f6a60; stroke-width: 2; stroke-dasharray: 7 7; }
.chart-label { fill: var(--muted); font-size: 12px; }
.subheader { margin: 18px 0 22px; font-size: clamp(1.4rem, 3vw, 2.4rem); color: var(--accent); font-weight: 800; letter-spacing: -0.03em; }
.jobs-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.visible-count { color: var(--muted); margin: 0; }
.jobs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.filter-rail { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: var(--panel); }
.filter-rail button { width: 100%; display: flex; justify-content: space-between; gap: 12px; border: 0; background: transparent; color: var(--text); padding: 9px 10px; border-radius: 9px; text-align: left; cursor: pointer; }
.filter-rail button[aria-pressed="true"] { background: var(--accent-soft); color: #0a3f2b; font-weight: 700; }
.table-wrap { max-height: 68vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table { width: 100%; min-width: 1320px; border-collapse: separate; border-spacing: 0; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; background: #f4eddf; cursor: pointer; white-space: nowrap; }
th[aria-sort="ascending"]::after { content: " ▲"; }
th[aria-sort="descending"]::after { content: " ▼"; }
td { font-size: .92rem; }
.title-cell a { font-weight: 700; }
.secondary { color: var(--muted); font-size: .83rem; margin-top: 3px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { background: #eee6d7; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
footer { color: var(--muted); padding: 28px 0 40px; }
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jobs-layout { display: block; }
  .filter-rail { display: flex; max-height: none; overflow-x: auto; gap: 8px; margin-bottom: 10px; }
  .filter-rail button { width: auto; white-space: nowrap; }
  .table-wrap { max-height: 64vh; }
}
