/* roadmap.css — mission timeline & day-card content styles.
 * Authored in Phase 4 (rendering engine); linked from the shell now so the
 * cascade order (theme → shell → roadmap → insights) is fixed from the start. */

/* ------------------------------------------------------------------ *
 *  Hero — title + triple progress + projection
 * ------------------------------------------------------------------ */
.hero { margin-bottom: var(--s6); }
.hero-top { display: flex; align-items: flex-start; gap: var(--s4); flex-wrap: wrap; }
.hero-ico { font-size: 34px; line-height: 1;
  filter: drop-shadow(0 3px 8px color-mix(in srgb, var(--accent) 30%, transparent)); }
.hero h1 { font-size: var(--t-2xl); letter-spacing: -.028em; line-height: 1.1;
  background: var(--forge); -webkit-background-clip: text; background-clip: text;
  color: transparent; width: fit-content; }
.hero .sub { color: var(--text-2); margin-top: 6px; max-width: 60ch; }
.hero-actions { margin-left: auto; display: flex; gap: var(--s2); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: 1px solid var(--border); border-radius: var(--r2); background: var(--surface); color: var(--text-2);
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast); }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.hero-progress { position: relative; overflow: hidden; margin-top: var(--s5); display: grid;
  grid-template-columns: 1fr 1fr 1fr; gap: var(--s5); padding: var(--s5); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-tl) var(--r3) var(--r3) var(--r3); box-shadow: var(--shadow-sm); }
.hero-progress::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--forge); }
@media (max-width: 860px) { .hero-progress { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .hero-progress { grid-template-columns: 1fr; gap: var(--s4); } }

.dual .cap { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3);
  font-weight: 700; margin-bottom: var(--s2); }
.dual .lead { display: flex; align-items: baseline; gap: var(--s2); }
.dual .lead b { font-size: var(--t-3xl); letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.dual .lead span { font-size: var(--t-sm); color: var(--text-3); font-weight: 600; }
.dual .bonus-plus { color: var(--ok); }
.dual-bonus { margin-top: 6px; font-size: var(--t-xs); color: var(--text-3); }
.dual.orig .lead b { color: var(--text-2); }
.dual.ontime .lead b { color: var(--ontime-ink); }

.pbar { height: 10px; border-radius: 6px; background: var(--track); overflow: hidden; margin-top: var(--s3);
  position: relative; }
.pbar > i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; width: 0;
  background: var(--forge); transition: width var(--dur-slow) var(--ease); }
.pbar.orig > i { background: linear-gradient(90deg, var(--text-3), var(--text-2)); }
.pbar.ontime > i { background: linear-gradient(90deg, color-mix(in srgb, var(--ontime) 70%, #d97706), var(--ontime)); }

.projection { margin-top: var(--s4); display: flex; align-items: center; gap: var(--s3);
  flex-wrap: wrap; font-size: var(--t-sm); color: var(--text-2); }
.projection .chip { font-weight: 700; color: var(--text); }
.proj-delta { font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--t-xs); }
.proj-delta.ahead { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.proj-delta.on { color: var(--info); background: color-mix(in srgb, var(--info) 14%, transparent); }
.proj-delta.behind { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* ------------------------------------------------------------------ *
 *  Stats strip (KPI tiles) + workstream meters
 * ------------------------------------------------------------------ */
.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--s3); margin-bottom: var(--s5); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-tl) var(--r2) var(--r2) var(--r2);
  padding: var(--s3) var(--s4); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur-fast); }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.kpi .k { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; }
.kpi .v { font-size: var(--t-xl); font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: var(--t-sm); color: var(--text-3); font-weight: 600; }

.meters { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s5); }
.meter { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.meter:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.meter.secondary { opacity: .96; border-style: dashed; }
.meter .mname { font-weight: 600; font-size: var(--t-sm); display: flex; align-items: center; gap: 6px; }
.meter .mname .tier { font-size: var(--t-xs); color: var(--text-3); font-weight: 700; text-transform: uppercase; }
.meter .mbar { height: 8px; border-radius: 5px; background: var(--track); overflow: hidden; }
.meter .mbar > i { display: block; height: 100%; border-radius: 5px; background: var(--forge); width: 0;
  transition: width var(--dur-slow) var(--ease); }
.meter.secondary .mbar > i { background: var(--text-3); }
.meter .mval { font-size: var(--t-sm); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
@media (max-width: 620px) { .meter { grid-template-columns: 1fr auto; } .meter .mbar { grid-column: 1 / -1; order: 3; } }

/* ------------------------------------------------------------------ *
 *  Milestone rail (slideshow default / compact cards)
 * ------------------------------------------------------------------ */
.milestones { margin-bottom: var(--s6); }
.sec-title { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--text-3);
  font-weight: 700; margin-bottom: var(--s3); }
.ms-sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.ms-sec-head .sec-title { margin-bottom: 0; }
.ms-mode { display: inline-flex; gap: 2px; padding: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.ms-mode-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 24px;
  color: var(--text-3); border-radius: 999px; transition: background var(--dur-fast), color var(--dur-fast); }
.ms-mode-btn:hover { color: var(--text); }
.ms-mode-btn.on { background: var(--accent); color: #fff; }

.ms-rail { display: flex; gap: var(--s3); overflow-x: auto; padding: var(--s3) 0 var(--s2); scrollbar-width: thin; }
.ms { flex: none; width: 210px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-tl) var(--r2) var(--r2) var(--r2);
  padding: var(--s3) var(--s4); position: relative;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur-fast); }
.ms:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ms.current { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: var(--glow); }
.ms.met { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.ms .ms-week { font-size: var(--t-xs); color: var(--text-3); font-weight: 700; text-transform: uppercase; padding-right: 30px; }
.ms .ms-title { font-size: var(--t-sm); font-weight: 600; margin: 4px 0 var(--s2); padding-right: 30px; }
.ms .ms-status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 700; }
.ms .ms-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.ms.met .ms-status { color: var(--ok); } .ms.met .ms-status::before { background: var(--ok); }
.ms.risk .ms-status { color: var(--warn); } .ms.risk .ms-status::before { background: var(--warn); }
.ms.missed .ms-status { color: var(--bad); } .ms.missed .ms-status::before { background: var(--bad); }
.ms-info { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-3); transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast); }
.ms-info:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.ms.lg .ms-info { top: 12px; right: 12px; }
.ms-prog { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; margin-top: var(--s3); }
.ms-prog > i { display: block; height: 100%; background: var(--forge); border-radius: inherit; transition: width var(--dur) var(--ease); }
.ms-prog.met > i { background: var(--ok); }

