/* ReiBulk — tokens measured with tools/colors.mjs (all sRGB, text ≥ 4.5:1, controls/graphics ≥ 3:1). */
:root {
  color-scheme: light dark;

  --color-bg: oklch(0.975 0.005 70);
  --color-surface: oklch(1 0 0);
  --color-surface-sunken: oklch(0.95 0.007 70);
  --color-separator: oklch(0.9 0.007 70);
  --color-border-control: oklch(0.6 0.012 65);
  --color-text: oklch(0.22 0.012 60);
  --color-text-secondary: oklch(0.48 0.014 60);
  --color-accent-solid: oklch(0.75 0.16 55);
  --color-on-accent: oklch(0.22 0.04 50);
  --color-accent-text: oklch(0.53 0.14 45);
  --color-accent-tint: oklch(0.95 0.028 65);
  --color-accent-graphic: oklch(0.64 0.17 48);
  --color-track: oklch(0.92 0.008 70);
  --color-success-text: oklch(0.5 0.12 150);
  --color-success-tint: oklch(0.95 0.035 150);
  --color-danger-text: oklch(0.52 0.18 25);
  --color-danger-solid: oklch(0.52 0.18 25);
  --color-on-danger: oklch(1 0 0);
  --color-danger-tint: oklch(0.95 0.022 25);
  --color-backdrop: oklch(0.15 0.01 60 / 0.45);
  --shadow-card: 0 1px 2px oklch(0 0 0 / 0.05), 0 4px 16px oklch(0 0 0 / 0.04);
  --shadow-float: 0 4px 12px oklch(0 0 0 / 0.08), 0 12px 32px oklch(0 0 0 / 0.08);

  /* Type scale (rem follows iOS Dynamic Type through -apple-system-body). */
  --text-display: 2.6rem;
  --text-title: 1.65rem;
  --text-heading: 1.18rem;
  --text-body: 1rem;
  --text-callout: 0.88rem;
  --text-caption: 0.76rem;
  --text-tab: 0.72rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* Concentric: card radius = control radius (12px) + card padding (16px). */
  --radius-control: 12px;
  --radius-card: 28px;
  --pad-card: 16px;

  --tabbar-h: 3.5rem;
  --content-max: 36rem;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: oklch(0.17 0.006 60);
    --color-surface: oklch(0.225 0.008 60);
    --color-surface-sunken: oklch(0.29 0.01 60);
    --color-separator: oklch(0.33 0.01 60);
    --color-border-control: oklch(0.56 0.012 60);
    --color-text: oklch(0.95 0.006 70);
    --color-text-secondary: oklch(0.75 0.012 70);
    --color-accent-solid: oklch(0.74 0.15 55);
    --color-on-accent: oklch(0.22 0.04 50);
    --color-accent-text: oklch(0.8 0.12 60);
    --color-accent-tint: oklch(0.32 0.055 50);
    --color-accent-graphic: oklch(0.74 0.15 55);
    --color-track: oklch(0.32 0.01 60);
    --color-success-text: oklch(0.78 0.13 150);
    --color-success-tint: oklch(0.3 0.05 150);
    --color-danger-text: oklch(0.72 0.15 25);
    --color-danger-solid: oklch(0.72 0.15 25);
    --color-on-danger: oklch(0.2 0.04 25);
    --color-danger-tint: oklch(0.3 0.06 25);
    --color-backdrop: oklch(0 0 0 / 0.6);
    --shadow-card: none;
    --shadow-float: 0 8px 32px oklch(0 0 0 / 0.5);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 106.25%; /* 17px fallback outside iOS */
  font: -apple-system-body;
  -webkit-text-size-adjust: 100%;
  /* Keep focused controls clear of the fixed tab bar (WCAG 2.4.11). */
  scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-4));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-bg);
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--text-body);
  line-height: 1.5;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--text-title); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--text-heading); line-height: 1.3; font-weight: 600; text-wrap: balance; }
