/* Theme tokens. Light is the default; dark applies when the system prefers it, unless the owner picked
   a theme (data-theme on <html>, set by the theme switcher). */
:root {
  color-scheme: light;
  --bg: #f7f6f3; --panel: #ffffff; --text: #1d1c1a; --muted: #67645c; --line: #e4e1da;
  --accent: #2f5bd3; --accent-ink: #ffffff; --good: #2e7d4f; --bad: #b3403a; --warn: #a86a12;
  --series: #2f5bd3; --grid: #ebe8e1; --shadow: 0 1px 2px rgba(30, 28, 24, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141412; --panel: #1d1c1a; --text: #ecebe7; --muted: #9c998f; --line: #2f2e2a;
    --accent: #7b9cff; --accent-ink: #0d0d0c; --good: #6cc38f; --bad: #f08a83; --warn: #e5b25a;
    --series: #6a8af0; --grid: #2a2926; --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141412; --panel: #1d1c1a; --text: #ecebe7; --muted: #9c998f; --line: #2f2e2a;
  --accent: #7b9cff; --accent-ink: #0d0d0c; --good: #6cc38f; --bad: #f08a83; --warn: #e5b25a;
  --series: #6a8af0; --grid: #2a2926; --shadow: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; }
header { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
header h1 { font-size: 17px; margin: 0; letter-spacing: -0.01em; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav button { background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; font: inherit; }
nav button.active { background: var(--bg); color: var(--text); font-weight: 600; }
@media (min-width: 861px) and (max-width: 1400px) {  /* 12 tabs: keep the header on one line on laptop screens */
  header { gap: 10px; padding: 12px 14px; }
  nav { gap: 0; }
  nav button { padding: 6px 8px; }
  header .btn { padding-left: 12px; padding-right: 12px; }
}
header .spacer { flex: 1; }
main { max-width: 1000px; margin: 0 auto; padding: 24px 16px 80px; }
section.tab { display: none; } section.tab.active { display: block; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 15px; margin: 0 0 10px; }
.card h3 { font-size: 14px; margin: 14px 0 6px; }
.muted { color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 9px 16px;
  font: inherit; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--line); }
textarea, input, select { width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.north { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.move { border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; margin: 12px 0; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
ul { padding-left: 20px; margin: 6px 0; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar > div { height: 100%; background: var(--accent); }
.entry { border-bottom: 1px solid var(--line); padding: 10px 0; white-space: pre-wrap; }
.entry:last-child { border: 0; }
.entry .x { float: right; background: none; border: 0; color: var(--muted); cursor: pointer; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; margin-bottom: 12px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 85%; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.msg p:first-child { margin-top: 0; } .msg p:last-child { margin-bottom: 0; }
.status { padding: 10px 14px; border-radius: 8px; background: var(--bg); border: 1px dashed var(--line); font-size: 14px; }
.status.error { color: var(--bad); border-color: var(--bad); }
.report { font-size: 14px; }
.login { max-width: 360px; margin: 12vh auto; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 8px; }
@media (max-width: 600px) { header { padding: 12px 16px; } .card { padding: 16px; } }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 99px;
  padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.pill.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill .n { opacity: .7; margin-left: 4px; }
.pill.done:not(.active) { border-color: var(--good); }
.q { padding: 10px 0; border-bottom: 1px solid var(--line); }
.q:last-of-type { border: 0; }
.q label { color: var(--text); font-size: 14px; margin: 0 0 6px; }
.q .unit { color: var(--muted); font-size: 13px; }
.q textarea { min-height: 70px; }
.scale { display: flex; gap: 4px; flex-wrap: wrap; }
.scale button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: inherit; cursor: pointer; }
.scale button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.slider { display: grid; grid-template-columns: 70px 1fr 28px; align-items: center; gap: 8px; }
.slider label { margin: 8px 0; }
.slider input { padding: 0; accent-color: var(--accent); }
.slider output { text-align: right; font-weight: 600; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.saved { color: var(--good); font-size: 13px; }
.evolve { border-left: 3px solid var(--accent); }
.evolve .head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.evolve .head h2 { margin: 0; }
.tag.new { border-color: var(--accent); color: var(--accent); }
.why { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; font-weight: normal; }
.metric-sep { border-top: 1px dashed var(--line); margin: 10px 0 2px; padding-top: 6px; font-size: 12px; color: var(--muted); }
.yesno { display: flex; gap: 6px; }
.yesno button { flex: 1; padding: 7px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.yesno button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.section-title { font-size: 15px; margin: 24px 0 12px; }
.agent-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.agent-head h2 { margin: 0; }
.agent p { font-size: 14px; }
.agent.paused, .agent.retired { opacity: .7; }
.score { color: var(--accent); letter-spacing: 2px; font-size: 13px; }
.score .muted { letter-spacing: 0; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
details summary { cursor: pointer; }
/* ---- North Star ---- */
.ns-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat.hero .stat-value { font-size: 34px; }
.delta { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); } .delta.flat { color: var(--muted); }
.chart { position: relative; margin-top: 8px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .proj { fill: none; stroke: var(--series); stroke-width: 2; stroke-dasharray: 4 4; opacity: .7; }
.chart .area { fill: var(--series); opacity: .08; }
.chart .mark { fill: var(--series); stroke: var(--panel); stroke-width: 2; }
.chart .mark-label { fill: var(--text); font-size: 11px; font-weight: 600; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.tooltip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.12); white-space: nowrap; transform: translate(-50%, -110%); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 5px 10px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--bg); color: var(--text); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.kpi-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.kpi-table th { text-align: right; font-weight: 500; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.kpi-table td { text-align: right; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.kpi-table th:first-child, .kpi-table td:first-child { text-align: left; white-space: normal; min-width: 120px; }
.kpi-table .spark { width: 70px; height: 22px; }
.kpi-table .spark path { fill: none; stroke: var(--series); stroke-width: 1.5; }
.feedback { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--bg); border-left: 3px solid var(--series); font-size: 14px; }
.horizons { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.horizon { position: relative; }
.horizon .when { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--series); }
.horizon h3 { margin: 10px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.horizon p { margin: 0; font-size: 14px; }
.horizon .pace-chip { float: right; font-size: 12px; }
.field-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
/* ---- daily check-in ---- */
.checkin-areas { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
fieldset.area { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 12px; margin: 0; min-width: 0; }
fieldset.area legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
.cf { margin-top: 8px; }
.cf label { margin: 0 0 4px; color: var(--text); font-size: 13px; }
.cf input { padding: 7px 10px; }
.scale.compact { gap: 3px; flex-wrap: nowrap; }
.scale.compact button { width: auto; flex: 1; min-width: 0; height: 30px; padding: 0; font-size: 12px; border-radius: 6px; }
/* ---- life dashboard ---- */
.chart .dot { fill: var(--series); }
.chart .target-line { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.area-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 16px; }
.area-card { text-align: left; font: inherit; color: var(--text); cursor: pointer; margin: 0; transition: border-color .15s; }
.area-card:hover, .area-card:focus-visible { border-color: var(--series); outline: none; }
.area-card-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.area-icon { width: 26px; height: 26px; border-radius: 7px; background: var(--bg); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: var(--series); }
.area-ns { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.unit-sm { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.spark-lg { display: block; width: 100%; height: 34px; margin: 6px 0; overflow: visible; }
.spark-lg path { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; }
.spark-lg circle { fill: var(--series); }
.spark-lg .spark-target { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.bar-label { fill: var(--text); font-size: 13px; }
.bar-value { fill: var(--text); font-size: 12px; font-weight: 600; }
.bar-track { fill: var(--bg); }
.bar-fill { fill: var(--series); }
.bar-target { stroke: var(--text); stroke-width: 2; }
.tile-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile { margin: 0; padding: 14px 16px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.days { display: flex; gap: 3px; margin: 10px 0 8px; }
.days span { flex: 1; height: 16px; border-radius: 3px; border: 1px solid var(--line); }
.days .yes { background: var(--series); border-color: var(--series); }
.days .no { background: var(--bg); }
.days .none { background: repeating-linear-gradient(45deg, transparent 0 3px, var(--line) 3px 4px); }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 6px; left: 6px; right: 6px; height: 2px; background: var(--line); }
.timeline li { position: relative; padding-top: 22px; }
.timeline .node { position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2px solid var(--series); }
.timeline li.now .node { background: var(--series); }
.timeline .when { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--series); }
.timeline .what { font-size: 13px; margin-top: 4px; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; gap: 14px; padding-left: 26px; }
  .timeline::before { top: 6px; bottom: 6px; left: 6px; right: auto; width: 2px; height: auto; }
  .timeline li { padding-top: 0; }
  .timeline .node { left: -26px; top: 1px; }
}
/* ---- structured health check-in ---- */
fieldset.area.wide { grid-column: 1 / -1; }
.plan-link { font-size: 12px; margin: 4px 0 2px; }
.plan-link a { color: var(--series); }
.subgroups { columns: 3 270px; column-gap: 22px; }  /* columns fill the gaps that grid rows leave */
.subgroup { break-inside: avoid; }
.subgroup h4 { margin: 12px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--series); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips button { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 99px; padding: 4px 10px;
  font: inherit; font-size: 12px; cursor: pointer; }
.chips button.on { background: var(--series); border-color: var(--series); color: var(--accent-ink); }
.ex-row { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.ex-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.ex-head .ex-name { flex: 1; min-width: 140px; padding: 6px 8px; }
.ex-done { display: inline-flex; gap: 4px; align-items: center; margin: 0 0 0 auto; color: var(--text); font-size: 13px; }
.ex-done input { width: auto; }
.ex-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; }
.ex-dims { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ex-dims label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; }
.ex-dims input { width: 68px; padding: 5px 7px; }
.meal-label { margin: 8px 0 3px; font-size: 12px; }
.meals textarea { min-height: 36px; resize: vertical; overflow: hidden; }
.nutrition { margin-top: 10px; }
.nut-totals { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin-bottom: 8px; }
.days .part { background: linear-gradient(90deg, var(--series) 50%, var(--bg) 50%); border-color: var(--series); }
.tile-wide { grid-column: span 2; }
@media (max-width: 520px) { .tile-wide { grid-column: auto; } }
.chip-counts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.plan-targets { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin: 12px 0; }
.plan-targets div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.plan-targets .stat-label { display: block; }
.plan-table td, .plan-table th { text-align: center; }
.hp-ex { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.hp-ex-top { display: flex; gap: 8px; }
.hp-ex-top input { flex: 2; } .hp-ex-top select { flex: 1; }
.hp-days { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hp-days label { display: inline-flex; gap: 3px; align-items: center; margin: 0; font-size: 13px; color: var(--text); }
.hp-days input { width: auto; }
/* ---- physique ---- */
.vol { display: grid; gap: 6px; margin-top: 10px; }
.vol-row { display: grid; grid-template-columns: 80px 1fr 48px; gap: 8px; align-items: center; font-size: 13px; }
.vol-name { text-transform: capitalize; }
.vol-track { position: relative; height: 12px; background: var(--bg); border-radius: 4px; }
.vol-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--series); border-radius: 4px; }
.vol-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); }
.vol-val { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.measure-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.measure-opt { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--text); font-size: 13px; }
.measure-opt input[type=checkbox] { width: auto; }
.measure-opt input[type=number] { width: 80px; margin-left: auto; padding: 5px 7px; }
.hp-muscles label { text-transform: capitalize; }
.hp-muscles .key { margin-left: auto; font-weight: 600; text-transform: none; }
/* ---- goals ---- */
.goal { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: 0; }
.goal.main { background: var(--bg); border-radius: 10px; padding: 10px; border: 1px solid var(--series); margin-bottom: 6px; }
.goal.editing { display: block; }
.goal-body { flex: 1; min-width: 0; }
.goal-title { font-weight: 600; }
.goal-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 13px; }
.goal-why { font-size: 13px; margin-top: 4px; }
.goal-actions { display: flex; gap: 4px; flex: 0 0 auto; align-items: center; }
.goal-actions button:not(.btn) { background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--muted);
  width: 28px; height: 28px; cursor: pointer; font: inherit; }
.goal-actions button:not(.btn):hover { color: var(--text); border-color: var(--muted); }
.star { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 0 0; }
.star.on { color: var(--series); }
.goal-form input[name=title] { font-weight: 600; margin-bottom: 4px; }
.suggestions { margin-top: 14px; padding-top: 6px; border-top: 1px dashed var(--line); }
.suggestions h3 { font-size: 13px; margin: 8px 0 4px; }
.goal.suggested .goal-title { font-weight: 500; }
.goal.done .goal-title { color: var(--muted); font-weight: 500; }
.done-goals { margin-top: 10px; }
.main-goal { font-size: 14px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }

/* ---- theme switcher ---- */
.theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.theme-switch button { background: none; border: 0; color: var(--muted); padding: 6px 9px; cursor: pointer; font: inherit; font-size: 13px; }
.theme-switch button.on { background: var(--bg); color: var(--text); font-weight: 600; }
/* ---- guide ---- */
.guide { max-width: 860px; margin: 0 auto; }
.guide h1 { font-size: 28px; letter-spacing: -0.02em; margin: 4px 0 10px; }
.guide h2 { font-size: 18px; margin: 0 0 12px; }
.guide h3 { font-size: 14px; margin: 0 0 6px; color: var(--series); }
.guide p, .guide li, .guide dd { line-height: 1.6; }
.guide li { margin: 6px 0; }
.loop { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); counter-reset: loop; }
.loop li { counter-increment: loop; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
.loop li::before { content: counter(loop); display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--series);
  color: var(--accent-ink); font-size: 12px; font-weight: 700; align-items: center; justify-content: center; margin-bottom: 6px; }
.loop b, .loop span { display: block; } .loop span { color: var(--muted); font-size: 13px; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; }
.guide-toc a { color: var(--series); text-decoration: none; }
.guide-toc a:hover { text-decoration: underline; }
.steps { padding-left: 22px; }
.steps li { padding-left: 4px; margin: 10px 0; }
.routine { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.routine ul { padding-left: 18px; margin: 0; font-size: 14px; }
.tabs-list dt { font-weight: 700; margin-top: 12px; }
.tabs-list dd { margin: 2px 0 0; color: var(--text); }
.agents-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.agents-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.agents-table tr:last-child td { border-bottom: 0; }
.agents-table td:first-child { white-space: nowrap; }
.agents-table td:last-child { color: var(--muted); white-space: nowrap; font-size: 13px; }
.guide details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.guide details:last-child { border-bottom: 0; }
.guide summary { font-weight: 600; }
.guide details p { margin: 8px 0 0; }
.guide section { scroll-margin-top: 80px; }
.stale-note { margin-top: 8px; font-size: 13px; color: var(--warn); }
/* ---- money ---- */
.money-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.money textarea { min-height: 70px; }
fieldset.area:has(.money-cf) { grid-column: 1 / -1; }
.money-table td { text-align: left; }
.money-table td:last-child { text-align: right; font-weight: 600; }
.dir { display: inline-block; width: 14px; font-weight: 700; }
.dir.out { color: var(--bad); } .dir.in { color: var(--good); } .dir.inv { color: var(--series); }
.nature { font-size: 12px; } .nature.waste { color: var(--bad); font-weight: 600; } .nature.need { color: var(--muted); }
.cat-row { grid-template-columns: 150px 1fr 90px; }
.cat-row .vol-name { text-transform: none; }
.vol-val.over { color: var(--bad); }
.stack { display: flex; height: 16px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 8px 0 10px; background: var(--bg); }
.stack span { display: block; height: 100%; }
.seg-need, .sw-need { background: var(--series); }
.seg-want, .sw-want { background: color-mix(in srgb, var(--series) 45%, var(--panel)); }
.seg-waste, .sw-waste { background: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.budget-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.money-parsed:not(:empty) { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
/* ---- live analysis progress ---- */
.run-panel { border-left: 3px solid var(--series); }
.run-panel.failed { border-left-color: var(--bad); }
.run-panel.complete { border-left-color: var(--good); }
.run-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.run-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.run-meta { text-align: right; display: flex; flex-direction: column; font-size: 13px; }
.run-meta b { font-size: 22px; font-variant-numeric: tabular-nums; }
.run-bar { height: 8px; margin: 12px 0 14px; }
.run-bar > div { background: var(--series); transition: width .6s ease; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--series); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.pipeline { list-style: none; padding: 0; margin: 0; position: relative; }
.pipeline .step { display: flex; gap: 12px; position: relative; padding-bottom: 12px; }
.pipeline .step:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.pipeline .step.done:not(:last-child)::before { background: var(--series); }
.pipeline .dot { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; position: relative; z-index: 1; }
.step.done .dot { background: var(--series); border-color: var(--series); color: var(--accent-ink); }
.step.running .dot { border-color: var(--series); border-top-color: transparent; animation: spin .9s linear infinite; }
.step.failed .dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.step.skipped .dot { color: var(--muted); }
.step.pending .step-head { opacity: .55; }
@keyframes spin { to { transform: rotate(360deg); } }
.step-body { flex: 1; min-width: 0; padding-top: 1px; }
.step-head { font-size: 14px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.step-time { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.step-detail { font-size: 13px; color: var(--muted); margin-top: 2px; }
.err-text { color: var(--bad); }
.spec-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.spec { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); }
.spec i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.spec.running i { background: var(--series); animation: pulse 1s ease-in-out infinite; }
.spec.done { border-color: var(--series); }
.spec.done i { background: var(--series); }
.spec.failed i { background: var(--bad); }
.x-close { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .pulse, .step.running .dot, .spec.running i { animation: none; } .run-bar > div { transition: none; } }
/* ---- cost ---- */
.step-cost { color: var(--text); font-weight: 600; }
.spec-cost { color: var(--muted); font-variant-numeric: tabular-nums; }
.day-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: 6px 0 4px; }
.day-bar { flex: 1; max-width: 26px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.day-bar span { width: 100%; background: var(--series); border-radius: 4px 4px 0 0; }
.day-bar em { font-style: normal; font-size: 10px; color: var(--muted); margin-top: 3px; }
.console-note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg); border: 1px dashed var(--line); font-size: 13px; line-height: 1.55; }
.console-note code { font-size: 12px; background: var(--panel); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
.day-bar { position: relative; }
.est-mark { position: absolute; left: -2px; right: -2px; height: 2px; background: var(--text); border-radius: 1px; }
/* ---- settings ---- */
.opts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.opt { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 10px 12px 10px 34px; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; position: relative; color: var(--text); font-size: 14px; }
.opt input { position: absolute; left: 12px; top: 13px; width: auto; }
.opt span { font-size: 12px; line-height: 1.45; }
.opt.on { border-color: var(--series); background: var(--bg); }
.opt.off { opacity: .55; cursor: not-allowed; }
.saved-note { font-size: 12px; color: var(--good); margin-top: 4px; }
/* ---- Today ---- */
.today-head .day-nav, #kundli .day-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.today-progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 12px; font-size: 14px; }
.today-progress b { font-size: 18px; font-variant-numeric: tabular-nums; }
.today-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 860px) { .today-grid { grid-template-columns: 1fr; } }
.timeline-day { list-style: none; margin: 0; padding: 0; }
.blk { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.blk:last-child { border-bottom: 0; }
.blk-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.blk-time span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.blk-body { border-left: 3px solid var(--line); padding-left: 12px; min-width: 0; }
.kind-habit_stack .blk-body, .kind-deep_work .blk-body, .kind-workout .blk-body { border-left-color: var(--series); }
.kind-sleep .blk-body, .kind-wind_down .blk-body { border-left-color: color-mix(in srgb, var(--series) 35%, var(--panel)); }
.blk-title { font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.blk-kind { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-left: auto; }
.blk-note { font-size: 13px; margin-top: 2px; }
.blk.past { opacity: .55; }
.blk.now { background: var(--bg); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--series); padding-left: 6px; padding-right: 6px; }
.now-pill { font-size: 11px; background: var(--series); color: var(--accent-ink); padding: 1px 8px; border-radius: 99px; }
.hstack { margin-top: 6px; }  /* not ".stack": that's the Wealth tab's needs/wants/waste bar */
.anchor { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.habit { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: 14px; color: var(--text); cursor: pointer; }
.habit input, .task input { width: auto; margin: 0; }
.habit.done .habit-text { text-decoration: line-through; color: var(--muted); }
.habit-min { font-size: 12px; }
.streak { font-size: 12px; margin-left: auto; }
.ex-line { font-size: 13px; margin: 2px 0; }
.tasks { list-style: none; padding: 0; margin: 0; }
.task { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.task:last-child { border-bottom: 0; }
.task label { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--text); flex: 1; cursor: pointer; font-size: 14px; }
.task.done label span { text-decoration: line-through; color: var(--muted); }
.task .tag { font-size: 11px; white-space: nowrap; }
.task .tag.carry { border-color: var(--warn); color: var(--warn); }
.stack-sum { padding: 8px 0; border-bottom: 1px solid var(--line); }
.stack-sum:last-of-type { border-bottom: 0; }
.streaks { display: flex; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
/* goal plan: one goal's dated plan, full screen. Phase state is carried by fill strength and a text chip, not color alone */
.wizard.gp:focus { outline: none; }
.wizard.gp { padding: 0 max(16px, calc((100vw - 980px) / 2)) 48px; display: block; }
.gp-top { display: flex; gap: 12px; align-items: flex-start; position: sticky; top: 0; background: var(--bg); padding: 18px 0 12px; z-index: 2; border-bottom: 1px solid var(--line); }
.gp-top h2 { margin: 2px 0 4px; font-size: clamp(20px, 4vw, 26px); line-height: 1.25; }
.gp-area { font-size: 13px; }
.gp-window { font-size: 13px; }
.gp-close { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 18px; cursor: pointer; }
.gp-body { padding: 16px 0; }
.gp-empty { max-width: 640px; }
.gp-empty textarea { width: 100%; min-height: 0; }
.gp-summary { font-size: 15px; margin: 0 0 14px; }
.gp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.gp-stats b { font-size: 17px; }
.gp-stats b.gp-next { font-size: 14px; }
.gp-stats .muted { font-size: 12px; }
.gp-overdue { color: var(--bad); font-size: 12px; font-weight: 600; }
.gp-bar { stroke: var(--series); stroke-width: 1.5; }
.gp-bar.gp-now { fill: var(--series); }
.gp-bar.gp-next { fill: color-mix(in srgb, var(--series) 30%, var(--panel)); }
.gp-bar.gp-past { fill: var(--panel); stroke: var(--muted); stroke-dasharray: 3 2; }
.gp-ms { fill: var(--panel); stroke: var(--text); stroke-width: 1.5; }
.gp-ms.done { fill: var(--text); }
.gp-ms.late { stroke: var(--bad); stroke-width: 2; }
.gp-row { cursor: pointer; outline: none; }
.gp-row:hover .rm-hit, .gp-row:focus-visible .rm-hit { fill: color-mix(in srgb, var(--series) 7%, transparent); }
.rm-legend .sw.gp-sw-now { background: var(--series); }
.rm-legend .sw.gp-sw-next { background: color-mix(in srgb, var(--series) 30%, var(--panel)); }
.rm-legend .sw.gp-sw-past { border-style: dashed; border-color: var(--muted); }
.rm-legend .sw-dia.gp-dia-done { background: var(--text); }
.gp-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 12px 0 4px; }
.gp-shift { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.gp-phases { display: grid; gap: 12px; margin-top: 12px; }
.gp-phase { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); min-width: 0; }
.gp-phase.gp-now { border-color: var(--series); box-shadow: inset 3px 0 0 var(--series); }
.gp-phase.gp-past { opacity: .75; }
.gp-phase.flash { outline: 2px solid var(--accent); }
.gp-ph-h { display: flex; gap: 10px; align-items: flex-start; }
.gp-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--series); color: var(--series); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.gp-now .gp-num { background: var(--series); color: var(--panel); }
.gp-dates { font-size: 12px; margin-top: 2px; }
.gp-obj { margin: 8px 0 0; font-size: 14px; }
.gp-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 12px 0 4px; }
.gp-actions { margin: 0; padding-left: 18px; font-size: 14px; }
.gp-actions li { margin: 3px 0; }
.gp-mile { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 5px 0; cursor: pointer; color: var(--text); }
.gp-mile input { width: auto; margin: 3px 0 0; flex: 0 0 auto; }
.gp-mdate { font-weight: 700; font-variant-numeric: tabular-nums; }
.gp-mile.done .gp-mtitle { text-decoration: line-through; color: var(--muted); }
.gp-measure { display: block; font-size: 12px; }
.gp-risks { margin-top: 16px; }
.gp-risk { font-size: 14px; margin: 6px 0; }
.gp-revise { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.gp-revise .wz-reply input { flex: 1; }
.gp-drift { margin-bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gp-edit label { display: block; }
.gp-edit textarea { width: 100%; min-height: 0; }
.gp-ph-edit { margin: 14px 0 0; }
.gp-ph-edit legend { font-weight: 700; padding: 0 6px; }
.gp-row2 { display: flex; gap: 8px; align-items: center; }
.gp-row2 .gp-ptitle { flex: 1; font-weight: 600; }
.gp-dates-edit { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.gp-dates-edit label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.gp-dates-edit input { width: auto; }
.gp-arow { display: flex; gap: 6px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
.gp-arow input { width: auto; flex: 0 1 150px; min-width: 0; }
.gp-arow input.gp-grow { flex: 1 1 200px; }
.gp-arow input.gp-min { flex: 0 0 70px; }
.gp-arow input[type=date] { flex: 0 0 auto; }
.gp-savebar { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); margin-top: 16px; }
.goal-plan-line, .seq-plan, .aim-plan { font-size: 12px; margin-top: 3px; color: var(--text); }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.linkbtn:hover { text-decoration-color: var(--series); }
/* today's aims: one tile per area of life, aims grouped under the goal they move */
.aims-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.aims-side { display: flex; gap: 14px; align-items: center; flex: 0 0 auto; }
.aims-prog { min-width: 110px; font-size: 14px; }
.aims-prog b { font-size: 18px; font-variant-numeric: tabular-nums; }
.aims-headline { margin: 6px 0 0; font-size: 15px; }
.aims-stale { font-size: 13px; margin: 6px 0 0; }
.aims-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 14px; align-items: start; }
.aim-area { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg); min-width: 0; }
.aim-area-h { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.aim-ic { color: var(--series); width: 18px; text-align: center; }
.aim-count { margin-left: auto; font-size: 13px; font-variant-numeric: tabular-nums; }
.aim-focus { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.aim-goal { margin-top: 10px; }
.aim-goal-t { font-size: 13px; font-weight: 600; line-height: 1.4; }
.aim-goal-t .stage { font-size: 10px; padding: 1px 6px; margin-left: 2px; vertical-align: 1px; }
.aim-goal.quiet .aim-goal-t { color: var(--muted); font-weight: 500; }
.main-star { color: var(--series); }
.aim { display: flex; gap: 8px; align-items: flex-start; margin: 5px 0 0; font-size: 14px; color: var(--text); cursor: pointer; line-height: 1.4; }
.aim input { width: auto; margin: 3px 0 0; flex: 0 0 auto; }
.aim.done .aim-text { text-decoration: line-through; color: var(--muted); }
.aim-when { font-size: 12px; white-space: nowrap; }
.aim-none { font-size: 12px; margin-top: 2px; }
.aim-targets { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.aim-targets .tag { font-size: 11px; }
.aim-tasks { font-size: 12px; margin-top: 8px; line-height: 1.5; }
.aims-empty { font-size: 13px; margin: 12px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 600px) { .aims-side { width: 100%; justify-content: space-between; } .aims-grid { grid-template-columns: 1fr; } }
/* ---- Think it through ---- */
.thought { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.thought-q { font-size: 16px; font-style: italic; }
.verdict { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.verdict.down { color: var(--bad); } .verdict.up { color: var(--good); } .verdict.flat { color: var(--warn); }
.effect { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.effect.blocks { color: var(--bad); } .effect.slows { color: var(--warn); } .effect.helps { color: var(--good); } .effect.neutral { color: var(--muted); }
.root-q { margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: var(--bg); border-left: 3px solid var(--series); }
.root-q span { display: block; font-size: 12px; } .root-q b { font-size: 16px; }
.options-table td { text-align: left; white-space: normal; vertical-align: top; min-width: 90px; }
.options-table tr.picked td { background: color-mix(in srgb, var(--series) 10%, transparent); }
.options-table tr.picked td:first-child { box-shadow: inset 3px 0 0 var(--series); }
.reco { margin: 16px 0 8px; }
.reco .kv { align-items: center; }
.old-thought { border-bottom: 1px solid var(--line); padding: 8px 0; }
.old-thought summary { cursor: pointer; }
/* ---- Decide ---- */
.stepper { display: flex; gap: 6px; list-style: none; padding: 0; margin: 4px 0 14px; flex-wrap: wrap; }
.stepper li { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.stepper li.done { border-color: var(--series); color: var(--series); }
.stepper li.on { background: var(--series); border-color: var(--series); color: var(--accent-ink); }
.opt-in { margin-bottom: 6px; }
.decision { border-bottom: 1px solid var(--line); }
.decision:last-child { border-bottom: 0; }
.decision-head { display: flex; gap: 10px; align-items: center; width: 100%; background: none; border: 0; padding: 12px 0; text-align: left;
  font: inherit; color: var(--text); cursor: pointer; flex-wrap: wrap; }
.decision-head b { flex: 1; min-width: 200px; }
.decision-body { padding-bottom: 14px; }
.matrix td, .matrix th { text-align: center; vertical-align: top; }
.matrix td:first-child, .matrix th:first-child { text-align: left; min-width: 160px; }
.matrix select { width: auto; padding: 3px 6px; }
.matrix .reason { font-size: 11px; max-width: 160px; margin: 3px auto 0; white-space: normal; }
.matrix th.rec { color: var(--series); }
.rec-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.matrix td.best { background: color-mix(in srgb, var(--series) 10%, transparent); }
.decide-opts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.decided { border-left: 3px solid var(--good); }
.outcome button { font-size: 13px; }
.matrix td.unscored { outline: 1px dashed var(--warn); outline-offset: -3px; }
.matrix td.unscored .reason { color: var(--warn); }
.decision-body .verdict { flex: 0 0 auto; }
.scoreboard { display: grid; gap: 8px; margin: 6px 0 12px; }
.sb-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(80px, 1fr) 44px; gap: 10px; align-items: center; font-size: 14px; }
.sb-bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.sb-bar span { display: block; height: 100%; background: var(--series); border-radius: 5px; }
.sb-row b { text-align: right; font-variant-numeric: tabular-nums; }
.matrix-details summary { margin: 4px 0 8px; }
/* ---- Parkinson / Hick / Zeigarnik / Goodhart ---- */
.next-up { border-left: 3px solid var(--series); }
.next-up.overdue { border-left-color: var(--warn); }
.nu-title { font-size: 18px; font-weight: 700; margin: 2px 0 6px; }
.nu-clock { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.next-up.overdue .nu-clock { color: var(--warn); }
.task .timebox { width: auto; padding: 2px 4px; font-size: 12px; }
.task.started { background: color-mix(in srgb, var(--series) 8%, transparent); border-radius: 6px; padding-left: 6px; }
.task.moved label span { color: var(--muted); text-decoration: line-through; }
.more-tasks, .dump, .shutdown { margin-top: 10px; }
.more-tasks summary, .dump summary, .shutdown summary { cursor: pointer; }
.sd-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.sd-opts { display: inline-flex; gap: 10px; }
.sd-opts label { display: inline-flex; gap: 4px; align-items: center; margin: 0; color: var(--text); font-size: 13px; }
.sd-opts input { width: auto; }
.reality.flagged { border-left: 3px solid var(--warn); }
.decide-by { font-size: 13px; margin: -4px 0 12px; color: var(--muted); }
.decide-by b { color: var(--text); }
.decide-by.late { color: var(--warn); }

/* roadmap: goal sequencing. One hue; stage is carried by fill strength + texture + a text chip, never color alone */
.stage { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--series); }
.stage.stage-now { background: var(--series); color: var(--panel); }
.stage.stage-next { color: var(--series); background: color-mix(in srgb, var(--series) 14%, transparent); }
.stage.stage-later { color: var(--muted); border-style: dashed; border-color: var(--muted); }
.rm-scroll { overflow-x: auto; margin: 8px -4px 0; padding: 0 4px; }
.rm-scroll svg { display: block; font-size: 12px; }
.rm-grid { stroke: var(--grid); stroke-width: 1; }
.rm-tick { fill: var(--muted); font-size: 11px; }
.rm-lane { fill: var(--bg); }
.rm-lane-label { fill: var(--text); font-weight: 700; font-size: 12px; }
.rm-label { fill: var(--text); font-size: 12px; }
.rm-label.main { font-weight: 700; }
.rm-hit { fill: transparent; }
.rm-row { cursor: pointer; outline: none; }
.rm-row:hover .rm-hit, .rm-row:focus-visible .rm-hit { fill: color-mix(in srgb, var(--series) 7%, transparent); }
.rm-bar { stroke: var(--series); stroke-width: 1.5; }
.rm-bar.stage-now { fill: var(--series); }
.rm-bar.stage-next { fill: color-mix(in srgb, var(--series) 40%, var(--panel)); }
.rm-bar.stage-later { fill: var(--panel); stroke-dasharray: 4 3; }
.rm-bar.late { stroke: var(--bad); stroke-width: 2; }
.rm-hatch { stroke: color-mix(in srgb, var(--series) 35%, transparent); stroke-width: 2; }
.rm-milestone { fill: var(--panel); stroke: var(--text); stroke-width: 1.5; }
.rm-deadline { stroke: var(--bad); stroke-width: 2; stroke-dasharray: 2 2; }
.rm-dep { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.rm-arrowhead { fill: var(--muted); }
.rm-today { stroke: var(--accent); stroke-width: 2; }
.rm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; align-items: center; }
.rm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rm-legend .sw { display: inline-block; width: 22px; height: 10px; border-radius: 3px; border: 1.5px solid var(--series); }
.rm-legend .sw.stage-now { background: var(--series); }
.rm-legend .sw.stage-next { background: color-mix(in srgb, var(--series) 40%, var(--panel)); }
.rm-legend .sw.stage-later { border-style: dashed; background: repeating-linear-gradient(45deg, transparent 0 3px, color-mix(in srgb, var(--series) 35%, transparent) 3px 5px); }
.rm-legend .sw-dia { display: inline-block; width: 8px; height: 8px; transform: rotate(45deg); border: 1.5px solid var(--text); background: var(--panel); }
.rm-legend .sw-arrow { font-style: normal; color: var(--muted); }
.rm-legend .sw-dl { display: inline-block; width: 0; height: 12px; border-left: 2px dashed var(--bad); }
.rm-top { align-items: flex-start; gap: 16px; }
.rm-top > .card { margin-bottom: 0; }
.focus-list { margin: 4px 0 0; padding-left: 20px; }
.focus-list li { margin: 4px 0; }
.seq-late { color: var(--warn); font-size: 13px; margin-top: 6px; }
.seq-area { margin: 18px 0 6px; font-size: 15px; }
.seq { list-style: none; counter-reset: seq; padding: 0; margin: 0; }
.seq-item { counter-increment: seq; position: relative; padding: 10px 12px 12px 44px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; transition: box-shadow .3s; }
.seq-item::before { content: counter(seq); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--series); color: var(--series); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.seq-item.flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.seq-when { font-size: 13px; margin-top: 3px; }
.seq-why { font-size: 14px; margin-top: 6px; }
.seq-miles { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.seq-edit { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.seq-edit input { width: 64px; padding: 4px 6px; margin: 0 4px; }
.goal-steps { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 0; overflow-x: auto; }
.goal-steps li { flex: 1 0 150px; position: relative; padding: 22px 12px 4px 0; font-size: 14px; }
.goal-steps li::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--line); }
.goal-steps li:last-child::before { right: auto; width: 14px; }
.goal-steps .step-node { position: absolute; top: 1px; left: 0; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--series); background: var(--panel); }
.goal-steps li.stage-now .step-node { background: var(--series); }
.goal-steps li.stage-later .step-node { border-style: dashed; border-color: var(--muted); }
@media (max-width: 640px) { .rm-top { flex-direction: column; } .goal-steps { flex-direction: column; } .goal-steps li { flex-basis: auto; padding: 0 0 12px 24px; }
  .goal-steps li::before { top: 14px; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; } .goal-steps li:last-child::before { display: none; } }

/* quick check-in: the check-in form, full screen, one question at a time */
.quiz-top, .quiz-nav, .quiz-end, .quiz-done { display: none; }
body.quiz-open { overflow: hidden; }
#checkin.quiz { position: fixed; inset: 0; z-index: 50; margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow-y: auto;
  background: var(--bg); padding: 0 max(16px, calc((100vw - 680px) / 2)) 48px; display: flex; flex-direction: column; }
#checkin.quiz > .checkin-head, #checkin.quiz > .checkin-intro { display: none; }
#checkin.quiz .quiz-top, .wizard .quiz-top { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 12px; position: sticky; top: 0;
  background: var(--bg); padding: 16px 0 10px; z-index: 1; }
.quiz-where { font-size: 12px; font-weight: 700; color: var(--series); text-transform: uppercase; letter-spacing: .06em; }
.quiz-where .muted { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.quiz-close { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 15px; }
.quiz-bar { grid-column: 1 / -1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.quiz-bar > div { height: 100%; background: var(--accent); transition: width .3s ease; }
#checkin.quiz .checkin-areas { display: block; padding: 7vh 0 18px; }
#checkin.quiz fieldset.area:not(.q-cur), #checkin.quiz .subgroup:not(.q-cur), #checkin.quiz .cf:not(.q-cur) { display: none; }
#checkin.quiz fieldset.area { border: 0; padding: 0; }
#checkin.quiz fieldset.area legend, #checkin.quiz .subgroup h4, #checkin.quiz .plan-link { display: none; }
#checkin.quiz .subgroups { columns: auto; }
#checkin.quiz .cf { margin: 0; }
#checkin.quiz .cf > label { font-size: clamp(22px, 5vw, 30px); font-weight: 600; line-height: 1.25; margin-bottom: 22px; display: block; }
#checkin.quiz .cf > label .why { display: block; font-size: 15px; font-weight: 400; margin-top: 8px; }
#checkin.quiz .cf > label .tag { font-size: 12px; vertical-align: middle; }
#checkin.quiz .cf > input { font-size: 24px; padding: 10px 2px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; background: transparent; width: 100%; max-width: 420px; }
#checkin.quiz .cf > input:focus { outline: none; border-bottom-color: var(--accent); }
#checkin.quiz .scale.compact { flex-wrap: wrap; gap: 8px; }
#checkin.quiz .scale.compact button { flex: 0 0 calc(20% - 6.4px); height: 54px; font-size: 18px; border-radius: 10px; }
@media (min-width: 640px) { #checkin.quiz .scale.compact button { flex: 1 1 0; } }
#checkin.quiz .yesno { max-width: 420px; gap: 10px; }
#checkin.quiz .yesno button { padding: 16px; font-size: 18px; border-radius: 10px; }
#checkin.quiz .chips { gap: 8px; }
#checkin.quiz .chips button { padding: 10px 16px; font-size: 16px; }
#checkin.quiz .meals textarea, #checkin.quiz .money textarea { font-size: 16px; }
#checkin.quiz .money-grid { grid-template-columns: 1fr; }
#checkin.quiz .money-cf::before { content: "What did you spend, earn or invest today?"; display: block; font-size: clamp(22px, 5vw, 30px); font-weight: 600; margin-bottom: 18px; }
.q-in-up { animation: q-in-up .28s ease-out; }
.q-in-down { animation: q-in-down .28s ease-out; }
@keyframes q-in-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes q-in-down { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .q-in-up, .q-in-down { animation: none; } }
#checkin.quiz .quiz-nav, .wizard .quiz-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#checkin.quiz .quiz-nav .btn, .wizard .quiz-nav .btn, .wizard .form-actions .btn { padding: 12px 22px; font-size: 16px; }
#checkin.quiz .quiz-nav .btn:disabled, .wizard .btn:disabled { opacity: .4; cursor: default; }
.quiz-hint { font-size: 13px; }
@media (pointer: coarse) { .quiz-hint { display: none; } }
#checkin.quiz .checkin-save, #checkin.quiz .feedback { display: none; }
#checkin.quiz.q-end .checkin-areas, #checkin.quiz.q-end .quiz-nav { display: none; }
#checkin.quiz.q-end .quiz-end { display: block; margin-top: 7vh; }
#checkin.quiz.q-end .checkin-save { display: flex; }
#checkin.quiz.q-end .checkin-save .btn { padding: 12px 26px; font-size: 16px; }
.quiz-big { font-size: clamp(24px, 5vw, 32px); font-weight: 700; margin-bottom: 8px; }
.quiz-skipped button { font-size: 14px; }
#checkin.quiz.q-saved .feedback:not([hidden]) { display: block; }
#checkin.quiz.q-saved .quiz-done { display: block; margin-top: 16px; }
#checkin.quiz.q-saved .checkin-save .btn, #checkin.quiz.q-saved .quiz-skipped, #checkin.quiz.q-saved .quiz-end p + div { display: none; }

/* guided setup: same look as the check-in quiz */
.wizard { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto;
  padding: 0 max(16px, calc((100vw - 680px) / 2)) 48px; display: flex; flex-direction: column; }
.wizard[hidden] { display: none; }
.wz-body { padding: 7vh 0 18px; }
.wz-icon { font-size: 34px; color: var(--series); margin-bottom: 10px; }
.wz-q { font-size: clamp(22px, 5vw, 30px); font-weight: 600; line-height: 1.25; margin: 0 0 8px; }
.wz-sub { color: var(--muted); font-size: 15px; margin: 0 0 22px; max-width: 560px; }
.wz-body input.wz-in { font-size: 22px; padding: 10px 2px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; background: transparent; width: 100%; }
.wz-body input.wz-in[type=number], .wz-body input.wz-in[type=date] { max-width: 280px; }
.wz-body input.wz-in:focus { outline: none; border-bottom-color: var(--accent); }
.wz-body textarea.wz-in { font-size: 17px; width: 100%; }
.wz-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-opts button { padding: 12px 18px; font: inherit; font-size: 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.wz-opts button:hover { border-color: var(--series); }
.wz-opts button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wz-opts.wz-stack { flex-direction: column; align-items: stretch; max-width: 560px; }
.wz-opts.wz-stack button { text-align: left; }
.wz-opts.wz-scale button { flex: 0 0 calc(20% - 6.4px); height: 54px; padding: 0; }
@media (min-width: 640px) { .wz-opts.wz-scale button { flex: 1 1 0; } }
.wz-when { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.wz-opts.wz-small button { padding: 6px 12px; font-size: 14px; border-radius: 99px; }
.wz-summary { list-style: none; padding: 0; margin: 18px 0; }
.wz-summary li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.wz-sum-area { display: block; font-size: 12px; font-weight: 700; color: var(--series); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.setup-card { border-color: var(--series); }

/* Kundli */
.k-grid { display: grid; gap: 12px 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.k-grid label { display: block; }
.k-grid .why { display: block; }
.k-hits { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.k-hit { text-align: left; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.k-hit:hover { border-color: var(--series); }
.k-coords { font-size: 12px; margin-top: 4px; }
.k-manual { margin-top: 4px; font-size: 13px; }
.k-big { font-size: 20px; font-weight: 700; margin: 2px 0 4px; }
.k-note { font-size: 12px; text-align: center; margin: 8px 0 24px; }
.k-q { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 99px; vertical-align: middle; }
.k-q.q-good { color: var(--good); border: 1px solid var(--good); }
.k-q.q-neutral { color: var(--muted); border: 1px solid var(--line); }
.k-q.q-bad, .k-q.q-caution { color: var(--bad); border: 1px solid var(--bad); }
.k-now-card.caution, .k-today.caution { border-color: var(--bad); }
.k-now-grid { display: grid; gap: 14px 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.k-alert { padding: 8px 10px; border-radius: 8px; margin-top: 4px; font-size: 14px; }
.k-alert.caution { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.k-alert.good { background: color-mix(in srgb, var(--good) 10%, transparent); }
.k-panchang { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; margin: 12px 0; }
.k-strip { width: 100%; height: 104px; display: block; margin-top: 8px; }
.k-strip .q-good { fill: var(--good); opacity: .75; } .k-strip .q-neutral { fill: var(--line); } .k-strip .q-bad { fill: var(--bad); opacity: .55; }
.k-strip .q-caution { fill: var(--bad); }
.k-strip .k-night { fill: var(--grid); }
.k-strip .k-now { stroke: var(--accent); stroke-width: 3; }
.k-tick { fill: var(--muted); font-size: 11px; }
.rm-legend .sw.q-good { background: var(--good); border-color: var(--good); opacity: .75; }
.rm-legend .sw.q-neutral { background: var(--line); border-color: var(--line); }
.rm-legend .sw.q-bad { background: var(--bad); border-color: var(--bad); opacity: .55; }
.rm-legend .sw.q-caution { background: var(--bad); border-color: var(--bad); }
.k-hours { margin-top: 12px; }
.k-hours summary { cursor: pointer; }
.k-hours td { font-size: 13px; vertical-align: top; }
.k-cur td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.k-nightrow td { color: var(--muted); }
.k-wait { padding: 12px 0; }
.k-reading h4 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.k-head { margin: 6px 0 0; font-size: 18px; }
.k-tone { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); }
.k-tone.favourable { color: var(--good); border-color: var(--good); } .k-tone.challenging { color: var(--bad); border-color: var(--bad); } .k-tone.mixed { color: var(--warn); border-color: var(--warn); }
.k-two { display: grid; gap: 8px 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.k-list { list-style: none; padding: 0; margin: 0; }
.k-list li { padding: 8px 0 8px 12px; border-left: 3px solid var(--line); margin-bottom: 6px; }
.k-list.do li { border-left-color: var(--good); } .k-list.avoid li { border-left-color: var(--bad); }
.k-when { font-size: 12px; font-weight: 700; color: var(--series); }
.k-dasha { position: relative; height: 54px; margin: 10px 0 4px; }
.k-dseg { position: absolute; top: 0; bottom: 0; border: 1px solid var(--series); border-radius: 6px; padding: 6px 8px; overflow: hidden; font-size: 13px; background: var(--panel);
  display: flex; flex-direction: column; box-sizing: border-box; }
.k-dseg span { font-size: 11px; color: var(--muted); }
.k-dseg.cur { background: color-mix(in srgb, var(--series) 18%, var(--panel)); border-width: 2px; }
.k-dnow { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--accent); }
.k-antars { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.k-antar { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; display: flex; flex-direction: column; }
.k-antar.cur { border-color: var(--series); background: color-mix(in srgb, var(--series) 12%, transparent); }
.k-antar.past { opacity: .5; }
.k-cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.k-cols > .card { margin-bottom: 0; }
.k-chart { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, minmax(64px, auto)); border: 1px solid var(--text); max-width: 420px; }
.k-cell { border: 1px solid var(--line); padding: 4px 6px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-cell.lagna { background: color-mix(in srgb, var(--series) 12%, transparent); }
.k-sign { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.k-asc { font-size: 10px; font-weight: 700; color: var(--series); }
.k-pl { font-weight: 700; line-height: 1.4; }
.k-pl sup { font-size: 9px; color: var(--bad); }
.k-center { grid-column: 2 / 4; grid-row: 2 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--line); font-size: 13px; text-align: center; }
.k-today-r { margin-top: 8px; font-size: 14px; }
.k-banner { position: sticky; top: 0; z-index: 40; background: var(--bad); color: #fff; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.k-banner button { background: none; border: 0; color: inherit; float: right; cursor: pointer; font-size: 14px; }
.k-strip { height: 84px; }
.k-ticks { position: relative; height: 18px; font-size: 11px; color: var(--muted); }
.k-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
@media (max-width: 560px) { .k-ticks span:nth-child(even) { display: none; } }
.kpi-table.k-hours-t th, .kpi-table.k-hours-t td { text-align: left; white-space: normal; }
.kpi-table.k-hours-t td:last-child { min-width: 220px; }
#kundli .day-nav h2 { flex: 0 1 auto; }
@media (max-width: 560px) {  /* the hour table as stacked rows on phones */
  .kpi-table.k-hours-t thead { display: none; }
  .kpi-table.k-hours-t tr { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .kpi-table.k-hours-t td { border: 0; padding: 2px 0; min-width: 0 !important; }
  .kpi-table.k-hours-t td:nth-child(n+3) { grid-column: 1 / -1; }
}
.k-here { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; font-size: 14px; }
.k-here.ask { border: 1px solid var(--series); }
.k-here-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.k-follow { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-size: 13px; color: var(--text); cursor: pointer; }
.k-follow { white-space: nowrap; width: auto; } .k-follow input { width: auto; margin: 0; }
/* setup: starting point + goal options */
.wz-field { margin-top: 18px; }
.wz-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.wz-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.wz-card { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; line-height: 1.35; }
.wz-card:hover { border-color: var(--series); }
.wz-card.on { border: 2px solid var(--accent); padding: 13px 15px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.wz-card .muted { font-size: 13px; }
.wz-style { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--series); }
.wz-amb { color: var(--muted); }
.wz-meta { font-size: 12px; color: var(--muted); }
.wz-own { margin-top: 20px; }
.wz-loading { display: flex; align-items: center; gap: 6px; padding: 26px 0; color: var(--muted); }
.wz-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--series); animation: wz-dot 1s infinite ease-in-out; }
.wz-loading span:nth-child(2) { animation-delay: .15s; } .wz-loading span:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes wz-dot { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wz-loading span { animation: none; } }
.wz-body textarea.wz-goal { font-size: 20px; padding: 8px 2px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; background: transparent;
  resize: none; overflow: hidden; line-height: 1.35; }
.wz-body textarea.wz-goal:focus { outline: none; border-bottom-color: var(--accent); }
/* "include what you can" detail chips above describe-it-yourself boxes */
.q-details { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; align-items: center; }
.q-details > .muted { flex-basis: 100%; font-size: 13px; margin-bottom: 2px; }
.q-details button { font: inherit; font-size: 13px; padding: 5px 11px; border-radius: 99px; border: 1px dashed var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.q-details button:hover { border-color: var(--series); }
.q-details button.on { border-style: solid; border-color: var(--good); color: var(--good); }
.q-details button.on::before { content: "✓ "; }
.wz-body textarea.wz-in:not(.wz-goal) { min-height: 120px; }
/* setup: choosing a goal with the Goal Coach */
.wz-coach { font-size: 16px; line-height: 1.5; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--series) 8%, var(--panel));
  border-left: 3px solid var(--series); margin: 4px 0 18px; }
.wz-model { gap: 8px; }
.wz-model > span { font-size: 13px; line-height: 1.45; }
.wz-yours { color: var(--text); padding-top: 6px; border-top: 1px dashed var(--line); }
.wz-card.wz-model.on::after { content: "✓ Appeals to me"; font-size: 12px; font-weight: 700; color: var(--accent); }
.wz-thread { margin: 0 0 14px; font-size: 13px; }
.wz-thread summary { cursor: pointer; }
.wz-past { padding: 6px 0 6px 10px; border-left: 2px solid var(--line); margin-top: 6px; color: var(--muted); }
.wz-past.you { border-left-color: var(--accent); }
.wz-reply { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.wz-reply .wz-note { flex: 1; font-size: 15px; padding: 10px 12px; }
.wz-reply .btn { flex: 0 0 auto; padding: 10px 16px; }
.wz-reply .btn:disabled { opacity: .45; cursor: default; }
.wz-field + .wz-reply { margin-top: 12px; }
.wz-cards + .wz-label, .wz-cards + .wz-field { margin-top: 18px; }
@media (max-width: 560px) { .wz-reply { flex-direction: column; align-items: stretch; } }
.wz-card.wz-option.on::after { content: "✓ Added"; font-size: 12px; font-weight: 700; color: var(--accent); }
.wz-goal-row { padding: 6px 0 10px; border-bottom: 1px dashed var(--line); }
.wz-goal-row:last-of-type { border-bottom: 0; }
.wz-goal-line { display: flex; gap: 8px; align-items: flex-start; }
.wz-goal-line .wz-goal { flex: 1; }
.wz-x { flex: 0 0 auto; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 32px; height: 32px; margin-top: 8px; cursor: pointer; }
.wz-x:hover { color: var(--bad); border-color: var(--bad); }
.wz-goal-row .wz-when { margin-top: 8px; }
.wz-body textarea.wz-goal { min-height: 0; }

/* ---- Life map: a timeline mind map. Status is carried by border style + a glyph, kind by an icon + word; one hue ---- */
/* the map wants the whole window: the Life map tab breaks out of the page's 1000px column */
#tab-lifemap.active { width: min(1600px, calc(100vw - 32px)); margin-left: calc((100% - min(1600px, calc(100vw - 32px))) / 2); }  /* no transform: it would trap the fixed bottom sheet */
.cm-help { font-size: 13px; margin: 6px 0 10px; }
.cm-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.cm-group { display: inline-flex; gap: 4px; }
.cm-paths { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.cm-chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.cm-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cm-ask { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.cm-ask[hidden] { display: none; }
.cm-ask input { flex: 1 1 280px; }
.cm-summary { font-size: 14px; background: var(--bg); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
.cm-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.cm-wrap.has-panel { grid-template-columns: minmax(0, 1fr) 320px; }
.cm-canvas { position: relative; height: max(420px, 68vh); overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  touch-action: none; cursor: grab; outline: none; }
.cm-canvas:active { cursor: grabbing; }
.cm-canvas:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.cm-world { position: relative; }
.cm-axis { position: sticky; top: 0; height: 30px; z-index: 4; background: color-mix(in srgb, var(--panel) 92%, transparent); border-bottom: 1px solid var(--line); }
.cm-tick { position: absolute; top: 8px; font-size: 11px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.cm-tick.mon { font-weight: 700; color: var(--text); }
.cm-tick.year { font-weight: 700; color: var(--text); font-size: 12px; transform: translateX(4px); }
.cm-weekend { position: absolute; top: 30px; bottom: 0; background: color-mix(in srgb, var(--muted) 7%, transparent); }
.cm-vline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.cm-vline.year { background: color-mix(in srgb, var(--muted) 35%, transparent); }
.cm-band { position: absolute; z-index: 4; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  background: color-mix(in srgb, var(--panel) 85%, transparent); padding: 1px 6px; border-radius: 4px; pointer-events: none; white-space: nowrap; }
.cm-band.dim { opacity: .35; }
.cm-band-rule { position: absolute; left: 0; height: 1px; background: var(--line); z-index: 1; }
.cm-todayline { position: absolute; top: 30px; bottom: 0; width: 2px; background: var(--accent); z-index: 1; }
.cm-todayline span { position: absolute; top: 4px; left: 6px; font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.cm-edges { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; overflow: visible; }
.cm-edge { fill: none; stroke: color-mix(in srgb, var(--muted) 70%, transparent); stroke-width: 2; }
.cm-edge.temp { stroke: var(--accent); stroke-dasharray: 5 4; }
.cm-arrow { fill: color-mix(in srgb, var(--muted) 70%, transparent); }
.cm-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.cm-link:hover .cm-edge, .cm-link.sel .cm-edge { stroke: var(--accent); stroke-width: 3; }
.cm-link.sel .cm-arrow, .cm-link:hover .cm-arrow { fill: var(--accent); }
.cm-link.dim { opacity: .2; }
.cm-edge-x { position: absolute; z-index: 6; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--bad); background: var(--panel); color: var(--bad); cursor: pointer; font-size: 12px; }
.cn { position: absolute; z-index: 3; width: 200px; height: 64px; box-sizing: border-box; padding: 7px 10px; border-radius: 10px; background: var(--panel);
  border: 1.5px solid var(--series); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); cursor: grab; user-select: none; touch-action: none; outline: none; }
.cn:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.cn.sel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); z-index: 5; }
.cn.dragging { cursor: grabbing; z-index: 7; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.cn.target { box-shadow: 0 0 0 3px var(--accent); }
.cn.dim { opacity: .28; }
.cn.fresh { animation: cn-fresh 1.2s ease-in-out 3; }
@keyframes cn-fresh { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 40%, transparent); } }
.cn.st-idea { border-style: dashed; }
.cn.st-active { box-shadow: inset 4px 0 0 var(--series); }
.cn.st-active.sel { box-shadow: inset 4px 0 0 var(--series), 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.cn.st-done { background: var(--bg); border-color: var(--muted); }
.cn.st-dropped { opacity: .45; border-style: dotted; border-color: var(--muted); }
.cn.st-dropped .cn-title { text-decoration: line-through; }
.cn-top { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cn-kind { color: var(--series); font-weight: 700; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cn-area { font-size: 12px; color: var(--text); flex: 0 0 auto; }
.cn-top { overflow: hidden; }
.cn.st-done .cn-kind, .cn.st-dropped .cn-kind { color: var(--muted); }
.cn-when { font-variant-numeric: tabular-nums; }
.cn-st { margin-left: auto; font-weight: 700; color: var(--series); }
.cn-title { font-size: 13px; font-weight: 600; line-height: 1.3; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cn-out { position: absolute; right: -7px; top: 25px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--series); cursor: crosshair; touch-action: none; }
.cn-out:hover { background: var(--series); transform: scale(1.25); }
.cn-plus { position: absolute; right: -10px; bottom: -10px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 14px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; padding: 0; }
.cn:hover .cn-plus, .cn.sel .cn-plus, .cn:focus-within .cn-plus { opacity: 1; }
@media (hover: none) { .cn-plus { opacity: 1; } }
/* steps too short for their title: a slim bar (or a diamond, for a moment) with the title beside it */
.cn.slim, .cn.moment { background: none; border: 0; padding: 0; box-shadow: none !important; }
.cn.slim::before, .cn.moment::before { content: ""; position: absolute; box-sizing: border-box; border: 1.5px solid var(--series);
  background: color-mix(in srgb, var(--series) 28%, var(--panel)); }
.cn.slim::before { left: 0; right: 0; top: 18px; height: 28px; border-radius: 8px; }
.cn.moment::before { left: 2px; top: 25px; width: 14px; height: 14px; transform: rotate(45deg); border-radius: 2px; background: var(--series); }
.cn.slim.st-idea::before, .cn.moment.st-idea::before { border-style: dashed; background: var(--panel); }
.cn.slim.st-active::before { background: color-mix(in srgb, var(--series) 55%, var(--panel)); }
.cn.slim.st-done::before, .cn.moment.st-done::before { border-color: var(--muted); background: var(--bg); }
.cn.slim.sel::before, .cn.moment.sel::before, .cn.slim.target::before, .cn.moment.target::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.cn.slim:hover::before, .cn.moment:hover::before { filter: brightness(1.06); }
.cn-lab { position: absolute; left: calc(100% + 12px); top: 15px; width: max-content; max-width: 240px; }
.cn-lab .cn-title { margin-top: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-until { font-variant-numeric: tabular-nums; }
.cn.slim .cn-plus, .cn.moment .cn-plus { bottom: 6px; }
.cm-tip { position: fixed; z-index: 90; background: var(--text); color: var(--panel); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.cm-empty { position: absolute; z-index: 5; left: 50%; top: 45%; transform: translate(-50%, -50%); width: min(460px, 90%); text-align: center;
  background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; padding: 18px; }
.cm-list .cm-empty { position: static; transform: none; margin: 0 auto; }
.cm-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.cm-panel label { display: block; font-size: 13px; margin: 8px 0 0; }
.cm-panel input, .cm-panel select, .cm-panel textarea { width: 100%; margin-top: 3px; box-sizing: border-box; }
.cm-panel textarea { min-height: 0; }
.cm-panel-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cm-panel-h .gp-close { width: 32px; height: 32px; font-size: 14px; }
.cm-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cm-2 input, .cm-2 select { min-width: 0; }
.cm-links ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.cm-links li { display: flex; gap: 6px; align-items: baseline; padding: 2px 0; }
.cm-x { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; }
.cm-x:hover { color: var(--bad); }
.cm-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cm-goalline { font-size: 12px; margin: 8px 0 0; }
.cm-saved { font-size: 12px; min-height: 1em; margin: 6px 0 0; }
.cm-del { margin-top: 6px; color: var(--bad); }
.cm-list h3 { margin: 14px 0 6px; }
.cm-list h3:first-child { margin-top: 0; }
.cm-list table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cm-list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 4px 6px; }
.cm-list td { border-bottom: 1px solid var(--line); padding: 6px; vertical-align: top; }
.cm-list tr.st-dropped { opacity: .5; }
.cm-lwhen { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .cm-wrap.has-panel { grid-template-columns: minmax(0, 1fr); }
  .cm-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40; max-height: 62vh; border-radius: 14px 14px 0 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, .18); }
  .cm-canvas { height: 62vh; }
}

/* ---- Musk's principles on Today: the bottleneck, using all the time, 1% better ---- */
.card.edge { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.edge-col { padding: 14px 16px; min-width: 0; }
.edge-col + .edge-col { border-left: 1px solid var(--line); }
.edge-h { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px; align-items: baseline; }
.edge-h .linkbtn { text-transform: none; letter-spacing: 0; font-weight: 500; }
.edge-big { font-size: 16px; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.edge-unit { font-size: 13px; font-weight: 500; color: var(--muted); }
.edge-sub { font-size: 12px; margin: 4px 0; }
.edge-alt { font-size: 12px; margin-top: 6px; padding: 6px 8px; background: var(--bg); border-radius: 6px; }
.edge-fp { font-size: 13px; margin-top: 8px; display: inline-block; }
.edge-form { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 4px; }
.edge-form input { flex: 1 1 160px; min-width: 0; }
.edge-done { color: var(--good); display: flex; gap: 6px; align-items: baseline; }
.edge-suggest { display: block; text-align: left; width: 100%; margin-top: 4px; font: inherit; font-size: 12px; color: var(--text); background: var(--bg);
  border: 1px dashed var(--line); border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.edge-suggest:hover { border-color: var(--series); }
.card.edge .bar { margin: 2px 0 4px; }
.card.edge .btn { margin-top: 4px; }
@media (max-width: 860px) { .card.edge { grid-template-columns: 1fr; } .edge-col + .edge-col { border-left: 0; border-top: 1px solid var(--line); } }
/* 1% better than yesterday: a row per area, yesterday -> today */
.better-list { margin-top: 12px; border-top: 1px solid var(--line); }
.br-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.br-row:last-child { border-bottom: 0; }
.br-area { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 14px; }
.br-score { flex-basis: 100%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.br-score b { color: var(--text); }
.br-lbl { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.br-y { font-size: 13px; line-height: 1.45; }
.br-t .aim { margin-top: 0; }
.br-measure { display: block; font-size: 12px; margin-top: 2px; }
.br-beat { font-size: 13px; line-height: 1.5; }
.br-row.done .br-y { opacity: .6; }
@media (max-width: 700px) { .br-row { grid-template-columns: 1fr; gap: 6px; } }
.aims-bneck { margin: 6px 0 0; font-size: 14px; padding: 6px 10px; border-left: 3px solid var(--series); background: var(--bg); border-radius: 0 6px 6px 0; }
.task .tag.slow { border-color: var(--warn); color: var(--warn); }
.task .tag.bneck { border-color: var(--series); color: var(--series); font-weight: 700; }
/* first principles */
.fp-assume { display: grid; gap: 8px; }
.fp-a { display: grid; grid-template-columns: 128px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.fp-kind { font-size: 11px; font-weight: 700; text-align: center; border-radius: 999px; padding: 2px 8px; border: 1px solid var(--line); }
.fp-kind.fund { background: var(--text); color: var(--panel); border-color: var(--text); }
.fp-kind.conv { border-style: dashed; color: var(--muted); }
.fp-kind.unk { border-color: var(--warn); color: var(--warn); }
.fp-test { font-size: 12px; margin-top: 2px; }
.fp-del li { text-decoration: line-through; text-decoration-color: var(--bad); color: var(--muted); }
@media (max-width: 600px) { .fp-a { grid-template-columns: 1fr; } }

/* check-in: the fields the 1% is measured by */
.req { color: var(--accent); font-weight: 700; margin-left: 3px; }
.req-ok { color: var(--good); }
.cf.missing { outline: 2px solid var(--warn); outline-offset: 4px; border-radius: 6px; }
.req-badge { font-size: 12px; font-weight: 500; margin-left: 8px; color: var(--accent); white-space: nowrap; }
.req-badge .req { margin-left: 0; }
.req-miss { margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid var(--warn); background: var(--bg); border-radius: 0 8px 8px 0; font-size: 14px; }
.req-miss .chips { margin-top: 8px; }

/* the day as a story */
.card.story h2 { font-size: 19px; }
.st-intro { font-size: 15px; line-height: 1.55; margin: 8px 0 12px; white-space: pre-wrap; }
.st-chapters { list-style: none; margin: 0; padding: 0; }
.st-ch { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.st-ch:last-child { border-bottom: 0; }
.st-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.st-time span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.st-body { border-left: 3px solid var(--series); padding-left: 12px; font-size: 14px; line-height: 1.55; }
.st-body b { display: block; margin-bottom: 2px; }
.st-closing { font-size: 15px; font-style: italic; margin: 12px 0 4px; }
.st-wins ul { margin: 4px 0 0; }
.st-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.st-revise { flex: 1 1 320px; }
.st-revise input { flex: 1; }
.st-actual { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.st-actual h3 { margin: 0 0 6px; }
.st-actual textarea { width: 100%; }
.st-edit label { display: block; margin-top: 8px; }
.st-edit textarea, .st-edit input:not([type=time]) { width: 100%; }
.st-ch-edit { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 10px 0; display: grid; gap: 6px; }
.st-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.st-row input[type=time] { width: auto; }
.st-row select { width: auto; flex: 1 1 160px; }
.st-ch-title { font-weight: 600; }
.st-score { display: flex; align-items: baseline; gap: 6px; }
.st-score b { font-size: 34px; font-variant-numeric: tabular-nums; }
.st-score span { color: var(--muted); }
.st-cmp td { vertical-align: top; font-size: 13px; }
.st-v { white-space: nowrap; font-weight: 600; }
.st-cmp tr.v-as_planned .st-v, .st-cmp tr.v-better .st-v { color: var(--good); }
.st-cmp tr.v-missed .st-v { color: var(--bad); }
.st-cmp tr.v-partly .st-v { color: var(--warn); }
.st-told { margin-top: 12px; }
@media (max-width: 600px) { .st-ch { grid-template-columns: 46px minmax(0, 1fr); gap: 8px; } }
.st-cmp th, .st-cmp td { text-align: left; }
.st-cmp td:last-child, .st-cmp th:last-child { text-align: right; }
.st-review h3 { margin: 16px 0 6px; }
.st-review .table-wrap { margin-top: 8px; }

/* weekly review */
.wk-head { font-size: 18px; font-weight: 600; margin: 4px 0 8px; }
.wk-result h3 { margin: 18px 0 6px; }
.wk-warn { padding: 8px 12px; border-left: 3px solid var(--warn); background: var(--bg); border-radius: 0 8px 8px 0; font-size: 14px; }
.wk-plans { display: grid; gap: 8px; }
.wk-plan { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; }
.wk-st { font-size: 12px; font-weight: 700; text-align: center; border-radius: 999px; padding: 2px 8px; border: 1px solid currentColor; }
.wk-st.good { color: var(--good); } .wk-st.warn { color: var(--warn); } .wk-st.bad { color: var(--bad); }
.wk-result { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }

/* goal plan: research -> OKRs -> milestones -> Life map, each stage reviewed */
.gp-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.gp-step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); text-decoration: none; font-size: 13px; }
.gp-step .gp-num { width: 20px; height: 20px; font-size: 11px; }
.gp-step.gp-st-done { color: var(--text); border-color: var(--series); }
.gp-step.gp-st-draft, .gp-step.gp-st-stale { color: var(--text); border-color: var(--accent); font-weight: 600; }
.gp-arrow { color: var(--muted); font-size: 12px; }
.gp-stage { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; background: var(--panel); }
.gp-stage.gp-st-locked { opacity: .6; }
.gp-stage.gp-st-draft, .gp-stage.gp-st-stale { border-color: var(--accent); }
.gp-stage-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gp-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.gp-tag.ok { color: var(--series); } .gp-tag.warn { color: var(--accent); font-weight: 600; } .gp-tag.bad { color: #c2410c; font-weight: 600; }
.gp-first { padding-left: 20px; margin: 4px 0 8px; } .gp-first li { margin: 0 0 6px; }
.gp-sources { font-size: 13px; padding-left: 18px; } .gp-sources a { word-break: break-word; }
.gp-stage .wz-reply { margin-top: 10px; }
.gp-dot { color: var(--series); font-size: 12px; }
.gp-mrow select { max-width: 200px; }
.gp-edit label { display: block; margin: 0 0 8px; }
.gp-edit textarea { width: 100%; box-sizing: border-box; }

/* one goal, one number */
.metric-fs { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 10px 0; }
.metric-fs legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.metric-fs > input { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.cm-metric .field-grid { grid-template-columns: 1fr 1fr; }
.cm-metric select, .cm-metric input { min-width: 0; width: 100%; box-sizing: border-box; }
.gn-list { margin-top: 10px; }
.gn-row { padding: 10px 0; border-top: 1px solid var(--line); }
.gn-row:first-child { border-top: 0; }
.gn-row.beat .gn-beat { color: var(--series); font-weight: 600; }
.gn-goal { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.gn-main { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.gn-metric { min-width: 0; }
.gn-beat { font-size: 13px; margin-top: 2px; }
.gn-in { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.gn-in input { width: 96px; }
.gn-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: 12px; }
.gn-prog .bar { flex: 1 1 120px; max-width: 220px; }
.gn-pace { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--bg); }
.gn-pace.ok { color: var(--series); } .gn-pace.bad { color: #c2410c; }
.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; }

/* Dashboard: goal progress */
.gp-cards { display: grid; gap: 12px; }
.gp-card h3 { font-size: 16px; }
.gp-now { flex: 0 0 auto; text-align: right; }
.gp-now b { font-size: 22px; }
.goal-chart { width: 100%; height: auto; display: block; margin: 10px 0 4px; }
.gc-line { fill: none; stroke: var(--series); stroke-width: 2; }
.gc-dot { fill: var(--series); stroke: var(--panel); stroke-width: 2; }
.gc-pace { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.gc-target { stroke: var(--line); stroke-width: 1; }
.gc-today { stroke: var(--accent); stroke-width: 1; opacity: .6; }
.gc-lbl { font-size: 11px; fill: var(--muted); }
/* Google Calendar strip on Today */
.gcal { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.gcal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.gcal-head a.btn { text-decoration: none; }
.gcal-msg { margin-top: 6px; color: var(--series); }
.gcal-ev { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gcal-ev li { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.gcal-t { font-variant-numeric: tabular-nums; color: var(--muted); }
.habit-goal { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.task-clock { font-variant-numeric: tabular-nums; }
.task-clock.over { color: #c2410c; }
.dump-card label { display: block; margin-bottom: 6px; }
.dump-card textarea { width: 100%; box-sizing: border-box; }
.dump-card .form-actions { flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.today-grid.one { grid-template-columns: minmax(0, 1fr); }
.today-main > .card + .card { margin-top: 16px; }
/* Tasks, Google Tasks style */
.gt { padding-bottom: 8px; }
.gt-head { display: flex; align-items: baseline; gap: 10px; }
.gt-head h2 { margin: 0; }
.gt-add { display: flex; align-items: center; gap: 12px; margin: 10px -8px 4px; padding: 6px 8px; border-radius: 8px; }
.gt-add:focus-within { background: var(--bg); }
.gt-plus { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; color: var(--accent); font-size: 22px; font-weight: 300; line-height: 1; }
.gt-add input { flex: 1; border: 0; background: none; padding: 6px 0; font: inherit; color: var(--text); box-shadow: none; outline: none; }
.gt-add input::placeholder { color: var(--accent); }
.gt-list { list-style: none; margin: 0; padding: 0; }
.gt-row { display: flex; align-items: flex-start; gap: 12px; margin: 0 -8px; padding: 8px; border-radius: 8px; }
.gt-row:hover, .gt-row:focus-within { background: var(--bg); }
.gt-check { flex: 0 0 auto; width: 22px; height: 22px; padding: 0; margin-top: 1px; border: 0; background: none; cursor: pointer; color: var(--muted); }
.gt-check svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.gt-check path { opacity: 0; stroke: var(--accent); stroke-width: 2.2; }
.gt-check:hover path, .gt-check:focus-visible path { opacity: 1; }
.gt-check:hover circle { stroke: var(--accent); }
.gt-row.done .gt-check circle { fill: var(--accent); stroke: var(--accent); }
.gt-row.done .gt-check path { opacity: 1; stroke: var(--panel); }
.gt-main { flex: 1; min-width: 0; }
.gt-title { font-size: 14px; line-height: 1.4; cursor: text; overflow-wrap: anywhere; }
.gt-row.done .gt-title, .gt-row.moved .gt-title { text-decoration: line-through; color: var(--muted); }
.gt-edit { width: 100%; box-sizing: border-box; font: inherit; padding: 2px 6px; }
.gt-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.gt-chip { font-size: 12px; line-height: 1; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--panel); }
.gt-chip.on { color: var(--accent); border-color: var(--accent); font-variant-numeric: tabular-nums; }
.gt-chip.slow { color: #c2410c; }
select.gt-box { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 8px; height: auto; min-height: 0; width: auto; }
.gt-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.gt-row:hover .gt-actions, .gt-row:focus-within .gt-actions, .gt-row.started .gt-actions { opacity: 1; }
@media (hover: none) { .gt-actions { opacity: 1; } }
.gt-icon { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.gt-icon:hover { background: var(--line); color: var(--text); }
.gt-empty { color: var(--muted); padding: 14px 4px; }
.gt-done { margin-top: 6px; }
.gt-done summary { cursor: pointer; padding: 8px 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.gp-peak { border: 1.5px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.gp-peak-l { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.gp-peak-t { font-size: 17px; font-weight: 700; margin: 4px 0 6px; line-height: 1.35; }
.gp-peak p { margin: 2px 0 8px; }
.gp-deadline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 10px; font-size: 13px; }
.gp-deadline span { flex: 1 1 260px; }
.gp-extra { margin-top: 10px; font-size: 13px; }
.gp-extra .gp-label { display: inline; margin-right: 6px; }
.gp-habits { list-style: none; padding: 0; margin: 6px 0 0; }
.gp-habits li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-top: 1px solid var(--line); }
.gp-dots { letter-spacing: 2px; color: var(--series); white-space: nowrap; }
.dash-metric { margin-top: 6px; }
/* a score made of parts */
.mf-parts, .mf-scoreonly { display: none; }
.metric-fs.is-score .mf-parts { display: block; }
.metric-fs.is-score .mf-scoreonly { display: inline; }
.metric-fs.is-score .mf-single { display: none; }
.mf-part { display: grid; grid-template-columns: minmax(0, 2fr) auto 80px 70px auto 26px; gap: 6px; margin-bottom: 6px; align-items: center; }
.mf-part input, .mf-part select { min-width: 0; }
@media (max-width: 640px) { .mf-part { grid-template-columns: 1fr 1fr; } }
.gn-parts { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }
.gn-part { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.gn-part input[type=number] { width: 70px; }
.gn-part.yn { cursor: pointer; }
.gp-partbar { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.gp-partbar .bar { width: 90px; display: inline-block; }
.gp-partbar .bar span { display: block; height: 100%; }
.gn-part.yn { white-space: nowrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
.gn-part.yn input { width: auto; margin: 0; }
.gn-part.yn:has(input:checked) { border-color: var(--series); color: var(--series); }
.gn-edit { font-size: 12px; margin-left: 6px; }
.metric-edit { margin-top: 6px; }
.mf-tosc { display: block; margin: 8px 0 2px; font-size: 13px; }
.metric-fs.is-score .mf-tosc { display: none; }
.gp-track { margin: 12px 0 6px; padding: 10px 12px; border: 1px dashed var(--series); border-radius: 10px; }
.gp-track-m { margin: 4px 0; }
.gp-track-parts { margin: 4px 0 6px; padding-left: 18px; font-size: 13px; }
.gp-track-ok { color: var(--series); font-weight: 600; font-size: 13px; display: inline-block; margin-right: 6px; }
/* each part of a score on its own */
.parts-stats { list-style: none; padding: 0; margin: 6px 0 0; }
.part-stat { padding: 8px 0; border-top: 1px solid var(--line); }
.ps-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ps-week { font-weight: 700; font-variant-numeric: tabular-nums; }
.ps-week.ok { color: var(--series); } .ps-week.bad { color: #c2410c; }
.pt-up { color: var(--series); font-size: 12px; } .pt-down { color: #c2410c; font-size: 12px; }
.ps-body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.ps-stats { font-size: 12px; }
.part-spark { width: 150px; height: 30px; flex: 0 0 auto; }
.ps-line { fill: none; stroke: var(--series); stroke-width: 1.6; }
.ps-dot { fill: var(--series); }
.ps-target { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.part-dots { display: inline-flex; gap: 2px; flex: 0 0 auto; }
.part-dots i { width: 4px; height: 14px; border-radius: 2px; background: var(--line); }
.part-dots i.y { background: var(--series); }
.part-dots i.n { background: #c2410c; opacity: .75; }
.cn.moment.nolab:hover, .cn.moment.nolab.sel { z-index: 6; }
.cn-lab { overflow: hidden; }
.cn-lab .cn-top { overflow: hidden; }
/* milestones we're chasing, on Today */
.ms-goal { padding: 8px 0; border-top: 1px solid var(--line); }
.ms-goal:first-of-type { border-top: 0; }
.ms-goal-h { font-size: 13px; margin-bottom: 4px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ms-row { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
.ms-row input { margin-top: 3px; }
.ms-main { display: flex; flex-direction: column; min-width: 0; }
.ms-title { font-weight: 600; }
.ms-row.late .ms-title { color: #c2410c; }
.ms-row.done .ms-title { text-decoration: line-through; color: var(--muted); }
.ms-meta { font-size: 12px; }
.ms-then { font-size: 12px; margin: 2px 0 0 28px; }
.ms-row input[type=checkbox] { width: auto; flex: 0 0 auto; margin: 3px 0 0; }
.ms-main { flex: 1 1 auto; }
/* expanded milestones: the whole title, up to two lines */
.cn-lab.full { top: 6px; }
.cn-lab.full .cn-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.ms-due { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--panel); vertical-align: middle; }
.ms-row.today { margin: 2px -10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); box-shadow: inset 3px 0 0 var(--accent); }
.ms-row.today .ms-title { color: var(--text); }
.ms-today { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.ms-today .ms-due { align-self: flex-start; }
.ms-aim { font-size: 13px; }
.ms-aim.done { color: var(--muted); text-decoration: line-through; }
.cm-axis { z-index: 9; background: var(--panel); }  /* above every step, even selected or dragged ones, while scrolling */