.ms-show { margin-top: var(--s3); }
.ms-show-vp { overflow: hidden; padding: var(--s3) 0 var(--s4); cursor: grab; touch-action: pan-y; }
.ms-show-vp.dragging { cursor: grabbing; }
.ms-show-track { display: flex; gap: var(--s4); }
.ms.lg { flex: 0 0 clamp(240px, 62%, 360px); width: auto; padding: var(--s4) var(--s5);
  opacity: .5; transform: scale(.9); transform-origin: center;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur-fast), box-shadow var(--dur); }
.ms.lg:hover { transform: scale(.9); box-shadow: none; }
.ms.lg.is-active { opacity: 1; transform: scale(1); box-shadow: var(--shadow); }
.ms.lg .ms-week { font-size: var(--t-sm); }
.ms.lg .ms-title { margin: 6px 0 var(--s3); line-height: 1.35; }
.ms-show-nav { display: flex; align-items: center; justify-content: center; gap: var(--s3); margin-top: 2px; }
.ms-nav-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 50%;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.ms-nav-btn:hover { color: var(--text); border-color: var(--accent); }
.ms-nav-btn.prev { transform: scaleX(-1); }
.ms-dots { display: inline-flex; align-items: center; gap: 6px; }
.ms-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border);
  transition: background var(--dur-fast), transform var(--dur-fast); }
.ms-dot:hover { background: var(--text-3); }
.ms-dot[aria-current="true"] { background: var(--accent); transform: scale(1.35); }

/* inline "what's needed" checklist */
.ms-detail-host:empty { display: none; }
.ms-detail { margin-top: var(--s3); padding: var(--s4); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); display: flex; flex-direction: column; gap: var(--s3); }
.ms-detail-sum { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.ms-detail-count { font-size: var(--t-lg); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-3); }
.ms-detail-sum.met .ms-detail-count { color: var(--ok); }
.ms-detail-sum.risk .ms-detail-count { color: var(--warn); }
.ms-detail-sum.missed .ms-detail-count { color: var(--bad); }
.ms-detail-week { font-size: var(--t-xs); color: var(--text-3); text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.ms-detail-title { font-weight: 700; }
.ms-detail-note { font-size: var(--t-sm); color: var(--text-2); }
.ms-detail-empty { font-size: var(--t-sm); color: var(--text-3); font-style: italic; }
.ms-tasklist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ms-tk { display: flex; gap: var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--border); border-radius: var(--r1); background: var(--surface); }
.ms-tk.done { opacity: .6; } .ms-tk.done .ms-tk-title { text-decoration: line-through; }
.ms-tk.partial { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.ms-tk-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
  border-radius: 999px; font-size: var(--t-xs); font-weight: 800; font-variant-numeric: tabular-nums; }
.ms-tk.done .ms-tk-mark { color: #fff; background: var(--ok); }
.ms-tk.partial .ms-tk-mark { color: var(--accent); border: 1px solid var(--accent); background: var(--accent-soft); padding: 0 6px; }
.ms-tk.todo .ms-tk-mark { border: 2px solid var(--border); }
.ms-tk-day { font-size: var(--t-xs); color: var(--text-3); }
.ms-tk-title { font-size: var(--t-sm); font-weight: 600; }
.ms-tk-subs { list-style: none; margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.ms-tk-subs li { display: flex; gap: 6px; align-items: baseline; font-size: var(--t-xs); color: var(--text-2); }
.ms-tk-subs li.done { color: var(--text-3); text-decoration: line-through; }
.ms-sub-mark { flex: none; width: 14px; display: inline-flex; align-items: center; color: var(--ok); }
.ms-tk-subs li.todo .ms-sub-mark::before { content: "○"; color: var(--text-3); }

/* ------------------------------------------------------------------ *
 *  Timeline: month → week group → day cards
 * ------------------------------------------------------------------ */
.month-group { margin-bottom: var(--s6); }
.month-head { font-size: var(--t-lg); font-weight: 700; letter-spacing: -.01em; margin-bottom: var(--s4);
  position: sticky; top: 0; z-index: 5; padding: var(--s2) 0; background: linear-gradient(var(--bg) 60%, transparent); }
.week-group { margin-bottom: var(--s5); }
.week-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3);
  padding-bottom: var(--s2); border-bottom: 1px dashed var(--border-2); }
.week-head .wk { font-weight: 700; font-size: var(--t-sm); }
.week-head .wk small { color: var(--text-3); font-weight: 500; margin-left: 6px; }
.week-dual { display: flex; align-items: center; gap: var(--s3); margin-left: auto; font-size: var(--t-xs);
  color: var(--text-2); font-variant-numeric: tabular-nums; }
.week-dual b { color: var(--text); }
.week-dual .wd-actual b { color: var(--accent); }
.week-dual .wd-orig b { color: var(--text-2); }
.week-dual .wd-ontime b { color: var(--ontime-ink); }
.wk-milestone { font-size: var(--t-xs); font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); }

.day { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-tl) var(--r3) var(--r3) var(--r3);
  margin-bottom: var(--s3); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur); }
.day:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border-2)); box-shadow: var(--shadow); }
/* today wears a forge left-edge + accent glow — the eye lands on it immediately */
.day.today { border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: inset 3px 0 0 0 var(--accent), var(--glow); }
.day.complete { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.day.past { opacity: .82; }
.day.off { opacity: .7; background: var(--surface-2); }

.day-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); cursor: pointer; user-select: none; }
.day-head:hover { background: var(--surface-2); }
.day-caret { color: var(--text-3); transition: transform var(--dur) var(--ease); flex: none; }
.day.open .day-caret { transform: rotate(90deg); }
.day-date { text-align: center; flex: none; width: 46px; }
.day-date .dow { font-size: var(--t-xs); text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.day-date .dnum { font-size: var(--t-lg); font-weight: 700; line-height: 1; }
.day-info { flex: 1; min-width: 0; }
.day-title { font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.day-theme { color: var(--text-3); font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-badge { font-size: var(--t-xs); font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: var(--r-pill); }
.t-moved { font-size: var(--t-xs); color: var(--warn); font-weight: 600; }
.day-off-tag { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; }

.day-figs { display: flex; align-items: flex-start; gap: var(--s3); flex: none; }
.ring-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ring-cap { font-size: 9px; line-height: 1; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 700; }
.day-ring { --p: 0; --ring: var(--accent); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  flex: none; font-weight: 800; font-variant-numeric: tabular-nums; position: relative;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--track) 0); transition: --p var(--dur-slow) var(--ease); }
.day-ring i { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
  transition: color var(--dur-fast); font-size: var(--t-xs); }
.day-ring.actual { --ring: var(--accent); }
.day-ring.orig { --ring: var(--text-3); }
.day-ring.ontime { --ring: var(--ontime); }
.day-ring.mini { width: 30px; height: 30px; }
.day-ring.mini i { width: 22px; height: 22px; font-size: 9px; }
.day-ring.actual.full { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 45%, transparent)); }
.day-ring.full i { color: var(--ok); }
.day-ring.orig.full i { color: var(--text-2); }
.day-ring.ontime.full i { color: var(--ontime-ink); }

