/* Layout: a top bar, then one centred column of cards; tables scroll inside their own box. */
:root {
  --bg: #f4f6f9; --panel: #ffffff; --fg: #141922; --muted: #5a6474; --line: #dfe4ea; --soft: #eef2f7;
  --accent: #1f4fd1; --accent-fg: #ffffff; --held: #c0392b; --trial: #b26b00; --released: #23804f;
  --tip: #141922; --tip-fg: #ffffff;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1117; --panel: #161b23; --fg: #e6e9ef; --muted: #9aa4b2; --line: #2a313c; --soft: #1d2430;
    --accent: #7ea2ff; --accent-fg: #0e1117; --held: #f2796c; --trial: #e5b04d; --released: #61c28f;
    --tip: #e6e9ef; --tip-fg: #0e1117; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); }
a { color: var(--accent); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.bar { position: sticky; top: 0; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1240px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-left)); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.brand { display: flex; gap: 10px; align-items: center; color: var(--fg); font-weight: 650; text-decoration: none; font-size: 15px; }
.mark { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, var(--accent), var(--held)); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 6px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--soft); color: var(--fg); font-weight: 600; }
.who { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.role { padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; text-transform: capitalize; }
.page { max-width: 1240px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-left)) 48px; display: grid; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; min-width: 0; }
.card h2 { margin: 0 0 4px; font-size: 16px; }
.card h3 { margin: 16px 0 6px; font-size: 14px; }
.sub { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.center { text-align: center; padding: 40px 18px; }
h1 { margin: 0; font-size: 22px; line-height: 1.25; text-wrap: balance; }
.lede { margin: 6px 0 0; max-width: 78ch; font-size: 15px; }
.lede b { font-variant-numeric: tabular-nums; }
.status { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 12px; }
.chip { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip.ok::before, .chip.bad::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.chip.ok::before { background: var(--released); }
.chip.bad { color: var(--held); border-color: currentColor; }
.chip.bad::before { background: var(--held); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
label.f { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
select, input[type="text"], input[type="email"], input[type="date"], input[type="number"], textarea {
  font: inherit; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-width: 0; }
textarea { width: 100%; min-height: 96px; font-family: var(--mono); font-size: 12px; }
button { font: inherit; border-radius: 6px; padding: 7px 14px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
button.link { border: 0; padding: 0; background: none; color: var(--accent); }
button.danger { color: var(--held); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 2px; }
.tile .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tile .v { font-size: 30px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile .v.word { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.tile .s { font-size: 12px; color: var(--muted); }
.held { color: var(--held); } .trial { color: var(--trial); } .released { color: var(--released); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.chart { position: relative; min-height: 120px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart text.lbl { fill: var(--fg); font-size: 12px; }
.chart .grid { stroke: var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw.held, .fill-held { background: var(--held); fill: var(--held); }
.sw.trial, .fill-trial { background: var(--trial); fill: var(--trial); }
.sw.released, .fill-released { background: var(--released); fill: var(--released); }
.tip { position: absolute; z-index: 3; pointer-events: none; background: var(--tip); color: var(--tip-fg); border-radius: 6px; padding: 6px 8px; font-size: 12px; max-width: 280px; }
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th, table.t td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t th { color: var(--muted); font-weight: 600; white-space: nowrap; font-size: 12px; }
td.when { white-space: nowrap; font-variant-numeric: tabular-nums; }
td.addr { min-width: 210px; overflow-wrap: anywhere; }
td.check { min-width: 150px; }
td.why { min-width: 240px; color: var(--muted); }
.pill { display: inline-block; padding: 1px 8px; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; font-size: 12px; }
.quiet { color: var(--muted); font-style: italic; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.msg { font-size: 13px; }
.msg.ok { color: var(--released); } .msg.bad { color: var(--held); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 16px; margin: 6px 0; }
.checks label, .radios label { display: flex; gap: 8px; align-items: flex-start; }
.radios { display: grid; gap: 6px; margin: 6px 0 10px; }
details.about summary { cursor: pointer; font-weight: 600; }
details.about ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 6px; max-width: 86ch; }
.mono { font-family: var(--mono); font-size: 12px; }
@media (prefers-reduced-motion: no-preference) { .tabs a, button { transition: background-color .15s, color .15s; } }
