:root {
  color-scheme: light;
  --bg: #f3f2ee;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --border: #e2e0da;
  --text: #121212;
  --text-2: #52514e;
  --text-3: #75736e;
  --brand: #0f2a43;
  --brand-ink: #ffffff;
  --accent: #127a52;
  --accent-soft: #e2f4ea;
  --red: #c4302f;
  --red-soft: #fbe7e6;
  --amber: #9a6200;
  --amber-soft: #fdf1d8;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --grid: #e7e5df;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.05);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #121211;
    --surface: #1a1a19;
    --surface-2: #242422;
    --border: #2f2f2c;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --text-3: #9b9a92;
    --brand: #13324f;
    --accent: #3ddc97;
    --accent-soft: #143528;
    --red: #ff7b7a;
    --red-soft: #3a1c1c;
    --amber: #f2b84b;
    --amber-soft: #3a2d12;
    --series-1: #3987e5;
    --series-2: #d95926;
    --grid: #2b2b29;
    --shadow: none;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #121211;
  --surface: #1a1a19;
  --surface-2: #242422;
  --border: #2f2f2c;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --text-3: #9b9a92;
  --brand: #13324f;
  --accent: #3ddc97;
  --accent-soft: #143528;
  --red: #ff7b7a;
  --red-soft: #3a1c1c;
  --amber: #f2b84b;
  --amber-soft: #3a2d12;
  --series-1: #3987e5;
  --series-2: #d95926;
  --grid: #2b2b29;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.boot { padding: 40vh 16px 0; text-align: center; color: var(--text-3); }

/* Layout */
.top {
  background: var(--brand);
  color: var(--brand-ink);
  padding: calc(env(safe-area-inset-top) + 14px) 16px 14px;
}
.top-inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.top .muted { color: #b9c8d6; font-size: 13px; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
.demo-banner {
  background: var(--amber-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px;
}
.demo-banner b { color: var(--amber); }

nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
nav.tabs .inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(10, 1fr); }
nav.tabs a {
  text-decoration: none; color: var(--text-3); font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px;
}
nav.tabs a .ico { font-size: 20px; line-height: 1; }
nav.tabs a[aria-current='page'] { color: var(--accent); background: var(--accent-soft); }

/* Cards & type */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 10px; font-size: 17px; }
.card h3 { margin: 0 0 6px; font-size: 15px; }
.section-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; font-weight: 700; color: var(--text-3); margin: 22px 2px 8px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; color: var(--text-3); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row + .row { margin-top: 10px; }
.stack > * + * { margin-top: 10px; }
.right { text-align: right; }
.strong { font-weight: 700; }
.good { color: var(--accent); }
.bad { color: var(--red); }

.hero { background: var(--brand); color: #fff; border: none; }
.hero .label { color: #b9c8d6; font-size: 14px; font-weight: 600; }
.hero .big { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 4px 0 6px; }
.hero .sub { color: #dbe5ee; font-size: 15px; }
.hero .win { margin-top: 10px; display: inline-block; background: rgba(61, 220, 151, 0.16); color: #7ff0bf; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.stat .v { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.stat .k { font-size: 12px; color: var(--text-3); font-weight: 600; }
@media (max-width: 420px) { .stat .v { font-size: 17px; } .hero .big { font-size: 34px; } }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: none; padding-top: 2px; }
.list li:last-child { padding-bottom: 2px; }

.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill.green { background: var(--accent-soft); color: var(--accent); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 10px; font-size: 14px; }
.alert.red { background: var(--red-soft); }
.alert.amber { background: var(--amber-soft); }
.alert .icon { font-weight: 900; }
.alert.red .icon { color: var(--red); }
.alert.amber .icon { color: var(--amber); }
.alert.green { background: var(--accent-soft); }
.alert.green .icon { color: var(--accent); }
.alert button { margin-left: auto; }

/* Buttons & forms */
.btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 9px 14px; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer; min-height: 40px;
}
.btn:hover { background: var(--surface-2); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .btn.primary { color: #0b2418; } }
.btn.primary:hover { filter: brightness(1.05); }
.btn.big { width: 100%; padding: 14px; font-size: 17px; border-radius: 14px; }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: 13px; border-radius: 10px; }
.btn.link { border: none; background: none; color: var(--accent); padding: 4px 6px; min-height: 0; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

label.field { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 12px; }
label.field input, label.field select {
  display: block; width: 100%; margin-top: 4px; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--bg); font-size: 16px; font-weight: 500;
}
label.check { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 6px 0 12px; }
label.check input { width: 20px; height: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 14px; }
.seg button { border: none; background: transparent; padding: 10px 8px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--text-2); }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg small { display: block; font-weight: 500; font-size: 12px; color: var(--text-3); }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper input { flex: 1; text-align: center; font-size: 22px; font-weight: 800; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); min-width: 0; }
.stepper button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 22px; font-weight: 800; cursor: pointer; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chips button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.chips button[aria-pressed='true'] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* Debts */
.debt { cursor: pointer; }
.debt .name { font-weight: 700; }
.debt .meta { font-size: 13px; color: var(--text-3); }
.debt .bal { font-size: 18px; font-weight: 800; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bar.warn > span { background: var(--amber); }
.bar.bad > span { background: var(--red); }
.target { border: 2px solid var(--accent); }
.num-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 800; margin-right: 8px; flex: none; }
.target .num-badge { background: var(--accent); color: #fff; }

/* Bills */
.date-chip { flex: none; width: 46px; text-align: center; border-radius: 10px; background: var(--surface-2); padding: 4px 0; line-height: 1.1; }
.date-chip .m { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; }
.date-chip .d { font-size: 18px; font-weight: 800; }
.bill-row { display: flex; gap: 12px; align-items: center; }
.bill-row .grow { flex: 1; min-width: 0; }
.bill-row .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Drag ⠿ to put bills in your own order */
.sortable { position: relative; }
.grip { flex: none; align-self: center; width: 22px; height: 44px; margin: 0 -6px 0 -6px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text-3); font-size: 18px; line-height: 1; cursor: grab; touch-action: none; }
.grip:hover { color: var(--text); background: var(--surface-2); }
.grip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.list li.dragging { position: relative; z-index: 5; background: var(--surface); border-top-color: transparent; border-radius: 12px; box-shadow: 0 0 0 10px var(--surface), 0 12px 30px 10px rgba(0, 0, 0, 0.18); }
.list li.dragging + li { border-top-color: transparent; }
body.dragging-now, body.dragging-now * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.cancelled .nm { text-decoration: line-through; color: var(--text-3); }

/* Found money */
.find .impact { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.script { background: var(--surface-2); border-radius: 12px; padding: 12px; font-size: 14px; margin-top: 10px; white-space: pre-wrap; }

/* Chart */
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-wrap svg:focus { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.legend .key { display: inline-block; width: 18px; height: 2px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.tip {
  position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; font-size: 13px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); min-width: 150px; display: none; z-index: 5;
}
.tip .when { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 8px; }
.tip .r b { font-size: 14px; }
.tip .r span { color: var(--text-2); }
.tip .k { width: 12px; height: 2px; border-radius: 2px; flex: none; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 8px 6px; border-top: 1px solid var(--border); text-align: right; }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; }
table.tbl th { font-size: 12px; color: var(--text-3); font-weight: 700; border-top: none; }
details summary { cursor: pointer; font-weight: 700; color: var(--accent); }

/* Dialog */
dialog {
  border: none; border-radius: 20px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
dialog::backdrop { background: rgba(10, 16, 24, 0.5); }
dialog .dbody { padding: 18px; }
dialog h2 { margin: 0 0 14px; font-size: 19px; }

/* Login */
.login { max-width: 420px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12vh) 20px 40px; text-align: center; }
.login .mark { width: 76px; height: 76px; border-radius: 20px; margin-bottom: 16px; }
.login h1 { margin: 0 0 6px; font-size: 28px; }
.login p { color: var(--text-2); }
.login .card { text-align: left; margin-top: 20px; }

#toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  opacity: 0; transition: all 0.2s; pointer-events: none; z-index: 50; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loading { opacity: 0.6; transition: opacity 0.15s; }

/* ---------- Platform layout: sidebar on computers, bottom tabs on phones ---------- */
.sidebar { display: none; }
.page-title { display: none; margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top .top-connect { background: var(--accent); border-color: var(--accent); color: #fff; }
.stats.four { grid-template-columns: repeat(2, 1fr); }
.cols { display: block; }
.grid-cards { display: block; }
.side-nav .count { margin-left: auto; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
  .sidebar {
    display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh;
    background: var(--brand); color: #fff; padding: 22px 14px 18px;
  }
  .side-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; padding: 0 8px; }
  .side-logo img { width: 32px; height: 32px; border-radius: 8px; }
  .side-connect { width: 100%; justify-content: center; text-align: center; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
  .side-nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
    color: #c9d6e3; text-decoration: none; font-weight: 650; font-size: 15px;
  }
  .side-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
  .side-nav a[aria-current='page'] { background: rgba(255, 255, 255, 0.14); color: #fff; }
  .side-nav .ico { width: 20px; text-align: center; font-size: 17px; }
  .side-nav .count { background: rgba(255, 255, 255, 0.18); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; font-weight: 700; }
  .side-foot { margin-top: auto; font-size: 12px; color: #9fb3c6; padding: 0 8px; }

  nav.tabs { display: none; }
  header.top { background: transparent; color: var(--text); padding: 26px 32px 0; }
  header.top .logo, .top .top-connect { display: none; }
  .top-inner { max-width: 1200px; margin: 0; }
  .page-title { display: block; }
  main { max-width: 1200px; margin: 0; padding: 18px 32px 48px; }

  .stats.four { grid-template-columns: repeat(4, 1fr); }
  .cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; margin-bottom: 14px; }
  .grid-cards > .card { margin-bottom: 0; }
  .btn.big { width: auto; padding: 12px 20px; font-size: 16px; }
  #toast { bottom: 28px; }
}

/* Subscriptions */
.sub-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.why { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.note { border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--surface-2); }
.note.red { background: var(--red-soft); }
.note.amber { background: var(--amber-soft); }
.note.green { background: var(--accent-soft); }
ol.steps, ul.steps { margin: 10px 0 6px; padding-left: 22px; font-size: 15px; }
ol.steps li, ul.steps li { margin: 4px 0; }
dialog h3 { margin: 20px 0 8px; font-size: 15px; }
@media (max-width: 420px) { nav.tabs a { font-size: 10px; } nav.tabs a .ico { font-size: 18px; } }

/* Cancel Robot */
.robot-stack { margin-bottom: 4px; }
.robot-card { border-left: 5px solid var(--accent); }
.robot-card.attention { border-left-color: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 25%, transparent), var(--shadow); }
.robot-shot { display: block; width: 100%; max-width: 640px; border-radius: 10px; border: 1px solid var(--border); margin: 6px 0 4px; }
.robot-cta { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin: 12px 0 6px; }
.robot-cta .btn.big { width: 100%; }

/* Search (⌘K): a box in the header and a results panel */
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.1); color: inherit; font: inherit; font-size: 14px;
}
.search-btn-text, .search-kbd { display: none; }
.search-kbd { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--border); color: var(--text-3); background: var(--surface-2); }
@media (min-width: 900px) {
  .search-btn { min-width: 300px; border-color: var(--border); background: var(--surface); color: var(--text-3); box-shadow: var(--shadow); }
  .search-btn:hover { border-color: var(--text-3); }
  .search-btn-text, .search-kbd { display: inline; }
  .search-btn-text { flex: 1; text-align: left; }
}
dialog.search-dlg { width: min(680px, calc(100vw - 24px)); max-height: min(78vh, 720px); margin-top: 8vh; display: flex; flex-direction: column; overflow: hidden; }
dialog.search-dlg:not([open]) { display: none; }
.search-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.search-ico { font-size: 18px; }
.search-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 18px; padding: 6px 0; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-results { overflow-y: auto; padding: 6px 8px 12px; }
.search-group { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); padding: 12px 8px 6px; }
.search-group .tiny { text-transform: none; letter-spacing: 0; font-weight: 600; }
.search-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: none; background: none; color: inherit; font: inherit; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.search-item .grow, .search-tx .grow { flex: 1; min-width: 0; }
.search-item .nm, .search-tx .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item .tiny { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item .right { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.search-item.active { background: var(--accent-soft); }
.search-tx { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-top: 1px solid var(--border); }
.search-tx-date { flex: none; width: 74px; font-size: 13px; color: var(--text-2); }
.search-in { color: var(--accent); }
.search-sum { margin: 0 2px 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.search-note { padding: 8px 10px; font-size: 14px; color: var(--text-3); }
.search-empty { padding: 14px 10px; }
/* What you picked in Search glows for a moment */
.flash { animation: flash-glow 2.4s ease-out; border-radius: 12px; }
@keyframes flash-glow {
  0%, 35% { box-shadow: 0 0 0 3px var(--accent); background-color: var(--accent-soft); }
  100% { box-shadow: 0 0 0 3px transparent; }
}

/* Credit */
.credit-scores { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.credit-score { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); min-width: 96px; }
.credit-score b { font-size: 24px; line-height: 1.1; }
.credit-score span { font-size: 12px; opacity: 0.85; }
.score-chart { width: 100%; height: auto; display: block; margin: 4px 0 8px; }
textarea.letter-text { width: 100%; font: 14px/1.5 Georgia, serif; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); resize: vertical; }
label.btn { display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.card.drop-here { outline: 2px dashed var(--accent); outline-offset: -6px; }
/* Payoff Coach */
.coach-card textarea { width: 100%; resize: vertical; min-height: 54px; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.coach-ask { display: flex; gap: 10px; align-items: flex-end; }
.coach-ask .btn { flex: none; }
.coach-ideas { margin-top: 10px; }
.coach-ideas button { text-align: left; }
.coach-thread { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 14px; max-height: 70vh; overflow-y: auto; padding-right: 4px; }
.coach-msg.you { align-self: flex-end; max-width: 80%; }
.coach-msg.you .bubble { background: var(--brand); color: var(--brand-ink); padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.coach-msg.ai { align-self: stretch; background: var(--surface-2); border-radius: 16px 16px 16px 4px; padding: 12px 16px; }
.coach-answer { line-height: 1.55; }
.coach-answer p { margin: 0 0 10px; }
.coach-answer ul, .coach-answer ol { margin: 0 0 10px; padding-left: 20px; }
.coach-answer li { margin: 3px 0; }
.coach-answer h4 { margin: 12px 0 6px; font-size: 15px; }
.coach-answer.partial { opacity: 0.85; }
.coach-answer a.cite { font-size: 11px; vertical-align: super; text-decoration: none; margin-left: 1px; }
.md-table { border-collapse: collapse; margin: 0 0 10px; font-size: 14px; }
.md-table th, .md-table td { border: 1px solid var(--border); padding: 5px 9px; text-align: left; }
.md-table th { background: var(--surface); }
.coach-sources { margin-top: 6px; font-size: 13px; }
.coach-sources summary { cursor: pointer; color: var(--text-2); }
.coach-sources ol { margin: 6px 0 0; padding-left: 20px; }
.coach-sources li { margin: 2px 0; word-break: break-word; }
.coach-progress { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; margin-bottom: 6px; }
.coach-past { margin-top: 12px; }
.coach-past summary { cursor: pointer; }
.dot-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: coach-pulse 1s ease-in-out infinite; flex: none; }
@keyframes coach-pulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .dot-pulse { animation: none; } }
/* Income */
.inc-bars { display: flex; gap: 10px; align-items: flex-end; height: 180px; padding-top: 8px; }
.inc-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.inc-fill { width: 100%; max-width: 64px; background: var(--accent); border-radius: 8px 8px 3px 3px; }
.inc-fill.partial { opacity: 0.45; }
.inc-val { font-size: 12px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; }
.inc-mon { font-size: 12px; color: var(--text-2); margin-top: 6px; white-space: nowrap; }