.day-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur) var(--ease); }
.day.open .day-body { grid-template-rows: 1fr; }

/* scroll-reveal cascade: below-fold day cards rise in as they scroll into view.
   JS adds .sr (hidden) then .sr-in (shown) via IntersectionObserver; reduce-motion
   zeroes the transition and the JS is skipped entirely, so cards stay visible. */
.timeline .day.sr { opacity: 0; transform: translateY(16px); }
.timeline .day.sr.sr-in { opacity: 1; transform: none;
  transition: opacity .5s var(--ease-out) var(--sr, 0ms), transform .5s var(--ease-out) var(--sr, 0ms); }
.day-body > .inner { overflow: hidden; }
.day-body .pad { padding: 0 var(--s4) var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.center-note { text-align: center; color: var(--text-3); padding: var(--s6) var(--s4); font-size: var(--t-sm); }

/* --- Spine day modal: the same day detail, always expanded, ticks live --- */
.day-modal-body .day-detail { display: block; }
.dd-head { display: flex; align-items: center; gap: var(--s3); padding-bottom: var(--s3); margin-bottom: var(--s3);
  border-bottom: 1px solid var(--border-2); }
.day-detail .day-title { font-size: var(--t-lg); }
.day-modal-body .pad { padding: 0; display: flex; flex-direction: column; gap: var(--s2); }

/* --- goto flash: brief accent halo on a card jumped-to from the Spine modal --- */
@keyframes dayFlash { 0%, 100% { outline-color: transparent; } 28% { outline-color: color-mix(in srgb, var(--accent) 72%, transparent); } }
.day.day-flash { outline: 2px solid transparent; outline-offset: 3px; border-radius: var(--r2); animation: dayFlash 1.6s var(--ease); }
@media (prefers-reduced-motion: reduce) { .day.day-flash { animation: none; } }
:root[data-motion="off"] .day.day-flash { animation: none; }
.center-note .big { font-size: 40px; line-height: 1; display: block; margin-bottom: var(--s2); }

/* ------------------------------------------------------------------ *
 *  Task rows & mini-tasks
 * ------------------------------------------------------------------ */
.task { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3); border-radius: var(--r2);
  border: 1px solid transparent; transition: background var(--dur-fast), transform var(--dur-fast); }
.task:hover { background: var(--surface-2); transform: translateX(2px); }
.task.done { opacity: .62; }
.task.done .t-label { text-decoration: line-through; text-decoration-color: var(--text-3); }

.checkbox { --sz: 22px; width: var(--sz); height: var(--sz); border-radius: 7px; flex: none; margin-top: 1px;
  border: 2px solid var(--border-2); display: grid; place-items: center; color: #fff;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast); }
.checkbox:hover { border-color: var(--accent); }
.checkbox svg { width: 13px; height: 13px; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset var(--dur) var(--ease); }
.task.done > .checkbox { background: var(--accent); border-color: var(--accent); }
.task.done > .checkbox svg { stroke-dashoffset: 0; }

/* one-shot "forge stamp": a spring pop + accent shock-ring on a genuine completion.
   render.js adds .forged after the repaint and clears it on animationend, so it fires
   once per real tick, never on every repaint. */
.checkbox { position: relative; }
.checkbox.forged { animation: stamp .34s var(--ease-spring) both; }
.checkbox.forged::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  animation: shockRing .55s var(--ease-out) both;
}

.t-body { flex: 1; min-width: 0; }
.t-label { font-size: var(--t-sm); line-height: 1.5; }
.t-label code, .t-ref code, .t-lead code, .t-model code, .t-subnote code, .fc-a code, .fc-q code {
  background: var(--surface-3); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.t-label.rich { display: block; }
.t-lead { font-size: var(--t-sm); font-weight: 650; line-height: 1.45; color: var(--text); }
.t-refs { list-style: none; margin: 7px 0 0; display: flex; flex-direction: column; gap: 5px; }
.t-ref { position: relative; padding-left: 16px; font-size: var(--t-sm); line-height: 1.45; color: var(--text-2); }
.t-ref::before { content: ""; position: absolute; left: 2px; top: .5em; width: 5px; height: 5px; border-radius: 1.5px;
  background: color-mix(in srgb, var(--accent) 60%, transparent); }
.t-ref a, .t-lead a, .t-model a, .t-subnote a { color: var(--accent-ink, var(--accent)); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.t-ref a:hover, .t-lead a:hover, .t-model a:hover { border-bottom-color: var(--accent); }
.t-model { margin-top: 8px; padding: 6px var(--s3); font-size: var(--t-sm); line-height: 1.45; color: var(--text-2);
  border-left: 2px solid color-mix(in srgb, var(--accent) 45%, var(--border-2));
  background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 0 var(--r1) var(--r1) 0; }
.task.done .t-label.rich { text-decoration: none; }
.task.done .t-label.rich .t-lead { text-decoration: line-through; text-decoration-color: var(--text-3); }

.info-dot { display: inline-grid; place-items: center; vertical-align: text-bottom; width: 17px; height: 17px;
  margin-left: 5px; border-radius: 50%; color: var(--text-3); flex: none; line-height: 0;
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast); }
.info-dot:hover { color: var(--accent); background: var(--accent-soft); transform: scale(1.12); }
.t-info-panel { margin-top: 6px; padding: var(--s2) var(--s3); font-size: var(--t-sm); line-height: 1.55; color: var(--text-2);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: var(--r1); }

.t-meta { display: flex; align-items: center; gap: var(--s2); margin-top: 6px; flex-wrap: wrap; }
.chip { font-size: var(--t-xs); font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill);
  text-transform: capitalize; background: color-mix(in srgb, var(--chip, var(--cat-alt)) 16%, transparent);
  color: color-mix(in srgb, var(--chip, var(--cat-alt)) 92%, var(--text)); }
.t-est { font-size: var(--t-xs); color: var(--text-3); display: inline-flex; align-items: center; gap: 3px; }
.t-move { margin-left: auto; opacity: 0; color: var(--text-3); cursor: grab; padding: 2px; flex: none;
  transition: opacity var(--dur-fast), color var(--dur-fast); }
