/* base.css — @font-face, reset, layout, the ember ring, panels, dialogs,
   components, states. Design tokens (colors/type/spacing/radius) live in
   tokens.css (and are duplicated inline in index.html's <head> for
   zero-request first paint — keep both in sync), loaded first. */

/* ---------- self-hosted fonts (offline-first — cached by sw.js) ----------
   Space Grotesk (timer numerals + all stat figures) and General Sans
   (UI/body) are both free for commercial use (Space Grotesk: SIL OFL;
   General Sans: Fontshare free license), downloaded once — no runtime CDN
   request, required for an offline-first PWA and for perf. font-display:
   swap avoids a blank-text flash; the metrics-tuned FALLBACK faces below
   (size-adjust/ascent/descent extracted from the shipped files' own box
   metrics) make the swap itself nearly invisible, so CLS stays near zero. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
  src: url("../assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
}
/* Metrics from the real file (unitsPerEm 1000, ascent 984, descent -292)
   matched against Arial using the standard capsize/fontaine formula. */
@font-face {
  font-family: "Space Grotesk Fallback";
  src: local("Arial"), local("Helvetica"), local("Segoe UI"), local("Roboto");
  size-adjust: 126.64%;
  ascent-override: 77.7%;
  descent-override: 23.06%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "General Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/general-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "General Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/general-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "General Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/general-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "General Sans Fallback";
  src: local("Arial"), local("Helvetica"), local("Segoe UI");
  size-adjust: 102%;
  ascent-override: 95%;
  descent-override: 27%;
  line-gap-override: 0%;
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--sp-7);
  position: relative;
}
h1, h2, h3 { margin: 0; line-height: var(--lh-tight); font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-4); }
.ic { width: 18px; height: 18px; flex: 0 0 auto; }
.ic-lg { width: 26px; height: 26px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 0 0 var(--radius-xs) 0; font-weight: 600; }
.skip-link:focus { left: 0; }

/* Custom focus ring — visibly distinct from the decorative timer ring:
   a crisp 2px accent outline with offset, applied to every interactive
   element via :focus-visible so mouse users don't see it, but keyboard
   users always do (WCAG 2.4.7). Never `outline: none` without this. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.ring-wrap :focus-visible { outline-offset: 4px; }

/* ---------- faint warm paper grain — decorative, disabled under reduced-
   motion/contrast/forced-colors (SPEC §6 craft details). A static SVG
   turbulence filter data-URI — no animation, no network request. ---- */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply; }
@media (prefers-reduced-motion: reduce), (prefers-contrast: more), (forced-colors: active) {
  .grain { display: none; }
}

/* ---------- header / footer ---------- */
.site-header { padding: calc(env(safe-area-inset-top) + var(--sp-4)) 0 var(--sp-2); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.wordmark { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h1); color: var(--ink); text-decoration: none; }
.wordmark .ic { color: var(--accent); width: 24px; height: 24px; }
.header-nav { display: flex; gap: var(--sp-2); align-items: center; }
.site-footer { padding: var(--sp-6) 0 var(--sp-4); color: var(--ink-soft); font-size: var(--fs-sm); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; justify-content: center; text-align: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 44px;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 600; font-size: 0.95rem; transition: transform var(--dur-fast) var(--ease-settle), background var(--dur-fast); }
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: var(--surface-2); border-color: var(--surface-2); }
.btn-ghost { background: transparent; }
.btn-lg { min-height: 56px; padding: 13px 26px; font-size: 1.05rem; font-weight: 700; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.875rem; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft); flex: 0 0 auto; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.link-btn { background: none; border: none; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; min-height: 44px; }

/* ---------- overflow menus (timer overflow, theme switch, task row) ------ */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 24%, black 30%);
  padding: var(--sp-2); display: flex; flex-direction: column; gap: 2px; }
.menu-item { display: flex; align-items: center; gap: var(--sp-2); width: 100%; text-align: left; font-weight: 600;
  font-size: 0.9rem; padding: 10px 12px; border-radius: var(--radius-xs); border: none; background: transparent; color: var(--ink); min-height: 44px; }
