/* Stride Plan — mobile-first styles. Colours are tokens so light/dark and the
   accent colour can be switched at runtime. */

:root {
  --accent: #ff5a1f;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #15181d;
  --muted: #646d78;
  --border: #e2e5ea;
  --ok: #1f9d55;
  --warn: #b7791f;
  --warn-bg: #fff6e5;
  --danger: #d33a3a;
  --ph-base: #5aa7e6;
  --ph-build: #f0a33a;
  --ph-peak: #e5533d;
  --ph-taper: #8f6fd6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --tabs-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216; --surface: #181c22; --surface-2: #222831; --text: #eceff3; --muted: #9aa4b0;
    --border: #2b323c; --warn-bg: #3a2e14; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #181c22; --surface-2: #222831; --text: #eceff3; --muted: #9aa4b0;
  --border: #2b323c; --warn-bg: #3a2e14; --shadow: none; 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;
  -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 1.5rem; margin: .25rem 0 .75rem; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
p { margin: .4rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }

/* ---------- Layout ---------- */
.app { min-height: 100vh; padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 16px); }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 1.1rem; }
.brand span, .auth-brand span { color: var(--accent); }
.main { max-width: 640px; margin: 0 auto; padding: 0 16px; }
section > * + * { margin-top: 12px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; align-items: center;
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--border);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); font-size: .72rem; min-height: 48px; justify-content: center; }
.tab.on { color: var(--accent); }
.tab-icon { font-size: 1.25rem; line-height: 1; }
.tab.primary .tab-icon {
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center;
  font-size: 1.8rem; margin-top: -22px; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* ---------- Cards & lists ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.link { display: block; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; }
.list.menu a { display: flex; flex-direction: column; padding: 4px 0; }
.list.menu > li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.list-btn { width: 100%; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; gap: 8px; }
.gap { gap: 10px; } .gap-sm { gap: 6px; } .wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 360px) { .grid2 { grid-template-columns: 1fr; } }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty h3 { color: var(--text); }
.back { color: var(--muted); font-size: .9rem; display: inline-block; padding: 4px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-align: center;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 54px; font-size: 1.1rem; }
.btn:disabled { opacity: .5; cursor: default; }
.danger-btn { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger { color: var(--danger); }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; padding: 8px 0; cursor: pointer; }
.link-btn.danger { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.pill { font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 0; font-family: inherit; }
.pill.warn { background: var(--warn-bg); color: var(--warn); cursor: pointer; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.field-label { font-size: .85rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; width: 100%;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=range] { padding: 0; border: 0; accent-color: var(--accent); background: transparent; }
input[type=range].unset { opacity: .45; }
input[type=color] { width: 44px; padding: 2px; }
input.num { width: 70px; display: inline-block; }
.hint { font-size: .8rem; color: var(--muted); }
.error { color: var(--danger); font-weight: 600; }
.ok { color: var(--ok); }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: .9rem; }
.check input { width: auto; min-height: 0; margin-top: 3px; }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; padding: 0 8px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-sm button { min-height: 32px; font-size: .8rem; }
.scale, .days { display: flex; gap: 6px; }
.scale button, .days button {
  flex: 1; min-height: 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.scale button.on, .days button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.days button:disabled { opacity: .35; }
.toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 44px; height: 26px; border-radius: 13px; background: var(--border); position: relative; flex: none; transition: background .15s; }
.toggle .thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track .thumb { transform: translateX(18px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips, .presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.chip-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.swatches { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--text); }
details > summary { cursor: pointer; padding: 4px 0; }
.form h2 { margin-bottom: 4px; }

/* ---------- Today ---------- */
.date-head h1 { margin-bottom: 0; }
.today-card {
  background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--c, var(--accent));
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
}
.today-card.done { opacity: .92; }
.today-card.skipped { opacity: .6; }
.today-card.rest { border-left-color: var(--border); }
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tc-title { font-size: 1.45rem; margin: 0; line-height: 1.2; }
.tc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tc-stats div { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.tc-stats b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tc-stats span { font-size: .75rem; color: var(--muted); }
.status { font-size: .8rem; font-weight: 700; color: var(--ok); }
.chip { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; }
.chip.grey { --c: var(--muted); }
.blocks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.blocks.inner { padding-left: 8px; border-left: 2px solid var(--border); margin-top: 4px; }
.blk { display: grid; grid-template-columns: 82px 70px 1fr; gap: 6px; font-size: .9rem; align-items: baseline; }
.blk-repeat { display: block; }
.blk-kind { color: var(--muted); font-size: .8rem; font-weight: 600; }
.blk-target { font-weight: 700; font-variant-numeric: tabular-nums; }
.blk-note { grid-column: 2 / -1; font-size: .78rem; color: var(--muted); }
.pva { display: grid; gap: 2px; font-size: .9rem; }
.pva-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 4px 0; border-top: 1px solid var(--border); }
.pva-row.head { border: 0; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.pva-row span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.activity { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--border); }
.activity:first-of-type { border-top: 0; }
.notice { display: block; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
.notice.warn { background: var(--warn-bg); }
.notice.warn .btn { margin-top: 8px; }
.notice.link { color: var(--accent); font-weight: 600; }
.progress { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.pace-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.pace-mini div { display: flex; justify-content: space-between; font-size: .9rem; }
.pace-mini span { color: var(--muted); }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ws-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); min-height: 64px; }
.ws-day.cur { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ws-day.done .ws-name { color: var(--ok); }
.ws-name { font-size: .75rem; font-weight: 700; color: var(--muted); }
.ws-dots { display: flex; gap: 3px; min-height: 8px; flex-wrap: wrap; justify-content: center; }
.ws-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.ws-dots i.x { opacity: .3; }
.ws-dots i.act { background: var(--muted); border-radius: 2px; }
.ws-km { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Log ---------- */
.pace-live { margin: 0; color: var(--muted); }
.pace-live b { color: var(--text); font-size: 1.2rem; }
.checkin { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }
.split-row { display: grid; grid-template-columns: 28px 1fr 1fr 70px 40px; gap: 6px; align-items: center; margin-top: 6px; }
.split-row input { min-height: 38px; padding: 6px 8px; }

/* ---------- Calendar ---------- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.cal-nav .icon-btn { font-size: 1.6rem; color: var(--text); }
.cal-week { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cal-day { display: grid; grid-template-columns: 48px 1fr; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.cal-day.today { border-color: var(--accent); }
.cal-day.past { opacity: .85; }
.cal-date { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: .75rem; }
.cal-date b { font-size: 1.2rem; color: var(--text); }
.cal-items { display: flex; flex-direction: column; gap: 6px; justify-content: center; min-width: 0; }
.cal-item { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.cal-item .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.cal-item.st-skipped { opacity: .5; text-decoration: line-through; }
.cal-item.st-done .small, .cal-item.st-partial .small { color: var(--ok); font-weight: 700; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mh { text-align: center; font-size: .75rem; color: var(--muted); font-weight: 700; padding: 4px 0; }
.md { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; min-height: 58px; padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.md.out { opacity: .4; }
.md.today { border-color: var(--accent); }
.md-n { font-size: .8rem; font-weight: 700; }
.md-km { font-size: .7rem; color: var(--muted); }
.ws-dots i.ok { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 50%, transparent); }

/* ---------- Plan ---------- */
.chart { margin: 12px 0 0; }
.chart svg { width: 100%; height: 140px; display: block; }
.wb-plan { fill: color-mix(in srgb, var(--accent) 22%, transparent); }
.wb.cut .wb-plan { fill: color-mix(in srgb, var(--muted) 25%, transparent); }
.wb.cur .wb-plan { stroke: var(--accent); stroke-width: .4; }
.wb-act { fill: var(--accent); }
.wb { cursor: pointer; }
.legend { font-size: .75rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.legend span[class^="lg"] { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.lg-plan { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.lg-act { background: var(--accent); margin-left: 8px; }
.phase-strip { display: flex; gap: 2px; margin-top: 12px; }
.phase-strip .ph { flex: 1; height: 10px; border-radius: 2px; }
.phase-strip .ph.cut { opacity: .5; }
.phase-strip .ph.cur { outline: 2px solid var(--text); outline-offset: 1px; }
.ph-base { background: var(--ph-base); } .ph-build { background: var(--ph-build); } .ph-peak { background: var(--ph-peak); } .ph-taper { background: var(--ph-taper); }
.phase-legend { display: flex; gap: 12px; font-size: .75rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.phase-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.tag { font-size: .7rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.tag.ph-base, .tag.ph-build, .tag.ph-peak, .tag.ph-taper { color: #fff; }
.weeks li.cur { background: color-mix(in srgb, var(--accent) 8%, transparent); margin: 0 -16px; padding: 10px 16px; }
.issue { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* ---------- Builder ---------- */
.stepper { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; }
.stepper li { flex: 1; }
.stepper button { width: 100%; border: 0; background: transparent; font: inherit; font-size: .75rem; font-weight: 700; color: var(--muted);
  padding: 8px 0 6px; border-bottom: 3px solid var(--border); cursor: pointer; }
.stepper li.on button { color: var(--accent); border-color: var(--accent); }
.stepper li.done button { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table td, .table th { padding: 7px 0; border-top: 1px solid var(--border); text-align: left; }
.table th { color: var(--muted); font-size: .75rem; text-transform: uppercase; border-top: 0; }
.table td.num, .table th:not(:first-child) { text-align: right; }
.verdict { border-left: 6px solid var(--ok); }
.verdict.stretch { border-left-color: var(--warn); }
.verdict.ambitious { border-left-color: var(--danger); }
.pv-week { margin-top: 12px; }
.paces-preview { margin-top: 12px; }

/* ---------- Block editor ---------- */
.block-editor { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.be-row { display: grid; grid-template-columns: 1fr 1.2fr 1.4fr 36px; gap: 4px; align-items: center; }
.be-row select, .be-row input { min-height: 38px; padding: 6px; font-size: .85rem; }
.target-in { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.be-repeat { border: 1px dashed var(--border); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 420px) { .be-row { grid-template-columns: 1fr 1fr 36px; } .be-row > select:nth-of-type(2) { grid-column: 1 / 3; } }

/* ---------- Sheet & toast ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: 100%; max-width: 640px; max-height: 92vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 4px; }
.sheet-head h2 { margin: 0; }
.sheet-body { overflow-y: auto; padding: 4px 16px 20px; }
.sheet-body .row.gap { margin-top: 12px; }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 16px); z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .9rem; max-width: calc(100% - 32px); }
.diff { list-style: none; padding: 0; margin: 8px 0; }
.diff li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); font-size: .92rem; }
.diff s { color: var(--muted); }
.lead { font-weight: 600; }
.actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Auth ---------- */
.auth { max-width: 420px; margin: 0 auto; padding: calc(40px + env(safe-area-inset-top)) 16px 40px; }
.auth-brand { font-size: 2rem; font-weight: 800; text-align: center; letter-spacing: -.03em; }
.auth form { margin-top: 16px; }
.code { font: 700 1.15rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 12px; border-radius: 10px; text-align: center; letter-spacing: .04em; word-break: break-all; }
.hero h1 { margin-top: 0; }

/* ---------- Stage 3: suggestions, stats, shoes, library ---------- */
.more-btn { color: var(--text); font-size: 1.4rem; }
.more-btn.on { color: var(--accent); }
.choice-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; margin-bottom: 8px; }
.choice:disabled { opacity: .5; cursor: default; }
.notice .row { margin-top: 8px; }
.today-card.extra { gap: 6px; }
.today-card.extra .tc-title { font-size: 1.1rem; }
.warn-text { color: var(--warn); }
.progress.near span { background: var(--warn); }
.progress.over span { background: var(--danger); }
.card.shoe { display: flex; flex-direction: column; gap: 8px; text-align: left; margin-bottom: 8px; }
.card.shoe.retired { opacity: .6; }
.code.small { font-size: .8rem; letter-spacing: 0; }
code { font-size: .85em; background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; }
.tile b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.tile span { font-size: .75rem; color: var(--muted); }

.chart2 { margin: 8px 0 0; }
.chart2 svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart2 .grid { stroke: var(--border); stroke-width: 1; }
.chart2 .axis { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart2 .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart2 .pt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart2 .pt.on { r: 6; }
.chart2 .hit { fill: transparent; cursor: pointer; }
.chart2 .col { fill: var(--accent); }
.chart2 .tip { font-size: .85rem; min-height: 1.3em; margin-top: 4px; }

.sharebar .sb-track { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; margin: 8px 0; }
.sb.z1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.sb.z2 { background: color-mix(in srgb, var(--accent) 62%, var(--surface)); }
.sb.z3 { background: var(--accent); }
.sharebar .sb-track .sb { min-width: 4px; }
.sb-legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.sb-legend b { margin-left: 6px; font-variant-numeric: tabular-nums; }
.sb-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.heat { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 8px; }
.heat-col { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heat-cell { aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.heat-cell.on { background: var(--accent); }

@media (min-width: 700px) {
  .main { padding-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