.task:hover .t-move { opacity: 1; }
.t-move:hover { color: var(--accent); }
@media (hover: none) { .t-move { opacity: .6; } }

/* grouped / linked tasks */
.tgroup { position: relative; border-left: 2px solid var(--accent-soft); margin-left: var(--s2); padding-left: var(--s3); }
.tgroup::before { content: "⇄"; position: absolute; left: -9px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--accent); background: var(--surface); padding: 2px 0; }

/* parent tasks & mini-tasks */
.t-parent-head { display: flex; align-items: flex-start; gap: var(--s3); cursor: pointer; border-radius: var(--r1); }
.t-parent-head > .t-label { flex: 1; min-width: 0; }
.t-subprogress { display: flex; align-items: center; gap: var(--s2); flex: none; margin-top: 2px; }
.t-subbar { width: 46px; height: 5px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.t-subbar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width var(--dur) var(--ease); }
.t-subcount { font-size: var(--t-xs); font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.task.parent.done .t-subcount { color: var(--accent-ink, var(--accent)); }
.t-subcaret { display: inline-flex; color: var(--text-3); transition: transform .18s ease; }
.task.parent.open .t-subcaret { transform: rotate(90deg); }
.task.parent .t-expand { display: none; margin-top: var(--s2); }
.task.parent.open .t-expand { display: block; animation: subReveal var(--dur) var(--ease); }
@keyframes subReveal { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.t-subs { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--accent-soft); margin-left: 3px; padding-left: var(--s2); }
.subtask { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r1); transition: background var(--dur-fast); }
.subtask:hover { background: var(--surface-2); }
.subtask .checkbox { --sz: 19px; border-radius: 6px; }
.subtask.done .checkbox { background: var(--accent); border-color: var(--accent); }
.subtask.done .checkbox svg { stroke-dashoffset: 0; }
.subtask.done .t-label { text-decoration: line-through; text-decoration-color: var(--text-3); opacity: .7; }
.subtask .t-label { font-size: var(--t-sm); line-height: 1.45; color: var(--text-2); }
.t-subnote { margin-top: 4px; font-size: var(--t-xs); line-height: 1.45; color: var(--text-3); }
/* tri-state parent checkbox: a centred dash for partial, standard check for full */
.task.parent.partial > .checkbox { position: relative; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.task.parent.partial > .checkbox::after { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 2.5px;
  border-radius: 2px; background: var(--accent-ink, var(--accent)); }
.task.parent.partial > .checkbox svg { stroke-dashoffset: 20; }
.task.parent.partial { opacity: 1; }

/* recall deck — unlocked only when a task is done */
.t-recall { margin-top: 8px; }
.t-recall-head { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--text-2);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: var(--r-pill);
  padding: 3px 10px; font-size: var(--t-xs); font-weight: 650; }
.t-recall-head:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.t-recall-head b { color: var(--accent-ink, var(--accent)); }
.trh-caret { display: inline-flex; transition: transform .18s ease; }
.t-recall.open .trh-caret { transform: rotate(90deg); }
.t-recall-deck { display: none; flex-direction: column; gap: 6px; margin-top: 7px; }
.t-recall.open .t-recall-deck { display: flex; }
.flashcard { display: block; width: 100%; text-align: left; cursor: pointer; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r1); padding: 9px var(--s3); color: var(--text);
  transition: border-color .15s ease, background .15s ease; }
.flashcard:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.flashcard.revealed { background: color-mix(in srgb, var(--accent) 5%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.fc-q { display: block; font-size: var(--t-sm); font-weight: 650; line-height: 1.4; color: var(--text); }
.fc-a { display: none; margin-top: 6px; padding-top: 6px; font-size: var(--t-sm); line-height: 1.45; color: var(--text-2); border-top: 1px dashed var(--border-2); }
.flashcard.revealed .fc-a { display: block; }
.fc-hint { display: block; margin-top: 5px; font-size: var(--t-xs); color: var(--text-3); }
.flashcard.revealed .fc-hint { display: none; }

/* ------------------------------------------------------------------ *
 *  Learn / Study block — a calm study panel per day (soft, non-progress)
 * ------------------------------------------------------------------ */
.learn-block { margin-top: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r2);
  background: color-mix(in srgb, var(--info) 6%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--info) 18%, var(--border)); }
.learn-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.learn-cap { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--text-2); }
.learn-count { margin-left: auto; font-size: var(--t-xs); font-weight: 650; color: var(--text-3);
  background: var(--surface-3); padding: 2px 9px; border-radius: var(--r-pill); }
.learn-list { display: flex; flex-direction: column; gap: 6px; }
.learn-item { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s2) var(--s3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r1); transition: opacity var(--dur); }
.learn-item.seen { opacity: .6; }
.learn-seen { flex: none; margin-top: 1px; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-2);
  display: grid; place-items: center; color: transparent; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.learn-seen svg { width: 12px; height: 12px; }
.learn-seen:hover { border-color: var(--info); }
.learn-seen.on { background: var(--info); border-color: var(--info); color: #fff; }
.learn-body { flex: 1; min-width: 0; }
.learn-title { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.learn-type { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: var(--info);
  background: color-mix(in srgb, var(--info) 14%, transparent); padding: 2px 6px; border-radius: var(--r-pill); }
.learn-item.seen .learn-title { text-decoration: line-through; text-decoration-color: var(--text-3); }
.learn-link { font-size: var(--t-sm); font-weight: 650; color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--info) 40%, transparent); }
.learn-link:hover { color: var(--info); }
.learn-name { font-size: var(--t-sm); font-weight: 650; color: var(--text); }
.learn-why { margin-top: 3px; font-size: var(--t-xs); line-height: 1.45; color: var(--text-3); }
.learn-for { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.learn-for-cap { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--text-3); }
.learn-for-chip { font-size: var(--t-xs); color: var(--text-2); background: var(--surface-3); padding: 1px 8px; border-radius: var(--r-pill); }

/* ------------------------------------------------------------------ *
 *  Authored planner note (muted, left-accented; distinct from tasks)
 * ------------------------------------------------------------------ */
.day-note { display: flex; gap: var(--s2); align-items: flex-start; font-size: var(--t-sm); line-height: 1.5;
  color: var(--text-2); background: var(--surface-2);
  border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  padding: var(--s2) var(--s3); border-radius: 0 var(--r2) var(--r2) 0; }
.day-note .ico { flex: none; opacity: .85; }

/* ------------------------------------------------------------------ *
 *  Bonus (optional) track
 * ------------------------------------------------------------------ */
.bonus-track { margin-top: var(--s2); border-top: 1px dashed var(--border-2); padding-top: var(--s2); }
.bonus-head { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); cursor: pointer;
  font-size: var(--t-xs); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.bonus-head:hover { color: var(--text); }