.menu-item:hover { background: var(--surface-2); }
.menu-item .ic { color: var(--accent); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .ic { color: var(--danger); }
.theme-swatch-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-1); padding: var(--sp-1); }
.theme-swatch { display: flex; align-items: center; gap: var(--sp-2); padding: 8px 10px; border-radius: var(--radius-xs); border: 1.5px solid transparent; background: transparent; font-weight: 600; font-size: 0.85rem; color: var(--ink); min-height: 44px; }
.theme-swatch:hover { background: var(--surface-2); }
.theme-swatch[aria-checked="true"] { border-color: var(--accent); background: var(--surface-2); }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto; border: 1px solid rgba(0,0,0,.12); }
.swatch-dot[data-swatch="ember"] { background: #A54B27; }
.swatch-dot[data-swatch="matcha"] { background: #5C6B1E; }
.swatch-dot[data-swatch="midnight"] { background: #D9A441; }
.swatch-dot[data-swatch="blush"] { background: #BC2431; }
.swatch-dot[data-swatch="tide"] { background: #4A5FB0; }
.swatch-dot[data-swatch="espresso"] { background: #B58F69; }

/* ---------- main layout ---------- */
main { padding: var(--sp-4) 0 var(--sp-8); }
.layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); align-items: start; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr); }
}

/* ---------- section labels (small-caps + hairline rule, editorial voice) - */
.section-label { font-family: var(--font-ui); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-3); }

/* ---------- ring hero (the working hero, SPEC §6) ---------- */
.ring-hero { text-align: center; padding: var(--sp-4) 0; }
.round-counter { color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.02em; margin-bottom: var(--sp-4); min-height: 1.3em; }
.ring-wrap { position: relative; width: min(300px, 72vw); aspect-ratio: 1; margin: 0 auto; }
.ring-wrap::before {
  content: ""; position: absolute; inset: -20%; border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent) 0%, transparent 68%);
  opacity: 0; filter: blur(6px);
  animation: breathe var(--dur-breathe) var(--ease-settle) infinite;
}
.ring-wrap[data-active="true"][data-mode="focus"]::before { opacity: var(--glow-alpha); }
.ring-wrap[data-active="true"][data-mode="short"]::before,
.ring-wrap[data-active="true"][data-mode="long"]::before { opacity: calc(var(--glow-alpha) * 0.45); animation-duration: calc(var(--dur-breathe) * 1.4); }
@keyframes breathe {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.05); }
}
.ring-wrap.is-settling { animation: settle 700ms var(--ease-settle); }
@keyframes settle {
  0% { transform: scale(1); }
  35% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-2); stroke-width: 9; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 653.45; stroke-dashoffset: 653.45; transition: stroke-dashoffset var(--dur-med) linear, stroke var(--dur-med); }
.ring-wrap[data-mode="short"] .ring-fill, .ring-wrap[data-mode="long"] .ring-fill { opacity: 0.7; }
.ring-center { position: absolute; inset: 10%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1); text-align: center; padding: var(--sp-2); }
.mode-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.mode-chip .ic { width: 16px; height: 16px; }
.timer-numerals { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-timer); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; line-height: 1; color: var(--ink); }
.intention-line { color: var(--ink-soft); font-size: var(--fs-sm); max-width: 24ch; overflow-wrap: anywhere; }

.welcome-copy { max-width: 56ch; margin: var(--sp-5) auto var(--sp-5); }
.welcome-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-display); margin-bottom: var(--sp-2); }
.welcome-body { color: var(--ink-soft); margin-bottom: var(--sp-4); }
.preset-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; }

.timer-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-5); }
.park-capture { display: flex; gap: var(--sp-2); align-items: center; justify-content: center; margin-top: var(--sp-3); flex-wrap: wrap; }
.park-capture input { flex: 1 1 240px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.park-capture input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- panels (task queue / today / parked) ---------- */
.panels { display: flex; flex-direction: column; gap: var(--sp-5); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-4); box-shadow: 0 10px 28px -18px color-mix(in srgb, var(--accent) 30%, black 40%); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-1); }
.panel-head .section-label { flex: 1; margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.panel > .section-label:first-child { margin-top: 0; }

/* ---- today/stats panel ---- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-3); }
.stat { text-align: center; }
.stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent); }
.stat-label { font-size: var(--fs-xs); color: var(--ink-soft); }
.stat-active-task { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--sp-4); padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border-radius: var(--radius-sm); }
.stat-active-task strong { color: var(--ink); }
.week-bars { display: flex; align-items: flex-end; gap: 6px; height: 84px; margin-bottom: var(--sp-3); padding-top: var(--sp-2); }
.week-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.week-bar { width: 100%; max-width: 22px; background: color-mix(in srgb, var(--ink-soft) 50%, var(--surface)); border-radius: 4px 4px 0 0; min-height: 3px; }
.week-bar-col.is-today .week-bar { background: var(--accent); }
.week-bar-label { font-size: 10px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.task-rollup { display: flex; flex-direction: column; gap: var(--sp-1); }
.rollup-row { display: flex; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-sm); padding: 6px 0; border-top: 1px solid var(--line); }
.rollup-row:first-child { border-top: none; }
.rollup-title { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rollup-count { color: var(--ink-soft); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* ---- task queue ---- */
.task-list, .parked-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.task-row, .parked-row { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.task-row.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
.task-row.is-done .task-title, .parked-row.is-done .parked-text { text-decoration: line-through; color: var(--ink-soft); }
.task-info { flex: 1; min-width: 0; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-meta { font-size: var(--fs-xs); color: var(--ink-soft); display: flex; align-items: center; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.quadrant-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.quadrant-chip .ic { width: 13px; height: 13px; color: var(--accent); }
.parked-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.empty-note { color: var(--ink-soft); font-size: var(--fs-sm); padding: var(--sp-3) 0; text-align: center; }

/* ---------- forms / fields (used inside dialogs) ---------- */
.field-label { display: block; font-weight: 600; font-size: var(--fs-sm); margin: var(--sp-3) 0 6px; }
.field-label:first-child { margin-top: 0; }
.field { width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); }
textarea.field { min-height: 88px; padding: 10px 14px; resize: vertical; }
.field:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-hint { font-size: var(--fs-xs); color: var(--ink-soft); margin-top: 6px; }
.field-error { font-size: var(--fs-xs); color: var(--danger); margin-top: 6px; }
.form-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-5); flex-wrap: wrap; }
.seg-group { display: flex; flex-wrap: wrap; gap: var(--sp-1); background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; }
.seg { flex: 1 1 auto; font-weight: 700; font-size: 0.8rem; min-height: 44px; border: none; border-radius: var(--radius-xs);
  background: transparent; color: var(--ink-soft); padding: 8px 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg .ic { width: 14px; height: 14px; }
.seg[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 4px -1px rgba(0,0,0,.18); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) 0; min-height: 44px; }
.toggle-row .toggle-copy { flex: 1; }
.toggle-row .toggle-copy strong { display: block; font-size: 0.92rem; }
.toggle-row .toggle-copy span { font-size: var(--fs-xs); color: var(--ink-soft); }
.toggle-row input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--accent); flex: 0 0 auto; }
.range-row { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); min-height: 44px; }
.number-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); margin-top: var(--sp-2); }
.number-field label { display: block; font-size: var(--fs-xs); color: var(--ink-soft); margin-bottom: 4px; }
.number-field input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--bg); }
.preset-pick { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.preset-pick-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--bg); min-height: 44px; }
.preset-pick-btn strong { font-size: 0.92rem; }
.preset-pick-btn span { font-size: var(--fs-xs); color: var(--ink-soft); }
.preset-pick-btn[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.data-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.data-actions .btn { flex: 1 1 auto; }
.import-status { font-size: var(--fs-sm); margin-top: var(--sp-2); }
.import-status.is-error { color: var(--danger); }
.import-status.is-ok { color: var(--good); }

/* ---------- source cards (About the method) ---------- */
.source-card { padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.source-card:first-child { border-top: none; padding-top: 0; }
.source-card h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 4px; }
.source-card p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 4px; }
.source-cite { font-size: var(--fs-xs); color: var(--ink-soft); font-style: italic; }
.honesty-box, .giveback-box { background: var(--surface-2); border-radius: var(--radius-sm); padding: var(--sp-3); margin-bottom: var(--sp-4); font-size: 0.92rem; }
.honesty-box .ic, .giveback-box .ic { color: var(--accent); width: 20px; height: 20px; margin-bottom: 6px; }

