/* brady: clean, confident, a little warm. Signature: the payday strip. */
:root {
  --bg: #F3F4F0;
  --card: #FFFFFF;
  --ink: #0F1311;
  --sub: #56605A;
  --soft: #F0F2EE;
  --line: #ECEEE9;
  --edge: #DFE3DC;
  --track: #DDE1DB;
  --accent: #14A04F;
  --accent-ink: #0F7A3D;
  --accent-soft: #DCF3E4;
  --deep: #0E3B2A;
  --gold: #FFD166;
  --over: #C2361F;
  --over-soft: #FFE6DF;
  --shadow: 0 0 0 1px var(--edge);
  --r-lg: 16px;
  --r-md: 12px;
  --pad: 20px;
  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
h1, h2, h3 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.app { position: fixed; inset: 0; height: auto; display: flex; flex-direction: column; } /* fills the whole window, even after resizing */
.panes { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.pane { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(env(safe-area-inset-top) + 16px) var(--pad) 32px; }
.pane > .stack { max-width: 540px; margin: 0 auto; }
.pane-b { display: none; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.tight { gap: 8px; }

/* Inner screen of a foldable (or any wide screen): two panes. */
@media (min-width: 700px) {
  .app.split .panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .app.split .pane-b { display: block; background: #EEF0EA; }
  .app.split .pane-b .back { display: none; }
}
@media (horizontal-viewport-segments: 2) {
  .app.split .panes { grid-template-columns: env(viewport-segment-width 0 0) env(viewport-segment-width 1 0); column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); }
}
/* Outer (small) screen. */
@media (max-width: 360px) {
  :root { --pad: 16px; }
  .hero-num { font-size: 56px !important; }
}

/* ---------- Nav ---------- */
.nav { flex-shrink: 0; display: flex; justify-content: space-around; background: var(--bg); border-top: 1px solid var(--edge); padding: 8px 8px calc(env(safe-area-inset-bottom) + 6px); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; min-height: 48px; padding-top: 4px; font-size: 11px; font-weight: 500; color: var(--sub); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav svg { width: 23px; height: 23px; }

/* ---------- Brand + top bar ---------- */
.top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.logo { display: flex; align-items: flex-end; gap: 3px; height: 30px; text-decoration: none; color: var(--ink); }
.logo i { width: 6px; border-radius: 3px; background: var(--ink); display: block; }
.logo i:nth-child(1) { height: 12px; } .logo i:nth-child(2) { height: 20px; } .logo i:nth-child(3) { height: 30px; background: var(--accent); }
.logo span { font-family: var(--display); font-size: 29px; font-weight: 600; letter-spacing: -0.5px; margin-left: 8px; line-height: 30px; }
.top-right { display: flex; align-items: center; gap: 6px; }
.sync { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--sub); border: 0; background: none; min-height: 44px; padding: 0 6px; }
.sync .dot { width: 7px; height: 7px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.badge { font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: 8px; background: #FFF1CC; color: #6B4E00; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--card); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); flex-shrink: 0; color: var(--ink); text-decoration: none; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.ghost { background: none; box-shadow: none; }

/* ---------- Type ---------- */
.title { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -0.9px; line-height: 1.05; }
.h2 { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.3px; }
.label { font-size: 14px; font-weight: 500; color: var(--sub); }
.muted { color: var(--sub); }
.small { font-size: 13px; line-height: 1.5; }
.over { color: var(--over) !important; }
.good { color: var(--accent-ink) !important; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.link { font-size: 14px; font-weight: 600; text-decoration: none; background: none; border: 0; color: var(--accent-ink); min-height: 44px; display: inline-flex; align-items: center; padding: 0; }

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.hero-num { font-family: var(--display); font-size: 68px; font-weight: 600; letter-spacing: -2.6px; line-height: 1; }
.hero-num .cents { font-size: 0.42em; letter-spacing: -0.5px; color: var(--sub); margin-left: 2px; }
.hero-note { font-size: 15px; line-height: 1.45; color: #2A302C; margin-top: 6px; }
.info { width: 32px; height: 32px; border: 0; background: none; color: var(--sub); display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; padding: 0; margin: -6px -4px -6px 0; }
.info svg { width: 16px; height: 16px; }

/* Signature payday strip */
.strip { display: flex; flex-direction: column; gap: 8px; }
.strip-bars { display: grid; gap: 4px; align-items: end; height: 34px; }
.strip-bars i { height: 22px; border-radius: 5px; background: var(--track); display: block; }
.strip-bars i.past { background: var(--ink); }
.strip-bars i.now { height: 34px; background: var(--accent); }
.strip-bars i.pay { box-shadow: inset 0 0 0 2px var(--accent); }
.strip-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); font-weight: 500; }
.strip-labels b { color: var(--ink); font-weight: 600; }

/* ---------- Cards and rows ---------- */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.list { padding: 4px 16px; display: flex; flex-direction: column; }
.list .head { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 6px; gap: 10px; }
.count { font-size: 12px; font-weight: 500; color: var(--sub); background: var(--soft); padding: 5px 9px; border-radius: 8px; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-height: 60px; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; color: inherit; text-decoration: none; }
.row:last-child { border-bottom: 0; }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .t { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 13px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .v { font-size: 15px; font-weight: 600; white-space: nowrap; }
.row .v.in { color: var(--accent-ink); }
.row .actions { display: flex; gap: 6px; flex-shrink: 0; }
.dot-ic { width: 36px; height: 36px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-weight: 700; font-size: 15px; }
.dot-ic svg { width: 17px; height: 17px; }
.dot-ic.lg { width: 52px; height: 52px; border-radius: 26px; }
.dot-ic.lg svg { width: 24px; height: 24px; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #E8EAFD; color: #3D3DB8; margin-left: 6px; vertical-align: 1px; }

.pill-btn { height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--soft); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; text-decoration: none; line-height: 1; }
.pill-btn.primary { background: var(--ink); color: #fff; }
.pill-btn.green { background: var(--accent); color: #fff; }

.caught-up { display: flex; align-items: center; gap: 12px; padding: 16px 0 14px; }

/* Money in split */
.split-bar { display: flex; gap: 6px; }
.split-bar > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.split-bar i { height: 8px; border-radius: 4px; display: block; }
.split-bar span { font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-bar b { color: var(--ink); }

.bar { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar.over > i { background: var(--over); }
.b-row .main { gap: 7px; }
.b-row .top2 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat span { font-size: 12px; color: var(--sub); font-weight: 600; }
.stat b { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weeks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; height: 110px; }
.week { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week i { width: 100%; max-width: 34px; border-radius: 6px; background: var(--ink); display: block; min-height: 4px; }
.week i.now { background: var(--accent); }
.week i.future { background: var(--track); }
.week span { font-size: 11px; color: var(--sub); font-weight: 600; }

.deep { background: var(--deep); color: #fff; border-radius: var(--r-lg); box-shadow: 0 0 0 1px #0A2E20; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.deep .lbl { font-size: 12px; font-weight: 500; color: #B9D6C6; }
.deep .num { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -0.8px; }
.deep .chip-d { font-size: 12px; font-weight: 500; background: rgba(255,255,255,0.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); padding: 6px 10px; border-radius: 8px; white-space: nowrap; }

/* Filters, search, forms */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)); padding-inline: var(--pad); scroll-padding-inline: var(--pad); -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--pad), #000 calc(100% - 48px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 var(--pad), #000 calc(100% - 48px), transparent 100%); }
.chips::after { content: ''; flex: 0 0 24px; }
.chip { flex-shrink: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; border: 0; background: var(--card); box-shadow: var(--shadow); border-radius: 10px; padding: 0 14px; height: 40px; font-size: 13px; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.chip .n { opacity: 0.6; margin-left: 4px; }
.search { width: 100%; border: 0; background: var(--card); box-shadow: var(--shadow); border-radius: 12px; padding: 0 16px; height: 48px; font-size: 16px; }
.day { font-size: 12px; font-weight: 600; color: var(--sub); text-transform: uppercase; letter-spacing: 0.6px; margin: 4px 4px -10px; }
.btn { min-height: 52px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font-size: 16px; font-weight: 600; width: 100%; padding: 0 20px; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.secondary { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn.green { background: var(--accent); }
.btn:disabled { opacity: 0.45; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lab { font-size: 13px; font-weight: 600; color: var(--sub); }
.input { border: 0; background: var(--soft); border-radius: 10px; padding: 0 14px; height: 48px; font-size: 16px; width: 100%; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2356605A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
:root[data-theme="dark"] select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23AEB6B0' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.amt-input { width: 112px; border: 0; background: var(--soft); border-radius: 10px; padding: 0 14px; height: 40px; font-size: 16px; font-weight: 700; text-align: right; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--soft); font-size: 14px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.grid-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid-cats button { border: 0; background: var(--soft); border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; min-height: 76px; }
.grid-cats button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.grid-cats .dot-ic { width: 32px; height: 32px; }
.grid-cats .dot-ic svg { width: 16px; height: 16px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.steps { flex: 1; display: flex; align-items: flex-end; gap: 5px; height: 22px; }
.steps i { flex: 1; border-radius: 5px; background: var(--track); display: block; }
.steps i:nth-child(1) { height: 10px; } .steps i:nth-child(2) { height: 16px; } .steps i:nth-child(3) { height: 22px; }
.steps i.done { background: var(--ink); } .steps i.on { background: var(--accent); }
.option { display: flex; align-items: center; gap: 14px; padding: 16px; border: 0; width: 100%; text-align: left; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); color: inherit; }
.option .main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.option .t { font-size: 16px; font-weight: 600; }
.option .s { font-size: 13px; color: var(--sub); line-height: 1.4; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.preview-table td:last-child { text-align: right; font-weight: 700; }

/* Sheet, toast, loading */
.sheet-bg { position: fixed; inset: 0; background: rgba(15, 19, 17, 0.35); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px var(--pad) calc(env(safe-area-inset-bottom) + 20px); display: flex; flex-direction: column; gap: 14px; }
.sheet .grab { width: 48px; height: 5px; border-radius: 3px; background: var(--track); margin: -6px auto 2px; position: relative; cursor: grab; touch-action: none; }
.sheet .grab::before { content: ''; position: absolute; inset: -18px -120px; }
.sheet { transition: transform .22s ease; }
.sheet.dragging { transition: none; cursor: grabbing; user-select: none; }
.sheet > .h2:first-of-type { cursor: grab; touch-action: none; }
.sheet p { margin: 0; font-size: 15px; line-height: 1.55; color: #3A413C; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; } }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 86px); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 30; max-width: 90vw; text-align: center; }
.center { min-height: 70dvh; display: flex; flex-direction: column; justify-content: center; gap: 18px; max-width: 420px; margin: 0 auto; }
.skeleton { height: 120px; border-radius: var(--r-lg); background: linear-gradient(90deg, #E9ECE6, #F6F7F3, #E9ECE6); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
.fine { font-size: 11px; color: var(--sub); text-align: center; margin: 4px 0 0; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.spin svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
select.pill-btn { appearance: none; -webkit-appearance: none; padding-right: 30px; max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2356605A' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
select.pill-btn.primary { background-color: var(--ink); background-repeat: no-repeat; background-position: right 12px center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

[hidden] { display: none !important; }

/* Select mode in Activity */
.sel-box { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px #B9BFB7; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--card); }
.row[aria-pressed="true"] .sel-box { background: var(--ink); box-shadow: none; color: #fff; }
.sel-box svg { width: 14px; height: 14px; }
.bulk-bar { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 62px); z-index: 15; padding: 12px var(--pad); background: var(--bg); backdrop-filter: blur(12px); border-top: 1px solid var(--edge); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; max-width: 560px; margin: 0 auto; }
.bulk-bar select { width: 100%; height: 44px; }
.bulk-bar .top-line { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.pane.has-bulk { padding-bottom: 150px; }
.bulk-bar .n { font-size: 14px; font-weight: 600; }

/* Swipeable top numbers */
.metrics { display: flex; flex-direction: column; gap: 10px; margin: 0 calc(-1 * var(--pad)); }
.metrics-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.metrics-track::-webkit-scrollbar { display: none; }
.metric { flex: 0 0 100%; scroll-snap-align: start; padding: 4px var(--pad) 0; box-sizing: border-box; min-width: 0; }
.metric-dots { display: flex; gap: 6px; padding: 0 var(--pad); }
.metric-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--track); position: relative; }
.metric-dots button::after { content: ''; position: absolute; inset: -10px -4px; }
.metric-dots button[aria-current="true"] { width: 18px; background: var(--ink); }

/* ---------- Ask brady ---------- */
.bubble { max-width: 88%; padding: 12px 14px; border-radius: 14px; font-size: 15px; line-height: 1.5; }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin: 0; }
.bubble ul { margin: 4px 0 8px; padding-left: 18px; }
.bubble.user { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.bubble.assistant { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.ask-bar { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0 4px; background: var(--bg); }
.nav a.nav-ask svg { color: var(--accent); }

/* ---------- Alerts ---------- */
.bell { position: relative; }
.badge-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 4px; background: var(--over); box-shadow: 0 0 0 2px var(--bg); }
.unread-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--accent); margin-top: 7px; flex-shrink: 0; }

/* ---------- Trends bars ---------- */
.tbars { display: flex; gap: 6px; align-items: flex-end; height: 150px; }
.tbar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.tbar i { width: 100%; max-width: 28px; border-radius: 5px 5px 2px 2px; display: block; }
.tbar span { font-size: 10px; color: var(--sub); white-space: nowrap; }
.tbar .tv { font-size: 9px; }

/* ---------- Focus + view-only ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app.viewer [data-action="upload"], .app.viewer [data-action="add-cash"], .app.viewer [data-action="toggle-select"] { display: none; }

/* ---------- Dark mode ---------- */
:root[data-theme="dark"] {
  --bg: #0C0F0D; --card: #151A17; --ink: #EEF2EF; --sub: #9BA59F; --soft: #1E2521; --line: #222A25; --edge: #27302B; --track: #2C3530;
  --accent: #22B862; --accent-ink: #4ADE80; --accent-soft: #123323; --deep: #0F3A29; --over: #FF7A62; --over-soft: #3A1C15;
  color-scheme: dark;
}
:root[data-theme="dark"] .hero-note { color: #C9D1CC; }
:root[data-theme="dark"] .sheet p { color: #C9D1CC; }
:root[data-theme="dark"] .badge { background: #3A3016; color: #F5D98A; }
:root[data-theme="dark"] .tag { background: #23234A; color: #B8B8FF; }
:root[data-theme="dark"] .btn { background: var(--ink); color: #0C0F0D; }
:root[data-theme="dark"] .btn.green { background: var(--accent); color: #04140A; }
:root[data-theme="dark"] .btn.secondary { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .pill-btn.primary, :root[data-theme="dark"] .chip[aria-pressed="true"], :root[data-theme="dark"] .seg button[aria-pressed="true"], :root[data-theme="dark"] .grid-cats button[aria-pressed="true"], :root[data-theme="dark"] .row[aria-pressed="true"] .sel-box { background: var(--ink); color: #0C0F0D; }
:root[data-theme="dark"] .strip-bars i.past, :root[data-theme="dark"] .logo i { background: var(--ink); }
:root[data-theme="dark"] .logo i:nth-child(3) { background: var(--accent); }
:root[data-theme="dark"] .bulk-bar, :root[data-theme="dark"] .ask-bar, :root[data-theme="dark"] .nav { background: var(--bg); }
:root[data-theme="dark"] .toast { background: var(--ink); color: #0C0F0D; }
:root[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #161B18, #1E2421, #161B18); background-size: 200% 100%; }
:root[data-theme="dark"] .app.split .pane-b { background: #101411; }
:root[data-theme="dark"] select.pill-btn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239BA59F' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

/* ---------- Check-in ---------- */
.ck-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; }
.ck-card .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ck-card .t { font-size: 15px; font-weight: 600; }
.ck-card .s { font-size: 13px; color: var(--sub); }
.ck-card .pill-btn { display: inline-flex; align-items: center; }
.ck-card .chev { width: 18px; height: 18px; transform: rotate(180deg); color: var(--sub); }
.ck-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.ck-steps i { height: 5px; border-radius: 3px; background: var(--track); display: block; }
.ck-steps i.done { background: var(--ink); } .ck-steps i.on { background: var(--accent); }
.ck-need .row { border: 0; padding: 16px 0; }
.ck-need .t { font-size: 17px !important; font-weight: 600 !important; }
.icon-btn.back { background: none; box-shadow: none; margin-left: -12px; }
.sub-head { margin-bottom: -6px; }

/* ---------- Shortcuts ---------- */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tools.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool { background: var(--card); box-shadow: var(--shadow); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; min-width: 0; min-height: 92px; }
.tool-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--soft); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; color: var(--ink); }
.tool-ic svg { width: 16px; height: 16px; }
.tool .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool .s { font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Packages ---------- */
.pkg { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.pkg-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pkg-head .main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pkg-head .t { font-size: 15px; font-weight: 600; }
.pkg-head .s { font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkg-status { font-size: 13px; font-weight: 600; white-space: nowrap; }
.pkg-when { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.4px; }
.pkg-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pkg-bar i { height: 6px; border-radius: 3px; background: var(--track); display: block; }
.pkg-bar i.on { background: var(--ink); }
.pkg-bar i.on:last-of-type, .pkg-bar i.on + i:not(.on) { }
.pkg-bar.late i.on { background: var(--over); }
.pkg-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 11px; color: var(--sub); margin-top: -4px; }
.pkg-items { display: flex; flex-wrap: wrap; gap: 6px; }
.pkg-items span { font-size: 12px; font-weight: 500; background: var(--soft); padding: 5px 9px; border-radius: 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pkg .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pkg .actions a { display: inline-flex; align-items: center; text-decoration: none; }

/* ---------- Receipts ---------- */
.rc-thumb { width: 36px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow); background: var(--soft); }
.rc-full { width: 100%; max-height: 50dvh; object-fit: contain; border-radius: 12px; background: var(--soft); display: block; }

/* ---------- Cash flow chart ---------- */
.flow svg { width: 100%; height: 170px; display: block; overflow: visible; }
.flow-x { position: relative; height: 16px; margin-top: 6px; }
.flow-x span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--sub); white-space: nowrap; }
.flow-x span:first-child { transform: none; } .flow-x span:last-child { transform: translateX(-100%); }

/* ---------- Nav extras (laptop sidebar) ---------- */
.nav .nav-x { display: none; }
.nav a { position: relative; }
.nav-dot { position: absolute; top: 4px; right: 18px; width: 7px; height: 7px; border-radius: 4px; background: var(--accent); }

/* ---------- Laptop: sidebar + two panes ---------- */
@media (min-width: 1100px) {
  .app.big { flex-direction: row-reverse; }
  .app.big .panes { flex: 1; min-width: 0; }
  .app.big.split .panes { grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); }
  .app.big .pane > .stack { max-width: 640px; }
  .app.big .pane-a { padding-top: 28px; padding-inline: 40px; }
  .app.big .pane-b { padding-top: 28px; padding-inline: 28px; border-left: 1px solid var(--edge); }
  .app.big .nav { flex-direction: column; justify-content: flex-start; width: 232px; flex-shrink: 0; border-top: 0; border-right: 1px solid var(--edge); padding: 24px 12px; gap: 2px; overflow-y: auto; }
  .app.big .nav .nav-x { display: flex; }
  .app.big .nav a { flex-direction: row; align-items: center; gap: 12px; min-height: 40px; min-width: 0; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 500; }
  .app.big .nav a:hover { background: var(--soft); color: var(--ink); }
  .app.big .nav a[aria-current="page"] { background: var(--card); box-shadow: var(--shadow); }
  .app.big .nav svg { width: 18px; height: 18px; }
  .app.big .nav .logo { padding: 0 12px 22px; min-height: 0; height: auto; align-items: flex-end; }
  .app.big .nav .logo:hover { background: none; }
  .app.big .nav .logo span { font-size: 29px; }
  .app.big .nav hr { border: 0; border-top: 1px solid var(--edge); margin: 10px 12px; width: auto; }
  .app.big .nav-dot { position: static; margin-left: auto; }
  .app.big .top .logo { visibility: hidden; }
  .app.big .bulk-bar { left: 232px; max-width: none; bottom: 0; }
  .toast { bottom: 32px; }
}
:root[data-theme="dark"] .app.big .nav a[aria-current="page"] { background: var(--card); }
@media (min-width: 1100px) {
  .app.big .nav a.logo { gap: 3px; height: 50px; min-height: 50px; padding: 0 12px 20px; align-items: flex-end; }
  .app.big .nav .logo i:nth-child(1) { height: 9px; } .app.big .nav .logo i:nth-child(2) { height: 15px; } .app.big .nav .logo i:nth-child(3) { height: 22px; }
  .app.big .nav .logo span { margin-left: 7px; line-height: 22px; color: var(--ink); font-weight: 600; }
}

/* ---------- Make my budget ---------- */
.plan-flow .row-head { font-size: 15px; min-height: 26px; }
.plan-room { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-weight: 600; }
.plan-room b { font-family: var(--display); font-size: 22px; }
.plan-in { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.plan-in .amt-input { width: 96px; }
.mini { display: flex; gap: 3px; align-items: flex-end; height: 22px; margin-top: 4px; }
.mini i { width: 10px; border-radius: 2px; background: var(--track); display: block; }
.mini i:last-child { background: var(--sub); }
.grid-cats [data-new-cat] { color: var(--ink); }

/* ---------- Spending snapshot (donut) ---------- */
.snap { display: flex; flex-direction: column; gap: 14px; }
.seg-sm button { height: 32px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.snap-body { display: flex; align-items: center; gap: 18px; }
.donut { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; pointer-events: none; }
.donut-mid span { font-size: 11px; color: var(--sub); font-weight: 500; }
.donut-mid b { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }
.snap-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.snap-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; min-height: 30px; text-decoration: none; color: inherit; font-size: 13px; }
.snap-row i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.snap-row .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.snap-row .p { color: var(--sub); font-size: 12px; }
.snap-row .v { font-weight: 600; min-width: 52px; text-align: right; }
@media (max-width: 520px) { .snap-body { flex-direction: column; align-items: stretch; gap: 12px; } .donut { align-self: center; width: 170px; height: 170px; } .snap-legend { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; } .snap-row .p { display: none; } }

/* ---------- Bill calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { text-align: center; font-size: 11px; font-weight: 600; color: var(--sub); padding-bottom: 4px; }
.cal-d { aspect-ratio: 1 / 1.05; border: 0; background: none; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; min-height: 40px; }
.cal-d:hover { background: var(--soft); }
.cal-d.past { color: var(--sub); }
.cal-d.today span { background: var(--ink); color: var(--card); border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.cal-d.sel { background: var(--accent-soft); }
.cal-d i { display: flex; gap: 3px; height: 6px; }
.cal-d i b { width: 6px; height: 6px; border-radius: 3px; display: block; }
.cal-key { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--sub); }
.cal-key b { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 5px; vertical-align: 0; }
.icon-btn[disabled] { opacity: 0.35; cursor: default; }
.tools.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.icon-btn.sm { width: 34px; height: 34px; min-width: 34px; background: none; box-shadow: none; color: var(--sub); flex-shrink: 0; } .icon-btn.sm svg { width: 16px; height: 16px; }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--sub); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--edge); }
.sub-acct { display: flex; align-items: center; gap: 4px; font-size: 12px !important; } .sub-acct svg { flex-shrink: 0; opacity: 0.7; }

/* ---------- Wins ---------- */
.win-img { aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--soft); }
.win-img img { width: 100%; height: 100%; display: block; object-fit: cover; }
@media (min-width: 700px) { .win-img { max-width: 360px; } }
.code-pill { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 18px; font-weight: 600; letter-spacing: 1px; background: var(--soft); padding: 10px 14px; border-radius: 10px; flex: 1; text-align: center; }
.inc-row { align-items: center; }
.inc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 2px; }
.chip-s { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 7px; background: var(--soft); color: var(--ink); }
.chip-s.on { background: var(--accent-soft); color: var(--accent-ink); }
.xfer { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.xfer > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.xfer > div span { color: var(--sub); font-size: 13px; }
.xfer-tag { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: var(--accent); color: #fff; }
.nw-why { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nw-why li { display: flex; gap: 12px; align-items: baseline; font-size: 14px; line-height: 1.4; }
.nw-amt { flex-shrink: 0; min-width: 72px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nw-amt.up { color: var(--accent); } .nw-amt.down { color: var(--over); }
.nw-chip { align-self: flex-start; border: 0; font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--ink); cursor: pointer; margin: 2px 0 6px; }
.nw-chip.up { background: var(--accent-soft); color: var(--accent-ink); } .nw-chip.down { background: var(--over-soft); color: var(--over); }
.nw-chip u { margin-left: 6px; font-weight: 500; }
button.chip-s { border: 0; font: inherit; font-size: 13px; font-weight: 600; padding: 6px 11px; cursor: pointer; }
/* Rows with buttons: let the name and note use the full width, and drop the buttons to the next line when needed */
.row[style*="flex-wrap:wrap"] > .main { flex: 1 1 180px; min-width: 0; }
.row[style*="flex-wrap:wrap"] > .main .t, .row[style*="flex-wrap:wrap"] > .main .s { white-space: normal; overflow: visible; text-overflow: clip; }
:root[data-theme="dark"] .dot-ic.on-light { color: #0C0F0D; }

.sub-hist-wrap { padding: 0 16px 14px 64px; }
.sub-hist-row { display: grid; grid-template-columns: 1fr auto 72px; gap: 10px; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sub-hist-row span:nth-child(2), .sub-hist-row span:nth-child(3) { text-align: right; }

.sub-receipt { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--sub); padding: 0 0 6px 10px; border-left: 2px solid var(--line); margin: 0 0 4px; }

.ac-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.ac-row { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: baseline; }
.ac-name { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-cell { display: flex; flex-direction: column; align-items: flex-end; min-width: 72px; }
.ac-l { font-size: 11px; color: var(--sub); text-transform: uppercase; letter-spacing: .04em; }
.ac-v { font-family: var(--display); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }

.toast { display: flex; align-items: center; gap: 14px; }
.toast-act { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; padding: 4px 2px; cursor: pointer; }

.cat-suggest { display: flex; flex-direction: column; margin-top: 6px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.cs-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; border-bottom: 1px solid var(--line); }
.cs-row:last-child { border-bottom: 0; }
button.cs-row:hover, button.cs-row:focus-visible { background: var(--soft); }
.cs-row.warn { color: var(--over); font-size: 14px; }
.cs-row.muted { color: var(--sub); font-size: 14px; }
[data-glist] .row[aria-pressed="true"] { background: var(--soft); border-radius: 10px; }

.ac-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.ac-sum .ac-cell { align-items: flex-start; min-width: 0; }
.ac-sum .ac-net { margin-left: auto; align-items: flex-end; }
.ac-row3 { grid-template-columns: 1fr auto auto auto; gap: 14px; }
@media (max-width: 380px) { .ac-row3 { gap: 8px; } .ac-row3 .ac-cell { min-width: 58px; } }
.ac-headrow { margin-bottom: -6px; } .ac-headrow .ac-l { text-align: right; min-width: 72px; }
.ac-row3 .ac-cell .ac-l:empty { display: none; }

.plan-whats { margin: -4px 0 8px 56px; font-size: 14px; }
.plan-whats summary { cursor: pointer; color: var(--sub); font-weight: 600; padding: 4px 0; list-style: none; }
.plan-whats summary::-webkit-details-marker { display: none; }
.plan-whats summary::before { content: '›'; display: inline-block; margin-right: 6px; transition: transform .15s; }
.plan-whats[open] summary::before { transform: rotate(90deg); }
.pw-h { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--sub); margin: 8px 0 2px; }
.pw-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pw-row:last-child { border-bottom: 0; }
.pw-odd { align-items: center; flex-wrap: wrap; }
.pw-act { display: flex; gap: 6px; }
.pw-act .pill-btn { height: 34px; font-size: 13px; }

.cal2 { padding: 0; overflow: hidden; }
.cal2-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--soft); border-bottom: 1px solid var(--line); }
.cal2-head span { text-align: center; font-size: 12px; font-weight: 600; color: var(--sub); padding: 10px 0; text-transform: uppercase; letter-spacing: .04em; }
.cal2-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal2-day { min-height: 74px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 6px; cursor: pointer; text-align: left; }
.cal2-day:nth-child(7n) { border-right: 0; }
.cal2-day.empty { cursor: default; }
.cal2-day .n { font-size: 13px; font-weight: 600; line-height: 22px; min-width: 22px; text-align: center; border-radius: 50%; }
.cal2-day.past .n { color: var(--sub); }
.cal2-day.today .n { background: var(--ink); color: var(--bg); }
.cal2-day.sel { background: var(--soft); }
.cal2-day .amt { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.cal2-day .amt.in { color: var(--accent); }
.cal2-day .amt.out { color: #D9472B; }
.cal2-day .amt.exp { opacity: .55; }
.cal2 .cal-key { padding: 10px 14px; border-top: 1px solid var(--line); }
@media (max-width: 400px) { .cal2-day { min-height: 62px; padding: 4px 3px; } .cal2-day .amt { font-size: 10px; } }
textarea.input { font-family: inherit; font-size: 16px; line-height: 1.4; }

/* Buttons sitting on a soft gray box need their own fill and edge, or they blend in and stop looking like buttons. */
[style*="background:var(--soft)"] .pill-btn:not(.primary):not(.green),
[style*="background: var(--soft)"] .pill-btn:not(.primary):not(.green) { background: var(--card); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 22%, transparent); }

/* Make my budget: each category and its "See what's in it" sit together, with one line under both. */
.plan-block { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.plan-block:last-child { border-bottom: 0; }
.plan-block .row { border-bottom: 0; padding-bottom: 4px; }
.plan-block .plan-whats { margin: 0 0 6px 56px; }

/* Pay-what-works slider */
.price-slide .price-big { font-family: var(--display, inherit); font-weight: 600; font-size: 40px; letter-spacing: -0.03em; line-height: 1; }
.price-slide .price-big small { font-size: 16px; font-weight: 500; color: var(--sub, #4F5852); letter-spacing: 0; }
.price-slide input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: linear-gradient(to right, #14A04F 0%, #14A04F var(--fill, 28.6%), #DDE1DB var(--fill, 28.6%)); cursor: pointer; margin: 12px 0 2px; }
.price-slide input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid #14A04F; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.price-slide input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid #14A04F; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.price-slide .ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--sub, #4F5852); }

/* Ask box: wraps onto new lines as you type */
.ask-bar { align-items: flex-end; }
.ask-box { flex: 1; min-height: 48px; max-height: 180px; resize: none; overflow-y: auto; line-height: 1.4; padding-top: 13px; padding-bottom: 13px; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Cash flow: picked-day card */
.cf-hint { font-size: 12px; color: var(--sub); text-align: center; margin-top: -4px; }
.cf-day { background: var(--soft); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
.cf-day-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cf-day-top > div { display: grid; gap: 4px; }
.cf-tag { justify-self: start; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--sub); }
.cf-tag.low { color: #C2610F; }
.cf-date { font-size: 17px; font-weight: 600; }
.cf-bal { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.cf-none { font-size: 14px; color: var(--sub); }
.cf-evs { display: grid; gap: 6px; border-top: 1px solid var(--edge); padding-top: 8px; }
.cf-ev { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.cf-ev b { font-weight: 600; white-space: nowrap; }

/* Small dropdown, e.g. "Where it goes" range */
.pick-sm { appearance: none; -webkit-appearance: none; height: 40px; border: 0; border-radius: 10px; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2356605A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; padding: 0 34px 0 14px; cursor: pointer; max-width: 60%; }
.months-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.months-grid .input { padding: 0 10px; }
@media (max-width: 380px) { .months-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Ask brady to explain */
.ask-pill { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border-radius: 999px; border: 0; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; vertical-align: middle; }
.ask-pill:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.actions .ask-pill { height: 36px; }
.label .ask-pill { margin-left: 6px; }
:root[data-theme="dark"] .ask-pill { color: #7FD6A0; }
.ask-fu { display: grid; gap: 10px; background: var(--soft); border-radius: 14px; padding: 14px; }
.ask-fu .lab { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); }
:root[data-theme="dark"] .ask-fu .lab { color: #7FD6A0; }
.ask-fu .input { flex: 1; min-width: 0; background: var(--card); }
.ask-about-tag { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--sub); background: var(--soft); padding: 5px 10px; border-radius: 999px; }
.ask-fu .inc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-fu .chip-s { background: var(--card); box-shadow: inset 0 0 0 1px var(--edge); color: var(--ink); border: 0; border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
/* Two buttons side by side on wide screens, stacked on phones */
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .btn-pair { grid-template-columns: 1fr; } }
.snap > .row-head { flex-wrap: wrap; gap: 10px; }
.snap > .row-head .h2 { white-space: nowrap; }
@media (max-width: 520px) { .snap > .row-head > .row-head { width: 100%; justify-content: space-between; } .snap .pick-sm { max-width: none; } }

/* Small phones: action buttons wrap to a new line instead of pushing the page sideways */
.row .main .actions { flex-wrap: wrap; flex-shrink: 1; }
.pane { overflow-x: hidden; }
@media (max-width: 400px) {
  .row .main .actions .pill-btn, .row .main .actions .ask-pill { height: 38px; padding: 0 13px; font-size: 14px; }
}
.top { gap: 8px; min-width: 0; }
.top > * { min-width: 0; }
@media (max-width: 360px) {
  .top { flex-wrap: wrap; }
  .top-right { gap: 2px; }
  .top-right .icon-btn { width: 38px; height: 38px; }
  .top-right .badge { font-size: 12px; padding: 4px 8px; }
  .title { font-size: 28px; }
}

/* Ask page: a few short ideas, question box pinned to the bottom */
.ask-page { min-height: 100%; }
.ask-page .ask-spacer { flex: 1; }
.ask-page .ask-bar { position: sticky; bottom: -32px; background: var(--bg); padding: 10px 0 0; margin-bottom: -6px; z-index: 2; }
.ask-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-ideas .chip-s { background: var(--card); box-shadow: inset 0 0 0 1px var(--edge); color: var(--ink); border: 0; border-radius: 999px; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; }
.ask-ideas .chip-s:hover { box-shadow: inset 0 0 0 1px var(--sub); }

/* What if */
.scen-card { gap: 10px; }
.scen-verdict { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.scen-verdict.good { color: var(--ink); }
.scen-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.scen-lines li { font-size: 15px; line-height: 1.4; color: var(--sub); padding-left: 16px; position: relative; }
.scen-lines li::before { content: ''; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--sub); opacity: .6; }
.scen-lines b { color: var(--ink); font-weight: 600; }
.scen-verdict.over { color: var(--over); }
.scen-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.scen-stats > div { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.scen-stats span { font-size: 12px; color: var(--sub); }
.scen-stats b { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.scen-chart { width: 100%; height: auto; max-height: 260px; display: block; margin-top: 6px; overflow: visible; }
.scen-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); margin-top: -2px; }
.scen-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--sub); }
.scen-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.scen-change { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 12px; padding: 4px 4px 4px 12px; }
.scen-change .link { font-size: 14.5px; color: var(--ink); font-weight: 500; }
.scen-change .icon-btn { width: 36px; height: 36px; }
.whatif-chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--accent-ink) !important; }
@media (max-width: 380px) { .scen-stats b { font-size: 15px; } }

.bulk-owners { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.bulk-owners .pill-btn { height: 40px; }
.quiet-link { font-size: 13px; color: var(--sub); align-self: flex-start; margin-top: 6px; min-height: 28px; font-weight: 500; }

.sec-note { display: flex; gap: 10px; align-items: flex-start; background: #14A04F14; border: 1px solid #14A04F33; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.sec-note svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.sec-note b { font-weight: 650; }

.admin-stats b { font-size: 20px; }
.admin-stats small { display: block; font-size: 11.5px; line-height: 1.3; }

.hist { display: flex; align-items: flex-end; gap: 8px; min-height: 104px; }
.hist-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.hist-col b { font-size: 12px; font-weight: 600; white-space: nowrap; }
.hist-col i { display: block; width: 100%; max-width: 40px; border-radius: 6px 6px 3px 3px; background: var(--accent); }
.hist-col i.so-far { background: repeating-linear-gradient(45deg, var(--accent), var(--accent) 4px, #14A04F88 4px, #14A04F88 8px); }
.hist-col span { font-size: 11.5px; color: var(--sub); white-space: nowrap; }

.upd-note { display: flex; align-items: flex-start; gap: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--edge), 0 6px 20px rgba(0,0,0,.08); border-radius: 16px; padding: 12px 10px 12px 14px; margin: 0 0 14px; font-size: 14px; line-height: 1.45; animation: updIn .35s ease; }
.upd-note > svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.upd-note div { flex: 1; }
.upd-note .icon-btn { width: 32px; height: 32px; flex-shrink: 0; }
.upd-note.now { background: #FFF1CC; color: #5C4300; box-shadow: 0 0 0 1px #F1DFA8; }
.upd-note.now > svg { color: #8A6A00; }
@keyframes updIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .upd-note { animation: none; } }

.chart-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; display: grid; gap: 1px; max-width: 240px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.chart-tip b { font-weight: 650; }
.chart-tip span { opacity: .85; }
.scen-chart .hit .hd, .scen-chart .hit .hl { opacity: 0; transition: opacity .12s; }
.scen-chart .hit:hover .hd, .scen-chart .hit:hover .hl, .scen-chart .hit.tip-on .hd, .scen-chart .hit.tip-on .hl { opacity: 1; }
.scen-chart .hit { cursor: crosshair; }
.tbar { cursor: default; } .tbar.tip-on i, .tbar:hover i { filter: brightness(1.15); outline: 2px solid var(--accent); outline-offset: 1px; }
.hist-col.tip-on i, .hist-col:hover i { outline: 2px solid var(--ink); outline-offset: 1px; }
.dn-arc { transition: stroke-width .12s; } .dn-arc:hover, .dn-arc.tip-on { stroke-width: 32; }

.fix-box { display: grid; gap: 8px; background: #14A04F12; border: 1px solid #14A04F40; border-radius: 14px; padding: 12px; }
.fix { text-align: left; display: grid; gap: 2px; background: var(--card); border: 0; border-radius: 12px; padding: 10px 12px; box-shadow: 0 0 0 1px var(--edge); cursor: pointer; font: inherit; color: var(--ink); }
.fix:hover { box-shadow: 0 0 0 2px var(--accent); }
.fix .t { font-weight: 600; font-size: 14.5px; } .fix .s { font-size: 13px; color: var(--sub); }

.ask-card { margin-top: -4px; }

.wait-note { display: grid; gap: 6px; background: #14A04F14; border: 1px solid #14A04F55; border-radius: 14px; padding: 14px; font-size: 14.5px; line-height: 1.45; }
.wait-note b { font-size: 16px; } .wait-note .link { justify-self: start; }

.sheet.grab-hover { cursor: grab; } .sheet.grab-hover .grab { background: var(--sub); }
.sheet.dragging { cursor: grabbing; } .sheet.dragging .grab { background: var(--sub); }

.safe-eq { display: block; text-align: left; background: none; border: 0; padding: 0; margin: 2px 0 0; font: inherit; font-size: 13.5px; line-height: 1.45; color: var(--sub); cursor: pointer; }
.safe-eq b { color: var(--ink); font-weight: 600; } .safe-eq .op { color: var(--sub); padding: 0 2px; }
.safe-eq .see { color: var(--accent-ink); font-weight: 600; white-space: nowrap; margin-left: 4px; text-decoration: underline; text-underline-offset: 2px; }

.fb-float { display: flex; margin: 22px auto 6px; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 99px; border: 0; background: var(--card); color: var(--sub); box-shadow: 0 0 0 1px var(--edge), 0 6px 18px rgba(0,0,0,.08); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; z-index: 5; }
.fb-float svg { width: 16px; height: 16px; }
.fb-float:hover { color: var(--ink); }
.app.big .fb-float { display: none; }
.nav-fb { display: none; background: none; border: 0; font: inherit; color: var(--sub); cursor: pointer; margin-top: auto; }
.app.big .nav .nav-fb { display: flex; flex-direction: row; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 500; text-align: left; }
.app.big .nav .nav-fb:hover { background: var(--soft); color: var(--ink); }
.app.big .nav .nav-fb svg { width: 18px; height: 18px; }

.setup-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.setup-pills b { flex: 0 0 auto; font-size: 12.5px; font-weight: 500; line-height: 1; padding: 6px 10px; border-radius: 99px; background: var(--soft); color: var(--sub); white-space: nowrap; }
.setup-pills b.on { background: #14A04F1F; color: var(--accent-ink); font-weight: 600; }
.funnel { display: grid; grid-template-columns: 150px 1fr 32px; align-items: center; gap: 10px; font-size: 14px; }
.funnel b { text-align: right; } .fbar { height: 10px; border-radius: 99px; background: var(--track); overflow: hidden; } .fbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.fb-row.done .t { color: var(--sub); text-decoration: line-through; }

.fw-bar { height: 6px; margin: 0 16px 6px; border-radius: 99px; background: var(--track); overflow: hidden; } .fw-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.fw-step { text-decoration: none; color: inherit; }
.fw-dot { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--track); display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.fw-step.done .fw-dot { background: var(--accent); box-shadow: none; } .fw-step.done .fw-dot svg { width: 15px; height: 15px; }
.fw-step.done .t { color: var(--sub); text-decoration: line-through; }

.fw-chev { flex-shrink: 0; color: var(--sub); }

.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; }

.greet { display: flex; align-items: center; gap: 10px; margin: 4px 0 -4px; animation: greetIn .5s ease both; }
.greet-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex-shrink: 0; }
.greet-mark svg { width: 17px; height: 17px; }
.greet-t { margin: 0; font-family: var(--display, inherit); font-size: clamp(22px, 5.6vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
@keyframes greetIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .greet { animation: none; } }

.br-seg { flex-wrap: nowrap; } .br-seg button { flex: 1; min-width: 0; padding: 0 8px; white-space: nowrap; }
.br-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; } .br-pick .pill-btn { grid-column: 1 / -1; }
.br-pick .field { margin: 0; display: grid; gap: 4px; } .br-pick .input { height: 44px; width: 100%; min-width: 0; box-sizing: border-box; }
.br-pick .pill-btn { height: 44px; }

.op-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 14px; border: 0; background: var(--card); box-shadow: 0 0 0 1px var(--edge); font: inherit; color: var(--ink); cursor: pointer; }
.op-opt > span:last-child { display: grid; gap: 2px; } .op-opt b { font-size: 15px; }
.op-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 2px var(--edge); margin-top: 1px; }
.op-opt[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); } .op-opt[aria-pressed="true"] .op-dot { box-shadow: inset 0 0 0 6px var(--accent); }

.reality { display: grid; gap: 6px; margin-top: 4px; padding: 12px 14px; border-radius: 14px; background: var(--over-soft); font-size: 14px; line-height: 1.45; }
.reality .link { display: inline; min-height: 0; font-size: 14px; }

.cat-hist { position: relative; } .cat-hist button.tbar { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.cat-hist button.tbar[aria-pressed="true"] span:last-child { color: var(--accent-ink); font-weight: 700; }

.ob-bars { flex: 1; display: flex; gap: 5px; } .ob-bars i { flex: 1; height: 6px; border-radius: 99px; background: var(--soft); } .ob-bars i.done { background: var(--accent); } .ob-bars i.on { background: var(--ink); }
.op-dot.sq { border-radius: 7px; } .op-opt[aria-pressed="true"] .op-dot.sq { box-shadow: none; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304140A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/14px no-repeat; }
.good-tag { background: #14A04F1F !important; color: var(--accent-ink) !important; } .muted-tag { background: var(--soft) !important; color: var(--sub) !important; }

.rc-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--soft); }
.rc-doc { display: grid; place-items: center; color: var(--sub); } .rc-doc svg { width: 22px; height: 22px; }
.rv-opt { border-radius: 12px; background: var(--soft); padding: 10px 12px; min-height: 0; }
.pill-btn.on { background: var(--accent-soft, rgba(34,197,94,.18)); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