.bonus-star { display: inline-flex; color: var(--ok); }
.bonus-meter { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text-2); text-transform: none; letter-spacing: 0; }
.bonus-caret { display: inline-flex; color: var(--text-3); transition: transform .18s ease; }
.bonus-track.open .bonus-caret { transform: rotate(90deg); }
.bonus-rows { display: flex; flex-direction: column; gap: 2px; }
.bonus-track:not(.open) .bonus-rows { display: none; }
.task.bonus .checkbox { border-radius: 50%; }
.task.bonus.done .checkbox { background: var(--ok); border-color: var(--ok); }

/* ------------------------------------------------------------------ *
 *  Soft items (hints / callouts / tryouts — never touch real progress)
 * ------------------------------------------------------------------ */
.soft { border-radius: var(--r2); font-size: var(--t-sm); }
.soft.hint { display: flex; gap: var(--s2); padding: var(--s3); color: var(--text-2);
  background: color-mix(in srgb, var(--info) 8%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--info) 20%, transparent); }
.soft.hint .ico { flex: none; }
.soft.callout { display: flex; gap: var(--s2); padding: var(--s3); color: var(--text-2); background: var(--surface-2); border: 1px dashed var(--border-2); }
.soft.callout.nw { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 7%, var(--surface-2)); }
.soft.callout.dep { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 7%, var(--surface-2)); }
.soft.tryout { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3);
  border: 1.5px dashed color-mix(in srgb, var(--cat-test) 45%, var(--border-2)); background: color-mix(in srgb, var(--cat-test) 6%, transparent); }
.soft.tryout .checkbox { border-radius: 3px; border-style: dashed; --sz: 20px; border-color: color-mix(in srgb, var(--cat-test) 55%, var(--border-2)); }
.soft.tryout.done .checkbox { background: var(--cat-test); border-style: solid; }
.soft.tryout.done .t-label { text-decoration: none; opacity: .7; }
.soft .extra-tag { font-size: var(--t-xs); font-weight: 800; color: var(--cat-test); text-transform: uppercase; letter-spacing: .04em; }

/* ------------------------------------------------------------------ *
 *  Personal per-day journal note (saved to the DB; distinct from planner note)
 * ------------------------------------------------------------------ */
.usernote { margin-top: var(--s2); border-top: 1px dashed var(--border); padding-top: var(--s2); }
.usernote-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: 4px; }
.usernote-cap { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3); font-weight: 700; }
.usernote-cap svg { color: var(--accent); }
.usernote-edit { font-size: var(--t-xs); color: var(--text-3); padding: 2px 8px; border-radius: 6px; transition: background var(--dur-fast), color var(--dur-fast); }
.usernote-edit:hover { background: var(--surface-3); color: var(--text); }
.usernote-body { font-size: var(--t-sm); line-height: 1.55; color: var(--text-2); white-space: pre-wrap; word-break: break-word;
  background: var(--accent-soft); padding: var(--s2) var(--s3); border-radius: var(--r2); }
.usernote-add { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--text-3);
  padding: 4px 10px; border-radius: var(--r-pill); border: 1px dashed var(--border); transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.usernote-add:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }
.usernote-input { width: 100%; resize: vertical; min-height: 62px; font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-2); border-radius: var(--r2); padding: var(--s2) var(--s3); }
.usernote-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.usernote-actions { display: flex; gap: var(--s2); margin-top: 6px; }
.usernote-save { font-size: var(--t-sm); font-weight: 650; color: #fff; background: var(--accent); padding: 4px 14px; border-radius: var(--r-pill); }
.usernote-cancel { font-size: var(--t-sm); color: var(--text-3); padding: 4px 12px; border-radius: var(--r-pill); }
.usernote-cancel:hover { color: var(--text); }

/* ------------------------------------------------------------------ *
 *  Moves — drag states + the accessible picker (+ interim modal)
 * ------------------------------------------------------------------ */
.task.moving { opacity: .4; }
.day.dragover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.move-list { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; margin-top: var(--s3); }
.move-opt { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r2);
  border: 1px solid var(--border); text-align: left; width: 100%; transition: background var(--dur-fast), border-color var(--dur-fast); }
.move-opt:hover { background: var(--surface-3); border-color: var(--border-2); }
.move-opt.origin { border-style: dashed; }
.move-opt .mo-date { font-weight: 700; width: 54px; flex: none; font-size: var(--t-sm); }
.move-opt .mo-title { font-size: var(--t-sm); color: var(--text-2); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move-opt .mo-load { font-size: var(--t-xs); color: var(--text-3); flex: none; }

/* interim move-picker dialog — superseded by the Phase 9 modal system */
.mv-scrim { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--s4);
  background: var(--scrim); animation: mvFade var(--dur) var(--ease); }
@keyframes mvFade { from { opacity: 0; } to { opacity: 1; } }
.mv-modal { width: min(460px, 100%); max-height: 86vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r3); box-shadow: var(--shadow-lg); padding: var(--s5); }
.mv-modal-head { display: flex; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s2); }
.mv-modal-ico { font-size: 22px; line-height: 1; }
.mv-modal-title { font-size: var(--t-lg); font-weight: 700; letter-spacing: -.01em; }
.mv-modal-sub { font-size: var(--t-sm); color: var(--text-3); margin-top: 2px; }
.mv-modal-foot { display: flex; justify-content: flex-end; margin-top: var(--s4); }
.mv-modal-cancel { font-size: var(--t-sm); color: var(--text-2); padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--border); }
.mv-modal-cancel:hover { background: var(--surface-2); color: var(--text); }

/* ------------------------------------------------------------------ *
 *  Today — effort panel + due digest
 * ------------------------------------------------------------------ */
.today-head { display: flex; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s5); }
.today-title { font-size: var(--t-2xl); letter-spacing: -.028em; line-height: 1.1;
  background: var(--forge); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.effort, .due-digest { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-tl) var(--r3) var(--r3) var(--r3); padding: var(--s5); box-shadow: var(--shadow-sm); margin-bottom: var(--s5); }
.effort-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.effort-nav { display: inline-flex; align-items: center; gap: var(--s2); }
.effort-navbtn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-2);
  display: grid; place-items: center; transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.effort-navbtn.prev { transform: scaleX(-1); }