/* ---------- overlay sheets (dialogs) — Nielsen consistency: one pattern
   for every overlay in the app. Native focus-trap + Esc handled in app.js. */
.overlay { position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, black 45%, var(--bg) 20%);
  display: flex; align-items: center; justify-content: center; padding: var(--sp-3); overflow-y: auto; }
.sheet { position: relative; background: var(--bg); width: 100%; max-width: var(--maxw-narrow); border-radius: 18px;
  max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: var(--sp-5) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom));
  animation: rise 260ms var(--ease-settle); box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--accent) 30%, black 45%); }
.sheet-wide { max-width: 760px; }
@keyframes rise { from { transform: translateY(20px); opacity: 0.3; } to { transform: none; opacity: 1; } }
.sheet h2 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; margin: 0 0 6px; padding-right: 40px; }
.sheet .sub { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: var(--sp-2); }
.sheet-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); border: 1px solid var(--line); margin-bottom: var(--sp-2); }
.sheet-close { position: absolute; top: var(--sp-3); right: var(--sp-3); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); display: grid; place-items: center; }
.sheet-close:active { transform: scale(0.92); }
.settings-section { margin-top: var(--sp-5); }
.settings-section:first-of-type { margin-top: 0; }
.settings-section h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); margin-bottom: var(--sp-2); font-weight: 700; }

/* ---------- install banner / toast ---------- */
.banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--surface); border-top: 1px solid var(--line);
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; }
.banner button { min-height: 44px; }
.banner .close { width: 40px; height: 40px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 95; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: var(--sp-3); font-size: 0.9rem; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); max-width: 92vw; }
.toast-btn { background: none; border: none; color: var(--accent); font-weight: 700; text-decoration: underline; min-height: 32px; }
[data-theme="midnight"] .toast, [data-theme="espresso"] .toast { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }

/* ---------- reduced motion / high contrast / forced colors ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .ring-wrap::before { display: none; }
}
@media (prefers-contrast: more) {
  .ring-wrap::before { display: none; }
  .btn, .field, .task-row, .parked-row, .panel { border-width: 2px; }
}
@media (forced-colors: active) {
  .ring-wrap::before { display: none; }
  .ring-fill { forced-color-adjust: none; stroke: Highlight; }
  .btn-primary { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* ---------- small spacing utilities (avoid one-off inline styles) ---------- */
.u-mt-3 { margin-top: var(--sp-3); }
.u-mt-4 { margin-top: var(--sp-4); }

/* ---------- responsive ---------- */
@media (max-width: 480px) {
  .timer-numerals { font-size: clamp(2.8rem, 2rem + 8vw, 4rem); }
  .stat-row { gap: var(--sp-1); }
}