h3 { font-size: var(--text-body); line-height: 1.35; font-weight: 600; }
p { text-wrap: pretty; }
a { color: var(--color-accent-text); text-underline-offset: 0.15em; text-decoration-thickness: from-font; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
:focus-visible { outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.icon { width: 1.4em; height: 1.4em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--color-text-secondary); }
.callout { font-size: var(--text-callout); line-height: 1.4; }
.caption { font-size: var(--text-caption); line-height: 1.35; }

/* ---------- app shell ---------- */
.view {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-top: calc(env(safe-area-inset-top) + var(--space-4));
  padding-left: calc(env(safe-area-inset-left) + var(--space-4));
  padding-right: calc(env(safe-area-inset-right) + var(--space-4));
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-8));
  display: flex; flex-direction: column; gap: var(--space-4);
}
.view.no-tabs { padding-bottom: calc(env(safe-area-inset-bottom) + var(--space-6)); }
/* Headings receive programmatic focus on navigation only; they are not controls. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, main:focus { outline: none; }
.view-header { display: flex; align-items: center; gap: var(--space-3); min-height: 2.75rem; }
.view-header h1 { flex: 1; min-width: 0; }

.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 10;
  background: var(--color-surface);
  border-top: 1px solid var(--color-separator);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.tabbar ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: var(--content-max); }
.tabbar a {
  min-height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--color-text-secondary); text-decoration: none;
  font-size: var(--text-tab); line-height: 1.2; font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a .icon { width: 1.5rem; height: 1.5rem; stroke-width: 1.75; }
.tabbar a[aria-current="page"] { color: var(--color-accent-text); font-weight: 700; }
.tabbar a[aria-current="page"] .icon { stroke-width: 2.5; }

/* ---------- surfaces ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--pad-card);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.card-row { display: flex; align-items: center; gap: var(--space-3); }
.card-row > .grow { flex: 1; min-width: 0; }
.card.tint-accent { background: var(--color-accent-tint); box-shadow: none; }
.card.tint-success { background: var(--color-success-tint); box-shadow: none; }
.card.tint-danger { background: var(--color-danger-tint); box-shadow: none; }
.badge-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--color-surface-sunken); color: var(--color-text);
}
.badge-icon.accent { background: var(--color-accent-tint); color: var(--color-accent-text); }
.tint-accent .badge-icon.accent { background: var(--color-surface); }
.section-title { font-size: var(--text-heading); font-weight: 600; margin-top: var(--space-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 2.75rem; padding: var(--space-2) var(--space-4);
  border: 1px solid transparent; border-radius: var(--radius-control);
  font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none;
  background: var(--color-surface-sunken); color: var(--color-text);
}
.btn .icon { width: 1.25em; height: 1.25em; }
.btn-primary { background: var(--color-accent-solid); color: var(--color-on-accent); }
.btn-secondary { background: var(--color-accent-tint); color: var(--color-accent-text); }
.btn-danger { background: var(--color-danger-tint); color: var(--color-danger-text); }
.btn-danger-solid { background: var(--color-danger-solid); color: var(--color-on-danger); }
.btn-quiet { background: transparent; color: var(--color-accent-text); padding-inline: var(--space-2); }
.btn-block { width: 100%; }
.btn-lg { min-height: 3.5rem; font-size: 1.06rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn {
  width: 2.75rem; height: 2.75rem; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1px solid transparent; background: var(--color-surface-sunken); color: var(--color-text);
}
.btn-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 8rem; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .icon-btn { transition-property: scale; transition-duration: 150ms; transition-timing-function: ease-out; }
  .btn:not(:disabled):active, .icon-btn:not(:disabled):active { scale: 0.96; }
}

/* ---------- week strip ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-1); }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 3.75rem; padding: var(--space-1) 0;
  border: 1px solid transparent; border-radius: var(--radius-control);
  background: transparent; color: var(--color-text-secondary);
}
.day .dow { font-size: var(--text-caption); line-height: 1.2; }
.day .dnum {
  width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums;
  border: 1.5px dashed var(--color-border-control);
}
.day.hit .dnum { border: none; background: var(--color-accent-solid); color: var(--color-on-accent); }
.day[aria-pressed="true"] { background: var(--color-surface); box-shadow: var(--shadow-card); color: var(--color-text); }
@media (prefers-color-scheme: dark) { .day[aria-pressed="true"] { background: var(--color-surface-sunken); } }
.day .mark { height: 0.9rem; display: grid; place-items: center; }
.day .mark .icon { width: 0.9rem; height: 0.9rem; stroke-width: 3; color: var(--color-accent-text); }

/* ---------- calorie ring ---------- */
.ring-wrap { display: flex; align-items: center; gap: var(--space-4); }
.ring { position: relative; width: 9.5rem; height: 9.5rem; flex: none; }
.ring svg { width: 100%; height: 100%; rotate: -90deg; }
.ring .track { stroke: var(--color-track); }
.ring .fill { stroke: var(--color-accent-graphic); }
@media (prefers-reduced-motion: no-preference) { .ring .fill { transition: stroke-dashoffset 400ms var(--ease-out); } }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-center .big { font-size: 2rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ring-center .icon { width: 2rem; height: 2rem; color: var(--color-success-text); stroke-width: 2.5; }
.ring-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.stat .label { font-size: var(--text-callout); color: var(--color-text-secondary); line-height: 1.3; }
.stat .value { font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.stat .value .of { font-weight: 500; color: var(--color-text-secondary); }
.nowrap { white-space: nowrap; }

.bar { height: 0.5rem; border-radius: 999px; background: var(--color-track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--color-accent-graphic); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li + li { border-top: 1px solid var(--color-separator); }
.list-btn {
  width: 100%; display: flex; align-items: center; gap: var(--space-3);
  min-height: 3.5rem; padding: var(--space-3) 0;
  background: none; border: none; text-align: start; color: inherit;
}
.list-btn .grow { flex: 1; min-width: 0; }
.list-btn .grow > span, .list-btn .end > span { display: block; }
.list-btn .title { font-weight: 600; line-height: 1.3; overflow-wrap: break-word; }
.list-btn .meta { font-size: var(--text-callout); color: var(--color-text-secondary); line-height: 1.4; font-variant-numeric: tabular-nums; }
.list-btn .end { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-btn > .icon { color: var(--color-text-secondary); }
/* Tap highlight is off for buttons, so rows and days give their own instant pressed cue. */
.list-btn:active, .day:active { opacity: 0.6; }
.list-row { display: flex; align-items: center; gap: var(--space-3); min-height: 3.5rem; padding: var(--space-3) 0; }
.list-row .grow { flex: 1; min-width: 0; }

.empty { text-align: center; padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); align-items: center; }
.empty .icon { width: 2.5rem; height: 2.5rem; color: var(--color-text-secondary); stroke-width: 1.5; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field > label, .field > .label, fieldset > legend { font-weight: 600; font-size: var(--text-callout); line-height: 1.3; }
.field .hint { font-size: var(--text-callout); color: var(--color-text-secondary); line-height: 1.4; }
.field .error { font-size: var(--text-callout); color: var(--color-danger-text); line-height: 1.4; display: flex; gap: var(--space-1); align-items: flex-start; }
.field .error .icon { width: 1.1rem; height: 1.1rem; margin-top: 0.1rem; }
.input, select.input {
  width: 100%; min-height: 3rem; padding: var(--space-2) var(--space-3);
  font-size: max(1rem, 16px);
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-border-control); border-radius: var(--radius-control);
}
.input[aria-invalid="true"] { border-color: var(--color-danger-text); border-width: 2px; }
.input-suffix { position: relative; }
.input-suffix .input { padding-inline-end: 3.5rem; }
.input-suffix .suffix { position: absolute; inset-inline-end: var(--space-3); top: 50%; translate: 0 -50%; color: var(--color-text-secondary); pointer-events: none; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); gap: var(--space-4); }
fieldset { border: none; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }

/* Choice cards / segmented controls built on native radios. */
.choices { display: flex; flex-direction: column; gap: var(--space-2); }
.choices.inline { flex-direction: row; flex-wrap: wrap; }
.choices.inline > .choice { flex: 1 1 7rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.choice label {
  display: flex; flex-direction: column; gap: 2px;
  min-height: 3rem; padding: var(--space-3);
  border: 1px solid var(--color-border-control); border-radius: var(--radius-control);
  background: var(--color-surface); justify-content: center;
}
.choice label .title { font-weight: 600; line-height: 1.3; }
.choice label .meta { font-size: var(--text-callout); color: var(--color-text-secondary); line-height: 1.4; }
.choice input:checked + label { border: 2px solid var(--color-accent-text); background: var(--color-accent-tint); padding: calc(var(--space-3) - 1px); }
.choice input:focus-visible + label { outline: 2px solid var(--color-text); outline-offset: 2px; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--color-surface-sunken); border-radius: var(--radius-control); padding: 3px; }
.segmented .choice label { min-height: 2.5rem; padding: var(--space-1) var(--space-2); border: none; background: transparent; align-items: center; border-radius: 9px; font-weight: 600; font-size: var(--text-callout); }
.segmented .choice input:checked + label { border: none; padding: var(--space-1) var(--space-2); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-card); }
@media (prefers-color-scheme: dark) { .segmented .choice input:checked + label { background: var(--color-separator); } }

.check-row { display: flex; align-items: center; gap: var(--space-3); min-height: 3rem; }
.check-row input[type="checkbox"] { width: 1.4rem; height: 1.4rem; accent-color: var(--color-accent-text); flex: none; margin: 0; }
.check-row label { flex: 1; }

/* ---------- stepper ---------- */
.stepper { display: flex; align-items: center; gap: var(--space-3); }
.stepper .input { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper.xl .icon-btn { width: 4rem; height: 4rem; }
.stepper.xl .icon-btn .icon { width: 1.75rem; height: 1.75rem; }
.stepper.xl .input { font-size: 3rem; min-height: 5rem; border: none; background: transparent; padding: 0; }
.stepper.xl .input:focus-visible { outline: 2px solid var(--color-accent-text); }

/* ---------- sheet (native dialog) ---------- */
dialog.sheet {
  border: none; padding: 0; margin: auto auto 0;
  width: 100%; max-width: var(--content-max); max-height: 92dvh;
  background: var(--color-surface); color: var(--color-text);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: var(--color-backdrop); }
.sheet-head {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--pad-card) var(--pad-card) var(--space-2);
}
.sheet-head h2 { flex: 1; min-width: 0; }
.sheet-body {
  overflow-y: auto; overscroll-behavior: contain;
  padding: var(--space-2) var(--pad-card) calc(env(safe-area-inset-bottom) + var(--pad-card));
  display: flex; flex-direction: column; gap: var(--space-4);
}
dialog.sheet.center { margin: auto; border-radius: var(--radius-card); width: calc(100% - 2rem); max-width: 26rem; }
dialog.sheet.center .sheet-body { padding-bottom: var(--pad-card); }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-in 300ms var(--ease-out) both; }
  dialog.sheet.center[open] { animation: pop-in 200ms ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open] { animation: fade-in 200ms ease-out both; }
}
@keyframes sheet-in { from { translate: 0 40px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes pop-in { from { scale: 0.96; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- toast & banners ---------- */
.toast-region {
  position: fixed; z-index: 20; inset-inline: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-3));
  display: flex; justify-content: center; pointer-events: none;
  padding-inline: var(--space-4);
}
body.no-tabs .toast-region { bottom: calc(env(safe-area-inset-bottom) + var(--space-4)); }
.toast {
  pointer-events: auto; width: 100%; max-width: calc(var(--content-max) - 2rem);
  display: flex; align-items: center; gap: var(--space-2);
  padding-block: var(--space-2); padding-inline: var(--space-4) var(--space-2);
  background: var(--color-text); color: var(--color-bg);
  border-radius: var(--radius-control); box-shadow: var(--shadow-float);
}
.toast .msg { flex: 1; min-width: 0; line-height: 1.4; padding-block: var(--space-1); }
.toast .btn-quiet { color: var(--color-bg); text-decoration: underline; min-height: 2.75rem; }
.toast .icon-btn { background: transparent; color: var(--color-bg); width: 2.75rem; height: 2.75rem; }
.update-banner {
  position: fixed; z-index: 30; inset-inline: 0; top: 0;
  padding: calc(env(safe-area-inset-top) + var(--space-2)) var(--space-4) var(--space-2);
  display: flex; justify-content: center;
}
.update-banner .inner {
  width: 100%; max-width: var(--content-max);
  display: flex; align-items: center; gap: var(--space-3);
  padding-block: var(--space-2); padding-inline: var(--space-4) var(--space-2);
  /* Concentric with the 12px button inside: 12 + 8px padding. */
  background: var(--color-surface); border-radius: 20px; box-shadow: var(--shadow-float);
  border: 1px solid transparent;
}
.update-banner .msg { flex: 1; }

/* ---------- workout session ---------- */
.session-top { display: flex; align-items: center; gap: var(--space-3); }
.session-top .grow { flex: 1; min-width: 0; }
.progress-dots { display: flex; gap: var(--space-1); }
.progress-dots span { flex: 1; height: 0.3rem; border-radius: 999px; background: var(--color-track); }
.progress-dots span.done { background: var(--color-accent-graphic); }
.set-card { align-items: stretch; text-align: center; gap: var(--space-4); padding-block: var(--space-6); }
.set-card .target { font-size: var(--text-callout); color: var(--color-text-secondary); }
.timer-big { font-size: 4.5rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cues { margin: 0; padding-inline-start: 1.25rem; display: flex; flex-direction: column; gap: var(--space-1); text-align: start; }
details.technique { text-align: start; }
details.technique summary {
  min-height: 2.75rem; display: flex; align-items: center; gap: var(--space-2);
  color: var(--color-accent-text); font-weight: 600; cursor: pointer; list-style: none;
}
details.technique summary::-webkit-details-marker { display: none; }
details.technique[open] summary .chev { rotate: 90deg; }
@media (prefers-reduced-motion: no-preference) { details.technique summary .chev { transition: rotate 150ms ease-out; } }
details.technique .body { display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: var(--space-2); }

.ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.ladder li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-callout); line-height: 1.4; color: var(--color-text-secondary); }
/* Shape carries the state too: upcoming = hollow ring, passed = filled dot, current = filled + halo + bold. */
.ladder li .dot { width: 0.65rem; height: 0.65rem; border-radius: 50%; flex: none; border: 2px solid var(--color-border-control); }
.ladder li.done .dot { background: var(--color-accent-graphic); border-color: var(--color-accent-graphic); }
.ladder li.current { color: var(--color-text); font-weight: 600; }
.ladder li.current .dot { background: var(--color-accent-graphic); border-color: var(--color-accent-graphic); outline: 3px solid var(--color-accent-tint); }

/* ---------- progress chart ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--color-separator); stroke-width: 1; }
.chart .axis-label { fill: var(--color-text-secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .pt { fill: var(--color-text-secondary); }
.chart .avg { fill: none; stroke: var(--color-accent-graphic); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .avg-end { fill: var(--color-accent-graphic); stroke: var(--color-surface); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: var(--text-caption); color: var(--color-text-secondary); }
.legend span { display: inline-flex; align-items: center; gap: var(--space-1); }
.legend .sw-dot { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--color-text-secondary); }
.legend .sw-line { width: 1rem; height: 3px; border-radius: 2px; background: var(--color-accent-graphic); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.status { display: inline-flex; align-items: center; gap: var(--space-1); font-weight: 600; }
.status.sesuai { color: var(--color-success-text); }
.status.lambat, .status.cepat { color: var(--color-text); }
.status.kurang-data { color: var(--color-text-secondary); font-weight: 500; }

/* ---------- onboarding ---------- */
.hero { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-4); }
.hero .logo { width: 3.5rem; height: 3.5rem; border-radius: 14px; }
.target-big { font-size: var(--text-display); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bullets { margin: 0; padding-inline-start: 1.25rem; display: flex; flex-direction: column; gap: var(--space-2); }

@media (hover: hover) {
  .list-btn:hover .title { text-decoration: underline; text-decoration-thickness: from-font; }
  .tabbar a:hover { color: var(--color-text); }
}
