:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel-2: #1c232c;
  --line: #2a323d;
  --text: #e6edf3;
  --muted: #8b96a5;
  --accent: #58a6ff;
  --good: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .75rem; }
h2.gap { margin-top: 1.5rem; }
.muted { color: var(--muted); margin: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; word-break: break-all; }

.topbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .75rem 1rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(14,17,22,.92); backdrop-filter: blur(8px); z-index: 5;
}
.brand { font-weight: 700; letter-spacing: .02em; }
.tabs { display: flex; gap: .15rem; margin-left: auto; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: .4rem .7rem; white-space: nowrap; border-radius: 999px; color: var(--muted); }
.tabs a[aria-current="page"] { background: var(--panel-2); color: var(--text); }
.tabs a:hover { color: var(--text); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.hello { margin-bottom: 1rem; }

.flash { padding: .6rem .9rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid var(--line); background: var(--panel); }
.flash.ok { border-color: #1f6f33; }
.flash.error { border-color: #8e2a26; color: #ffb4ae; }

input, select, button {
  font: inherit; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; min-height: 44px;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="date"] { color-scheme: dark; }
button { cursor: pointer; background: var(--accent); color: #0b1220; border-color: transparent; font-weight: 600; }
button:hover { filter: brightness(1.1); }
button.ghost { background: transparent; color: var(--muted); border-color: var(--line); font-weight: 500; }
button.ghost:hover { color: var(--text); }
button.check { background: transparent; color: var(--good); border: 1px solid var(--line); width: 44px; padding: 0; font-size: 1.1rem; }
button.check:hover { background: rgba(63,185,80,.12); }
.grow { flex: 1 1 12rem; min-width: 0; }

.capture, .filters, .inline { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.inline { margin: 1rem 0 0; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; display: flex; flex-direction: column; gap: .1rem;
}
a.tile:hover { border-color: #3a4655; background: var(--panel-2); }
.tile .num { font-size: 2.1rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .label { color: var(--muted); font-size: .85rem; }
.tile.alert { border-color: #8e2a26; } .tile.alert .num { color: var(--bad); }
.tile.warn { border-color: #7a5a12; } .tile.warn .num { color: var(--warn); }
.tile.good .num { color: var(--good); }

.cols { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .cols { grid-template-columns: 3fr 2fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li.done .title, .list li.dropped .title { color: var(--muted); text-decoration: line-through; }
.list form { margin: 0; }
.title { overflow-wrap: anywhere; }
.meta { display: flex; gap: .35rem; margin-top: .2rem; }
.actions { display: flex; gap: .4rem; }
.due { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.due.late { color: var(--bad); }
.empty { color: var(--muted); margin: .5rem 0; }

.chip { font-size: .72rem; padding: .1rem .5rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.bars a { display: flex; justify-content: space-between; margin-bottom: .2rem; }
.bar { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.bar div { height: 100%; background: var(--accent); border-radius: 999px; }

.status { margin: 0; display: flex; align-items: center; gap: .5rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; }
.dot.ok { background: var(--good); box-shadow: 0 0 8px rgba(63,185,80,.6); }
.dot.bad { background: var(--bad); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }

.login { max-width: 360px; margin: 12vh auto 0; }
.login form { display: grid; gap: .6rem; }
.login label { color: var(--muted); font-size: .85rem; }

.btn { display: block; text-align: center; padding: .75rem 1rem; border-radius: 10px; background: var(--accent); color: #0b1220; font-weight: 600; }
.btn:hover { filter: brightness(1.1); }
code { font-family: ui-monospace, Consolas, monospace; }

.flows { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.flow { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; min-height: 64px; justify-content: center; }
.flow:hover { background: var(--panel-2); border-color: #3a4655; }
.flow-title { font-weight: 700; }
.flow-sub { color: var(--muted); font-size: .85rem; }
.flow.done { border-color: #1f6f33; } .flow.done .flow-sub { color: var(--good); }
.focus-card { border-color: #26456d; margin-bottom: 1rem; }
.check-done { width: 44px; text-align: center; color: var(--good); font-size: 1.1rem; }
.stack { display: grid; gap: 1rem; margin-bottom: 5rem; }
.card.late { border-color: #8e2a26; }
.small { font-size: .85rem; }
.pick { display: flex; align-items: center; gap: .75rem; width: 100%; cursor: pointer; min-height: 44px; }
.pick input { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); flex: none; }
.pick .title { display: block; } .pick .meta { display: flex; }
.sticky-actions { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: rgba(14,17,22,.95); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.sticky-actions button { min-width: 11rem; }
.list li.decide { flex-wrap: wrap; }
.seg { display: flex; gap: .25rem; flex-wrap: wrap; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: .5rem .7rem; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--panel-2); }
.seg input:checked + span { background: var(--accent); color: #0b1220; border-color: transparent; font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.chip.focus { color: var(--accent); border-color: #26456d; }
textarea { width: 100%; font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; margin: .5rem 0; }
.card > input[name="note"] { width: 100%; }

/* Claude job cards */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; }
.tiers { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.tier { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--border, #2a2f3a); border-radius: 8px; }
.tier i { font-style: normal; opacity: .8; }
.tier.ready { border-color: #3fb68b; }
.triage .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.triage button[disabled] { opacity: .5; cursor: not-allowed; }
.triage, .prep { margin-bottom: 16px; }
.prep .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.prep button[disabled] { opacity: .5; cursor: not-allowed; }
.steps { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.steps .mark { display: inline-block; width: 1.4em; opacity: .7; }
.steps li.done { color: #3fb68b; }
.steps li.done .mark { opacity: 1; }

/* Session cards */
.live-card { border-color: var(--accent, #4f9cf9); }
.live-card .row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.live-card button { min-height: 44px; min-width: 88px; }
pre.draft { white-space: pre-wrap; word-wrap: break-word; font: inherit; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; margin: .6rem 0; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
