:root {
  color-scheme: dark;
  --bg: #0b1320; --panel: #131f30; --panel-2: #172538; --line: #2b394b; --muted: #acbbcd; --ink: #f0f4fa;
  --claude: #8ae0c0; --codex: #b5a0ff; --good: #8ae0c0; --room: #8ec5ff; --warn: #ffd18a; --stop: #ff9a8a;
  --track: #293548;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 85% 0, #182d3c 0, transparent 45%), var(--bg); color: var(--ink); line-height: 1.5; }
main { max-width: 1120px; margin: auto; padding: 24px 16px 32px; }
@media (min-width: 720px) { main { padding: 32px 32px 32px; } }
h1 { font-size: 28px; letter-spacing: -.03em; margin: 0 0 8px; }
h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 18px 0 8px; color: var(--ink); }
p { color: var(--muted); margin: 6px 0; font-size: 14px; }
.eyebrow { font-size: 11px; letter-spacing: .14em; font-weight: 650; color: var(--muted); margin: 0 0 6px; }
.muted { color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
button, select, input { font: inherit; }
button { background: var(--claude); color: #08211a; border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 650; cursor: pointer; }
button:disabled { opacity: .6; }
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
select { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; max-width: 220px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand strong { font-size: 19px; display: block; }
.brand .eyebrow { margin: 0; letter-spacing: .05em; }
.logo { font-size: 34px; color: var(--claude); }
.top-actions { display: flex; gap: 8px; align-items: center; }

.panel, .card { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 20px; margin-top: 16px; }
@media (min-width: 720px) { .panel, .card { padding: 26px; } }
.login { max-width: 420px; margin: 48px auto; display: grid; gap: 6px; }
.login label { font-size: 13px; color: var(--muted); margin-top: 8px; }
.login input { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
.login button { margin-top: 14px; }
.error { color: var(--stop); min-height: 1.5em; }
.loading { max-width: 420px; margin: 48px auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--claude); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
button.link { background: none; border: 0; color: var(--room); padding: 4px 0; font-weight: 500; text-align: left; text-decoration: underline; }

.banner { margin-top: 16px; border: 1px dashed var(--warn); color: var(--warn); border-radius: 14px; padding: 10px 14px; font-size: 13px; }
.tabs { display: flex; gap: 6px; margin-top: 18px; }
.tabs button { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); border-color: var(--muted); }
.status-line { font-size: 12px; margin: 10px 0 0; overflow-wrap: anywhere; }

.cards { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 820px) { .cards { grid-template-columns: 1fr 1fr; } }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 22px; }
.plan { margin: 0; font-size: 13px; }
.claude .card-head h2 { color: var(--claude); }
.codex .card-head h2 { color: var(--codex); }
.pill { border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid currentColor; }
.tone-good { color: var(--good); } .tone-room { color: var(--room); } .tone-warn { color: var(--warn); }
.tone-stop { color: var(--stop); } .tone-muted { color: var(--muted); }
.big-value { font-size: 48px; letter-spacing: -.05em; line-height: 1.1; margin: 4px 0 12px; }
.big-value span { font-size: 18px; letter-spacing: 0; color: var(--muted); }

.bar { position: relative; height: 12px; background: var(--track); margin: 4px 0 10px; }
.bar.thin { height: 6px; }
.bar .fill { height: 100%; background: var(--claude); }
.codex .bar .fill { background: var(--codex); }
.bar .marker { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; background: var(--ink); box-shadow: 0 0 0 2px var(--panel); }
.metric-line { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.metric-line strong { color: var(--ink); }
.metric-line.extra { margin-top: 6px; }
.pace { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.pace p:first-child { color: currentColor; font-weight: 600; }
.short { margin-top: 16px; }
.observed { font-size: 11px; margin-top: 12px; }

.history { margin-top: 10px; }
.history-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.grid { stroke: var(--line); stroke-width: 1; }
.axis { fill: var(--muted); font-size: 11px; }
.bar-value { fill: var(--ink); font-size: 11px; }
.bar-done { fill: var(--claude); opacity: .55; } .bar-full { fill: var(--claude); } .bar-open { fill: none; stroke: var(--claude); stroke-width: 2; stroke-dasharray: 4 3; }
.codex .bar-done, .codex .bar-full { fill: var(--codex); } .codex .bar-open { stroke: var(--codex); }
.plan-line { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 3 3; }
.plan-label { fill: var(--warn); font-size: 11px; font-weight: 600; }
.legend { font-size: 11px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.key { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; }
.key.full { background: var(--claude); } .key.done { background: var(--claude); opacity: .55; } .key.open { border: 2px dashed var(--claude); }
.codex .key.full, .codex .key.done { background: var(--codex); } .codex .key.open { border-color: var(--codex); }
.plans ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.plans strong { color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 8px; }
.dot.claude { background: var(--claude); } .dot.codex { background: var(--codex); }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 14px 0 6px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi span { display: block; font-size: 12px; color: var(--muted); }
.kpi strong { font-size: 24px; letter-spacing: -.02em; }
.day-bar { fill: var(--claude); opacity: .8; }

.mix { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--track); }
.seg.s0, .key.s0 { background: #7fd3c4; } .seg.s1, .key.s1 { background: #5fa8e8; }
.seg.s2, .key.s2 { background: #f0c27b; } .seg.s3, .key.s3 { background: #9aa7b8; }
.mix-key { white-space: nowrap; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td:first-child { white-space: normal; min-width: 120px; }
.you { color: var(--claude); font-size: 11px; }
.late { color: var(--warn); }
.two-col { display: grid; grid-template-columns: 1fr; gap: 8px 24px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 3fr 2fr; } }

footer { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; font-size: 12px; color: var(--muted); }