.effort-navbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.effort-navbtn:disabled { opacity: .35; cursor: default; }
.effort-date { font-size: var(--t-sm); font-weight: 650; min-width: 150px; text-align: center; }
.effort-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.effort-stat { padding: var(--s3); border-radius: var(--r2); background: var(--surface-2); border: 1px solid var(--border); }
.es-v { font-size: var(--t-xl); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.es-k { font-size: var(--t-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; margin-top: 2px; }
.effort-cmp { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s5); }
.effort-delta { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 700; border: 1px solid var(--border); }
.effort-delta .d-label { color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; }
.effort-delta.up { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.effort-delta.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.effort-delta.flat { color: var(--text-3); }

.effort-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: var(--s3) 0; margin-bottom: var(--s4); }
.ec-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; background: none; }
.ec-bar { width: 100%; height: 100%; display: flex; align-items: flex-end; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.ec-col.empty .ec-bar { background: var(--surface-2); }
.ec-fill { display: block; width: 100%; background: var(--forge); border-radius: 5px 5px 0 0;
  transform-origin: bottom; animation: barGrow .5s var(--ease-out) both; animation-delay: var(--gd, 0ms); }
.ec-col.sel .ec-fill { box-shadow: 0 0 0 2px var(--surface), 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent); }
.ec-col.sel .ec-x { color: var(--accent); font-weight: 800; }
.ec-col:hover .ec-fill { filter: brightness(1.12); }
.ec-x { font-size: 9px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.effort-log { margin-top: var(--s2); }
.effort-log .sec-title, .due-digest .sec-title { margin-bottom: var(--s3); }
.effort-log-row { display: flex; align-items: baseline; gap: var(--s3); padding: 6px var(--s2); border-bottom: 1px solid var(--border); font-size: var(--t-sm); }
.effort-log-row:last-child { border-bottom: none; }
.elr-time { font-size: var(--t-xs); color: var(--text-3); font-variant-numeric: tabular-nums; width: 56px; flex: none; }
.elr-label { flex: 1; min-width: 0; }
.elr-est { font-size: var(--t-xs); color: var(--text-3); flex: none; }
.effort-log-row.bonus .elr-label { color: var(--text-2); }
.effort-empty { color: var(--text-3); font-size: var(--t-sm); padding: var(--s3) 0; }

.due-group-head { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em; font-weight: 800; margin: var(--s3) 0 var(--s2); }
.due-group-head.overdue { color: var(--bad); } .due-group-head.due { color: var(--accent-ink); }
.due-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 8px var(--s3);
  border-radius: var(--r1); border: 1px solid var(--border); margin-bottom: 4px;
  transition: background var(--dur-fast), transform var(--dur-fast), border-color var(--dur-fast); }
.due-row:hover { background: var(--surface-2); transform: translateX(2px); border-color: var(--border-2); }
.due-row.overdue { border-left: 3px solid var(--bad); } .due-row.due { border-left: 3px solid var(--accent); }
.due-label { flex: 1; min-width: 0; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.due-when { font-size: var(--t-xs); color: var(--text-3); flex: none; }

/* ---- Finder: "Watch / read next" ---- */
.finder-panel { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-tl) var(--r3) var(--r3) var(--r3); padding: var(--s5); margin-bottom: var(--s5);
  position: relative; overflow: hidden; }
/* a faint forge seam down the top-left corner — the panel reads as a struck plate */
.finder-panel::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--forge);
  opacity: .5; }
