:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #fcfcfb;
  --border: #e4e3df;
  --grid: #ecebe7;
  --text: #0b0b0b;
  --text-2: #52514e;
  --text-3: #7a7974;
  --accent: #ff6600;
  --hiring: #2a78d6;
  --seeking: #eb6834;
  --ratio: #1baf7a;
  --indeed: #e87ba4;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211;
    --surface: #1a1a19;
    --border: #2e2e2b;
    --grid: #2a2a27;
    --text: #ffffff;
    --text-2: #c3c2b7;
    --text-3: #8f8e86;
    --hiring: #3987e5;
    --seeking: #d95926;
    --ratio: #199e70;
    --indeed: #d55181;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --surface: #1a1a19;
  --border: #2e2e2b;
  --grid: #2a2a27;
  --text: #ffffff;
  --text-2: #c3c2b7;
  --text-3: #8f8e86;
  --hiring: #3987e5;
  --seeking: #d95926;
  --ratio: #199e70;
  --indeed: #d55181;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 1080px; margin: 0 auto; padding: 32px 16px 48px; }
h1 { margin: 0; font-size: 28px; letter-spacing: -0.01em; }
h1::before { content: ""; display: inline-block; width: 12px; height: 12px; background: var(--accent); margin-right: 10px; border-radius: 2px; vertical-align: 3px; }
h2 { margin: 0 0 8px; font-size: 16px; }
.sub, .note { color: var(--text-2); margin: 6px 0 0; }
.note { font-size: 13px; margin: -4px 0 8px; }
a { color: inherit; }

.status {
  margin: 20px 0 0; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: 14px;
}

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 16px; }
.filters button {
  font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border);
}
.filters button:hover { color: var(--text); }
.filters button.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (min-width: 860px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.tile .label { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.tile .value { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .delta { color: var(--text-3); font-size: 12px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.chart-wrap { position: relative; height: 220px; transition: opacity .2s; }
.chart-wrap.tall { height: 360px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; }
.key.hiring { background: var(--hiring); }
.key.seeking { background: var(--seeking); }
.key.indeed { background: var(--indeed); }

.table-scroll { max-height: 480px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--grid); text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; background: var(--surface); color: var(--text-2); font-weight: 600; cursor: pointer; user-select: none; }
th[aria-sort="ascending"]::after { content: " ▲"; font-size: 10px; }
th[aria-sort="descending"]::after { content: " ▼"; font-size: 10px; }
.num { text-align: right; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
td.missing { color: var(--text-3); }

footer { color: var(--text-3); font-size: 13px; margin-top: 24px; }

.subscribe form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.subscribe input {
  flex: 1 1 220px; min-width: 0; font: inherit; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.subscribe input:focus { outline: 2px solid var(--hiring); outline-offset: 1px; }
.subscribe button {
  font: inherit; font-weight: 600; padding: 8px 18px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--text); background: var(--text); color: var(--bg);
}
.subscribe button:disabled { opacity: .6; cursor: default; }
.form-msg { margin: 8px 0 0; font-size: 14px; min-height: 1.5em; color: var(--text-2); }
.form-msg.ok { color: var(--text); font-weight: 600; }
.fine { margin: 4px 0 0; font-size: 12px; color: var(--text-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
