:root {
  --bg: #101216;
  --card: #191c22;
  --card-2: #20242c;
  --line: #2b3039;
  --text: #eef0f3;
  --muted: #9aa3af;
  --accent: #ff7a1a;
  --accent-ink: #1a0d02;
  --ok: #3ecf8e;
  --warn: #f5b942;
  --bad: #ff5d5d;
  --radius: 14px;
  --tap: 48px;
  --series-1: #3987e5;
  --series-2: #d95926;
  --tabbar: 58px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f4f6; --card: #ffffff; --card-2: #f0f1f4; --line: #dfe2e7;
    --text: #14171c; --muted: #5f6875; --accent: #e8650c; --accent-ink: #ffffff;
    --ok: #13905a; --warn: #a86b00; --bad: #c62828; --series-1: #2a78d6; --series-2: #eb6834; color-scheme: light;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 56px 1fr auto;
  align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .ttl { text-align: center; min-width: 0; }
.top h1 { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top p { margin: 2px 0 0; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .rgt { justify-self: end; min-width: 56px; text-align: right; }
.icon { width: var(--tap); height: var(--tap); border: 0; background: transparent; font-size: 1.5rem; border-radius: 12px; }
.icon:active { background: var(--card-2); }
.elapsed { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .95rem; }

.wrap { max-width: 640px; margin: 0 auto; padding: 12px 16px; display: grid; gap: 12px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; min-width: 0; }
details.card > summary, details > summary { cursor: pointer; font-weight: 600; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: " ▾"; color: var(--muted); font-weight: 400; }
details[open] > summary::after { content: " ▴"; }
details.cues > summary, .info > summary { font-weight: 500; color: var(--muted); font-size: .9rem; }
ul.plain, ol.plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.info ul { font-size: .9rem; color: var(--muted); }

.banner { border-radius: 12px; padding: 10px 12px; background: var(--card-2); border: 1px solid var(--line); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.banner.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.banner.ok { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.flash { border-radius: 12px; padding: 10px 12px; background: var(--card-2); border-left: 4px solid var(--accent); }
.flash.warn { border-left-color: var(--warn); }

/* ---------- buttons ---------- */
.btn { min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); font-weight: 600; }
.btn:active { transform: scale(.98); }
.btn.sm { min-height: 36px; padding: 6px 10px; font-size: .9rem; }
.btn.big { min-height: 54px; font-size: 1.05rem; width: 100%; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .45; }

.session { display: grid; gap: 2px; text-align: left; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); }
.session.hero { border-color: var(--accent); }
.session.done { opacity: .7; }
.s-title { font-weight: 700; font-size: 1.05rem; }
.s-sub { font-size: .9rem; }
.s-when { font-size: .8rem; color: var(--muted); }

.tms { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tms li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.badge { font-style: normal; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }

/* ---------- session ---------- */
.setsel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.setsel .muted { flex-basis: 100%; margin: 0; font-size: .85rem; }
.seg { min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; }
.seg.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.lift-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.lift-head .tm { font-size: .82rem; color: var(--muted); }
.hist { margin: 0; font-size: .85rem; color: var(--muted); }
.hist.note { color: var(--warn); }

.rows { display: grid; gap: 6px; }
.row {
  display: grid; grid-template-columns: 30px auto 1fr auto; grid-template-areas: "k load reps chk" "k plates plates chk";
  align-items: center; column-gap: 8px; row-gap: 0;
  min-height: var(--tap); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2);
  text-align: left; width: 100%; font-variant-numeric: tabular-nums;
}
.row .k { grid-area: k; } .row .load { grid-area: load; } .row .reps { grid-area: reps; }
.row .plates { grid-area: plates; } .row .chk, .row > button { grid-area: chk; }
.row .plates:empty { display: none; }
.row .k { color: var(--muted); font-size: .8rem; font-weight: 700; }
.row .load { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.row .load s { color: var(--muted); font-weight: 400; font-size: .85rem; }
.row .reps { color: var(--muted); }
.row .plates { font-size: .8rem; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chk { font-weight: 700; color: var(--ok); white-space: nowrap; }
.row.wu { background: transparent; }
.row.wu .load { font-size: .95rem; font-weight: 600; }
.row.done { opacity: .75; }
.row.skipped { opacity: .45; text-decoration: line-through; }
.row.current { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card-2)); }
.row.current .load { font-size: 1.3rem; }
.adj { margin: 0; padding: 8px 10px; border-radius: 10px; font-size: .9rem; background: color-mix(in srgb, var(--warn) 14%, transparent); }
.adj.stop { background: color-mix(in srgb, var(--bad) 16%, transparent); }

.ladder { display: grid; gap: 8px; padding: 10px; border-radius: 12px; border: 1px dashed var(--warn); }
.cal { margin: 0; font-size: .9rem; }
.ladrow { display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px; align-items: center; }
.num { width: 100%; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 6px 10px; font: inherit; font-weight: 700; text-align: center; }
.inl { display: flex; align-items: center; gap: 8px; }
.inl .num { width: 96px; }

textarea, .fld input { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 10px; font: inherit; }
textarea.note { resize: vertical; min-height: 44px; font-size: .9rem; }
.fld { display: grid; gap: 6px; font-weight: 600; border: 0; padding: 0; margin: 0; }
.fld legend { margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; margin: 4px 10px 4px 0; min-height: 36px; }
.chip input { width: 20px; height: 20px; }
.chip.wide { display: flex; }

.check { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; min-height: 44px; }
.check.done span { color: var(--muted); text-decoration: line-through; }
.tick { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); background: transparent; font-weight: 800; color: var(--ok); }
.check.done .tick { border-color: var(--ok); }

.dots { display: flex; flex-wrap: wrap; gap: 10px; }
.dot { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--line); background: var(--card-2); font-weight: 700; }
.dot.on { background: var(--ok); border-color: var(--ok); color: #06140d; }

.finishbar { padding-top: 4px; }

/* ---------- timer bar ---------- */
.timerbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: none;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 10px;
  background: var(--card); border-top: 2px solid var(--accent); box-shadow: 0 -8px 24px rgba(0,0,0,.35);
  grid-template-columns: 1fr auto; align-items: center;
}
.timerbar.show { display: grid; }
.t-main { display: grid; min-width: 0; }
.t-label { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-clock { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.t-next { font-size: .85rem; }
.t-prog { position: relative; height: 4px; border-radius: 2px; background: var(--line); margin: 4px 0; overflow: visible; }
.t-prog i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 2px; width: 0; }
.t-prog b { position: absolute; top: -3px; width: 2px; height: 10px; background: var(--ok); }
.timerbar.hold.target .t-prog i { background: var(--ok); }
body.holding .t-prog { width: min(420px, 90vw); height: 8px; }
.t-btns { display: flex; gap: 6px; }
.timerbar.hold.target { border-top-color: var(--ok); }
.timerbar.hold.target .t-clock { color: var(--ok); }
.timerbar.hold.max .t-clock { color: var(--warn); }
body.holding .timerbar { top: 0; grid-template-columns: 1fr; align-content: center; justify-items: center; text-align: center; border-top: 0; }
body.holding .t-clock { font-size: 6rem; }
body.holding .t-label { font-size: 1.2rem; color: var(--text); white-space: normal; }
body.holding .t-next { white-space: normal; }
body.holding .t-btns { width: min(420px, 100%); }
body.holding .t-btns .btn { flex: 1; min-height: 64px; }

/* ---------- RPE sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; display: none; background: rgba(0,0,0,.55); align-items: flex-end; }
.overlay.show { display: flex; }
.sheet { width: 100%; max-width: 640px; margin: 0 auto; background: var(--card); border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 12px; max-height: 92vh; overflow-y: auto; }
.steppers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 4px 8px; text-align: center; }
.stepper .lbl { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); }
.stepper b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.stepper .btn { min-width: 48px; min-height: 48px; }
.rpes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rpe { min-height: 54px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); font-weight: 800; font-size: 1.1rem; }
.rpe.hot { color: var(--warn); }
.rpe.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sheet-foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; }

/* ======================= dashboard ======================= */
body.tabs { padding-bottom: calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar:empty { display: none; }
.tab { display: grid; justify-items: center; gap: 2px; min-height: var(--tabbar); padding: 6px 2px; border: 0; background: transparent;
  color: var(--muted); font-size: .72rem; font-weight: 600; }
.tab span { font-size: 1.25rem; line-height: 1.2; filter: grayscale(1); opacity: .7; }
.tab.on { color: var(--accent); }
.tab.on span { filter: none; opacity: 1; }
body.tabs .timerbar { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: 10px; }
body.holding .timerbar { bottom: 0; }
.syncdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); margin-right: 2px; vertical-align: middle; }
.center { text-align: center; }
.empty { margin: 0; }
.line { margin: 0; }
.sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 6px 0 0; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.link { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: .85rem; padding: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toolrow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
select, .fld select, .addrow input { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 8px 10px; font: inherit; }
.addrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.fld { font-size: .9rem; }
.sheet h3 { font-size: 1.1rem; } .sheet h4 { margin: 4px 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sheet p { margin: 0; }
.choices { display: grid; gap: 8px; }
.choices .btn.big { text-align: left; padding: 10px 14px; display: grid; }

/* fuel level: ordinal, so one hue stepped light → strong */
.lvl { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; color: var(--text); }
.lvl.f1 { background: color-mix(in srgb, var(--accent) 14%, var(--card-2)); }
.lvl.f2 { background: color-mix(in srgb, var(--accent) 34%, var(--card-2)); }
.lvl.f3 { background: color-mix(in srgb, var(--accent) 62%, var(--card-2)); }
.lvl.f4 { background: var(--accent); color: var(--accent-ink); }

.daystrip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 16px 8px; margin: 0 -16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.daystrip::-webkit-scrollbar { display: none; }
.daychip { flex: 0 0 auto; display: grid; justify-items: center; gap: 2px; min-width: 56px; padding: 6px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); scroll-snap-align: center; }
.daychip .dow { font-size: .7rem; color: var(--muted); font-weight: 600; }
.daychip .dom { font-size: 1.05rem; font-weight: 800; line-height: 1; }
.daychip .marks { font-size: .7rem; color: var(--warn); min-height: .8rem; line-height: .8rem; }
.daychip.past { opacity: .7; }
.daychip.today { border-color: var(--muted); }
.daychip.sel { border: 2px solid var(--accent); opacity: 1; background: color-mix(in srgb, var(--accent) 10%, var(--card)); }

.big-num { margin: 0; font-size: 1.15rem; font-weight: 800; }
.big-num span, .tile small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.meter { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ok) 18%, var(--card-2)); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.dayhead .adj, .verdict .adj { margin: 0; }

.rows.meal .row { grid-template-columns: 62px 1fr auto; grid-template-areas: "k load chk" "k plates chk"; }
.rows.meal .row .k { font-size: .75rem; line-height: 1.15; white-space: normal; }
.rows.meal .row .load { white-space: normal; font-size: .95rem; font-weight: 600; line-height: 1.25; }
.rows.meal .row .load s { display: block; }
.rows.meal .row .plates { white-space: normal; }
.mealrow .chk { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: var(--ok); font-size: 1rem; }
.mealrow.eaten .chk { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.mealrow.skipped .chk { border-color: var(--muted); color: var(--muted); }
.mealrow.skipped .load { text-decoration: line-through; color: var(--muted); }
.mealrow.swapped .chk { border-color: var(--warn); color: var(--warn); }
.mealrow.eaten { opacity: .8; }
.session-row { grid-template-columns: 62px 1fr !important; grid-template-areas: "k load" !important; background: transparent; border-style: dashed; }
.session-row .load { color: var(--muted); }

.segs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.segs .seg { border: 0; background: transparent; border-radius: 9px; padding: 8px 4px; min-height: 40px; }
.segs .seg.on { background: var(--accent); color: var(--accent-ink); }

.batch { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.batch:last-of-type { border-bottom: 0; }
.b-main { display: grid; min-width: 0; }
.batch.low .b-main b::after { content: " low"; font-size: .7rem; font-weight: 700; color: var(--warn); text-transform: uppercase; }
.stepper2 { display: flex; align-items: center; gap: 6px; }
.stepper2 .btn { min-width: 40px; }
.count { min-width: 52px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tile { display: grid; gap: 2px; padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); min-width: 0; }
.card .tile { background: var(--card-2); padding: 10px; }
.tile span { font-size: .75rem; color: var(--muted); font-weight: 600; }
.tile b { font-size: 1.35rem; line-height: 1.15; }
.tiles.three .tile b { font-size: 1rem; }
.tile i { font-style: normal; font-size: .75rem; color: var(--muted); }
.tile.over { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }

.verdict { border-left: 4px solid var(--muted); }
.verdict.on_track, .verdict.recomp, .verdict.maintenance { border-left-color: var(--ok); }
.verdict.too_slow, .verdict.too_fast, .verdict.recover, .verdict.slow { border-left-color: var(--warn); }
.verdict p, .next p { margin: 0; }
.alert { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.notice { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); }
.next h2 { font-size: 1.15rem; }
.tasks .tick.ghost { border: 0; display: grid; place-items: center; }
.loglist li { list-style: none; margin-left: -18px; }
.option { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); }
.option.static { background: transparent; }
.at { display: inline-block; min-width: 38px; color: var(--muted); font-variant-numeric: tabular-nums; }
.writeup { white-space: pre-wrap; font-size: .85rem; max-height: 60vh; overflow-y: auto; padding: 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }

/* ---------- charts ---------- */
.chart { margin: 0; position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1 { stroke: var(--series-1); }
.chart .bar.s2 { fill: var(--series-2); }
.chart .dot { fill: var(--series-1); stroke: var(--card); stroke-width: 2; }
.chart .dot.hollow { fill: var(--card); stroke: var(--muted); }
.chart .cross { stroke: var(--muted); stroke-width: 1; opacity: 0; }
.chart .hit { fill: transparent; }
.chart .xg { outline: none; }
.chart .xg.on .cross { opacity: 1; }
.chart .xg.on .bar { filter: brightness(1.18); }
.chart .xg.on .dot { r: 5.5; }
.chart .endlabel { fill: var(--text); font-size: 11px; font-weight: 700; }
.chart .tip { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; margin-top: 4px; padding: 6px 10px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line); font-size: .85rem; }
.chart .tip[hidden] { display: none; }
.chart .tip span { color: var(--muted); flex-basis: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; }
.key.rect { width: 10px; height: 10px; border-radius: 2px; }
.key.stroke { width: 16px; height: 0; border-top: 2px solid; }
.key.rect.s2 { background: var(--series-2); }
.key.stroke.s1 { border-color: var(--series-1); }
.datatable { margin-top: 6px; }
.datatable summary { font-size: .8rem; color: var(--muted); font-weight: 500; }
.datatable table { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; margin-top: 6px; }
.datatable th, .datatable td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.datatable th { color: var(--muted); font-weight: 600; }

.tasks { display: grid; gap: 4px; }

/* ask the coach · who's eating · cooking for two */
.btnpair { display: flex; gap: 6px; }
.company { margin: 10px 0 6px; }
.company p { margin: 0 0 6px; }
.company + .adj { margin-bottom: 6px; }
.segs.who .seg { font-size: .85rem; padding: 8px 2px; }
.check .segs.who { margin-top: 6px; }
.qa { max-height: 48vh; overflow-y: auto; margin-bottom: 8px; }
.qa-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.qa-item:last-child { border-bottom: 0; }
.qa-item .q { font-weight: 600; margin: 2px 0 4px; }
.qa-item .a { margin: 0 0 4px; line-height: 1.4; }
.aboutchip { font-size: .85rem; background: var(--card-2); padding: 6px 10px; border-radius: 10px; margin: 0 0 8px; }
.packitem { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.packitem:first-of-type { border-top: 0; }
.packitem p { margin: 0 0 6px; }

/* the day's timeline */
.tl { display: grid; gap: 2px; margin-top: 6px; }
.tl-row { display: grid; grid-template-columns: 58px 22px 1fr 18px; gap: 6px; align-items: start; text-align: left;
  padding: 7px 6px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; width: 100%; }
button.tl-row:active { background: var(--card-2); }
.tl-t { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem; display: grid; }
.tl-t s { color: var(--muted); font-weight: 400; font-size: .75rem; }
.tl-i { text-align: center; }
.tl-w { display: grid; gap: 2px; min-width: 0; }
.tl-w b { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.tl-n { font-size: .8rem; padding: 3px 8px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 14%, transparent); }
.tl-s { font-weight: 700; color: var(--ok); text-align: right; }
.tl-row.train { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.tl-row.work, .tl-row.sleep { opacity: .75; }
.tl-row.past, .tl-row.done { opacity: .55; }
.tl-row.next { outline: 2px solid var(--accent); }
.tl-row.skipped b { text-decoration: line-through; color: var(--muted); }
.tl-row.squeezed .tl-s { color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chipbtn { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit; font-size: .85rem; }
.chipbtn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.workrow { padding: 6px 0; border-top: 1px solid var(--line); }
.workrow:first-of-type { border-top: 0; }
.workrow p { margin: 0 0 6px; }
.option.on { border-color: var(--accent); outline: 2px solid var(--accent); }
.row-btn { width: 100%; text-align: left; border: 0; background: transparent; color: inherit; font: inherit; }
.countgrid { display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; margin-bottom: 8px; }
.wk-row { margin: 2px 0; }
.wk .badge { font-style: normal; }