.finder-head { display: flex; align-items: center; gap: var(--s3); }
.finder-ico { font-size: var(--t-lg); }
.finder-title { font-weight: 750; font-size: var(--t-md); flex: 1; }
.finder-sub { color: var(--text-3); font-size: var(--t-sm); margin: 4px 0 var(--s4); }
/* the shuffle button: forge gradient, and its icon spins a half-turn on each tap */
.finder-go { width: 34px; height: 34px; border-radius: var(--r2) var(--r1) var(--r2) var(--r1);
  display: grid; place-items: center; color: #fff; background: var(--forge); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur), filter var(--dur); }
.finder-go:hover { box-shadow: var(--glow); filter: brightness(1.06); }
.finder-go:active { transform: scale(.9); }
.finder-go > svg { transition: transform var(--dur-slow) var(--ease); }
.finder-go:hover > svg { transform: rotate(180deg); }
.finder-slot { min-height: 0; }

.finder-note { display: flex; align-items: center; gap: var(--s3); color: var(--text-2); font-size: var(--t-sm);
  padding: var(--s4); border-radius: var(--r2); background: var(--surface-2); border: 1px dashed var(--border-2); }
.finder-note.fail { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.finder-spin { width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: conic-gradient(from 0deg, transparent, var(--accent)); -webkit-mask: radial-gradient(closest-side, transparent 62%, #000 64%);
  mask: radial-gradient(closest-side, transparent 62%, #000 64%); animation: finderSpin .8s linear infinite; }
@keyframes finderSpin { to { transform: rotate(1turn); } }

.finder-result { display: flex; gap: var(--s4); align-items: stretch; padding: var(--s3);
  border-radius: var(--r3); border: 1px solid var(--border); background: var(--surface-2);
  position: relative; transition: transform var(--dur) var(--ease), border-color var(--dur), box-shadow var(--dur); }
.finder-result:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--glow); }
.finder-result.enter { animation: frEnter .46s var(--ease-out) both; }
@keyframes frEnter { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.fr-thumb { position: relative; flex: none; width: 132px; aspect-ratio: 16 / 9; border-radius: var(--r2); overflow: hidden;
  background: var(--surface-3); display: grid; place-items: center; }
.fr-thumb.noimg { background: var(--forge-soft); }
.fr-img { width: 100%; height: 100%; object-fit: cover; }
.fr-badge { position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: color-mix(in srgb, #000 55%, transparent); }
.finder-result.article .fr-badge { background: color-mix(in srgb, var(--accent-2) 80%, #000); }
.fr-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; justify-content: center; }
.fr-kicker { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--accent-ink); font-weight: 750; }
.fr-title { font-weight: 650; font-size: var(--t-sm); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fr-topic { font-size: var(--t-xs); color: var(--text-3); }
.fr-bookmark { position: absolute; top: var(--s2); right: var(--s2); width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-3); background: var(--surface); border: 1px solid var(--border);
  transition: color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast); }
.fr-bookmark:hover { color: var(--accent); transform: scale(1.1); }
.fr-bookmark.active { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* ---- Companion views: Ideas board + Account Structures ---- */
.companion-hero .hero-top { display: flex; align-items: flex-start; gap: var(--s4); }

.ideas-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: start; }
@media (max-width: 860px) { .ideas-cols { grid-template-columns: 1fr; } }
.ideas-col { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-tl) var(--r3) var(--r3) var(--r3); padding: var(--s4) var(--s4) var(--s5);
  box-shadow: var(--shadow-sm); min-width: 0; }
.ideas-col.mine { position: relative; overflow: hidden; }
.ideas-col.mine::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--forge); opacity: .5; }
.ideas-col-head { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.ideas-col-head h2 { font-size: var(--t-lg); letter-spacing: -.01em; }
.ic-sub { font-size: var(--t-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }

.idea-list { display: flex; flex-direction: column; gap: var(--s3); }
.idea-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r2);
  padding: var(--s3) var(--s4); transition: border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
  animation: revealUp .4s var(--ease-out) both; }
.idea-card.mine:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.idea-card-head { display: flex; align-items: center; gap: var(--s2); }
.idea-title { font-size: var(--t-md); font-weight: 650; flex: 1; min-width: 0; line-height: 1.3; }
.idea-body { font-size: var(--t-sm); color: var(--text-2); margin-top: 5px; white-space: pre-wrap; }

.idea-tag { font-size: var(--t-xs); font-weight: 750; padding: 2px 9px; border-radius: var(--r-pill);
  text-transform: uppercase; letter-spacing: .03em; flex: none;
  color: var(--tagc, var(--accent-ink)); background: color-mix(in srgb, var(--tagc, var(--accent)) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--tagc, var(--accent)) 35%, transparent); }
.idea-tag.tag-approach { --tagc: var(--accent); }
.idea-tag.tag-tool     { --tagc: var(--info); }
.idea-tag.tag-feature  { --tagc: var(--accent-2); }
.idea-tag.tag-gotcha   { --tagc: var(--ember); }

/* composer + inline editor */
.idea-composer { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.idea-in { width: 100%; background: var(--surface); border: 1px solid var(--border-2); color: var(--text);
  border-radius: var(--r2); padding: 9px 12px; font-size: var(--t-sm);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.idea-in:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.idea-in-title { font-weight: 650; }
.idea-in-body { resize: vertical; min-height: 40px; font-family: inherit; }
.idea-composer-row { display: flex; gap: var(--s2); align-items: center; }
.idea-in-tag { flex: 1; appearance: none; -webkit-appearance: none; cursor: pointer; }
.idea-add { flex: none; }
.idea-cancel { flex: none; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r2);
  padding: 8px 14px; font-weight: 650; font-size: var(--t-sm); color: var(--text-2); }
.idea-cancel:hover { border-color: var(--border-2); color: var(--text); }
.idea-card.editing { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  display: flex; flex-direction: column; gap: var(--s2); box-shadow: var(--glow); }

.idea-acts { display: inline-flex; gap: 2px; flex: none; }
.idea-iconbtn { width: 28px; height: 28px; border-radius: var(--r1); display: grid; place-items: center;
  color: var(--text-3); font-size: 13px; transition: background var(--dur-fast), color var(--dur-fast); }
.idea-iconbtn:hover { background: var(--surface-3); color: var(--text); }
.idea-iconbtn.arm { width: auto; padding: 0 10px; color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent);
  font-size: var(--t-xs); font-weight: 750; }

/* account structures */
.acct-tables { display: flex; flex-direction: column; gap: var(--s5); }
.acct-table { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-tl) var(--r3) var(--r3) var(--r3); padding: var(--s4); box-shadow: var(--shadow-sm); }
.acct-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.acct-name { font-family: var(--font-mono); font-size: var(--t-md); font-weight: 700; color: var(--accent-ink); }
.acct-purpose { font-size: var(--t-sm); color: var(--text-3); }
.acct-seeds { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); flex-wrap: wrap; }
.acct-seeds-label { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em; font-weight: 750; color: var(--text-3); }
.acct-seeds-val { font-size: var(--t-sm); color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r1); padding: 2px 8px; }
.acct-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r2); }
.acct-grid { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 420px; }
.acct-grid th { text-align: left; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); font-weight: 750; padding: 9px var(--s4); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.acct-grid td { padding: 9px var(--s4); border-bottom: 1px solid var(--border); vertical-align: top; }
.acct-grid tr:last-child td { border-bottom: none; }
.acct-grid tr:hover td { background: var(--surface-2); }
.acct-field code { color: var(--text); font-weight: 650; }
.acct-type code { color: var(--accent-ink); }
.acct-note { color: var(--text-2); }
/* Instruction Schema reuses the account grid; a fourth (accounts) column, wider min
   so four columns breathe, and the accounts cell wraps instead of forcing scroll. */
.ix-grid { min-width: 640px; }
.ix-accts code { color: var(--text-2); white-space: normal; word-break: break-word; }
/* ---- editable schema grids: add / change / delete a row, saved as a private overlay ---- */
.acct-edited { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; font-weight: 750;
  color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: var(--r1); padding: 1px 7px; }
.acct-reset { margin-left: auto; font-size: var(--t-xs); color: var(--text-3); background: none;
  border: 1px solid var(--border-2); border-radius: var(--r1); padding: 2px 9px; cursor: pointer; }
.acct-reset:hover { color: var(--text); border-color: var(--accent); }
.acct-actions-h { width: 1%; }
.acct-row-acts { white-space: nowrap; text-align: right; }
.acct-row-acts .idea-iconbtn { display: inline-grid; vertical-align: middle; }
.acct-grid tr.acct-editing:hover td { background: transparent; }
.acct-editing td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.acct-in { width: 100%; min-width: 90px; background: var(--surface); border: 1px solid var(--border-2);
  color: var(--text); border-radius: var(--r1); padding: 5px 7px; font-size: var(--t-sm); font-family: var(--font-mono); }
.acct-in:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.acct-in { resize: vertical; font-family: inherit; }
.acct-save:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.acct-addrow { margin-top: var(--s3); width: 100%; font-size: var(--t-sm); color: var(--accent-ink); background: none;
  border: 1px dashed var(--border-2); border-radius: var(--r1); padding: 6px 12px; cursor: pointer; }
.acct-addrow:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.acct-emptyrow td { text-align: center; color: var(--text-3); font-style: italic; padding: var(--s4); }
.acct-emptyrow:hover td { background: transparent; }

@media (max-width: 620px) {
  .month-head { top: 54px; }
  .day-theme { display: none; }
  .fr-thumb { width: 96px; }
}

/* a slow molten shimmer along the forge-filled progress bars — the Forge signature.
   scoped to the accent/forge fills (never the grey "original" or gold "on-time" bars);
   the reduce-motion / data-motion=off guards neutralise it globally. */
.pbar:not(.orig):not(.ontime) > i,
.meter:not(.secondary) .mbar > i,
.ms-prog:not(.met) > i,
.sb-mini .bar > i,
.hbar-fill {
  background-size: 220% 100%;
  animation: forgeDrift 12s linear infinite;
}

/* ---- Bookmarks (#/bookmarks) -------------------------------------- */
.bm-body { padding: 0 var(--s2) var(--s6); }
.bm-count { font-size: var(--t-sm); color: var(--text-2); margin: 0 0 var(--s3); }
.bm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
.bm-grid .finder-result { animation: frEnter .4s var(--ease-out) both; }
@media (max-width: 620px) { .bm-grid { grid-template-columns: 1fr; } }

/* ---- Interludes (between-days resource cards; soft "seen" tick) ----- */
.interlude { display: flex; gap: var(--s3); align-items: stretch; margin: var(--s2) 0 var(--s3);
  padding: var(--s3); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r3) var(--r3) var(--r3) var(--r-tl); box-shadow: var(--shadow-sm);
  transition: border-color var(--dur), box-shadow var(--dur), opacity var(--dur); }
.interlude:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--glow); }
.interlude.seen { opacity: .55; }
.il-media { position: relative; flex: 0 0 116px; align-self: stretch; min-height: 74px;
  display: flex; align-items: center; justify-content: center; border-radius: var(--r2); overflow: hidden;
  color: #fff; text-decoration: none; background: var(--forge); }
.interlude.article .il-media { color: var(--text-2);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, var(--surface-3)), var(--surface-3)); }
.il-glyph { display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: var(--r-pill); background: rgba(0,0,0,.30); }
.interlude.article .il-glyph { background: transparent; }
.il-body { display: flex; flex-direction: column; gap: 3px; justify-content: center; min-width: 0; flex: 1; }
.il-kicker { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
  color: var(--accent-ink); }
.il-title { font-size: var(--t-sm); font-weight: 700; color: var(--text); text-decoration: none; line-height: 1.3; }
.il-title:hover { color: var(--accent-ink); text-decoration: underline; }
.interlude.seen .il-title { text-decoration: line-through; }
.il-note { margin: 2px 0 0; font-size: var(--t-xs); color: var(--text-2); line-height: 1.45; }
.il-seen { flex: 0 0 auto; align-self: flex-start; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--r-pill); border: 2px solid var(--border-2); background: var(--surface);
  color: transparent; transition: background var(--dur), border-color var(--dur), color var(--dur); }
.il-seen svg { width: 15px; height: 15px; }
.il-seen:hover { border-color: var(--accent); }
.il-seen.on { background: var(--ok); border-color: var(--ok); color: #fff; }
@media (max-width: 560px) {
  .interlude { flex-wrap: wrap; }
  .il-media { flex-basis: 100%; min-height: 108px; }
}

/* ================================================================================== *
 *  Visual polish pass — additive depth, micro-interactions, and idle life for the
 *  classic roadmap view. No structural/markup changes; every rule either adds a
 *  property (rules merge per-property) or a pseudo/hover. All animation & transition
 *  is neutralised globally by the reduce-motion / data-motion=off guard in theme.css.
 * ================================================================================== */

/* hero — the forge icon breathes; the top seam of the progress panel flows */
.hero-ico { animation: heroFloat 4.6s var(--ease) infinite; will-change: transform; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.hero-progress::before { background-size: 220% 100%; animation: sheenSlide 7s linear infinite; }
@keyframes sheenSlide { from { background-position: 0 0; } to { background-position: 220% 0; } }

/* KPI tiles — a hint of glass, and a forge seam that draws across the top on hover */
.kpi { position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, white 4%, var(--surface)), var(--surface)); }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--forge);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease); }
.kpi:hover::before { transform: scaleX(1); }

/* workstream meters — the whole tile lifts a touch on hover, echoing the KPIs */
.meter { transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast) var(--ease); }
.meter:hover { transform: translateY(-1px); }

/* day cards — subtle glass, and a forge left-edge that lights on hover (today already
   wears its own inset accent, so it opts out) */
.day { position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, white 3%, var(--surface)), var(--surface));
  /* skip layout/paint for off-screen day cards — on a ~100-day roadmap this is the big
     scroll win: it also PAUSES each off-screen card's forge-shimmer bars (they only paint
     while near the viewport). auto → the real height is remembered after first render. */
  content-visibility: auto; contain-intrinsic-size: auto 200px; }
.day:hover { transform: translateY(-1px); }
.day:not(.today)::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--forge); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
.day:not(.today):hover::before { opacity: .9; }
/* today keeps drawing the eye — a soft breathing ring on its badge */
.today-badge { animation: todayBreath 2.8s var(--ease) infinite; }
@keyframes todayBreath {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 5px transparent; }
}

/* rings lift and enlarge slightly when you hover the day head */
.ring-cell { transition: transform var(--dur-fast) var(--ease); }
.day-head:hover .day-figs .ring-cell { transform: translateY(-1px) scale(1.04); }

/* task rows — a faint accent outline on hover, and a tint preview on the checkbox */
.task:hover { border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.task:not(.done) > .checkbox:hover,
.subtask:not(.done) .checkbox:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* the current milestone gently pulses so the eye finds "this week" at a glance */
.ms.current { animation: msPulse 2.9s var(--ease) infinite; }
@keyframes msPulse {
  0%, 100% { box-shadow: var(--glow); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent), var(--glow); }
}

/* learn (study) block — a calm left seam in its info hue, matching the day-note motif */
.learn-block { border-left: 3px solid color-mix(in srgb, var(--info) 45%, var(--border)); }

/* ================================================================================== *
 *  Other-page polish — Today, Ideas, Account Structures. Additive & motion-safe (the
 *  global reduce-motion / data-motion=off guard in theme.css neutralises the motion).
 * ================================================================================== */
.effort, .due-digest, .acct-table, .ideas-col {
  background: linear-gradient(180deg, color-mix(in srgb, white 3%, var(--surface)), var(--surface)); }
.effort, .due-digest, .acct-table { position: relative; }
/* a faint forge seam across the panel top — the signature the hero/insights cards share */
.effort::before, .due-digest::before, .acct-table::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--forge); opacity: .5;
  border-radius: var(--r-tl) var(--r3) 0 0; pointer-events: none; }

/* Today — effort stat tiles lift like the KPIs; the 14-day bars brighten on hover */
.effort-stat { transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast), box-shadow var(--dur-fast); }
.effort-stat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow-sm); }
.ec-col .ec-fill { transition: filter var(--dur-fast); }
.ec-col:hover .ec-fill { filter: brightness(1.16); }

/* Ideas — suggested cards gain the same hover affordance My Ideas already had */
.idea-card:not(.editing):hover { border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* Account Structures — a forge left-edge lights the row you hover */
.acct-grid tr:hover td:first-child { box-shadow: inset 2px 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
