:root {
  color-scheme: dark;
  --color-canvas: #07090c;
  --color-surface: #10151b;
  --color-surface-subtle: #1a222b;
  --color-surface-accent: #15232f;
  --color-text: #f1f7fa;
  --color-text-muted: #99aab6;
  --color-border: #27323d;
  --color-border-strong: #405263;
  --color-primary: #a8ddfa;
  --color-primary-hover: #d9f1ff;
  --color-primary-soft: #19374a;
  --color-positive: #9cdcc8;
  --color-negative: #f4aeb6;
  --color-warning: #f1d29b;
  --color-info: #a8ddfa;
  --color-focus: #bce8ff;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: clamp(1.75rem, 3vw, 2.5rem);
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --radius-sm: .5rem;
  --radius-md: .75rem;
  --radius-lg: .875rem;
  --radius-pill: 999px;
  --shadow-card: 0 12px 36px rgb(0 0 0 / 12%);
  --shadow-float: 0 18px 60px rgb(0 0 0 / 55%);
  --content-max: 1280px;
  --sidebar-width: 236px;
  --control-height: 42px;
  --transition-fast: 160ms ease;
}

@media (prefers-reduced-motion: reduce) {
  :root { --transition-fast: 0ms; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
table { border-collapse: collapse; border-spacing: 0; }
[hidden] { display: none !important; }
body { min-width: 320px; background: var(--color-canvas); color: var(--color-text); font: 400 var(--text-md)/1.5 var(--font-sans); letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
h1, h2, h3, table { font-family: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-focus) 55%, transparent); outline-offset: 2px; }
.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; }
.eyebrow { color: var(--color-primary); font-size: var(--text-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.muted { color: var(--color-text-muted); }
.money { font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.positive { color: var(--color-positive); }
.negative { color: var(--color-negative); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: var(--space-6) var(--space-4); background: #050608; color: #d8e6ef; }
.brand { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-3) var(--space-8); color: #fff; font-size: 1.35rem; font-weight: 850; letter-spacing: -.055em; }
.nav { display: grid; gap: var(--space-1); }
.nav-link { min-height: 44px; display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-3); border-radius: var(--radius-md); color: #aec1b6; font-size: var(--text-sm); font-weight: 650; transition: background var(--transition-fast), color var(--transition-fast); }
.nav-link:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.nav-link[aria-current="page"] { background: #172735; color: #cdeeff; }
.nav-icon { width: 20px; text-align: center; font-size: 16px; }
.sidebar-foot { margin-top: auto; padding: var(--space-4) var(--space-3) 0; border-top: 1px solid rgb(255 255 255 / 10%); font-size: var(--text-sm); }
.user-row { display: flex; align-items: center; gap: var(--space-3); padding: 8px; margin: -8px; border-radius: var(--radius-md); transition: background var(--transition-fast); }
.user-row:hover { background: rgb(255 255 255 / 7%); }
.avatar { width: 32px; height: 32px; flex: 0 0 32px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #182c39; color: #d6efff; font-weight: 800; }
.main { min-width: 0; }
.mobile-header { display: none; }
.mobile-bottom-nav { display: none; }
.content { width: min(100%, var(--content-max)); margin: 0 auto; padding: var(--space-10) var(--space-8) 4rem; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-5); margin-bottom: var(--space-8); }
.page-header h1 { max-width: 850px; margin-top: var(--space-1); font-size: clamp(2rem,4vw,3.6rem); line-height: .98; letter-spacing: -.06em; }
.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); gap: var(--space-4); align-items: start; }
.side-stack { display: grid; gap: var(--space-4); }

@media (max-width: 1050px) {
  :root { --sidebar-width: 208px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-header { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-4); background: #050608; color: #fff; }
  .mobile-header .brand { padding: 0; }
  .menu-button { width: 42px; height: 42px; border: 0; border-radius: var(--radius-md); background: rgb(255 255 255 / 10%); color: #fff; cursor: pointer; }
  .content { padding: var(--space-6) var(--space-4) 5rem; }
  .mobile-bottom-nav { position: fixed; z-index: 9; right: 10px; bottom: 10px; left: 10px; display: grid; grid-template-columns: repeat(6,1fr); padding: 6px; border: 1px solid var(--color-border); border-radius: 16px; background: rgb(8 12 16 / 95%); box-shadow: var(--shadow-float); backdrop-filter: blur(12px); }
  .mobile-bottom-nav a, .mobile-bottom-nav button { min-width: 0; display: grid; place-items: center; gap: 2px; padding: 5px 2px; border: 0; border-radius: 10px; background: transparent; color: var(--color-text-muted); cursor: pointer; }
  .mobile-bottom-nav form { min-width: 0; }
  .mobile-bottom-nav button { width: 100%; font: inherit; }
  .mobile-bottom-nav a[aria-current="page"] { background: var(--color-primary-soft); color: var(--color-primary); }
  .mobile-bottom-nav small { max-width: 100%; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .page-header { align-items: flex-start; }
  .header-actions .button .button-label { display: none; }
  .side-stack { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .page-header { display: grid; }
  .header-actions { width: 100%; }
  .month-select { flex: 1; }
}
.button { height: var(--control-height); min-height: var(--control-height); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 0 var(--space-4); background: var(--color-primary); color: #fff; font-weight: 750; line-height: 1; cursor: pointer; transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast); }
.button:hover { background: var(--color-primary-hover); box-shadow: 0 6px 18px rgb(23 59 45 / 16%); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button-secondary { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); }
.button-secondary:hover { background: var(--color-surface-subtle); }
.icon-button { width: var(--control-height); padding: 0; }
.month-select { height: var(--control-height); min-height: var(--control-height); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 0 2.25rem 0 var(--space-3); background: var(--color-surface); color: var(--color-text); font-weight: 650; }
.card { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-card); transition: border-color var(--transition-fast), transform var(--transition-fast); }
.card:hover { border-color: var(--color-border-strong); }
.card-body { padding: var(--space-6); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--color-border); }
.card-header h2 { font-size: var(--text-lg); line-height: 1.1; letter-spacing: -.035em; }
.text-link { color: var(--color-primary); font-size: var(--text-sm); font-weight: 750; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.metric-card { min-height: 168px; padding: var(--space-5); position: relative; overflow: hidden; }
.metric-card::after { content: ""; width: 84px; height: 84px; position: absolute; right: -26px; top: -28px; border-radius: 50%; background: var(--metric-tint, var(--color-primary-soft)); opacity: .7; }
.metric-label { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); font-weight: 650; }
.metric-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--metric-color, var(--color-primary)); }
.metric-value { margin-top: var(--space-5); font-size: clamp(1.65rem, 2.4vw, 2.45rem); font-weight: 800; line-height: 1; }
.metric-note { margin-top: var(--space-2); color: var(--color-text-muted); font-size: var(--text-xs); }
.metric-note strong { color: var(--color-text); }
.category-list { display: grid; gap: var(--space-5); }
.category-row { display: grid; gap: var(--space-2); }
.category-meta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); }
.category-name { display: flex; align-items: center; gap: var(--space-2); font-weight: 650; }
.category-color { width: 9px; height: 9px; border-radius: 3px; background: var(--category-color); }
.category-amount { white-space: nowrap; font-weight: 750; }
.progress { height: 7px; overflow: hidden; border-radius: var(--radius-pill); background: var(--color-surface-subtle); }
.progress-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: #9bd1ec; transition: width var(--transition-fast); }
.progress-over .progress-fill { background: var(--color-negative); }
.transaction-list { display: grid; }
.transaction { min-height: 66px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.transaction:last-child { border-bottom: 0; padding-bottom: 0; }
.transaction:first-child { padding-top: 0; }
.transaction-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--color-surface-subtle); font-size: 18px; }
.transaction-title { overflow: hidden; font-size: var(--text-sm); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.transaction-meta { color: var(--color-text-muted); font-size: var(--text-xs); }
.transaction-amount { font-size: var(--text-sm); font-weight: 800; white-space: nowrap; }
.budget-summary { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-3); }
.budget-summary strong { font-size: var(--text-xl); }
.budget-caption { margin-top: var(--space-3); color: var(--color-text-muted); font-size: var(--text-xs); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--radius-pill); background: var(--color-primary-soft); color: var(--color-primary); font-size: var(--text-xs); font-weight: 750; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.quick-action { min-height: 76px; display: flex; flex-direction: column; justify-content: center; gap: var(--space-1); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3); background: var(--color-surface); font-size: var(--text-sm); font-weight: 750; }
.quick-action:hover { border-color: var(--color-primary); background: var(--color-surface-accent); }
.quick-action small { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 500; }
.form-card { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.field { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); }
.field label, .field legend { font-size: var(--text-sm); font-weight: 750; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), .field select, .field textarea { width: 100%; min-height: var(--control-height); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: .65rem .8rem; background: #fff; color: var(--color-text); }
.field select { height: var(--control-height); padding-block: 0; }
.field textarea { min-height: 100px; resize: vertical; }
.field small { color: var(--color-text-muted); }
.checks { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.check { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 650; }
.check input, .field.boolean input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--color-primary); }
.field.boolean { display: flex; align-items: center; }
.field.boolean label { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.field.boolean input[type="checkbox"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.form-actions { display: flex; align-items: center; gap: var(--space-3); }
.hint { margin-bottom: var(--space-5); padding: var(--space-4); border-radius: var(--radius-md); background: #e8f0fa; color: #244f83; font-size: var(--text-sm); }
.filters { display: flex; align-items: end; gap: var(--space-3); flex-wrap: wrap; }
.filters .field { min-width: 150px; flex: 1; margin: 0; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; min-width: 720px; }
.data-table th, .data-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
.data-table th { color: var(--color-text-muted); font-size: var(--text-xs); letter-spacing: .05em; text-transform: uppercase; }
.data-table tbody tr:hover { background: #fafcfb; }
.data-table .amount { text-align: right; font-weight: 800; white-space: nowrap; }
.pill { display: inline-flex; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--color-surface-subtle); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 700; }
.empty-state { padding: var(--space-10); text-align: center; color: var(--color-text-muted); }
.split-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--space-4); align-items: start; }
.list-row { padding: var(--space-4) 0; border-bottom: 1px solid var(--color-border); }
.list-row:first-child { padding-top: 0; }.list-row:last-child { padding-bottom: 0; border-bottom: 0; }
.list-row-head { display: flex; justify-content: space-between; gap: var(--space-4); }
.chat { display: grid; gap: var(--space-3); max-height: 500px; overflow-y: auto; }
.message { max-width: 80%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); background: var(--color-surface-subtle); }
.message.user { justify-self: end; background: var(--color-primary-soft); }
.message small { display: block; margin-bottom: var(--space-1); color: var(--color-text-muted); font-weight: 750; }
.file-picker { position: relative; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: var(--space-3); min-height: 82px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); padding: var(--space-3); background: #fafbf7; cursor: pointer; transition: border-color var(--transition-fast), background var(--transition-fast); }
.file-picker:hover { border-color: var(--color-primary); background: var(--color-surface-accent); }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-picker-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); font-size: 20px; }
.file-picker-copy { display: grid; }.file-picker-copy small { color: var(--color-text-muted); }
.file-picker-action { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--color-text); color: #fff; font-size: var(--text-sm); font-weight: 750; }
.analysis-stage { overflow: hidden; border: 0; background: #171916; color: #f4f5ef; }
.analysis-stage-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(220px,.65fr); }
.analysis-verdict { min-height: 360px; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px,5vw,60px); background: radial-gradient(circle at 85% 10%,rgb(230 239 61 / 18%),transparent 38%); }
.analysis-verdict h2 { max-width: 760px; margin-top: var(--space-5); font-size: clamp(2rem,4vw,4.4rem); line-height: .98; letter-spacing: -.06em; overflow-wrap: anywhere; hyphens: auto; }
.analysis-verdict p { max-width: 680px; margin-top: var(--space-5); color: #bac2b9; font-size: var(--text-lg); }
.analysis-score { min-width: 0; display: grid; align-content: space-between; padding: clamp(var(--space-5), 3vw, var(--space-8)); border-left: 1px solid rgb(255 255 255 / 12%); background: #20231f; overflow: hidden; }
.analysis-score-value { max-width: 100%; font-size: clamp(2.1rem,4vw,4rem); font-weight: 800; line-height: .9; letter-spacing: -.05em; color: #cceeff; white-space: nowrap; }
.editorial-card { position: relative; overflow: hidden; }
.editorial-card::before { content: attr(data-index); position: absolute; right: 18px; top: 8px; color: rgb(21 23 20 / 5%); font-size: 5rem; font-weight: 850; letter-spacing: -.08em; }
.recommendation-panel { background: #dce8df; border-color: #c5d6ca; }
.recommendation-kicker { display: inline-flex; padding: 5px 9px; border-radius: var(--radius-pill); background: #171916; color: #f4f5ef; font-size: var(--text-xs); font-weight: 750; }
@media(max-width:1050px){.analysis-stage-grid{grid-template-columns:1fr}.analysis-score{border-left:0;border-top:1px solid rgb(255 255 255 / 12%)}}
@media(max-width:760px){.file-picker{grid-template-columns:44px 1fr}.file-picker-action{grid-column:1/-1;text-align:center}}
@media(max-width:900px){.form-grid,.split-grid{grid-template-columns:1fr}.data-table{min-width:650px}}

/* FinAnal / eclipse direction */
.app-shell { background: radial-gradient(ellipse at 67% -12%, #13202c 0, transparent 34%), var(--color-canvas); }
.sidebar { background: #050608; border-right: 1px solid #1c2731; }
.brand { font-size: 1.65rem; letter-spacing: -.07em; }
.nav-link { color: #82939f; border-radius: 8px; }
.nav-link:hover { background: #141d25; color: #e8f6ff; }
.nav-link[aria-current="page"] { background: #172735; color: #cdeeff; box-shadow: inset 2px 0 0 #a8ddfa; }
.sidebar-foot { border-top-color: #27323d; }
.sidebar-foot .muted { color: #8195a2; }
.mobile-profile-link { display: none; }
.avatar { background: #182c39; color: #d6efff; }
.mobile-header { background: #050608; border-bottom: 1px solid var(--color-border); }
.mobile-bottom-nav { background: rgb(8 12 16 / 95%); border-color: var(--color-border); }
.mobile-bottom-nav a[aria-current="page"] { background: var(--color-primary-soft); color: var(--color-primary); }
.eyebrow { color: #93cce8; letter-spacing: .18em; }
.page-header h1 { font-weight: 760; }
.page-header .muted { margin-top: 12px; }
.page-header:not(.dashboard-heading) { position: relative; padding-bottom: 30px; border-bottom: 1px solid #273946; }
.page-header:not(.dashboard-heading)::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 92px; height: 1px; background: #b6e7ff; box-shadow: 0 0 16px #8acff1; }
.button { background: var(--color-primary); color: #07121a; border-color: #b6e7ff; font-weight: 760; }
.button:hover, .button:focus-visible { background: var(--color-primary-hover); box-shadow: 0 0 25px rgb(147 204 232 / 19%); }
.button-secondary { background: #18232d; border-color: #334758; color: #d8ebf4; }
.button-secondary:hover { background: #21323f; color: #fff; }
.month-select, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), .field select, .field textarea { background: #0b1117; border-color: #35434e; color: var(--color-text); }
.field input::placeholder, .field textarea::placeholder { color: #758895; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus-visible, .field select:focus-visible, .field textarea:focus-visible, .month-select:focus-visible { border-color: #acdff9; outline: 2px solid rgb(172 223 249 / 28%); outline-offset: 1px; box-shadow: 0 0 22px rgb(106 178 220 / 11%); }
.field input:disabled { color: #7c8a94; background: #121a20; }
.card { background: linear-gradient(145deg,#131a21,#10161c); border-color: #273440; }
.card:hover { border-color: #405a6d; }
.form-card { border-top: 2px solid #8bcbe9; }
.card-header { border-bottom-color: #283743; }
.card-header h2 { font-size: clamp(1.18rem,2vw,1.5rem); }
.card-body > h2 { font-size: clamp(1.35rem,2vw,1.75rem); line-height: 1.12; letter-spacing: -.045em; }
.split-grid > .card { min-height: 100%; }
.text-link { color: #a8ddfa; }
.metric-card::after { background: radial-gradient(circle, rgb(139 199 232 / 11%),transparent 70%); opacity: 1; }
.metric-label, .metric-note, .metric-note strong { color: var(--color-text-muted); }
.metric-value { color: #f0f8fc; }
.metric-value.positive { color: var(--color-positive); }
.metric-value.negative { color: var(--color-negative); }
.metric-dot { background: var(--color-primary); }
.progress { background: #253440; }
.progress-fill { background: #9bd1ec; }
.category-color { background: #9bd1ec; }
.category-amount small { color: var(--color-text-muted); font-weight: 500; }
.status-pill { background: #183144; color: #bde7fa; }
.transaction-icon { background: #1b2b37; color: #a8ddfa; font-size: .7rem; font-family: var(--font-mono); }
.transaction-amount.negative { color: var(--color-negative); }
.quick-action { background: #141e26; color: var(--color-text); }
.quick-action:hover { background: #1a2d3a; border-color: #7eb8d6; }
.hint { background: #152938; color: #b7ddf3; }
.data-table tbody tr:hover { background: #17232d; }
.data-table th { color: #8cb2c6; font-weight: 700; }
.data-table td { font-variant-numeric: tabular-nums; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.pill { background: #253543; color: #b8d1de; }
.message.user { background: #1b384a; }
.chat { padding: 4px 2px 16px; }
.message { padding: 16px 20px; line-height: 1.55; }
.message:not(.user) { border: 1px solid #304452; }
.message.user { border: 1px solid #39627a; }
.file-picker { background: #101b24; }
.file-picker:hover { background: #172b39; }
.file-picker { min-height: 112px; border-width: 1.5px; }
.file-picker:focus-within, .file-picker.is-dragging { border-color: #a8ddfa; background: #1a3445; box-shadow: 0 0 0 3px rgb(168 221 250 / 18%); }
.file-picker-action { background: #a8ddfa; color: #07121a; }
.analysis-stage { background: #050608; border: 1px solid #354e60; box-shadow: 0 0 44px rgb(141 201 237 / 8%); }
.analysis-verdict { background: radial-gradient(circle at 75% 0%,rgb(150 207 240 / 22%),transparent 45%); }
.analysis-verdict p { color: #b8c9d4; }
.analysis-score { background: #0b1117; }
.analysis-score-value { color: #cceeff; }
.analysis-verdict .text-link[style] { color: #bce8ff !important; }
.recommendation-panel { background: #15232d; border-color: #334a5b; }
.recommendation-kicker { background: #a8ddfa; color: #07121a; }
.recommendation-panel { position: relative; overflow: hidden; }
.recommendation-panel::after { content: ""; position: absolute; right: -75px; top: -90px; width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle,rgb(146 205 236 / 12%),transparent 65%); pointer-events: none; }
.recommendation-panel ol { color: #c4d2dc; }
.recommendation-panel li::marker { color: #a8ddfa; font-weight: 750; }
.editorial-card::before { color: rgb(184 221 242 / 6%); }
.overview-hero { min-height: 390px; position: relative; isolation: isolate; overflow: hidden; border: 1px solid #344b5c; border-radius: 20px; background: radial-gradient(ellipse at 89% 45%,rgb(93 157 194 / 24%),transparent 37%),linear-gradient(115deg,#060a0d 0%,#0b161d 58%,#142b3a 100%); box-shadow: 0 0 54px rgb(141 201 237 / 7%); }
.overview-hero::after { content: ""; position: absolute; z-index: -1; width: 66%; height: 160%; top: -42%; right: -30%; transform: rotate(-26deg); background: linear-gradient(90deg,transparent,rgb(187 230 252 / 7%),transparent); filter: blur(24px); }
.overview-hero-content { min-height: 390px; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(24px,3.5vw,46px); }
.hero-topline,.hero-bottomline { display: flex; justify-content: space-between; gap: 16px; color: #a5bdca; font-size: .72rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.hero-bottomline a { color: #d5efff; }
.hero-main { align-self: center; width: min(100%,600px); text-align: center; text-shadow: 0 2px 18px #000; }
.overview-hero .hero-main { align-self: flex-start; text-align: left; }
.hero-main p { color: #b8d3e1; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.hero-main strong { display: block; margin: 13px 0; color: #f5fbff; font-size: clamp(3.3rem,7vw,7rem); line-height: .95; letter-spacing: -.08em; }
.hero-main strong small { font-size: .45em; font-weight: 500; }
.hero-main > span { color: #bfced8; font-size: .9rem; }
.dashboard-stat-strip { display: grid; grid-template-columns: repeat(4,1fr); margin: 20px 0; border: 1px solid var(--color-border); border-radius: 14px; background: #0f161c; }
.dashboard-stat-strip article { display: grid; gap: 12px; padding: 24px; border-right: 1px solid var(--color-border); }
.dashboard-stat-strip article:last-child { border: 0; }
.dashboard-stat-strip .stat-index { color: #86a7ba; font-size: .68rem; letter-spacing: .14em; }
.dashboard-stat-strip strong { font-size: clamp(1.4rem,2.2vw,2.1rem); line-height: 1; letter-spacing: -.05em; white-space: nowrap; }
.dashboard-stat-strip small { color: var(--color-text-muted); }
.login-page { background: #000; }
.login-shell { position: relative; isolation: isolate; min-height: 100vh; display: grid; place-items: center; overflow: hidden; padding: 24px; background: #000; }
.login-shell::before { content: ""; position: absolute; z-index: -2; width: min(88vw,720px); aspect-ratio: 1; left: 50%; top: 48%; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(circle at 34% 9%,rgb(246 252 255 / 97%),transparent 13%),radial-gradient(circle at center,#000 0 63%,#03080b 64%,#c8edff 65%,#81c9ef 66%,rgb(96 173 220 / 28%) 69%,transparent 77%); filter: blur(9px); box-shadow: 0 -24px 96px rgb(184 229 255 / 17%); }
.login-shell::after { content: ""; position: absolute; z-index: -1; width: min(66vw,540px); aspect-ratio: 1; left: 50%; top: 48%; transform: translate(-50%,-50%); border-radius: 50%; background: #000; }
.login-panel { position: relative; width: min(100%,420px); }
.login-content { padding: 30px 24px; background: transparent; }
.login-wordmark { margin-bottom: 56px; color: #f2f7f9; text-align: center; font-size: clamp(2.4rem,7vw,3.5rem); font-weight: 800; letter-spacing: -.085em; }
.login-form .field { margin-bottom: 20px; }
.login-form .field label { color: #b7c5ce; font-weight: 600; }
.login-form .field input { min-height: 52px; background: rgb(8 13 18 / 94%); }
.login-submit { width: 100%; min-height: 50px; justify-content: space-between; margin-top: 12px; }
@media(max-width:1050px){.dashboard-stat-strip{grid-template-columns:repeat(2,1fr)}.dashboard-stat-strip article:nth-child(2){border-right:0}.dashboard-stat-strip article:nth-child(-n+2){border-bottom:1px solid var(--color-border)}}
@media(max-width:760px){.overview-hero,.overview-hero-content{min-height:360px}.hero-topline span:last-child{display:none}.dashboard-stat-strip{grid-template-columns:1fr}.dashboard-stat-strip article{border-right:0;border-bottom:1px solid var(--color-border)}.dashboard-stat-strip article:nth-child(2){border-bottom:1px solid var(--color-border)}.dashboard-stat-strip article:last-child{border:0}.login-content{padding:34px 24px}.mobile-profile-link{display:grid;place-items:center;position:relative;float:right;z-index:3;width:36px;height:36px;margin-bottom:12px;border:1px solid #436075;border-radius:50%;background:#172735;color:#d6efff;font-weight:800}.content > .page-header{clear:both}}
.prototype-index { background: radial-gradient(ellipse at 88% -7%,#1c3546,transparent 35%),#07090c; }
.prototype-index-content { width: min(100% - 40px,1080px); margin: 0 auto; padding: 28px 0 90px; }
.prototype-index-top { display: flex; align-items: center; justify-content: space-between; color: #7892a2; font-size: .7rem; letter-spacing: .15em; }
.prototype-index-top .brand { padding: 0; color: #f1f7fa; font-size: 1.65rem; letter-spacing: -.07em; }
.prototype-index header { max-width: 760px; padding: clamp(70px,9vw,130px) 0 52px; }
.prototype-index h1 { margin: 12px 0 20px; font-size: clamp(3rem,7vw,6.5rem); line-height: .94; letter-spacing: -.075em; }
.prototype-index header > p:last-child { color: #9cabb5; }
.prototype-index-list { display: grid; border-top: 1px solid #33414d; }
.prototype-index-list a { display: grid; grid-template-columns: 62px 1fr minmax(140px,.45fr) 24px; gap: 18px; align-items: center; min-height: 76px; border-bottom: 1px solid #26333e; transition: background var(--transition-fast), padding var(--transition-fast); }
.prototype-index-list a:hover { padding-inline: 16px; background: #111c24; }
.prototype-index-list span { color: #7193a6; font-size: .72rem; font-family: var(--font-mono); }
.prototype-index-list strong { font-size: clamp(1rem,2vw,1.35rem); font-weight: 650; letter-spacing: -.03em; }
.prototype-index-list small { color: #869baa; }
.prototype-index-list b { color: #addff9; font-weight: 500; }
@media(max-width:620px){.prototype-index-list a{grid-template-columns:32px 1fr 20px;gap:12px}.prototype-index-list small{display:none}}
.product-dialog {
  width: min(470px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  color: var(--color-text);
}

.product-dialog:not([open]) {
  display: none;
}

.product-dialog::backdrop {
  background: rgb(0 0 0 / 45%);
}
/* FinAnal / bright direction. Loaded after the structural prototype styles. */
:root {
  color-scheme: light;
  --color-canvas: #f7f9f0;
  --color-surface: #fff;
  --color-surface-subtle: #f0f4e6;
  --color-surface-accent: #effbd7;
  --color-text: #151814;
  --color-text-muted: #616a5f;
  --color-border: #dce3d4;
  --color-border-strong: #b8c5ad;
  --color-primary: #caff3d;
  --color-primary-hover: #b9f22c;
  --color-primary-soft: #edffc2;
  --color-positive: #176a43;
  --color-negative: #bc414a;
  --color-warning: #a05b16;
  --color-info: #5442a9;
  --color-focus: #4d61d2;
  --shadow-card: 0 3px 18px rgb(25 41 15 / 3%);
  --shadow-float: 0 16px 40px rgb(22 33 12 / 12%);
}

body { background: var(--color-canvas); color: var(--color-text); }
.app-shell { background: radial-gradient(ellipse at 100% -10%, #f0ffd1 0, transparent 30%), var(--color-canvas); }
.sidebar { background: #fcfff6; color: #242b20; border-right: 1px solid #dbe7cf; }
.brand { color: #101410; }
.nav-link { color: #52604d; font-weight: 650; }
.nav-link:hover { background: #f0f8dd; color: #111811; }
.nav-link[aria-current="page"] { background: #ceff4f; color: #111811; box-shadow: none; }
.sidebar-foot { border-top-color: #dbe7cf; }
.sidebar-foot .muted { color: #697464; }
.user-row:hover { background: #eff8da; }
.avatar, .mobile-profile-link { background: #d8ff78; color: #1a2115; border-color: #c3e96a; }
.mobile-header { background: #fcfff6; color: #111811; border-bottom-color: #dbe7cf; }
.menu-button { background: #d8ff78; color: #1a2115; }
.mobile-bottom-nav { background: rgb(252 255 246 / 96%); border-color: #dbe7cf; }
.mobile-bottom-nav a, .mobile-bottom-nav button { color: #5e6b58; }
.mobile-bottom-nav a[aria-current="page"] { background: #d8ff78; color: #172012; }

.eyebrow { color: #687d3e; font-weight: 800; }
.page-header:not(.dashboard-heading) { border-bottom-color: #d8e4cf; }
.page-header:not(.dashboard-heading)::after { background: #9cd10f; box-shadow: none; }
.page-header h1 { color: #151814; }
.muted, .metric-note, .metric-label, .budget-caption, .transaction-meta { color: var(--color-text-muted); }
.money.positive, .positive { color: var(--color-positive); }
.money.negative, .negative { color: var(--color-negative); }

.button { border-color: #b5e82f; background: #caff3d; color: #18200f; box-shadow: none; }
.button:hover, .button:focus-visible { border-color: #9bca22; background: #b9f22c; color: #13190e; box-shadow: 0 7px 18px rgb(152 209 25 / 21%); }
.button-secondary { border-color: #d6dfce; background: #fff; color: #20291d; }
.button-secondary:hover { background: #f1f7e8; color: #162014; box-shadow: none; }
.month-select, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), .field select, .field textarea { background: #fff; border-color: #cad5c1; color: #182018; }
.field input::placeholder, .field textarea::placeholder { color: #879381; }
.field input:disabled { background: #f1f3ed; color: #768070; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus-visible, .field select:focus-visible, .field textarea:focus-visible, .month-select:focus-visible { border-color: #7eaa18; outline-color: rgb(176 224 55 / 45%); box-shadow: 0 0 0 3px rgb(183 232 53 / 17%); }

.card { background: #fff; border-color: #dbe3d4; box-shadow: var(--shadow-card); }
.card:hover { border-color: #b9cbab; }
.card-header { border-bottom-color: #e3e9dc; }
.card-header h2 { color: #181e16; }
.form-card { border-top-color: #a7dc29; }
.text-link { color: #365b18; }
.text-link:hover { color: #142c0c; }
.metric-card::after { background: radial-gradient(circle, rgb(198 255 77 / 58%), transparent 72%); }
.metric-value, .metric-value.positive, .metric-value.negative { color: #181f14; }
.metric-dot { background: #a5d626; }
.progress { background: #e9efdf; }
.progress-fill, .category-color { background: #b7e83b; }
.status-pill { background: #eaffbb; color: #385b0e; }
.transaction-icon { background: #eff8da; color: #547622; }
.quick-action { background: #fbfdf7; color: #20261b; }
.quick-action:hover { background: #eaffc6; border-color: #acd235; }
.quick-action small { color: #65715f; }
.hint { background: #eff8df; color: #3a5627; }
.data-table th { color: #6c7e61; }
.data-table th, .data-table td, .list-row, .transaction { border-bottom-color: #e3e9dd; }
.data-table tbody tr:hover { background: #f6fbe9; }
.pill { background: #edf3e7; color: #5d6b55; }
.message:not(.user) { background: #f5f8ee; border-color: #e4ebdc; }
.message.user { background: #edffc5; border-color: #d9efa9; }
.message small { color: #596952; }
.file-picker { background: #fbfdf6; border-color: #b9cba8; }
.file-picker:hover, .file-picker:focus-within, .file-picker.is-dragging { background: #f1ffdb; border-color: #8fbd26; box-shadow: 0 0 0 3px rgb(183 232 53 / 17%); }
.file-picker-icon { background: #e6ffad; color: #385a12; }
.file-picker-action { background: #caff3d; color: #18200f; }
.file-picker-copy small { color: #697664; }

/* The overview keeps a single bright focal surface. */
.overview-hero { border-color: #c2ed54; background: linear-gradient(118deg,#e6ff9b 0%,#caff4c 51%,#a7e634 100%); box-shadow: none; }
.overview-hero::before { content: ""; position: absolute; z-index: -1; inset: -25%; background: radial-gradient(ellipse at 20% 30%,rgb(255 255 255 / 64%),transparent 44%),radial-gradient(ellipse at 78% 68%,rgb(90 178 47 / 31%),transparent 48%); animation: hero-drift 10s ease-in-out infinite alternate; }
.overview-hero::after { background: linear-gradient(90deg,transparent,rgb(255 255 255 / 55%),transparent); filter: blur(4px); opacity: .52; animation: hero-sheen 8.5s ease-in-out infinite alternate; }
.overview-hero-content { position: relative; z-index: 1; }
@keyframes hero-drift { from { transform: translate3d(-3%,2%,0) scale(1); } to { transform: translate3d(4%,-3%,0) scale(1.08); } }
@keyframes hero-sheen { from { transform: translate3d(-10%,0,0) rotate(-26deg); } to { transform: translate3d(12%,0,0) rotate(-26deg); } }
.overview-hero .hero-main { text-shadow: none; }
.hero-topline,.hero-bottomline { color: #425827; }
.hero-bottomline a { color: #1c3314; text-decoration: underline; text-underline-offset: 4px; }
.hero-main p { color: #3e5b20; }
.hero-main strong { color: #151d12; text-shadow: none; }
.hero-main > span { color: #395026; }
.dashboard-stat-strip { background: #fff; border-color: #dce3d4; }
.dashboard-stat-strip article { border-color: #e3e9dd; }
.dashboard-stat-strip .stat-index { color: #637955; }
.dashboard-stat-strip small { color: #687465; }
.budget-summary strong { color: #181e16; }

/* Analysis uses a dark feature panel on the light canvas. */
.analysis-stage { background: #151914; border-color: #151914; box-shadow: none; }
.analysis-verdict { background: radial-gradient(circle at 88% 8%,rgb(193 255 65 / 20%),transparent 42%); }
.analysis-verdict .status-pill { background: #d6ff68; color: #192214; }
.analysis-verdict h2 { color: #f9fff5; }
.analysis-verdict p { color: #c5d2bf; }
.analysis-verdict .text-link { color: #d2ff69; }
.analysis-score { background: #222a1c; }
.analysis-score-value { color: #d6ff68; }
.recommendation-panel { background: #f1f8e6; border-color: #d7e5ca; }
.recommendation-panel::after { background: radial-gradient(circle,rgb(199 247 91 / 45%),transparent 65%); }
.recommendation-kicker { background: #d4ff65; color: #253516; }
.recommendation-panel ol { color: #515e4a; }
.recommendation-panel li::marker { color: #628e1b; }

/* Login shares the app's canvas, surface and accent. */
.login-page { color-scheme: light; background: var(--color-canvas); }
.login-shell { background: radial-gradient(circle at 50% 53%,#e6ffad 0,transparent 36%),var(--color-canvas); }
.login-shell::before { width: 560px; top: 50%; background: #d5ff72; border: 0; filter: none; box-shadow: none; opacity: .42; }
.login-shell::after { display: none; }
.login-panel { width: min(100%,450px); border: 1px solid #d6e3c8; border-radius: 22px; background: #fff; box-shadow: 0 22px 70px rgb(45 75 14 / 10%); }
.login-content { padding: clamp(28px,5vw,48px); background: transparent; }
.login-wordmark { margin-bottom: 42px; color: #141a11; }
.login-form .field label { color: #384334; }
.login-form .field input { background: #fbfdf8; border-color: #c8d4bd; color: #182018; }
.login-form .field input::placeholder { color: #82907a; }
.login-form .field input:focus-visible { border-color: #8fbd26; outline-color: #8fbd26; box-shadow: 0 0 0 3px rgb(202 255 61 / 20%); }
.login-submit { background: #caff3d; color: #171d0f; }

.theme-toggle { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 1.25rem; line-height: 1; cursor: pointer; transition: background var(--transition-fast),border-color var(--transition-fast); }
.theme-toggle:hover { background: var(--color-primary-soft); border-color: var(--color-primary); }
.theme-toggle[aria-pressed="true"] { border-color: var(--color-primary); }
.sidebar-account-row { display: flex; align-items: center; gap: 10px; }
.sidebar-account-row .user-row { flex: 1; min-width: 0; margin: -8px 0 -8px -8px; }
.sidebar-account-row .theme-toggle { flex: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; }
.login-theme-toggle { position: absolute; top: 24px; right: 24px; z-index: 2; }
.mobile-theme-toggle { display: none; }

.prototype-index { background: radial-gradient(ellipse at 88% -7%,#ebffbd,transparent 34%),#f7f9f0; }
.prototype-index-top { color: #68775d; }
.prototype-index-top .brand { color: #151814; }
.prototype-index header > p:last-child { color: #677261; }
.prototype-index-list { border-top-color: #bfcdb6; }
.prototype-index-list a { border-bottom-color: #dce4d5; }
.prototype-index-list a:hover { background: #edffc7; }
.prototype-index-list span,.prototype-index-list small { color: #65745b; }
.prototype-index-list b { color: #3d6b14; }

@media (max-width: 760px) {
  .dashboard-stat-strip article { border-color: #e3e9dd; }
  .mobile-profile-link { background: #d8ff78; color: #1a2115; border-color: #c3e96a; }
  .mobile-theme-toggle { position: relative; z-index: 3; display: inline-flex; width: 36px; height: 36px; margin-bottom: 12px; }
  .login-theme-toggle { top: 14px; right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .overview-hero::before, .overview-hero::after { animation: none; }
}
/* Alternate FinAnal palette. Keep geometry and lime accent consistent. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-canvas: #0e110d;
  --color-surface: #191e17;
  --color-surface-subtle: #242b21;
  --color-surface-accent: #2b3921;
  --color-text: #f2f7eb;
  --color-text-muted: #a8b5a2;
  --color-border: #394335;
  --color-border-strong: #586a4d;
  --color-primary: #caff3d;
  --color-primary-hover: #ddff85;
  --color-primary-soft: #34451f;
  --color-positive: #9bddb2;
  --color-negative: #ff9ea7;
  --color-warning: #ffcf8d;
  --color-info: #c1b4ff;
  --color-focus: #d6ff73;
  --shadow-card: 0 3px 18px rgb(0 0 0 / 8%);
  --shadow-float: 0 16px 40px rgb(0 0 0 / 35%);
}

[data-theme="dark"] .app-shell { background: radial-gradient(ellipse at 100% -10%,#1b2714,transparent 30%),var(--color-canvas); }
[data-theme="dark"] .sidebar,[data-theme="dark"] .mobile-header { background: #131812; color: var(--color-text); border-color: var(--color-border); }
[data-theme="dark"] .brand,[data-theme="dark"] .page-header h1 { color: var(--color-text); }
[data-theme="dark"] .nav-link { color: #b1c0aa; }
[data-theme="dark"] .nav-link:hover,[data-theme="dark"] .user-row:hover { background: #253020; color: var(--color-text); }
[data-theme="dark"] .nav-link[aria-current="page"] { background: #caff3d; color: #17200f; }
[data-theme="dark"] .sidebar-foot,[data-theme="dark"] .mobile-bottom-nav { border-color: var(--color-border); }
[data-theme="dark"] .sidebar-foot .muted { color: var(--color-text-muted); }
[data-theme="dark"] .avatar,[data-theme="dark"] .mobile-profile-link { background: #caff3d; color: #19220f; border-color: #caff3d; }
[data-theme="dark"] .mobile-bottom-nav { background: rgb(19 24 18 / 96%); }
[data-theme="dark"] .mobile-bottom-nav a,[data-theme="dark"] .mobile-bottom-nav button { color: #b1c0aa; }
[data-theme="dark"] .mobile-bottom-nav a[aria-current="page"] { background: #caff3d; color: #19220f; }
[data-theme="dark"] .eyebrow { color: #b7e85a; }
[data-theme="dark"] .page-header:not(.dashboard-heading) { border-color: var(--color-border); }
[data-theme="dark"] .page-header:not(.dashboard-heading)::after { background: #caff3d; }
[data-theme="dark"] .muted,[data-theme="dark"] .metric-note,[data-theme="dark"] .metric-label,[data-theme="dark"] .budget-caption,[data-theme="dark"] .transaction-meta { color: var(--color-text-muted); }
[data-theme="dark"] .money.positive,[data-theme="dark"] .positive { color: var(--color-positive); }
[data-theme="dark"] .money.negative,[data-theme="dark"] .negative { color: var(--color-negative); }
[data-theme="dark"] .button-secondary,[data-theme="dark"] .month-select,[data-theme="dark"] .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),[data-theme="dark"] .field select,[data-theme="dark"] .field textarea { background: var(--color-surface); border-color: var(--color-border-strong); color: var(--color-text); }
[data-theme="dark"] .button-secondary:hover { background: var(--color-surface-subtle); color: var(--color-text); }
[data-theme="dark"] .field input::placeholder,[data-theme="dark"] .field textarea::placeholder { color: #899b82; }
[data-theme="dark"] .field input:disabled { background: #232920; color: #a0ac99; }
[data-theme="dark"] .card,[data-theme="dark"] .dashboard-stat-strip { background: var(--color-surface); border-color: var(--color-border); }
[data-theme="dark"] .card:hover { border-color: var(--color-border-strong); }
[data-theme="dark"] .card-header,[data-theme="dark"] .dashboard-stat-strip article,[data-theme="dark"] .data-table th,[data-theme="dark"] .data-table td,[data-theme="dark"] .list-row,[data-theme="dark"] .transaction { border-color: var(--color-border); }
[data-theme="dark"] .card-header h2,[data-theme="dark"] .budget-summary strong,[data-theme="dark"] .metric-value,[data-theme="dark"] .metric-value.positive,[data-theme="dark"] .metric-value.negative { color: var(--color-text); }
[data-theme="dark"] .text-link { color: #caff3d; }
[data-theme="dark"] .text-link:hover { color: #e2ff9d; }
[data-theme="dark"] .metric-card::after { background: radial-gradient(circle,rgb(202 255 61 / 17%),transparent 72%); }
[data-theme="dark"] .progress { background: #35422f; }
[data-theme="dark"] .status-pill { background: #35491f; color: #dbff8a; }
[data-theme="dark"] .transaction-icon,[data-theme="dark"] .pill { background: #2a3823; color: #d1eeaf; }
[data-theme="dark"] .quick-action,[data-theme="dark"] .file-picker { background: #1d251a; border-color: var(--color-border); color: var(--color-text); }
[data-theme="dark"] .quick-action:hover,[data-theme="dark"] .file-picker:hover,[data-theme="dark"] .file-picker:focus-within,[data-theme="dark"] .file-picker.is-dragging { background: #2a3920; border-color: #a6d829; }
[data-theme="dark"] .quick-action small,[data-theme="dark"] .file-picker-copy small { color: var(--color-text-muted); }
[data-theme="dark"] .hint,[data-theme="dark"] .message:not(.user) { background: #26331f; border-color: var(--color-border); color: #d2e8c3; }
[data-theme="dark"] .message.user { background: #35491f; border-color: #577328; }
[data-theme="dark"] .message small,[data-theme="dark"] .data-table th { color: var(--color-text-muted); }
[data-theme="dark"] .data-table tbody tr:hover { background: #26311f; }
[data-theme="dark"] .file-picker-icon { background: #35491f; color: #d6ff73; }
[data-theme="dark"] .hero-topline,[data-theme="dark"] .hero-bottomline { color: #415b26; }
[data-theme="dark"] .hero-main p,[data-theme="dark"] .hero-main > span { color: #354f20; }
[data-theme="dark"] .dashboard-stat-strip .stat-index,[data-theme="dark"] .dashboard-stat-strip small { color: var(--color-text-muted); }
[data-theme="dark"] .analysis-stage { background: #1a2117; border-color: #394b2b; }
[data-theme="dark"] .analysis-score { background: #263120; }
[data-theme="dark"] .analysis-verdict p { color: #cbd9c2; }
[data-theme="dark"] .recommendation-panel { background: #26351d; border-color: #465d32; }
[data-theme="dark"] .recommendation-panel ol { color: #cbd8be; }
[data-theme="dark"] .recommendation-panel li::marker { color: #caff3d; }

[data-theme="dark"] .login-page { color-scheme: dark; background: var(--color-canvas); }
[data-theme="dark"] .login-shell { background: radial-gradient(circle at 50% 53%,#27391a 0,transparent 38%),var(--color-canvas); }
[data-theme="dark"] .login-shell::before { background: #405f28; opacity: .32; }
[data-theme="dark"] .login-panel { background: var(--color-surface); border-color: var(--color-border); box-shadow: 0 22px 70px rgb(0 0 0 / 20%); }
[data-theme="dark"] .login-wordmark { color: var(--color-text); }
[data-theme="dark"] .login-form .field label { color: #d1ddc9; }
[data-theme="dark"] .login-form .field input { background: #10160e; border-color: var(--color-border-strong); color: var(--color-text); }
[data-theme="dark"] .login-form .field input::placeholder { color: #91a18a; }
[data-theme="dark"] .prototype-index { background: radial-gradient(ellipse at 88% -7%,#26371c,transparent 34%),var(--color-canvas); }
[data-theme="dark"] .prototype-index-top,[data-theme="dark"] .prototype-index header > p:last-child,[data-theme="dark"] .prototype-index-list span,[data-theme="dark"] .prototype-index-list small { color: var(--color-text-muted); }
[data-theme="dark"] .prototype-index-top .brand { color: var(--color-text); }
[data-theme="dark"] .prototype-index-list,[data-theme="dark"] .prototype-index-list a { border-color: var(--color-border); }
[data-theme="dark"] .prototype-index-list a:hover { background: #273a1e; }
[data-theme="dark"] .prototype-index-list b { color: #caff3d; }
.flash-stack {
  position: fixed;
  z-index: 60;
  top: var(--space-4);
  right: var(--space-4);
  width: min(440px, calc(100vw - 32px));
  display: grid;
  gap: var(--space-2);
}

.flash {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.flash.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.flash-close {
  flex: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.flash-close::before {
  content: "×";
}

.flash.notice {
  border-color: var(--color-positive);
}

.flash.alert,
.form-errors,
.field-error {
  color: var(--color-negative);
}

.month-filter {
  display: flex;
  align-items: end;
  gap: var(--space-2);
}

.month-filter .field {
  margin: 0;
}

.month-filter-end {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.month-filter-end .month-picker-field-label {
  margin-bottom: 0;
}

.month-picker {
  position: relative;
  width: 190px;
  min-width: 190px;
}

.month-picker-field-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 650;
}

.month-picker-details {
  position: relative;
}

.month-picker-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  padding-right: var(--space-3);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.month-picker-trigger::-webkit-details-marker {
  display: none;
}

.month-picker-trigger::after {
  content: "▾";
  margin-left: auto;
  padding-left: var(--space-2);
}

.month-picker-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + var(--space-2));
  left: 0;
  width: min(320px, calc(100vw - 32px));
  padding: var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 12px 32px rgb(0 0 0 / 15%);
}

.dashboard-period .month-picker-panel,
.month-filter-end .month-picker-panel,
.v2-head-actions .month-picker-panel {
  right: 0;
  left: auto;
}

.month-picker-year-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.month-picker-year-controls strong {
  min-width: 5ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.month-picker-year-step {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text);
  font-size: 1.35rem;
  cursor: pointer;
}

.month-picker-year-step:hover {
  background: var(--color-surface-subtle);
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.month-picker-choice,
.month-picker-clear {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.month-picker-choice[aria-pressed="true"] {
  background: var(--color-primary-soft);
  color: var(--color-text);
}

.month-picker-clear {
  width: 100%;
  margin-top: var(--space-2);
}

.month-picker-choice:focus-visible,
.month-picker-clear:focus-visible,
.month-picker-year-step:focus-visible,
.month-picker-trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.section-title {
  margin-bottom: var(--space-5);
  font-size: var(--text-xl);
}

.actions,
.checks {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.checks .field {
  margin-bottom: var(--space-3);
}

.nowrap {
  white-space: nowrap;
}

.empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--color-text-muted);
}

.analysis-follow-up {
  margin-top: var(--space-4);
}

.analysis-section-title {
  margin: var(--space-2) 0 var(--space-5);
  font-size: var(--text-xl);
}

.analysis-score-label,
.analysis-score-caption {
  color: #aeb7ad;
}

.analysis-evidence {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.analysis-action-list {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  padding-left: var(--space-5);
}

.analysis-action-list li span {
  display: block;
  margin-top: var(--space-1);
}

.logout-link {
  margin-top: var(--space-3);
  width: 100%;
}

.sidebar-account-row .user-row > span:last-child {
  min-width: 0;
  overflow: hidden;
}

.sidebar-account-row .user-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-row {
  min-width: 0;
}

.sidebar-account-row .user-row {
  min-height: 48px;
  max-height: 48px;
}

.sidebar-account-row .user-copy {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.sidebar-account-row .user-copy .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transactions-filters {
  display: grid;
  justify-items: start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.transactions-filters .filter-card {
  width: 100%;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.pagination-link {
  min-width: var(--control-height);
  padding-inline: var(--space-3);
}

.pagination-gap {
  padding-inline: var(--space-1);
}

.file-field-label {
  font-size: var(--text-sm);
  font-weight: 750;
}

form.button_to {
  display: inline-flex;
}

.debt-archive {
  margin-top: var(--space-4);
}

@media (max-width: 1050px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

.chat-messages {
  display: grid;
  gap: var(--space-3);
  max-height: 520px;
  margin-bottom: var(--space-5);
  overflow-y: auto;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--space-3);
}

.chat-form .field {
  margin: 0;
}

.message {
  max-width: min(80%, 680px);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-subtle);
}

.message.user {
  justify-self: end;
  background: var(--color-primary-soft);
}

.message-error {
  border-color: var(--color-negative);
}

.message-pending {
  min-width: 88px;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
}

.typing-indicator > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentcolor;
  animation: typing-pulse 1.1s ease-in-out infinite;
}

.typing-indicator > span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-indicator > span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-pulse {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .typing-indicator > span {
    animation: none;
    opacity: 0.75;
  }
}

.transaction > span:nth-child(2) {
  min-width: 0;
}

.transaction-title,
.transaction-meta {
  display: block;
}

@media (max-width: 900px) {
  .side-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .month-filter,
  .chat-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .month-filter {
    display: grid;
  }

  .month-filter-end .month-picker {
    width: 100%;
    min-width: 0;
  }

  .month-filter-end .month-picker-panel {
    width: min(320px, 100%);
  }

  .message {
    max-width: 94%;
  }
}
.content {
  --green: var(--color-positive);
  --red: var(--color-negative);
  --muted: var(--color-text-muted);
  --text: var(--color-text);
  --line: var(--color-border);
}

.page-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.account-card h2 {
  margin: 18px 0 4px;
}

.account-card .money,
.account-balance .money {
  display: block;
  margin-top: 24px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.account-card.is-archived {
  opacity: .68;
}

.event-list {
  display: grid;
}

.event-row,
.impact-row {
  display: grid;
  grid-template-columns: minmax(110px, .35fr) 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border);
}

.event-row:last-child,
.impact-row:last-child {
  border-bottom: 0;
}

.impact-row {
  grid-template-columns: 1fr auto;
  padding-inline: 0;
}

.money.negative {
  color: var(--color-negative);
}

.money.positive {
  color: var(--color-positive);
}

.compact-grid {
  grid-template-columns: repeat(3, 1fr);
}

.event-actions,
.inline-reversal-form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.inline-reversal-form {
  flex-wrap: wrap;
}

.inline-reversal-form label {
  width: 100%;
}

@media (max-width: 760px) {
  .page-header-actions {
    display: grid;
  }

  .event-row {
    grid-template-columns: 1fr auto;
  }

  .event-row > span:first-child {
    grid-column: 1 / -1;
  }

  .compact-grid {
    grid-template-columns: 1fr;
  }
}
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.chart-card {
  min-width: 0;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) repeat(auto-fit, minmax(7rem, auto));
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border-color, #d9d9d9);
}

.classification-preview {
  display: grid;
  gap: .35rem;
  margin-bottom: 1rem;
}
/* FinAnal V2 prototypes: shared product layer on top of Bright. */
.plan-state { font-size: 1.55rem !important; }
.v2-plan-amount { max-width: 100%; overflow-wrap: normal; text-align: right; font-variant-numeric: tabular-nums; }
.v2-grid-4 .v2-kpi .v2-value { font-size: clamp(1.35rem,2.2vw,2.1rem); }
.v2-table td small { display: block; margin-top: 4px; }
.v2-content .file-picker { grid-template-columns: 44px minmax(0,1fr); }
.v2-content .file-picker-copy { min-width: 0; overflow-wrap: anywhere; }
.v2-content .file-picker-action { grid-column: 1 / -1; text-align: center; }
.v2-content input, .v2-content select, .v2-content textarea { min-width: 0; max-width: 100%; }
.v2-content .button { min-width: min-content; max-width: 100%; white-space: normal; overflow-wrap: normal; }
.v2-page-head { flex-wrap: wrap; }
.v2-page-head > .v2-head-actions { flex-shrink: 0; max-width: 100%; margin-left: auto; }
.v2-content .form-actions { flex-wrap: wrap; }
.v2-content .form-actions,.v2-content .v2-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.v2-toolbar,.filter-disclosure { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.dashboard-period { justify-content: flex-end; margin-bottom: 16px; }
.dashboard-toolbar .dashboard-period { margin: 0; }
.dashboard-cash-flow-section { display: grid; gap: var(--space-6); }
.dashboard-page-head { align-items: center; }
.dashboard-setup-state { margin-bottom: 16px; }
.dashboard-kpis .v2-kpi { position: relative; isolation: isolate; overflow: hidden; min-height: 170px; }
.dashboard-kpis .v2-kpi::after { content: ""; position: absolute; z-index: -1; right: -26px; bottom: -37px; width: 102px; height: 102px; border-radius: 50%; background: rgb(97 195 148 / 10%); }
.v2-grid-4.dashboard-kpis .v2-kpi .v2-value { font-size: clamp(.95rem,1.35vw,1.55rem); white-space: nowrap; overflow-wrap: normal; }
.dashboard-priority-grid { align-items: stretch; }
.dashboard-question-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.dashboard-question-row:first-of-type { padding-top: 0; }
.dashboard-question-row:last-child { padding-bottom: 0; border-bottom: 0; }
.dashboard-question-row > div { min-width: 0; }
.dashboard-question-row strong { display: flex; align-items: center; gap: 8px; }
.dashboard-question-row small { display: block; margin-top: 4px; color: var(--color-text-muted); }
.dashboard-question-row .v2-link { flex: none; text-align: right; }
.dashboard-question-count { display: inline-grid; min-width: 24px; height: 24px; padding: 0 7px; place-items: center; border-radius: 999px; background: var(--color-surface-subtle); font-size: .72rem; font-variant-numeric: tabular-nums; }
.dashboard-positive-state { margin: 0; }
.dashboard-chart-grid { align-items: stretch; }
.dashboard-balance-chart { overflow: hidden; }
.dashboard-balance-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(24px,4vw,48px); width: min(100%,620px); margin-inline: auto; }
.dashboard-balance-group { min-width: 0; }
.dashboard-balance-group figcaption { margin-top: 10px; color: var(--color-text-muted); font-size: .74rem; font-weight: 800; text-align: center; }
.dashboard-balance-columns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(42px,58px); justify-content: center; gap: 8px; align-items: end; }
.dashboard-balance-column { display: grid; min-width: 0; grid-template-rows: minmax(1.6em,auto) 96px auto; gap: 5px; align-items: end; text-align: center; }
.dashboard-balance-value { align-self: end; color: var(--color-text-muted); font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-balance-bar-space { display: flex; width: 100%; height: 96px; align-items: end; justify-content: center; border-bottom: 1px solid var(--color-border-strong); }
.dashboard-balance-bar { display: block; width: min(100%,58px); height: var(--height); min-height: 3px; border-radius: 7px 7px 0 0; background: #53d690; }
.dashboard-balance-group-liabilities .dashboard-balance-bar { background: #c9d8bb; }
.dashboard-balance-column > strong { color: var(--color-text-muted); font-size: .74rem; font-weight: 700; text-transform: capitalize; }
.dashboard-cash-flow .v2-flow { grid-template-columns: repeat(7,minmax(0,1fr)); overflow: visible; }
.dashboard-cash-flow .v2-flow-item { padding-inline: 6px; }
.dashboard-cash-flow .v2-flow-item strong { font-size: .7rem; letter-spacing: -.015em; }
.dashboard-category-plan-grid > .v2-card,.dashboard-forecast-grid > .v2-card { height: 100%; }
@media (max-width: 1100px) {
  .dashboard-cash-flow .v2-flow { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-cash-flow .v2-flow-item { padding-inline: 9px; }
  .dashboard-cash-flow .v2-flow-item strong { font-size: clamp(.88rem,1.15vw,1.1rem); letter-spacing: normal; }
}
.review-queue-indicator { width: 9px; height: 9px; flex: 0 0 9px; margin-left: auto; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 3px rgb(229 72 77 / 16%); }
.review-queue-toast { position: fixed; z-index: 61; top: 16px; right: 16px; width: min(390px,calc(100vw - 32px)); }
.review-queue-toast[hidden] { display: none; }
.review-queue-toast span { min-width: 0; }
.review-queue-toast strong { display: block; margin-bottom: 3px; }
.review-queue-toast .v2-link { margin-left: 6px; }
.v2-card > .v2-actions:last-child { margin-top: auto; padding-top: 20px; }
.classification-review-source { white-space: nowrap; }
.v2-note.owned-card-form { display: block; }
.shared-account-page,.shared-account-page :is(.v2-card,.v2-row,.v2-form-grid,.v2-inline-form) { min-width: 0; max-width: 100%; }
.shared-account-page :is(.v2-card,.v2-row) { overflow-wrap: anywhere; }
.shared-account-page .v2-row { flex-wrap: wrap; }
.shared-account-page .v2-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shared-account-page input[type="file"] { width: 100%; }
/* Keep transfer controls out of the first paint while the review form initializes. */
[data-classification-preview-form]:not([data-classification-preview-initialized]):has(input[name="decision[kind]"]:checked:not([value="internal_transfer"]))
  :is([data-classification-field-wrapper="destination"], [data-classification-field-wrapper="owned_card"]) { display: none; }
.owned-card-form h2 { margin-bottom: 12px; }
.classification-review-actions { display: grid; gap: 12px; margin-top: 20px; }
.classification-review-action-group { display: flex; flex-wrap: nowrap; justify-content: flex-end; align-items: stretch; gap: 9px; }
.classification-review-action-group .button { min-height: 42px; }
.classification-review-action-group form { display: flex; margin: 0; }
.classification-review-support-actions { padding-top: 12px; border-top: 1px solid var(--color-border); }
@media (max-width: 600px) {
  .classification-review-action-group { display: grid; grid-template-columns: minmax(0,1fr); }
  .classification-review-action-group .button,.classification-review-action-group form { width: 100%; }
  .classification-review-action-group form .button { width: 100%; }
}
.product-page-navigation { min-height: 32px; }
.product-page-navigation .v2-back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; font-weight: 750; }
.v2-content .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 760px) { .v2-content .form-grid { grid-template-columns: minmax(0,1fr); } }
.source-json { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.v2-menu-button[data-product-menu] { width: auto; min-width: 64px; padding: 0 10px; font-size: .85rem; }
.v2-app > .v2-main { grid-column: 2; }
.content.v2-content { padding: 42px 0 90px; }
.v2-sidebar .sidebar-foot { color: var(--color-text); }
.v2-sidebar .user-copy { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .sidebar.v2-sidebar { display: flex; }
  .v2-app > .v2-main { grid-column: auto; }
  .content.v2-content { padding: 26px 0 30px; }
  .v2-app .mobile-theme-toggle, .mobile-bottom-nav { display: none; }
  .dashboard-cash-flow .v2-flow { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-question-row { align-items: flex-start; }
}
@media (max-width: 430px) {
  .dashboard-toolbar { justify-content: stretch; }
  .dashboard-toolbar .dashboard-period,.dashboard-toolbar .month-picker,.dashboard-toolbar .button { width: 100%; }
  .dashboard-question-row { display: grid; }
  .dashboard-question-row .v2-link { justify-self: end; }
  .v2-grid-4.dashboard-kpis .v2-kpi .v2-value { font-size: clamp(1.2rem,7vw,1.8rem); }
  .dashboard-cash-flow .v2-flow { grid-template-columns: minmax(0,1fr); }
}
.v2-app { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0,1fr); background: var(--color-canvas); }
.v2-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; padding: 24px 16px 18px; border-right: 1px solid var(--color-border); background: var(--color-surface); }
.v2-sidebar .brand { padding: 0 12px 8px; color: var(--color-text); }
.v2-nav { display: grid; gap: 3px; }
.v2-nav-label { margin: 14px 12px 5px; color: var(--color-text-muted); font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.v2-nav a { display: flex; align-items: center; gap: 10px; min-height: 39px; padding: 7px 11px; border-radius: 9px; color: var(--color-text-muted); font-size: .85rem; font-weight: 650; }
.v2-nav a:hover { background: var(--color-surface-subtle); color: var(--color-text); }
.v2-nav a[aria-current="page"] { background: #caff3d; color: #19220f; }
.v2-nav-icon { width: 18px; flex: none; text-align: center; font-size: 1rem; }
.v2-sidebar-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 16px 5px 0; border-top: 1px solid var(--color-border); }
.v2-sidebar-foot .v2-profile { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; font-size: .78rem; }
.v2-avatar { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #d8ff78; color: #1a2115; font-weight: 800; }
.v2-sidebar-foot .theme-toggle { flex: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; }
.v2-version { padding: 1px 12px 0; color: var(--color-text-muted); font: 600 .68rem var(--font-mono); letter-spacing: .04em; }
.v2-mobile-version { display: none; }
.v2-mobile-head { display: none; }
.v2-main { min-width: 0; }
.v2-content { width: min(100% - 64px,1260px); margin: 0 auto; padding: 42px 0 90px; }
.v2-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 13px; color: var(--color-text-muted); font-size: .76rem; }
.v2-breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.v2-page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 27px; }
.v2-page-head h1 { margin: 5px 0 9px; font-size: clamp(2.05rem,4vw,3.65rem); line-height: .98; letter-spacing: -.06em; }
.v2-page-head p { max-width: 700px; color: var(--color-text-muted); }
.v2-head-actions,.v2-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 9px; }
.v2-actions { margin-top: 20px; }
.v2-eyebrow { color: #5e791b; font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.v2-card { display: flex; min-width: 0; padding: 24px; flex-direction: column; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); box-shadow: var(--shadow-card); }
.v2-card h2 { margin-bottom: 14px; font-size: clamp(1.25rem,2vw,1.75rem); line-height: 1.13; letter-spacing: -.04em; }
.v2-card h3 { margin-bottom: 8px; font-size: 1.02rem; letter-spacing: -.02em; }
.v2-card > p + p { margin-top: 9px; }
.v2-card > .v2-link:last-child { align-self: flex-end; margin-top: auto; padding-top: 16px; }
.v2-card > .button:last-child { align-self: flex-end; margin-top: auto; }
.v2-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.plan-fact-categories { grid-column: 1 / -1; min-width: 0; }
.v2-grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.v2-grid-4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.v2-stack { display: grid; gap: 16px; }
.v2-section { margin-top: 16px; }
.v2-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin: 0 0 12px; }
.v2-section-head h2 { font-size: clamp(1.35rem,2.3vw,1.9rem); letter-spacing: -.045em; }
.v2-muted,.v2-card small { color: var(--color-text-muted); }
.v2-kpi { display: grid; align-content: space-between; min-height: 142px; }
.v2-kpi .v2-value { display: block; margin: 13px 0 3px; font-size: clamp(1.55rem,2.8vw,2.5rem); font-weight: 800; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v2-kpi .v2-label { color: var(--color-text-muted); font-size: .82rem; font-weight: 700; }
.v2-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 258px; padding: clamp(24px,4vw,42px); border: 1px solid #b7e73f; border-radius: 18px; background: linear-gradient(115deg,#e5ff9a,#caff4c 55%,#aae637); color: #1a2510; }
.v2-hero::before { content: ""; position: absolute; z-index: -1; inset: -30%; background: radial-gradient(circle at 18% 22%,rgb(255 255 255 / 65%),transparent 40%),radial-gradient(circle at 78% 72%,rgb(81 162 32 / 23%),transparent 43%); animation: hero-drift 10s ease-in-out infinite alternate; }
.v2-hero h2 { max-width: 620px; min-width: 0; margin: 12px 0 10px; font-size: clamp(2rem,4.5vw,4.1rem); line-height: .98; letter-spacing: -.065em; overflow-wrap: anywhere; hyphens: auto; }
.setup-complete-hero h2 { overflow-wrap: normal; hyphens: none; }
.v2-hero p { max-width: 680px; color: #344c23; }
.v2-hero .v2-eyebrow { color: #39521b; }
.v2-hero .button-secondary { border-color: #80ad25; background: rgb(255 255 255 / 68%); color: #1b2811; }
.v2-note { display: flex; gap: 12px; padding: 15px 18px; border: 1px solid #b7d982; border-radius: 12px; background: #effbd9; color: #2b451a; font-size: .87rem; }
.v2-note strong { flex: none; }
.v2-note-warning { border-color: #e5c990; background: #fff5df; color: #6b4618; }
.v2-note-danger { border-color: #e9b9bd; background: #fff0f1; color: #7f3038; }
.v2-note-neutral { border-color: var(--color-border); background: var(--color-surface-subtle); color: var(--color-text); }
.debt-explanation > span { flex: 1; min-width: 0; }
.debt-explanation > a { flex: none; align-self: flex-start; }
.v2-status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 9px; border-radius: 999px; background: #e8ffc0; color: #33530f; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.v2-status.warn { background: #fff0cc; color: #75501b; }
.v2-status.error { background: #ffe1e4; color: #942d3b; }
.v2-status.info { background: #e7e6ff; color: #4b4389; }
.v2-row { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--color-border); }
.v2-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.v2-row > form { flex-shrink: 0; max-width: 100%; }
.v2-row:last-child { border-bottom: 0; padding-bottom: 0; }
.v2-row:first-child { padding-top: 0; }
.v2-row strong { display: block; }
.v2-row small { display: block; margin-top: 3px; }
.v2-row .v2-money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 800; }
.known-card-actions { display: flex; flex-shrink: 0; align-items: center; gap: 12px; }
.v2-link { color: #42691b; font-weight: 760; text-decoration: underline; text-underline-offset: 4px; }
.v2-inline-links { display: flex; flex-wrap: wrap; gap: 14px 20px; }
.v2-table-wrap { overflow-x: auto; }
.v2-table { width: 100%; min-width: 610px; }
.v2-table th,.v2-table td { padding: 11px 10px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.v2-table th { color: var(--color-text-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; }
.v2-table td:last-child,.v2-table th:last-child { text-align: right; }
.v2-table tbody tr:last-child td { border-bottom: 0; }
.v2-table .v2-money { white-space: nowrap; font-weight: 780; font-variant-numeric: tabular-nums; }
.v2-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; counter-reset: step; }
.v2-setup-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-bottom: 16px; counter-reset: setup-step; }
.v2-setup-step { min-width: 0; padding: 14px; border: 1px solid var(--color-border); border-radius: 11px; background: var(--color-surface); font-size: .82rem; font-weight: 760; }
.v2-setup-step::before { counter-increment: setup-step; content: "0" counter(setup-step); display: block; margin-bottom: 8px; color: var(--color-text-muted); font: 800 .76rem var(--font-mono); }
.v2-setup-step.current { border-color: #a8dc2b; box-shadow: inset 0 0 0 1px #a8dc2b; }
.v2-setup-step.completed { border-color: #b9e845; background: var(--color-primary-soft); color: var(--color-text); }
.v2-setup-step a { color: inherit; text-decoration: none; }
.v2-setup-step small { display: block; margin-top: 6px; font-size: .72rem; font-weight: 500; line-height: 1.35; }
[data-classification-additional-kinds] summary { color: var(--color-text-muted); cursor: pointer; font-size: .9rem; font-weight: 500; }
[data-classification-additional-kinds][open] summary { margin-bottom: 10px; }
.v2-setup-actions { align-items: stretch; margin-top: 24px; }
.v2-setup-actions form { display: flex; }
.v2-setup-actions .button { min-height: 43px; }
.setup-information-grid .v2-card { min-height: 170px; }
.setup-account-note { margin-top: auto; padding-top: 18px; }
.v2-step { min-width: 0; padding: 14px; border: 1px solid var(--color-border); border-radius: 11px; background: var(--color-surface); font-size: .82rem; }
.v2-step::before { counter-increment: step; content: "0" counter(step); display: block; margin-bottom: 8px; color: #5f7d2c; font: 800 .76rem var(--font-mono); }
.v2-step.current { border-color: #b9e845; background: var(--color-primary-soft); }
.v2-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
.v2-form-grid :is(.field, .v2-field) { align-content: start; min-width: 0; }
.v2-form-grid > [data-debt-kind]:not([hidden]) { display: contents; }
.v2-form-grid > [data-debt-kind][hidden] { display: none; }
.debt-balance-date { margin: 0 0 18px; }
.debt-balance-date summary,.debt-explanation summary,.debt-explanations summary { cursor: pointer; font-weight: 700; }
.debt-balance-date .hint,.debt-explanation p,.debt-explanations p { margin: 8px 0; }
.debt-explanations details + details { margin-top: 16px; }
.v2-field { display: grid; gap: 7px; margin-bottom: 17px; }
.shared-account-conversion-form > .conversion-history-choice,.shared-account-conversion-form > .v2-actions { grid-column: 1 / -1; }
.v2-field label,.v2-field legend { font-size: .82rem; font-weight: 760; }
.v2-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),.v2-field select,.v2-field textarea { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-surface); color: var(--color-text); }
.v2-field textarea { min-height: 94px; resize: vertical; }
.v2-field small { color: var(--color-text-muted); font-size: .74rem; }
.v2-field .debt-grace-note,.v2-field .debt-account-note { margin: 0; line-height: 1.35; }
.debt-account-field,.debt-credit-limit-field,.debt-card-interest-field { align-self: start; }
.debt-card-identifiers { grid-column: 1 / -1; }
.debt-card-interest-field label,.debt-grace-field label { line-height: 24px; }
.debt-card-interest-field input { height: 44px; }
.v2-fieldset { margin: 0 0 17px; padding: 0; border: 0; }
.v2-choice-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 8px; }
.v2-choice { display: inline-flex; gap: 7px; align-items: center; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); font-size: .81rem; }
.v2-choice > label { display: inline-flex; align-items: center; gap: 7px; margin: 0; cursor: pointer; }
.v2-choice input[type="radio"],.v2-choice input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; padding: 0; accent-color: var(--color-primary); }
.v2-progress { height: 9px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: var(--color-surface-subtle); }
.v2-progress span { display: block; width: var(--value); height: 100%; border-radius: inherit; background: #a7dc29; }
.v2-bar-chart { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; }
.v2-chart-column { flex: 1 0 118px; min-width: 118px; }
.v2-chart-bar-space { display: flex; align-items: flex-end; height: 190px; padding: 28px 8px 0; border-bottom: 1px solid var(--color-border-strong); }
.v2-bar-chart .v2-bar { width: 100%; height: var(--height); min-height: 3px; border-radius: 6px 6px 0 0; background: #b1e741; }
.v2-chart-label { display: grid; gap: 2px; margin-top: 10px; color: var(--color-text-muted); font-size: .69rem; }
.v2-chart-label .v2-money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.v2-flow { display: grid; grid-template-columns: repeat(7,minmax(126px,1fr)); gap: 8px; overflow-x: auto; }
.v2-flow-item { min-width: 0; padding: 9px; border-radius: 9px; background: var(--color-surface-subtle); }
.v2-flow-item:first-child,.v2-flow-item:last-child { background: var(--color-primary-soft); }
.v2-flow-item small { display: block; min-height: 2.2em; font-size: .7rem; }
.v2-flow-item strong { display: block; margin-top: 8px; font-size: clamp(.88rem,1.15vw,1.1rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--color-border); }
.v2-tab-bar { display: flex; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; border-bottom: 1px solid var(--color-border); }
.v2-tab-bar .v2-tabs { flex: 1 1 auto; margin-bottom: 0; border-bottom: 0; }
.v2-tab-filter { margin-left: auto; padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--color-text-muted); font: 730 .82rem var(--font-sans); cursor: pointer; }
.v2-tab-filter:hover,.v2-tab-filter[aria-expanded="true"] { border-bottom-color: #93c522; color: var(--color-text); }
.v2-tabs a { padding: 9px 12px; border-bottom: 2px solid transparent; color: var(--color-text-muted); font-size: .82rem; font-weight: 730; }
.v2-tabs a[aria-current="page"] { border-bottom-color: #93c522; color: var(--color-text); }
.v2-tabs a[aria-selected="true"] { border-bottom-color: #93c522; color: var(--color-text); }
.v2-tabs button { padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--color-text-muted); font: inherit; font-size: .82rem; font-weight: 730; cursor: pointer; }
.v2-tabs button[aria-selected="true"] { border-bottom-color: #93c522; color: var(--color-text); }
[data-v2-plan-panel][hidden], [data-v2-analysis-october][hidden], [data-v2-analysis-empty][hidden] { display: none !important; }
.v2-empty { padding: 36px 20px; border: 1px dashed var(--color-border-strong); border-radius: 12px; background: var(--color-surface); text-align: center; }
.v2-empty h2 { margin-bottom: 7px; }
.v2-empty p { max-width: 480px; margin: 0 auto; color: var(--color-text-muted); }
.v2-state-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.v2-state-grid .v2-card { min-height: 182px; }
.v2-state-grid .v2-actions { margin-top: auto; padding-top: 20px; }
.v2-rule { border-left: 3px solid #caff3d; padding-left: 13px; }
.v2-chat { display: grid; gap: 12px; }
.v2-bubble { max-width: 85%; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 13px; background: var(--color-surface-subtle); }
.v2-bubble.user { justify-self: end; border-color: #c6e98b; background: var(--color-primary-soft); }
.v2-chat-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); gap: 16px; align-items: start; }
.v2-sticky { position: sticky; top: 20px; }
.v2-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v2-diff > div { padding: 11px; border-radius: 8px; background: var(--color-surface-subtle); }
.v2-diff .new { background: var(--color-primary-soft); }
.v2-checklist { display: grid; gap: 9px; list-style: none; padding: 0; }
.v2-checklist li { display: flex; gap: 9px; align-items: start; }
.v2-checklist li::before { content: "✓"; display: grid; flex: none; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #d6ff87; color: #223614; font-weight: 800; }
.v2-checklist li.pending::before { content: "!"; background: #ffe9af; color: #654717; }
.v2-divider { height: 1px; margin: 20px 0; background: var(--color-border); }
.v2-mono { font-family: var(--font-mono); font-size: .83rem; overflow-wrap: anywhere; }
.v2-overlay { display: none; }
[data-theme="dark"] .v2-sidebar,[data-theme="dark"] .v2-card,[data-theme="dark"] .v2-step,[data-theme="dark"] .v2-empty { background: var(--color-surface); }
[data-theme="dark"] .v2-nav a[aria-current="page"] { color: #19220f; }
[data-theme="dark"] .v2-note { border-color: #557331; background: #25371e; color: #d5eeb9; }
[data-theme="dark"] .v2-note-warning { border-color: #77613a; background: #352d1d; color: #f0d59d; }
[data-theme="dark"] .v2-note-danger { border-color: #75454a; background: #3a2428; color: #ffbec5; }
[data-theme="dark"] .v2-note-neutral { border-color: var(--color-border); background: var(--color-surface-subtle); color: var(--color-text); }
[data-theme="dark"] .v2-status { background: #35491f; color: #dbff8a; }
[data-theme="dark"] .v2-status.warn { background: #4b3b22; color: #ffdb99; }
[data-theme="dark"] .v2-status.error { background: #4c292e; color: #ffbcc3; }
[data-theme="dark"] .v2-status.info { background: #302b4e; color: #cec4ff; }
[data-theme="dark"] .v2-eyebrow,[data-theme="dark"] .v2-link { color: #bce970; }
[data-theme="dark"] .v2-hero .v2-eyebrow { color: #39521b; }
.v2-hero .v2-link,[data-theme="dark"] .v2-hero .v2-link { color: #39521b; }
[data-theme="dark"] .v2-step.current { background: #31441d; }
[data-theme="dark"] .v2-setup-step.current { border-color: #b9e845; box-shadow: inset 0 0 0 1px #b9e845; }
[data-theme="dark"] .v2-setup-step.completed { background: #33471f; }
[data-theme="dark"] .v2-flow-item:first-child,[data-theme="dark"] .v2-flow-item:last-child,[data-theme="dark"] .v2-bubble.user,[data-theme="dark"] .v2-diff .new { background: #33471f; }
[data-theme="dark"] .v2-bar-chart .v2-bar { color: #17200e; }
@media (max-width: 1100px) { .v2-app { grid-template-columns: 212px minmax(0,1fr); } .v2-content { width: min(100% - 40px,1260px); } .v2-grid,.v2-chat-layout { grid-template-columns: 1fr; } .v2-grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); } .v2-grid-3,.v2-state-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .v2-flow { grid-template-columns: repeat(auto-fit,minmax(132px,1fr)); } .v2-sticky { position: static; } }
@media (max-width: 760px) { .v2-app { display: block; } .v2-sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(88vw,310px); height: 100dvh; transform: translateX(-105%); transition: transform var(--transition-fast); box-shadow: var(--shadow-float); } .v2-app.nav-open .v2-sidebar { transform: translateX(0); } .v2-overlay { position: fixed; z-index: 29; inset: 0; background: rgb(0 0 0 / 45%); } .v2-app.nav-open .v2-overlay { display: block; } .v2-mobile-head { display: flex; justify-content: space-between; align-items: center; height: 62px; padding: 0 16px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); } .v2-mobile-head .brand { padding: 0; color: var(--color-text); font-size: 1.4rem; } .v2-mobile-controls { display: flex; gap: 8px; } .v2-menu-button { width: 40px; height: 40px; border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-surface); color: var(--color-text); font-size: 1.2rem; } .v2-content { width: min(100% - 32px,1260px); padding: 26px 0 30px; } .v2-mobile-version { display: block; padding: 0 16px 28px; color: var(--color-text-muted); font: 600 .68rem var(--font-mono); text-align: center; } .v2-page-head { display: block; } .v2-head-actions { margin-top: 16px; } .v2-grid,.v2-grid-3,.v2-grid-4,.v2-state-grid,.v2-chat-layout { grid-template-columns: 1fr; } .v2-flow { grid-template-columns: repeat(2,minmax(0,1fr)); } .v2-sticky { position: static; } .v2-card { padding: 20px; } .v2-form-grid { grid-template-columns: 1fr; } .v2-steps { grid-template-columns: repeat(2,minmax(0,1fr)); } .v2-note { display: block; } .v2-note strong { display: block; margin-bottom: 5px; } }
@media (max-width: 760px) {
  .plan-fact-categories .v2-table-wrap { overflow: visible; }
  .plan-fact-categories .v2-table { display: block; width: 100%; }
  .plan-fact-categories .v2-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .plan-fact-categories .v2-table tbody { display: grid; gap: 10px; }
  .plan-fact-categories .v2-table tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
  .plan-fact-categories .v2-table tbody td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .plan-fact-categories .v2-table tbody td::before { display: block; margin-bottom: 2px; color: var(--color-text-muted); font-size: .72rem; }
  .plan-fact-categories .v2-table tbody td:nth-child(1) { grid-column: 1 / -1; font-weight: 600; }
  .plan-fact-categories .v2-table tbody td:nth-child(1)::before { content: attr(data-label); font-weight: 400; }
  .plan-fact-categories .v2-table tbody td:nth-child(2)::before,
  .plan-fact-categories .v2-table tbody td:nth-child(3)::before,
  .plan-fact-categories .v2-table tbody td:nth-child(4)::before { content: attr(data-label); }
  .plan-fact-categories .v2-table tbody td:nth-child(5) { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
  .plan-fact-categories .v2-table tbody td:nth-child(5)::before { content: none; }
}
@media (max-width: 430px) { .v2-flow { grid-template-columns: 1fr; } .v2-flow-item { padding: 9px; } .v2-flow-item strong { font-size: .92rem; } .v2-head-actions .button { width: 100%; } .v2-actions .button { width: 100%; } .v2-diff { grid-template-columns: 1fr; } .v2-row { flex-wrap: wrap; } .v2-row > :first-child { flex: 1 1 45%; } .v2-row > form { flex: 0 1 auto; } .v2-row .v2-money { white-space: nowrap; overflow-wrap: normal; flex-shrink: 0; max-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .v2-hero::before { animation: none; } .v2-sidebar { transition: none; } }
@media (max-width: 760px) { .v2-setup-steps { grid-template-columns: repeat(2,minmax(0,1fr)); } }

.savings-goals-page .v2-grid { align-items: start; }
.savings-goals-page .goal-overview-card { gap: 10px; overflow-wrap: anywhere; }
.goal-overview-card h2 { margin: 0; }
.goal-overview-card > p { margin: 0; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.goal-overview-card .v2-progress { margin-top: 0; }
.goal-overview-card .v2-link:last-child { align-self: flex-end; }
.goal-funding-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0; }
.goal-funding-metrics > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface-subtle); }
.goal-funding-metrics dt,.goal-protection-row > span { color: var(--color-text-muted); font-size: .74rem; }
.goal-funding-metrics dd { margin: 4px 0 0; font-size: clamp(.82rem,1.1vw,1rem); font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: normal; }
.goal-protection-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; padding: 10px 0 14px; border-bottom: 1px solid var(--color-border); }
.goal-protection-row strong { font-variant-numeric: tabular-nums; }
.goal-protection-row small { grid-column: 1 / -1; }
.goal-account-availability { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.goal-forecast-assumptions { margin-bottom: 0; }
.goal-forecast-chart { min-width: 0; margin-top: 12px; }
.goal-forecast-chart .v2-chart { margin: 0; }
.goal-forecast-chart .v2-bar-chart { display: grid; grid-template-columns: repeat(var(--goal-chart-columns),minmax(0,1fr)); gap: 8px; overflow: visible; }
.goal-forecast-chart .v2-chart-column { min-width: 0; flex: none; }
.goal-forecast-chart .v2-chart-bar-space { height: 150px; padding: 20px 5px 0; }
.goal-forecast-chart .v2-chart-label { min-width: 0; font-size: .65rem; overflow-wrap: anywhere; }
.goal-forecast-chart .v2-chart-label strong { overflow-wrap: anywhere; }
.goal-forecast-chart .v2-chart-label .v2-money { font-size: .58rem; white-space: normal; overflow-wrap: normal; }
@media (max-width: 430px) {
  .goal-funding-metrics { gap: 6px; }
  .goal-funding-metrics > div { padding: 8px; }
  .goal-funding-metrics dt { font-size: .68rem; }
  .goal-funding-metrics dd { font-size: .8rem; }
  .goal-forecast-chart .v2-bar-chart { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .goal-forecast-chart .v2-chart-bar-space { height: 120px; padding-inline: 3px; }
  .goal-forecast-chart .v2-chart-label { font-size: .62rem; }
  .goal-forecast-chart .v2-chart-label .v2-money { font-size: .62rem; }
}

.financial-conversations { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.financial-conversations > *, .financial-conversations .field { min-width: 0; }
.conversation-sidebar summary { cursor: pointer; font-weight: 700; }
.conversation-list { display: grid; gap: 8px; margin: 16px 0 24px; }
.conversation-list a { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text); text-decoration: none; overflow-wrap: anywhere; }
.conversation-list a[aria-current="page"] { background: var(--color-primary-soft); border-color: var(--color-primary); }
.conversation-list small { color: var(--color-text-muted); }
.conversation-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.financial-conversations h2 { overflow-wrap: anywhere; }
.financial-conversations .message { min-width: 0; max-width: min(90%, 680px); overflow-wrap: anywhere; }
.fact-suggestion { margin-top: 12px; }
.fact-suggestion summary { cursor: pointer; }
.profile-fact { padding: 16px 0; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
@media (min-width: 1000px) { .conversation-sidebar > details > div { display: block; } .conversation-sidebar > details > summary { list-style: none; cursor: default; } }
@media (max-width: 999px) { .financial-conversations { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .financial-conversations .chat-form { grid-template-columns: minmax(0, 1fr); } .financial-conversations .chat-form .button { width: 100%; } .financial-conversations .message { max-width: 100%; } }
@media (max-width: 999px) {
  #ai-chat-header { gap: 8px; margin-bottom: 10px; }
  #ai-chat-header h1 { margin: 0; font-size: 1.7rem; line-height: 1.1; }
  #ai-chat-header .v2-eyebrow, #ai-chat-header .muted { display: none; }
  #ai-chat-header #ai-chat-actions { margin-top: 8px; justify-content: flex-start; gap: 8px; }
  #ai-chat-header .button { width: auto; padding: 8px 12px; font-size: .85rem; }
  #ai-chat-header + .chat-disclaimer { margin-bottom: 10px; font-size: .8rem; line-height: 1.35; }
  .financial-conversations { gap: 10px; }
  .financial-conversations .conversation-sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
  .conversation-sidebar > details[open] { flex-basis: 100%; }
  .financial-conversations .chat-card { padding: 16px; }
  .financial-conversations .chat-card h2 { margin-bottom: 6px; }
  .financial-conversations .chat-messages { max-height: clamp(140px, 28dvh, 260px); margin-bottom: 12px; }
  .financial-conversations .chat-messages .empty { padding: 12px 8px; margin: 0; font-size: .9rem; }
  .financial-conversations .chat-form { gap: 8px; }
  .financial-conversations .chat-form textarea { min-height: 74px; height: 74px; }
}
.conversation-list strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.conversation-quality .v2-note { margin: 0 0 10px; padding: 10px 12px; font-size: .8rem; line-height: 1.35; }

.chat-nav-heading { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; }
.chat-nav-heading > a { min-width: 0; }
.chat-sidebar-create { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-md); background: transparent; color: inherit; cursor: pointer; opacity: 0; }
.chat-nav-heading:hover .chat-sidebar-create, .chat-nav-heading:focus-within .chat-sidebar-create { opacity: 1; }
.chat-sidebar-create:hover, .chat-sidebar-create:focus-visible { background: rgb(255 255 255 / 10%); opacity: 1; }
.chat-sidebar-row { display: flex; align-items: center; min-width: 0; }
.chat-sidebar-row > a { display: block; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sidebar-menu { position: relative; flex: none; }
.chat-sidebar-menu summary { padding: 2px 8px; cursor: pointer; list-style: none; }
.chat-sidebar-menu summary::-webkit-details-marker { display: none; }
.chat-sidebar-menu > form { position: absolute; z-index: 2; right: 0; top: 100%; min-width: max-content; padding: 6px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-float); }
.chat-sidebar-delete { padding: 6px 10px; border: 0; background: transparent; color: var(--color-danger); cursor: pointer; }
.v2-review-group-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.v2-review-group-item > span:first-of-type { min-width: 0; }
.v2-review-group-item small { display: block; overflow-wrap: anywhere; }
.v2-review-group-confirmation { display: flex; align-items: flex-start; gap: 8px; }
.v2-review-group-confirmation label { margin: 0; }
@media (hover: none), (max-width: 760px) { .chat-sidebar-create { opacity: 1; } }
/* Approved Steep + Inter foundation. Keep page structure and financial UI intact. */
@font-face {
  font-family: Inter;
  src: url(/assets/inter-variable-cbcc037cbd5438e1be390e824994859759e0e45a06cc9df883e1656ea5142e85.ttf) format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root, :root[data-theme="light"] {
  color-scheme: light;
  --color-canvas: #f5f3ee;
  --color-surface: #fff;
  --color-surface-subtle: #efede7;
  --color-surface-accent: #f4e9df;
  --color-text: #202327;
  --color-text-muted: #62696f;
  --color-border: #d9d8d2;
  --color-border-strong: #b8b7b1;
  --color-primary: #e5cdb7;
  --color-primary-hover: #d8bda4;
  --color-primary-soft: #f4e9df;
  --color-positive: #276044;
  --color-negative: #a33932;
  --color-warning: #795318;
  --color-info: #62696f;
  --color-focus: #a47b59;
  --foundation-success: #edf4ee;
  --foundation-warning: #faf1df;
  --foundation-danger: #fbece9;
  --foundation-link: #795538;
  --font-sans: Inter, system-ui, sans-serif;
  --font-mono: var(--font-sans);
  --text-md: 15px;
  --control-height: 44px;
  --radius-lg: 16px;
  --radius-md: 8px;
  --shadow-card: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-canvas: #17191b;
  --color-surface: #222528;
  --color-surface-subtle: #303438;
  --color-surface-accent: #3b3530;
  --color-text: #f1f0ec;
  --color-text-muted: #b3b5b8;
  --color-border: #414447;
  --color-border-strong: #62666b;
  --color-primary: #d9bda2;
  --color-primary-hover: #e5cdb7;
  --color-primary-soft: #3b3530;
  --color-positive: #a9d8ba;
  --color-negative: #f1b2aa;
  --color-warning: #e6c68e;
  --color-info: #b3b5b8;
  --color-focus: #d9bda2;
  --foundation-success: #293b30;
  --foundation-warning: #403729;
  --foundation-danger: #452e2e;
  --foundation-link: #d9bda2;
}

body { font: 400 15px/24px var(--font-sans); letter-spacing: normal; }
button, input, select, textarea, summary { font-family: var(--font-sans); font-size: 15px; font-weight: 400; }
h1, .v2-page-head h1, .page-header h1 { color: var(--color-text); font: 600 36px/44px var(--font-sans); letter-spacing: -.035em; }
h2, .v2-card h2, .v2-section-head h2, .card-header h2 { font: 500 24px/32px var(--font-sans); letter-spacing: -.025em; }
.field label, .field > span, .month-picker-field-label, .v2-kpi .v2-label { font-size: 14px; line-height: 20px; font-weight: 400; }
.money, .v2-money, .metric-value, .v2-value, .v2-table .v2-money, .v2-row .v2-money { font-family: var(--font-sans); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.v2-kpi .v2-value { font-size: 28px; font-weight: 500; line-height: 36px; font-variant-numeric: tabular-nums; }
.v2-grid-4 .v2-kpi .v2-value, .v2-grid-4.dashboard-kpis .v2-kpi .v2-value { font-size: clamp(22px,2.2vw,28px); font-weight: 500; line-height: 36px; }
.dashboard-kpis { display: flex; flex-wrap: wrap; min-width: 0; overflow-x: auto; }
.dashboard-kpis .v2-kpi { flex: 1 1 200px; min-width: min-content; overflow: visible; }
#plan-review-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--color-accent); vertical-align: middle; }
.elya-empty-state { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-block: 12px 0; color: var(--color-text-muted); }
.elya-rest, .elya-chat-avatar { flex: none; background: center / contain no-repeat; }
.elya-rest { mask-image: radial-gradient(ellipse at center, black 62%, transparent 78%); }
.elya-chat-avatar { mask-image: none; }
.elya-rest { width: 98px; height: 92px; }
.elya-chat-avatar { width: 58px; height: 78px; }
.react-chat .elya-empty-state { justify-content: center; }
.plan-allocation-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 4px 12px; margin-block: 12px; }
.plan-allocation-row progress { grid-column: 1 / -1; width: 100%; height: 7px; accent-color: var(--color-primary); }
.quality-notices { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.quality-notice-items { flex: 1 1 26rem; min-width: 0; overflow-wrap: anywhere; }
.quality-notice-items strong, .quality-notice-items .v2-link { display: inline; }
.quality-notice-items strong { margin-inline-end: 6px; }
.quality-notice-items .v2-link { margin-inline-start: 4px; }
.quality-notice-controls:not([hidden]) { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.quality-notice-controls button { display: grid; place-items: center; width: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 1.3rem; cursor: pointer; }
.quality-notice-controls button:hover, .quality-notice-controls button:focus-visible { background: var(--color-surface); }
.quality-notices [hidden] { display: none; }
.plan-before-approval form + p { margin-block-start: var(--space-6); }
.plan-before-approval .v2-actions .button, .strategy-revision .v2-actions .button { width: auto; max-width: 100%; }
#plan-proposal-preview, #plan-review-form { display: grid; gap: var(--space-6, 24px); }
#plan-proposal-preview > *, #plan-review-form > * { min-width: 0; margin-block: 0; }
.v2-grid-4.dashboard-kpis .v2-kpi .v2-value { min-width: max-content; font-size: 28px; }
.app-shell, .v2-app { background: var(--color-canvas); }
:root[data-theme="dark"] .app-shell { background: var(--color-canvas); }
.login-shell, :root[data-theme="dark"] .login-shell { background: var(--color-canvas); }
.login-shell::before, :root[data-theme="dark"] .login-shell::before { display: none; }
.login-panel, :root[data-theme="dark"] .login-panel { background: var(--color-surface); border-color: var(--color-border); border-radius: 16px; box-shadow: none; }
.login-wordmark, .login-form .field label, :root[data-theme="dark"] .login-form .field label { color: var(--color-text); }
.login-form .field input, :root[data-theme="dark"] .login-form .field input { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text); }
.login-form .field input:focus, .login-form .field input:focus-visible { border-color: var(--color-focus); outline-color: var(--color-focus); box-shadow: none; }
.sidebar, .v2-sidebar, .mobile-header, .v2-mobile-head { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.brand, .v2-sidebar .brand { color: var(--color-text); }
.card, .v2-card { border-radius: 16px; border-color: var(--color-border); background: var(--color-surface); box-shadow: none; }
.v2-card { padding: 24px; }
.v2-grid, .v2-grid-3, .v2-grid-4, .v2-stack { gap: 24px; }
.v2-section { margin-top: 24px; }
.v2-page-head, .dashboard-page-head, .v2-head-actions, .dashboard-toolbar, .dashboard-period { align-items: flex-end; }
.v2-head-actions > .field, .v2-head-actions > .v2-field { margin-bottom: 0; }
.debt-card-interest-field, .debt-grace-field { align-self: start; row-gap: 8px; }
.debt-card-interest-field label, .debt-grace-field label { font-size: 14px; line-height: 20px; font-weight: 400; }
.button, .v2-content .button, .month-select { min-height: 44px; height: auto; border-radius: 8px; padding: 9px 16px; line-height: 24px; white-space: normal; }
.button, .button:hover, .button:focus-visible { border-color: var(--color-primary); background: var(--color-primary); color: #202327; font-weight: 500; box-shadow: none; }
.button:hover { background: var(--color-primary-hover); }
.button-secondary, .button-secondary:hover, .button-secondary:focus-visible { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); }
.button-secondary:hover { background: var(--color-surface-subtle); }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .field select, .field textarea { min-height: 44px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); line-height: 24px; }
.month-select { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.month-picker-panel { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); border-radius: 16px; }
.month-picker-choice, .month-picker-clear, .month-picker-year-step { min-height: 44px; border-radius: 8px; }
.month-picker-year-step { width: 44px; }
.month-picker-choice { padding: 8px 3px; font-size: 14px; }
.month-picker-choice[aria-pressed="true"] { background: var(--color-primary-soft); border-color: var(--color-primary); }
.month-picker-year-step:disabled { opacity: .35; cursor: default; }
.v2-nav a, .nav-link { font-weight: 400; color: var(--color-text-muted); }
.v2-nav a:hover, .nav-link:hover { background: var(--color-surface-subtle); color: var(--color-text); }
.v2-nav a[aria-current="page"], :root[data-theme="dark"] .v2-nav a[aria-current="page"], .nav-link[aria-current="page"], .v2-avatar, .avatar, .mobile-profile-link, .menu-button { background: var(--color-primary); color: #202327; border-color: var(--color-primary); }
:root[data-theme="dark"] .avatar, :root[data-theme="dark"] .v2-avatar, :root[data-theme="dark"] .mobile-profile-link { background: var(--color-primary); color: #202327; border-color: var(--color-primary); }
.v2-eyebrow, .eyebrow, .v2-link, .text-link, :root[data-theme="dark"] .v2-eyebrow, :root[data-theme="dark"] .v2-link { color: var(--foundation-link); font-weight: 500; }
.v2-note, :root[data-theme="dark"] .v2-note, .v2-status, :root[data-theme="dark"] .v2-status { background: var(--foundation-success); color: var(--color-positive); border-color: var(--color-border); }
.v2-note-warning, :root[data-theme="dark"] .v2-note-warning, .v2-status.warn, :root[data-theme="dark"] .v2-status.warn { background: var(--foundation-warning); color: var(--color-warning); border-color: var(--color-border); }
.v2-note-danger, :root[data-theme="dark"] .v2-note-danger, .v2-status.error, :root[data-theme="dark"] .v2-status.error { background: var(--foundation-danger); color: var(--color-negative); border-color: var(--color-border); }
.v2-note-neutral, :root[data-theme="dark"] .v2-note-neutral, .v2-status.info, :root[data-theme="dark"] .v2-status.info { background: var(--color-surface-subtle); color: var(--color-text-muted); border-color: var(--color-border); }
.v2-hero { border-color: var(--color-border); background: var(--color-primary-soft); color: var(--color-text); }
.v2-hero::before, .dashboard-kpis .v2-kpi::after { display: none; }
.v2-hero p, .v2-hero .v2-eyebrow, .v2-hero .v2-link, :root[data-theme="dark"] .v2-hero .v2-link { color: var(--foundation-link); }
.v2-hero .button-secondary { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text); }
.v2-step.current, :root[data-theme="dark"] .v2-step.current { background: var(--color-primary-soft); }
.v2-setup-step.completed, :root[data-theme="dark"] .v2-setup-step.completed { background: var(--color-primary-soft); border-color: var(--color-primary); }
.v2-setup-step.current, :root[data-theme="dark"] .v2-setup-step.current { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }
.v2-table th { font-size: 14px; font-weight: 500; line-height: 20px; text-transform: none; letter-spacing: normal; }
.v2-table td { font-size: 15px; line-height: 24px; }
.v2-flow-item, :root[data-theme="dark"] .v2-flow-item { background: var(--color-primary-soft); }
.v2-flow-item:first-child, .v2-flow-item:last-child,
:root[data-theme="dark"] .v2-flow-item:first-child, :root[data-theme="dark"] .v2-flow-item:last-child {
  background: color-mix(in srgb, var(--color-primary) 24%, var(--color-primary-soft));
}
.v2-flow-item strong { font-weight: 500; }
.dashboard-cash-flow .v2-flow { grid-template-columns: repeat(7,minmax(min-content,1fr)); overflow-x: auto; }
.dashboard-cash-flow .v2-flow-item { padding: 12px; }
.dashboard-cash-flow .v2-flow-item strong { font-size: 18px; line-height: 26px; }
@media (max-width: 600px) {
  h1, .v2-page-head h1, .page-header h1 { font-size: 30px; line-height: 38px; }
  .v2-card { padding: 20px; }
  .v2-page-head > .v2-head-actions { flex-wrap: wrap; }
  .dashboard-page-head .dashboard-toolbar { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashboard-page-head .dashboard-period { grid-column: 1 / -1; margin: 0; }
  .dashboard-page-head .dashboard-toolbar > .button { min-height: 44px; padding: 6px 8px; font-size: 14px; line-height: 20px; }
  .dashboard-page-head .month-picker, .dashboard-page-head .month-picker-trigger { width: 100%; }
  .dashboard-kpis .v2-kpi { min-height: auto; padding: 14px 16px; }
}
@media (max-width: 340px) {
  .dashboard-page-head .dashboard-toolbar { grid-template-columns: minmax(0, 1fr); }
}

/* Shared portal shell and approved overview widgets. */
:root .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus-visible,
:root .field select:focus-visible, :root .field textarea:focus-visible, :root .month-select:focus-visible {
  border-color: var(--color-focus); outline: 2px solid var(--color-focus); outline-offset: 2px; box-shadow: none;
}
:root .button-secondary { background: transparent; }
/* Match the actual Simple Form wrappers, including fields without v2-field. */
:root :is(.field, .v2-field) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
:root :is(.field, .v2-field) select, :root :is(.field, .v2-field) textarea {
  background: var(--color-surface); color: var(--color-text); border-color: var(--color-border);
}
:root :is(.field, .v2-field) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):is(:disabled, [readonly]),
:root :is(.field, .v2-field) :is(select, textarea):is(:disabled, [readonly]) {
  background: var(--color-surface-subtle); color: var(--color-text-muted);
}
:root :is(.field, .v2-field) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):focus-visible,
:root :is(.field, .v2-field) :is(select, textarea):focus-visible {
  border-color: var(--color-focus); outline: 2px solid var(--color-focus); outline-offset: 2px; box-shadow: none;
}
:root :is(.field, .v2-field).field_with_errors input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
:root :is(.field, .v2-field).field_with_errors :is(select, textarea) { border-color: var(--color-negative); }
:root .v2-nav .nav-link:not([aria-current="page"]) { color: var(--color-text-muted); }
:root .v2-nav .nav-link:not([aria-current="page"]):hover, :root .user-row:hover { background: var(--color-surface-subtle); color: var(--color-text); }
:root .sidebar-foot { border-color: var(--color-border); }
:root .v2-tab-filter:hover, :root .v2-tab-filter[aria-expanded="true"] { border-bottom-color: var(--color-primary); }
:root .file-picker { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text); }
:root .file-picker:hover, :root .file-picker:focus-within, :root .file-picker.is-dragging {
  background: var(--color-primary-soft); border-color: var(--color-focus); box-shadow: none;
}
:root .file-picker-icon { background: var(--color-primary-soft); color: var(--foundation-link); }
:root .file-picker-action { background: var(--color-primary); color: #202327; }
:root .file-picker-copy small { color: var(--color-text-muted); }
:root .v2-content .hint:not(.field > small):not(.v2-note-warning):not(.v2-note-danger):not([role="alert"]) { background: var(--color-surface-subtle); color: var(--color-text-muted); }
:root .v2-content .field > small.hint { margin: 0; padding: 0; background: transparent; line-height: 1.45; }
.plan-item-editor { width: min(100%,800px); margin-inline: auto; }
.plan-row-action { width: 60px; }
.plan-row-action .button { padding: 10px; }
.plan-tab-notice, .plan-tab-notice ~ .v2-tabs { margin-bottom: var(--space-6); }
.plan-tab-panel { grid-template-columns: minmax(0, 1fr); }
.plan-tab-panel > :is(.v2-section, .v2-actions) { margin-top: 0; }
.v2-tabs a, .v2-tabs button { min-height: 44px; font-size: 15px; font-weight: 500; }
.v2-tabs a[aria-selected="true"], .v2-tabs a[aria-current="page"], .v2-tabs button[aria-selected="true"] { border-bottom-color: var(--color-primary); }
.plan-fact-cash-flow { grid-column: 1 / -1; }
#fact .v2-table { min-width: 0; table-layout: fixed; }
#fact .v2-table th, #fact .v2-table td { white-space: normal; overflow-wrap: anywhere; }
#fact .v2-table .v2-money { white-space: normal; }
.tabler-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; background: currentColor; mask: var(--icon) center / contain no-repeat; }
.drawer-close { display: none; }
.v2-nav a { min-height: 44px; font-size: 14px; line-height: 20px; }
.v2-nav-label { font-size: 12px; font-weight: 500; }
.v2-sidebar .brand { font-size: 26px; font-weight: 600; letter-spacing: -.04em; }
.sidebar.v2-sidebar { overflow: hidden; }
.v2-sidebar .v2-nav { overflow-y: auto; min-height: 0; align-content: start; overscroll-behavior: contain; }
.sidebar-brand { display: flex; align-items: baseline; gap: .5rem; padding: 0 12px 8px; }
.sidebar-brand .brand { padding: 0; }
.sidebar-brand, .v2-sidebar .sidebar-foot { flex-shrink: 0; }
.sidebar-brand .app-version { color: var(--color-text-muted); font-size: .75rem; }
.sidebar-account-row .logout-link { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; margin: 0; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-surface); color: var(--color-text); cursor: pointer; }
.sidebar-account-row .logout-link:hover { background: var(--color-surface-muted); }
.dashboard-question-row .button { flex: none; max-width: 45%; text-align: center; }
.dashboard-chart-row { margin-bottom: 16px; }
.dashboard-chart-row .v2-row { border: 0; padding: 0 0 8px; align-items: baseline; }
.dashboard-chart-row .v2-row strong { font-size: 14px; font-weight: 400; }
.dashboard-chart-row .v2-money { white-space: normal; font-size: 14px; }
.dashboard-share-track { height: 7px; background: #eae7e0; border-radius: 8px; overflow: hidden; }
.dashboard-share-track span { display: block; height: 100%; background: var(--chart-color); border-radius: inherit; }
.v2-bar-chart .v2-bar, .v2-progress span { background: var(--color-primary); }
.chart-color-0 { --chart-color: #a47b59; }
.chart-color-1 { --chart-color: #b3987b; }
.chart-color-2 { --chart-color: #708577; }
.chart-color-3 { --chart-color: #92979d; }
:root[data-theme="dark"] .dashboard-share-track { background: #35393d; }
:root[data-theme="dark"] .chart-color-0 { --chart-color: #cfab8b; }
:root[data-theme="dark"] .chart-color-1 { --chart-color: #bca58c; }
:root[data-theme="dark"] .chart-color-2 { --chart-color: #9ab3a0; }
:root[data-theme="dark"] .chart-color-3 { --chart-color: #a6afb8; }
.dashboard-cash-flow .v2-flow { gap: 10px; }
.cash-flow-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.cash-flow-heading h2 { margin: 0; }
.cash-flow-heading > span { font-size: 14px; line-height: 20px; }
.dashboard-cash-flow .v2-flow-item { display: flex; flex-direction: column; justify-content: space-between; min-height: 128px; }
.dashboard-cash-flow .v2-flow-item small { font-size: 13px; line-height: 20px; }
.dashboard-cash-flow .v2-flow-item strong { font-size: clamp(14px,1.35vw,18px); }
@media (max-width: 760px) {
  .flash-stack { position: static; width: 100%; margin: 0 0 16px; }
  body.drawer-open { overflow: hidden; }
  .drawer-close { display: inline-flex; position: absolute; top: 16px; right: 16px; width: 44px; padding: 8px; }
  .v2-sidebar { z-index: 70; padding-top: 24px; }
  .v2-overlay { z-index: 69; }
  .dashboard-question-row { display: flex; align-items: center; gap: 10px; }
  .dashboard-cash-flow .v2-flow-item strong { font-size: 18px; }
}
.elya-rest { background-image: url(/assets/elya-rest-light-db85b362e4532e98d85c4bf7e102813698ec5187c9824bb7e4a07d1d71b4f144.jpg); }
.elya-chat-avatar { background-image: url(/assets/elya-chat-pixel-b987a192d2808c8fb48e22477ebee68528b1b4e4d8d896ccd77a12d8babb926c.png); image-rendering: pixelated; }
:root[data-theme="dark"] .elya-rest { background-image: url(/assets/elya-rest-dark-8251358b8c47abdaa52fda0a9b06229a730f0d4bb09143158f4f943948a111af.jpg); }
/* Approved chat layout: React owns only this workspace. */
.chat-plan-breakdown { margin: 10px 0; }
.chat-plan-breakdown > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding-block: 4px; }
.chat-plan-breakdown dt { flex: 1 1 13em; }
.chat-plan-breakdown dd { margin: 0 0 0 auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .content.v2-content {
  width: 100%;
  padding-block: 12px;
  --chat-inset: max(var(--chat-gutter, 32px), calc((100% - 1260px) / 2));
}
body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) { overflow: hidden; }
body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .v2-app { height: 100dvh; min-height: 0; }
body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .v2-main { min-height: 0; overflow: hidden; }
body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .content.v2-content { height: 100%; display: flex; flex-direction: column; }
body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .product-page-navigation { flex: none; margin-inline: var(--chat-inset); }
body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) [data-react-component="AiChat"] { flex: 1; min-height: 0; }
body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .react-chat { height: 100%; min-height: 0; }
body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .v2-mobile-version { display: none; }
.react-chat { display: flex; flex-direction: column; min-width: 0; height: calc(100dvh - 90px); min-height: 400px; }
.react-chat > :is(.react-chat-header, .react-chat-quality, .react-chat-composer-area) { margin-inline: var(--chat-inset); }
.react-chat-header { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 12px; }
.react-chat-header h1 { margin: 0; font-size: 20px; line-height: 28px; letter-spacing: -.025em; }
.react-chat-header p { margin: 4px 0 0; color: var(--color-text-muted); font-size: 13px; line-height: 20px; }
.react-chat-quality { flex: none; margin-top: 8px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); font-size: 13px; line-height: 20px; }
.react-chat-quality summary { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 12px; color: var(--color-text); cursor: pointer; }
.react-chat-quality summary::-webkit-details-marker { display: none; }
.react-chat-quality summary .tabler-icon { color: var(--foundation-link); }
.react-chat-quality summary::after { content: ""; width: 7px; height: 7px; margin-inline: auto 3px; border: solid var(--color-text-muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.react-chat-quality[open] summary::after { transform: rotate(225deg); }
.chat-quality-count { min-width: 22px; border-radius: 6px; background: var(--color-primary-soft); color: var(--foundation-link); text-align: center; }
.react-chat-quality ul { list-style: none; padding: 0 12px; margin: 0; max-height: 24dvh; overflow-y: auto; }
.react-chat-quality li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 16px; padding: 10px 0; border-top: 1px solid var(--color-border); }
.react-chat-quality li div { flex: 1 1 240px; }
.react-chat-quality li p { color: var(--color-text-muted); margin: 2px 0 0; }
.react-chat-quality li a { margin-inline-start: auto; color: var(--foundation-link); text-decoration: underline; text-underline-offset: 3px; }
.react-chat-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--chat-inset); scrollbar-width: thin; scrollbar-color: var(--color-border-strong) transparent; }
.react-chat-history-links { display: flex; gap: 20px; margin-bottom: 12px; font-size: 14px; color: var(--foundation-link); }
.react-chat .react-chat-message { max-width: 900px; padding: 16px 18px; margin: 0 auto 16px 0; border: 1px solid #e3dfd7; border-radius: 14px; background: #faf9f6; color: var(--color-text); }
.react-chat .react-chat-message.user { max-width: 85%; margin-left: auto; margin-right: 0; background: #eee7de; border-color: #ddd2c3; }
.react-chat-what-if { margin-top: 14px; padding: 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
.react-chat-what-if h3 { margin: 0 0 10px; font-size: 15px; }
.react-chat-what-if dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; margin: 0; }
.react-chat-what-if dl > div { display: contents; }
.react-chat-what-if dt, .react-chat-what-if dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--color-border); }
.react-chat-what-if dt { color: var(--color-text-muted); padding-right: 12px; }
.react-chat-what-if dd { font-variant-numeric: tabular-nums; text-align: right; }
.react-chat-what-if p { margin: 10px 0 0; color: var(--color-text-muted); font-size: 13px; }
.react-chat .react-chat-message.is-arriving { animation: react-chat-arrive 220ms ease-out both; }
@keyframes react-chat-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .react-chat .react-chat-message.is-arriving { animation: none; } }
.react-chat-send.is-sending { position: relative; }
.react-chat-send.is-sending .tabler-icon { opacity: .35; }
.react-chat-send.is-sending::after { position: absolute; inset: 0; content: ""; width: 12px; height: 12px; margin: auto; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: react-chat-send-spin 700ms linear infinite; }
@keyframes react-chat-send-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .react-chat-send.is-sending::after { animation: none; border-right-color: currentColor; opacity: .5; } }
:root[data-theme="dark"] .react-chat .react-chat-message { background: #2a2c2c; border-color: #414442; color: var(--color-text); }
:root[data-theme="dark"] .react-chat .react-chat-message.user { background: #35332e; border-color: #514b42; }
:root[data-theme="dark"] .react-chat-what-if { background: #282a29; border-color: #464945; }
@media (max-width: 480px) { .react-chat-what-if { padding: 11px; } .react-chat-what-if dt, .react-chat-what-if dd { font-size: 13px; } }
.react-chat-message > small { display: block; margin-bottom: 7px; color: var(--color-text-muted); font-size: 12px; line-height: 18px; }
.react-chat-message .conversation-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.chat-markdown { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.chat-markdown > :first-child { margin-top: 0; }
.chat-markdown > :last-child { margin-bottom: 0; }
.chat-markdown :is(h1,h2,h3,h4,h5,h6) { font: 600 1.05em/1.35 var(--font-sans); letter-spacing: normal; margin: 1em 0 .4em; }
.chat-markdown p, .chat-markdown :is(ul,ol,blockquote,pre,table) { margin: .55em 0; }
.chat-markdown :is(ul,ol) { padding-inline-start: 1.5em; }
.chat-markdown ul { list-style: disc; }
.chat-markdown ol { list-style: decimal; }
.chat-markdown blockquote { border-inline-start: 3px solid var(--color-primary); padding-inline-start: 12px; color: var(--color-text-muted); }
.chat-markdown :is(pre,table) { display: block; max-width: 100%; overflow-x: auto; }
.chat-markdown pre { padding: 10px; border-radius: 8px; background: var(--color-surface-subtle); }
.chat-markdown table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.chat-markdown :is(th,td) { padding: 5px 10px; border-bottom: 1px solid var(--color-border); text-align: start; }
.chat-markdown a { text-decoration: underline; color: var(--foundation-link); }
.chat-planning-step { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-block: 8px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); }
.chat-planning-step p { margin: 0; font-size: 14px; }
.chat-planning-step .button { margin-inline-start: auto; }
.chat-plan-catalog { flex: 1 1 220px; min-width: 0; }
.chat-plan-catalog summary { cursor: pointer; padding-block: 5px; }
.chat-plan-catalog-body { display: grid; gap: 12px; max-height: 30dvh; overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.chat-plan-catalog fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
.chat-plan-catalog legend { font-weight: 600; }
.chat-plan-catalog .chat-plan-choice { display: flex; align-items: center; gap: 8px; padding-block: 4px; overflow-wrap: anywhere; }
.chat-plan-choice input { width: 18px; height: 18px; min-height: 0; flex-shrink: 0; }
.chat-plan-catalog form, .chat-plan-catalog form label { display: grid; gap: 6px; min-width: 0; }
.chat-plan-catalog form { gap: 10px; padding-block: 6px; }
.chat-plan-catalog form input, .chat-plan-catalog form select { min-width: 0; width: 100%; }
@media (max-width: 1100px) { body[data-page="ai-chats"] { --chat-gutter: 20px; } }
.react-chat-pending { width: fit-content; min-width: 72px; }
.react-chat-proposal, .react-chat .fact-suggestion { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.react-chat-plan-proposal > div:first-child { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.react-chat-plan-proposal > div:first-child span { color: var(--color-text-muted); font-size: 13px; }
.react-chat-plan-proposal p { margin: 6px 0 10px; color: var(--color-text-muted); font-size: 14px; }
.chat-planning-step { flex: none; display: grid; align-items: start; gap: 10px; padding: 14px 16px; margin: 12px auto 20px; width: min(900px,100%); }
.chat-planning-step > p { line-height: 1.45; }
.chat-planning-step > .button { margin-inline-start: 0; justify-self: start; }
.chat-planning-intro { display: grid; gap: 4px; }
.chat-planning-intro strong, .chat-planning-ready > strong { font-size: 15px; font-weight: 600; }
.chat-planning-intro p { margin: 0; color: var(--color-text-muted); font-size: 14px; line-height: 1.45; }
.chat-planning-ready { border-color: var(--color-border-strong); background: var(--color-surface-subtle); }
.plan-review-guide { display: grid; gap: 16px; }
.plan-review-guide h2 { margin: 0; font-size: 20px; }
.plan-review-guide > p { margin: 0; color: var(--color-text-muted); }
.plan-review-guide ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.plan-review-guide li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-subtle); }
.plan-review-guide li > span { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 1px solid var(--color-border-strong); border-radius: 50%; color: var(--color-text-muted); font-size: 13px; }
.plan-review-guide li[data-complete="true"] > span, .plan-review-guide li[data-current="true"] > span { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-text); }
.plan-review-guide li > div { min-width: 0; }
.plan-review-guide li strong { display: block; font-size: 14px; }
.plan-review-guide li p { margin: 4px 0 0; color: var(--color-text-muted); font-size: 13px; line-height: 1.4; }
@media (max-width: 680px) { .plan-review-guide ol { grid-template-columns: 1fr; gap: 8px; } .plan-review-guide li { padding: 10px; } }
.react-chat-clarifications { width: min(640px, calc(100vw - 32px)); max-height: min(88vh, 820px); overflow-y: auto; border: 1px solid var(--color-border); border-radius: 16px; padding: 24px; color: var(--color-text); background: var(--color-surface); }
.react-chat-clarifications::backdrop { background: rgb(15 23 42 / 55%); }
.chat-question-panel {
  position: fixed;
  z-index: 1001;
  box-sizing: border-box;
  inset: auto auto var(--chat-panel-bottom, 16px) var(--chat-panel-left, 16px);
  width: var(--chat-panel-width, calc(100% - 32px));
  max-width: none;
  max-height: var(--chat-panel-height, 80dvh);
  margin: 0;
  padding: clamp(16px, 3vw, 28px);
  overscroll-behavior: contain;
  background: var(--color-surface);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 36px rgb(20 22 24 / 16%);
}
.chat-question-panel::backdrop { background: rgb(16 18 21 / 7%); }
.chat-question-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 16px; }
.chat-question-top strong { font-size: 14px; font-weight: 500; color: var(--color-text-muted); }
.chat-question-top nav { display: flex; gap: 3px; }
.chat-question-top button { width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--color-text-muted); cursor: pointer; }
.chat-question-top button[data-answered=true] { border-color: var(--color-border); color: var(--color-text); }
.chat-question-top button[aria-current=step] { background: var(--color-primary); color: #202327; }
.chat-question-top .chat-question-close { margin-inline-start: auto; font-size: 22px; }
.chat-question-body { min-width: 0; padding: 0; border: 0; margin: 0; }
.chat-question-body legend { max-width: 100%; padding: 0; font-size: clamp(18px, 2vw, 22px); line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.chat-question-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); gap: 8px; margin: 16px 0; }
.chat-question-options button { min-height: 44px; border: 1px solid var(--color-border); border-radius: 10px; padding: 8px 14px; background: var(--color-surface); color: var(--color-text); text-align: start; overflow-wrap: anywhere; cursor: pointer; }
.chat-question-options button:hover, .chat-question-options button[aria-pressed=true] { border-color: var(--color-focus); background: var(--color-primary-soft); }
.chat-question-body label { display: grid; gap: 4px; font-size: 13px; color: var(--color-text-muted); }
.chat-question-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 20px; }
.chat-question-footer:not(:empty) { margin-top: 12px; }
.chat-question-footer small { margin-inline-end: auto; color: var(--color-text-muted); }
.react-chat-clarifications textarea, .react-chat-clarifications select { box-sizing: border-box; width: 100%; min-width: 0; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font: inherit; }
.chat-question-body textarea { min-height: 44px; resize: vertical; }
@media (max-width: 600px) {
  .chat-question-panel { padding: 12px; }
  .chat-question-top { margin-bottom: 8px; }
  .chat-question-body legend { font-size: 18px; }
  .chat-question-options { gap: 6px; margin: 10px 0; }
  .chat-question-options button { min-height: 38px; padding: 6px 10px; }
  .chat-question-footer small { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .chat-question-panel[open] { animation: chat-question-rise 290ms cubic-bezier(.22, 1, .36, 1); }
  @keyframes chat-question-rise {
    from { transform: translateY(32px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}
.fact-suggestion-compact { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--color-border); }
.fact-suggestion-compact p, .fact-suggestion-saved { margin: 0 0 8px; overflow-wrap: anywhere; }
.fact-suggestion-saved { color: var(--color-primary); }
.react-chat-proposal summary, .react-chat .fact-suggestion summary { cursor: pointer; font-weight: 500; }
.react-chat-proposal a:not(.button) { color: var(--foundation-link); text-decoration: underline; }
.react-chat-composer-area { flex: none; padding-top: 10px; }
.react-chat-composer.chat-form { display: block; grid-template-columns: none; align-items: initial; gap: 0; width: auto; margin: 0; }
.react-chat-composer { padding: 12px; border: 1px solid var(--color-border-strong); border-radius: 16px; background: var(--color-surface); }
.react-chat-composer textarea { display: block; width: 100%; min-height: 54px; max-height: 140px; padding: 4px; border: 0; resize: vertical; background: transparent; color: var(--color-text); line-height: 24px; }
.react-chat-composer textarea:focus { outline: 0; }
.react-chat-composer:focus-within { border-color: var(--color-focus); }
.react-chat-controls, .react-chat-send-controls { display: flex; align-items: end; justify-content: space-between; gap: 8px; min-width: 0; }
.react-chat-controls { margin-top: 8px; }
.react-chat-controls > .react-chat-picker { flex: 0 1 280px; }
.react-chat-send-controls { flex: 0 1 320px; }
.react-chat-send-controls .react-chat-picker { flex: 1; }
.react-chat-send { flex: none; width: 44px; padding-inline: 10px; }
.react-chat-picker { position: relative; min-width: 0; }
.react-chat-picker > button, .react-chat-picker-list button { width: 100%; height: auto; min-height: 44px; border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; background: var(--color-surface); color: var(--color-text); text-align: left; white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 20px; }
.react-chat-picker > button { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 44px; }
.react-chat-picker-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.react-chat-picker > button[aria-expanded="true"] { border-color: var(--color-focus); }
.react-chat-picker-list { position: absolute; z-index: 35; bottom: calc(100% + 8px); left: 0; min-width: 100%; width: 260px; max-width: min(320px,calc(100vw - 64px)); max-height: 210px; overflow: auto; padding: 6px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); box-shadow: var(--shadow-float); }
.react-chat-send-controls .react-chat-picker-list { right: 0; left: auto; }
.react-chat-picker-list button { display: flex; align-items: center; gap: 9px; border-color: transparent; }
.react-chat-picker-list [aria-selected="true"] { background: var(--color-primary-soft); border-color: var(--color-border); }
.react-chat-picker button:disabled { opacity: .6; }
.react-chat-disclaimer { margin: 5px 0 0; color: var(--color-text-muted); font-size: 11px; line-height: 16px; }
.react-chat-disclaimer span { display: inline-block; text-decoration: underline dotted; }
.react-chat-error { color: var(--color-negative); font-size: 14px; line-height: 20px; margin-bottom: 8px; }
.react-chat-pin { font-size: 13px; line-height: 20px; margin-bottom: 8px; }
.react-chat-pin a { color: var(--foundation-link); text-decoration: underline; }
.react-chat-settings { width: min(560px,calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 24px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); color: var(--color-text); margin: auto; }
.react-chat-settings::backdrop { background: rgb(0 0 0 / 50%); }
.react-chat-settings fieldset { border: 0; padding: 0; margin: 16px 0 0; }
.chat-sidebar-conversations { display: grid; gap: 4px; margin: 0 0 8px 22px; }
.chat-nav-heading:has(> a[aria-current=page]) { background: var(--color-primary); color: #202327; border-radius: 9px; }
:root .v2-nav .chat-nav-heading > a[aria-current=page] { background: transparent; }
.v2-nav .chat-sidebar-conversations .chat-sidebar-row > a { min-height: 32px; padding: 5px 8px; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.chat-sidebar-more > div { max-height: 220px; overflow: auto; }
.chat-sidebar-conversations summary { cursor: pointer; font-size: 13px; padding: 6px 8px; }
.chat-sidebar-menu summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.chat-sidebar-conversations .button { font-size: 13px; width: 100%; }
.react-chat-actions { position: relative; flex: none; }
.react-chat-actions > summary { display: grid; width: 40px; min-height: 40px; place-items: center; padding: 0; font-size: 24px; line-height: 1; cursor: pointer; list-style: none; }
.react-chat-actions > summary::-webkit-details-marker { display: none; }
.react-chat-actions > div { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; min-width: max-content; padding: 6px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); box-shadow: var(--shadow-float); }
.react-chat-actions > div button { width: 100%; }
.chat-fallback-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-fallback-title h2 { min-width: 0; margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; }
.chat-fallback-actions { position: relative; flex: none; }
.chat-fallback-actions > summary { display: grid; width: 40px; min-height: 40px; place-items: center; border: 1px solid var(--color-border); border-radius: 9px; font-size: 24px; cursor: pointer; list-style: none; }
.chat-fallback-actions > summary::-webkit-details-marker { display: none; }
.chat-fallback-actions > div { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; min-width: max-content; padding: 6px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); box-shadow: var(--shadow-float); }
.chat-sidebar-row[hidden] { display: none !important; }
.chat-sidebar-more { justify-self: start; width: 38px; min-height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--color-text-muted); font: inherit; font-size: 20px; cursor: pointer; }
.chat-sidebar-more:hover, .chat-sidebar-more:focus-visible { background: var(--color-primary-soft); color: var(--color-text); }
.chat-sidebar-conversations[hidden] { display: none; }
.react-chat--empty .react-chat-messages { display: flex; flex-direction: column; justify-content: center; }
.react-chat--empty .react-chat-messages > .chat-planning-step { width: min(760px, 100%); margin: auto; }
.react-chat-welcome { margin: 0 auto 18px; text-align: center; }
.react-chat--empty .react-chat-welcome { width: min(760px, 100%); margin: 0 auto 12px; }
.react-chat--empty-default .react-chat-messages { display: none; }
.react-chat--empty-default .react-chat-composer-area { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: safe center; width: min(1260px, calc(100% - var(--chat-gutter, 32px) * 2)); margin-inline: auto; padding: 8px 2px; }
.react-chat-welcome .elya-chat-avatar { display: block; width: 104px; height: 128px; margin: 0 auto 6px; }
.react-chat-welcome p { max-width: 580px; margin: 0 auto 14px; color: var(--color-text); font-size: 18px; line-height: 1.5; }
.react-chat-starters { display: grid; gap: 2px; margin: 12px 0 4px; }
.react-chat-starters button { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 6px 12px; background: transparent; color: var(--color-text-muted); border: 0; border-radius: 10px; text-align: start; font: inherit; cursor: pointer; }
.react-chat-starters button:is(:hover,:focus-visible) { background: var(--color-primary-soft); color: var(--color-text); }
.react-chat-starters .tabler-icon { color: var(--foundation-link); }
.react-chat--empty-default .react-chat-composer { box-shadow: var(--shadow-subtle); }
.react-chat-pending .elya-chat-avatar { display: inline-block; width: 30px; height: 40px; vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) {
  .react-chat-welcome .elya-chat-avatar { animation: elya-resting 3.2s ease-in-out infinite; }
  @keyframes elya-resting { 50% { transform: translateY(-4px); } }
}
@media (max-width: 760px) {
  body[data-page="ai-chats"] { --chat-gutter: 16px; }
  body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .v2-app { display: flex; flex-direction: column; height: var(--chat-window-height, 100dvh); }
  body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .v2-mobile-head { flex: none; }
  body[data-page="ai-chats"]:has([data-react-component="AiChat"][data-react-ready="true"]) .v2-main { flex: 1; }
  .react-chat { height: auto; min-height: 0; flex: 1; }
  .react-chat-header { gap: 8px; padding-bottom: 6px; }
  .react-chat-header h1 { font-size: 18px; line-height: 24px; }
  .react-chat-header p { font-size: 12px; line-height: 18px; }
  .react-chat-welcome .elya-chat-avatar { width: 64px; height: 78px; }
  .react-chat-welcome p { margin-bottom: 4px; font-size: 16px; }
  .react-chat .react-chat-message { padding: 14px; }
  .react-chat .react-chat-message.user { max-width: 92%; }
  .react-chat-messages { padding-block: 8px; }
  .react-chat-composer-area { padding-top: 6px; }
  .react-chat-composer { position: relative; padding: 8px; }
  .react-chat:not(.react-chat--empty) .react-chat-composer { padding-block: 4px; }
  .react-chat:not(.react-chat--empty) .react-chat-controls { margin-top: 0; }
  .react-chat-controls { gap: 5px; }
  .react-chat-controls > .react-chat-picker { flex: 0 0 44px; }
  .react-chat-send-controls { display: flex; flex: 0 0 auto; gap: 5px; width: auto; }
  .react-chat-send-controls .react-chat-picker { flex: 0 0 44px; }
  .react-chat .react-chat-send { width: 44px; min-width: 44px; height: 44px; padding: 0; }
  .react-chat-picker > button { justify-content: center; width: 44px; height: 44px; padding: 0; }
  .react-chat-picker-label { display: none; }
  .react-chat-picker { position: static; }
  .react-chat-composer .react-chat-picker-list { inset-inline: 8px; width: auto; min-width: 0; max-width: none; max-height: min(40dvh,280px); }
  .react-chat-picker-list button { min-height: 44px; }
  .react-chat-composer textarea { min-height: 46px; max-height: 82px; }
  .react-chat-disclaimer { margin-top: 3px; }
}

#ai-chat-content { display: contents; }
.react-chat { position: relative; }
.react-chat > .react-chat-header { margin-inline: var(--chat-gutter, 24px); }
.react-chat-header h1 { font-size: 16px; line-height: 22px; }
.react-chat-header > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.react-chat-actions > summary { background: transparent; border-color: transparent; }
.react-chat-composer { border-radius: 22px; }
.react-chat-controls .react-chat-picker > button { border-color: transparent; background: transparent; }
.react-chat-controls .react-chat-picker > button:is(:hover,:focus-visible) { background: var(--color-primary-soft); }
.react-chat .react-chat-send { border-radius: 50%; width: 44px; height: 44px; }
.react-chat--empty-default .react-chat-controls { background: var(--color-primary-soft); border-radius: 12px; padding: 0 4px; }
.react-chat-companion { display: flex; flex: none; align-items: center; gap: 6px; pointer-events: none; }
.react-chat-companion strong, .react-chat-companion small { display: block; font-size: 13px; }
.react-chat-companion small { font-size: 11px; color: var(--color-text-muted); }
.companion-scene { position: relative; width: 32px; height: 40px; }
.companion-scene .elya-chat-avatar { display: block; width: 100%; height: 100%; transform-origin: center bottom; }
.companion-laptop { display: none; position: absolute; left: 0; bottom: 1px; width: 19px; height: 11px; border: 1px solid var(--color-text-muted); border-bottom: 3px solid var(--foundation-link); border-radius: 2px; background: var(--color-primary); transform: skewX(9deg); }
[data-thinking="true"] .companion-laptop { display: block; }
@media (min-width: 1450px) {
  .react-chat-companion { position: absolute; right: 24px; top: 76px; padding: 8px 16px; border-radius: 16px; background: var(--color-surface); border: 1px solid var(--color-border); }
  .companion-scene { width: 40px; height: 50px; }
}
@media (max-width: 360px) {
  .react-chat-companion > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (prefers-reduced-motion: no-preference) {
  .react-chat-companion[data-thinking="true"] .elya-chat-avatar { animation: elya-typing .5s ease-in-out infinite alternate; }
  @keyframes elya-typing { to { transform: translateY(2px) rotate(-5deg); } }
}
/* Guest pages use the application font and theme. */
body.landing-page { --landing-content-width: min(1200px, calc(100% - 64px)); display: block; min-width: 0; margin: 0; background: var(--color-canvas); color: var(--color-text); }
.landing-page *, .landing-page *::before, .landing-page *::after { box-sizing: border-box; }
.landing-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--color-text); font-size: 24px; font-weight: 650; letter-spacing: -.065em; text-decoration: none; }
.landing-brand img { display: block; flex: none; border-radius: 7px; }
.landing-header { position: absolute; z-index: 5; inset: 0 0 auto; max-width: 1220px; margin: auto; padding: 18px 42px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.landing-header nav, .landing-header-actions { display: flex; align-items: center; gap: 26px; }
.landing-header .theme-toggle { position: static; flex-shrink: 0; }
.landing-header nav a, .landing-footer a { color: var(--color-text); text-decoration: none; font-size: 14px; }
.landing-header nav a:hover, .landing-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.landing-main { width: 100%; }
.landing-eyebrow { color: var(--color-text-muted); font-size: 13px; margin: 0 0 16px; }
.landing-page :is(button,a,summary):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }

.landing-cover { --sand: #faf9f5; --light-left: #e5e1ee; --light-center: #f6d5bd; --light-end: #f6e8c9; --board: #fff; --side: #f7f7f5; --quiet: #686b69;
  --blue-bg: #e3edf5; --blue-ink: #365873; --clay-bg: #f4e5da; --clay-ink: #83513c; --line-bg: #efeee9; --line-ink: #52574c;
  position: relative; overflow: clip; background: var(--sand); }
[data-theme="dark"] .landing-cover { --sand: #181918; --light-left: #33313e; --light-center: #44352f; --light-end: #38352a; --board: #232424; --side: #202120; --quiet: #b7b8b0;
  --blue-bg: #2b3c48; --blue-ink: #b7d4e7; --clay-bg: #544238; --clay-ink: #f3d4bc; --line-bg: #31332e; --line-ink: #d0d2c3; }
.story-screen { position: relative; isolation: isolate; padding: 100px 0 44px; }
.story-screen::before { content: ""; position: absolute; z-index: -2; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 28% 44% at 61% 54%, var(--light-center), transparent 100%), radial-gradient(ellipse 35% 43% at 43% 45%, var(--light-left), transparent 100%), radial-gradient(ellipse 34% 31% at 51% 64%, var(--light-end), transparent 100%); }
.story-screen::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23555' filter='url(/%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E"); }
.landing-hero { z-index: 3; text-align: center; margin: 24px auto 56px; width: min(660px, 90%); }
.landing-hero h1 { font-size: clamp(45px, 5.25vw, 88px); line-height: 1.04; font-weight: 540; letter-spacing: -.052em; margin: 0 auto 20px; text-wrap: balance; }
.landing-intro { max-width: 500px; margin: auto; line-height: 1.48; font-size: clamp(16px,1.22vw,21px); text-wrap: balance; }
.landing-cta { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 26px; }
.landing-cta .button, .landing-closing .button { border-radius: 99px; padding-inline: 21px; }
.landing-cta .button-secondary { background: transparent; border-color: transparent; }
.landing-cta .button:first-child { background: var(--color-text); color: var(--board); border-color: var(--color-text); }
.story-shell { position: relative; display: grid; grid-template-columns: 16% minmax(0,1fr); width: min(1240px, 94%); margin: auto; }
.story-shell::before { content: ""; position: absolute; z-index: -1; inset: 0; border: 1px solid var(--color-border); border-radius: 18px; background: var(--board); box-shadow: 0 24px 55px -25px #25231e55; }
.story-sidebar { margin: 1px 0 1px 1px; padding: 20px 14px; border-radius: 17px 0 0 17px; border-right: 1px solid var(--color-border); background: var(--side); }
.story-sidebar .landing-brand { display: block; margin: 26px 8px 18px; font-size: 21px; }
.story-lights { display: flex; gap: 5px; margin-left: 6px; }
.story-lights i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--quiet) 22%, transparent); }
.story-nav-item { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: 12px; color: var(--quiet); border-radius: 6px; }
.story-shell .tabler-icon { width: 15px; height: 15px; flex: 0 0 15px; }
.story-nav-item:nth-child(3) { background: color-mix(in srgb, var(--quiet) 10%, transparent); color: var(--color-text); }
.story-workspace { position: relative; min-width: 0; padding: clamp(18px,2.1vw,34px); }
.story-bar, .story-heading, .story-tile-heading, .story-compose-tools, .story-trend > div, .story-week-values { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.story-bar { color: var(--quiet); font-size: 12px; margin-bottom: clamp(14px,2.5vh,26px); }
.story-bar small { font-size: 11px; }
.story-heading { margin-bottom: 14px; }
.story-heading h2 { margin: 0; font-size: clamp(20px,2vw,30px); letter-spacing: -.05em; line-height: 1.2; }
.story-heading > span { font-size: 11px; color: var(--quiet); }
.story-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.story-slot { display: grid; min-width: 0; }
.story-prompt-slot { grid-column: 1/-1; width: 68%; position: relative; z-index: 2; }
.story-tile, .story-balance { position: relative; min-width: 0; padding: clamp(13px,1.45vw,22px); border-radius: 11px; font-variant-numeric: tabular-nums; transform-origin: left top; }
.story-tile h3 { margin: 0; font-size: clamp(12px,1.18vw,17px); line-height: 1.2; font-weight: 580; letter-spacing: -.025em; }
.story-tile strong, .story-balance strong { font-size: clamp(18px,1.9vw,30px); line-height: 1.15; letter-spacing: -.045em; font-weight: 570; white-space: nowrap; }
.story-tile small, .story-balance small { font-size: 11px; line-height: 1.2; display: block; }
.story-weeks { color: var(--blue-ink); background: var(--blue-bg); }
.story-spend-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,.9fr); align-items: end; gap: 6%; margin-top: 12px; }
.story-bars { display: flex; gap: 5%; align-items: end; }
.story-bars > div { flex: 1; min-width: 0; }
.story-bars span { height: clamp(56px,11vh,114px); display: flex; align-items: end; gap: 13%; }
.story-bars i { flex: 1; height: calc(var(--value) * 8%); border-radius: 3px 3px 1px 1px; background: currentColor; transform-origin: center bottom; }
.story-bars small { margin-top: 6px; white-space: nowrap; }
.story-categories { margin: 0; border-left: 1px solid color-mix(in srgb,currentColor 20%,transparent); padding-left: 10%; }
.story-categories div { display: flex; justify-content: space-between; gap: 6px; font-size: clamp(11px,.9vw,14px); line-height: 2; }
.story-categories dd { margin: 0; }
.story-reserve { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3px 8px; background: var(--clay-bg); color: var(--clay-ink); }
.story-reserve h3 { grid-column: 1/-1; align-self: start; }
[data-theme="dark"] .story-reserve { outline: 1px solid #806453; outline-offset: -1px; }
.story-ring { position: relative; grid-column: 2; grid-row: 2/4; width: clamp(54px,5vw,80px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(currentColor 60%, color-mix(in srgb,currentColor 13%, transparent) 0); }
.story-ring::before { position: absolute; content: ""; inset: 4px; background: var(--clay-bg); border-radius: 50%; }
.story-ring b { position: relative; font-size: clamp(15px,1.55vw,24px); }
.story-reserve small { align-self: start; }
.story-trend, .story-balance { background: var(--line-bg); color: var(--line-ink); }
.story-trend svg { width: 100%; height: clamp(38px,6.5vh,68px); margin: 9px 0 4px; overflow: visible; }
.story-guides, .story-spark, .story-plot { fill: none; stroke: currentColor; vector-effect: non-scaling-stroke; }
.story-guides { opacity: .18; stroke-dasharray: 2 3; }
.story-spark, .story-plot { stroke-width: 2; stroke-linecap: round; }
.story-balance { display: grid; align-content: center; gap: 4px; }
.story-balance > span { font-size: 13px; }
.story-prompt { padding: 13px 16px; background: var(--board); border: 1px solid var(--color-border); }
.story-query { font-size: clamp(13px,1.1vw,17px); line-height: 1.4; min-height: 1.4em; }
.story-compose-tools { margin-top: 8px; font-size: 11px; color: var(--quiet); }
.story-compose-tools span, .story-assistant { display: flex; gap: 6px; align-items: center; }
.story-compose-tools i { display: grid; place-items: center; border-radius: 50%; background: var(--color-text); color: var(--board); width: 22px; height: 22px; font-size: 16px; line-height: 1; font-style: normal; }
.story-answer { padding: 20px 0 0; }
.story-assistant { color: var(--quiet); font-size: 11px; margin-bottom: 8px; }
.story-answer h3 { margin: 0; font-size: clamp(16px,1.6vw,24px); letter-spacing: -.035em; }
.story-answer p { margin: 7px 0; font-size: clamp(13px,1vw,16px); line-height: 1.5; }
.story-answer-chart { margin: 12px 0; padding: 14px 18px; background: var(--board); border: 1px solid var(--color-border); border-radius: 12px; }
.story-answer-chart figcaption { font-weight: 550; font-size: 13px; }
.story-answer-chart figcaption small { font-weight: 400; margin-left: 4px; color: var(--quiet); }
.story-answer-chart svg { width: 100%; height: clamp(50px,10vh,110px); margin-top: 7px; color: var(--blue-ink); }
.story-week-values { font-size: 11px; color: var(--quiet); }
.story-anchor { display: none; }

/* Geometry is measured only on resize. Every scroll position maps back to the same pose. */
.story-animated { height: 280svh; }
.story-animated .story-screen { --hero-width: min(43%,690px); --side-gap: clamp(16px,2.2vw,56px); --lane-edge: calc(50% + var(--hero-width) / 2 + var(--side-gap)); position: sticky; top: 0; height: 100svh; display: grid; place-items: center; padding: 0; }
.story-animated .landing-hero { position: absolute; width: var(--hero-width); top: 46%; left: 50%; margin: 0; transform: translate(-50%,calc(-50% - var(--departure) * 40px)); opacity: var(--title-alpha); }
.story-animated .story-shell { grid-area: 1/1; }
.story-animated :is(.story-sidebar, .story-bar) { opacity: var(--frame); }
.story-animated .story-shell::before { opacity: var(--frame); }
.story-animated :is(.story-heading, .story-balance) { opacity: calc(var(--frame) * (1 - var(--chat))); }
.story-animated .story-tile { transform: translate(calc(var(--dx) * var(--loose)), calc(var(--dy) * var(--loose))) scale(calc(1 + (var(--from-scale) - 1) * var(--loose))); box-shadow: 0 9px 22px -9px rgb(40 33 30 / calc(.32 * var(--loose))); }
.story-animated :is(.story-weeks, .story-trend, .story-reserve) { opacity: calc(1 - var(--chat)); }
.story-animated .story-bars i { transform: scaleY(calc(.70 + .30 * var(--dock))); }
.story-animated .story-prompt { left: calc(var(--chat) * 47%); top: calc(var(--chat) * -46px); border-radius: calc(11px + var(--chat) * 9px); background: color-mix(in srgb, var(--board), var(--side) calc(var(--chat) * 100%)); }
.story-animated .story-compose-tools { height: calc(22px * (1 - var(--chat))); margin-top: calc(8px * (1 - var(--chat))); overflow: hidden; }
.story-animated .story-prompt-slot { min-height: 76px; align-items: start; }
.story-animated .story-compose-tools { opacity: calc(1 - var(--chat)); }
.story-animated .story-workspace { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto 1fr; }
.story-animated .story-grid, .story-animated .story-answer { grid-area: 3 / 1; align-self: start; }
.story-animated .story-answer { margin: 10px 3% 0; opacity: var(--reply); transform: translateY(calc((1 - var(--reply)) * 15px)); }
.story-animated .story-plot { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw)); }
.story-plot { vector-effect: none; }
.story-animated[data-scene=chat] .story-nav-item:nth-child(3) { background: transparent; color: var(--quiet); }
.story-animated[data-scene=chat] .story-nav-item:last-child { background: color-mix(in srgb,var(--quiet) 10%,transparent); color: var(--color-text); }
@media (min-width: 651px) {
  .story-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .story-weeks-slot, .story-balance { grid-column: span 4; }
  .story-reserve-slot, .story-trend-slot { grid-column: span 2; }
  .story-animated .story-tile {
    width: calc(100% + (var(--origin-width) - 100%) * var(--loose));
    transform: translate(calc(var(--dx) * var(--loose)),calc(var(--dy) * var(--loose)));
  }
  .story-nav-item { transition: background-color .2s; }
}
.story-animated .story-anchor { pointer-events: none; position: absolute; display: block; height: 0; }
.story-anchor[data-origin=weeks] { right: var(--lane-edge); top: 23%; width: min(29%,535px,calc(100% - var(--lane-edge) - 12px)); }
.story-anchor[data-origin=reserve] { left: var(--lane-edge); top: 40%; width: min(23%,350px,calc(100% - var(--lane-edge) - 12px)); }
.story-anchor[data-origin=trend] { left: max(21%, calc(50% - 475px)); top: 68%; width: min(19%,285px); }
.story-anchor[data-origin=question] { right: max(20.5%, calc(50% - 485px)); top: 73%; width: min(25%,395px); }

.landing-telegram { width: var(--landing-content-width); margin: 40px auto 0; padding: clamp(24px,4.5vw,64px); border: 1px solid var(--color-border); border-radius: 24px; background: var(--color-surface); display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(22px,5vw,72px); scroll-margin-top: 32px; }
.landing-telegram-copy .landing-eyebrow { display: flex; align-items: center; gap: 7px; }
.landing-telegram h2 { font-size: clamp(30px,3.1vw,44px); line-height: 1.1; letter-spacing: -.045em; text-wrap: balance; }
.landing-telegram-copy > p:not(.landing-eyebrow) { margin-top: 14px; color: var(--color-text-muted); line-height: 1.6; }
.landing-telegram-example { min-width: 0; display: grid; gap: 14px; padding: clamp(16px,2.5vw,32px); border-radius: 16px; background: var(--color-surface-subtle); }
.landing-telegram-example .landing-eyebrow { margin: 0; }
.telegram-sample-message { justify-self: end; padding: 10px 16px; border-radius: 15px 15px 3px 15px; background: var(--color-primary-soft); }
.telegram-sample-draft { padding: 0 14px; border-radius: 12px; background: var(--color-surface); }
.telegram-sample-draft summary { padding: 14px 0; cursor: pointer; font-size: 14px; font-weight: 550; }
.telegram-sample-draft dl { margin: 0; padding-bottom: 10px; }
.telegram-sample-draft dl div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--color-border); font-size: 13px; }
.telegram-sample-draft dd { margin: 0; text-align: right; }
.landing-closing { display: grid; justify-items: center; gap: 20px; text-align: center; padding: clamp(80px,10vw,140px) 24px; }
.landing-closing h2 { max-width: 18ch; margin: 0; font-size: clamp(36px,5vw,64px); line-height: 1.10; text-wrap: balance; }
.landing-closing p { margin: 0; color: var(--color-text-muted); line-height: 1.55; }
.landing-footer { max-width: 1200px; padding: 28px 48px; margin: auto; display: flex; gap: 24px; justify-content: space-between; border-top: 1px solid var(--color-border); font-size: 12px; color: var(--color-text-muted); }
.guest-login-dialog { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: var(--color-text); background: var(--color-canvas); overscroll-behavior: contain; }
.guest-login-dialog::backdrop { background: transparent; }
.guest-login-shell { min-height: 100%; padding: 74px 18px 34px; display: grid; place-items: center; }
.guest-login-close { position: absolute; left: max(18px,calc(50% - 584px)); top: 18px; }
.guest-login-shell .login-content h2 { font-size: clamp(26px,4vw,36px); line-height: 1.2; }
html:has(.guest-login-dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: no-preference) {
  .guest-login-dialog[open] { animation: reveal-login .52s cubic-bezier(.32,.02,.24,1) both; }
  @keyframes reveal-login {
    from { clip-path: circle(4px at var(--login-x,50%) var(--login-y,50%)); }
    to { clip-path: circle(150vmax at var(--login-x,50%) var(--login-y,50%)); }
  }
}

@media (max-width: 900px) {
  body.landing-page { --landing-content-width: min(720px, calc(100% - 48px)); }
  .landing-header { padding: 14px 24px; }
  .story-shell { width: 94%; grid-template-columns: 14% minmax(0,1fr); }
  .story-sidebar { padding: 15px 6px; }
  .story-nav-item { font-size: 10px; gap: 4px; }
  .story-sidebar .landing-brand { font-size: 17px; margin-left: 3px; }
  .story-sidebar .landing-brand span { display: none; }
  .story-animated .story-screen { --hero-width: 43%; }
  .landing-hero h1 { font-size: clamp(37px,5.7vw,51px); }
  .story-anchor[data-origin=weeks] { top: 16%; }
  .story-categories { padding-left: 7%; }
}
@media (max-width: 680px) {
  body.landing-page { --landing-content-width: calc(100% - 36px); }
}
@media (max-width: 650px) {
  .landing-header { padding: 12px 16px; }
  .landing-header nav { display: none; }
  .landing-header-actions { gap: 10px; }
  .story-screen { padding: 80px 0 24px; }
  .landing-hero { margin: 12px auto 28px; }
  .landing-hero h1 { font-size: clamp(36px,8.4vw,47px); margin-bottom: 14px; }
  .landing-intro { max-width: 410px; font-size: 15px; }
  .landing-cta { margin-top: 16px; gap: 5px; }
  .landing-cta .button { padding-inline: 14px; }
  .story-animated .landing-hero { top: 29%; width: 92%; }
  .story-shell { width: calc(100% - 14px); grid-template-columns: 33px minmax(0,1fr); }
  .story-lights, .story-sidebar .landing-brand { display: none; }
  .story-sidebar { padding: 14px 3px; }
  .story-nav-item { font-size: 0; padding: 8px 4px; justify-content: center; gap: 0; }
  .story-workspace { padding: 13px 9px; }
  .story-heading { margin: 8px 0; }
  .story-bar { margin-bottom: 10px; font-size: 10px; }
  .story-bar small { font-size: 9px; }
  .story-grid { gap: 6px; grid-template-columns: minmax(0,1.23fr) minmax(0,1fr); }
  .story-tile, .story-balance { padding: 10px; }
  .story-tile-heading { display: grid; gap: 3px; }
  .story-tile h3 { font-size: 12px; }
  .story-tile strong, .story-balance strong { font-size: 19px; }
  .story-spend-layout { grid-template-columns: 1fr; margin-top: 5px; }
  .story-categories { display: none; }
  .story-bars { gap: 6%; }
  .story-bars small { font-size: 8px; }
  .story-bars span { height: 52px; }
  .story-reserve { grid-template-columns: 1fr; align-content: space-between; }
  .story-ring { grid-column: 1; grid-row: auto; width: 43px; margin: 4px 0; }
  .story-tile small, .story-balance small { font-size: 10px; }
  .story-prompt-slot { width: 78%; }
  .story-animated .story-prompt { left: calc(var(--chat) * 28%); }
  .story-query { font-size: 12px; }
  .story-compose-tools { margin-top: 6px; }
  .story-animated .story-answer { margin: 7px 1% 0; }
  .story-answer p { font-size: 12px; line-height: 1.4; }
  .story-answer-chart { padding: 9px; margin: 8px 0; }
  .story-week-values { font-size: 9px; gap: 3px; }
  .story-tile .story-bars small { font-size: 8px; }
  .story-anchor[data-origin=weeks] { left: 5%; right: auto; top: 49%; width: 43%; }
  .story-anchor[data-origin=reserve] { right: 7%; left: auto; top: 51%; width: 35%; }
  .story-anchor[data-origin=trend] { left: 11%; top: 76%; width: 34%; }
  .story-anchor[data-origin=question] { right: 5%; top: 79%; width: 47%; }
  .landing-telegram { grid-template-columns: minmax(0,1fr); padding: 20px; }
  .landing-closing { padding: 86px 20px; }
  .landing-footer { padding: 22px 16px; flex-wrap: wrap; }
}
.tour-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: 100%; min-width: 0; color: var(--color-text); }
.tour-page *, .tour-page *::before, .tour-page *::after { box-sizing: border-box; }
.tour-reserve-card { padding: 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
.tour-reserve-heading { display: flex; justify-content: space-between; align-items: end; gap: 8px; margin-bottom: 10px; }
.tour-reserve-heading > div { display: grid; gap: 4px; }
.tour-reserve-heading span, .tour-reserve-heading small, .tour-reserve-card p { color: var(--color-text-muted); font-size: 11px; line-height: 16px; }
.tour-reserve-heading strong { font-size: 21px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tour-track { display: block; height: 7px; overflow: hidden; border-radius: 99px; background: var(--color-surface-subtle); }
.tour-track > span { display: block; height: 100%; border-radius: inherit; background: var(--color-primary); }
.tour-reserve-card p { margin: 10px 0 0; }
.tour-note { margin: 0; color: var(--color-text-muted); font-size: 11px; line-height: 16px; }
.tour-contract-card { min-width: 0; padding: 13px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
.tour-contract-card > header { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; align-items: baseline; }
.tour-contract-card > header small { grid-column: 1 / -1; color: var(--color-text-muted); font-size: 10px; }
.tour-contract-card > header strong { font-size: 14px; font-weight: 500; }
.tour-contract-due { margin-top: 7px; display: flex; justify-content: space-between; gap: 8px; color: var(--color-text-muted); font-size: 10px; }
.tour-contract-due strong { color: var(--color-text); font-size: 11px; font-weight: 500; }
.tour-contract-balance { margin-top: 11px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tour-contract-balance small, .tour-contract-card dt, .tour-goal-details dt { color: var(--color-text-muted); font-size: 11px; }
.tour-contract-balance strong { font-size: 22px; line-height: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tour-contract-card dl, .tour-goal-details { margin: 8px 0 0; }
.tour-contract-card dl > div, .tour-goal-details > div { padding-top: 7px; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--color-border); }
.tour-contract-card dd, .tour-goal-details dd { margin: 0; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.tour-goal-details { display: grid; gap: 6px; }
.tour-goal-details > div { padding-top: 6px; }
.tour-action-summary { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--color-primary-soft); color: var(--color-text); font-size: 11px; line-height: 16px; }
.tour-chat-page { max-width: 690px; margin: auto; gap: 14px; }
.tour-chat-thread { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tour-chat-user, .tour-chat-assistant { padding: 12px 16px; border: 1px solid var(--color-border); border-radius: 14px; }
.tour-chat-user { margin-left: 15%; justify-self: end; background: var(--color-primary-soft); }
.tour-chat-assistant { margin-right: 8%; justify-self: start; background: var(--color-surface-subtle); }
.tour-chat-assistant strong { display: block; margin-bottom: 5px; font-size: 12px; }
.tour-chat-user p, .tour-chat-assistant p { margin: 0; font-size: 14px; line-height: 1.5; }
.tour-chat-composer { padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 17px; background: var(--color-surface); }
.tour-chat-composer:focus-within { border-color: var(--color-focus); }
.tour-chat-composer label { color: var(--color-text-muted); font-size: 12px; }
.tour-chat-composer > div { display: flex; align-items: center; gap: 8px; }
.tour-chat-composer select { flex: 1; width: 0; min-width: 0; padding: 6px 0; border: 0; background-color: var(--color-surface); color: var(--color-text); font: inherit; font-size: 14px; }
.tour-chat-composer button { min-width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--color-text); color: var(--color-canvas); font-size: 22px; cursor: pointer; }
.tour-proposal { margin-top: 6px; font-size: 12px; }
.tour-proposal summary { cursor: pointer; padding: 4px 0; }
.tour-plan-switch { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--color-surface-subtle); }
.tour-plan-switch button { flex: 1; min-height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--color-text-muted); font: inherit; font-size: 12px; cursor: pointer; }
.tour-plan-switch button[aria-pressed="true"] { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); }
.tour-plan-table { border: 1px solid var(--color-border); border-radius: 11px; overflow: hidden; background: var(--color-surface); }
.tour-plan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 39px; padding: 8px 12px; border-bottom: 1px solid var(--color-border); font-size: 12px; }
.tour-plan-row:last-child { border-bottom: 0; }
.tour-plan-row strong { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tour-plan-head { min-height: 34px; color: var(--color-text-muted); font-size: 10px; }
.tour-plan-total { background: var(--color-primary-soft); }
.tour-plan-equation { padding: 9px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); }
.tour-plan-equation p { margin: 0; padding: 4px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; line-height: 15px; }
.tour-plan-equation p + p { border-top: 1px solid var(--color-border); }
.tour-plan-equation span { color: var(--color-text-muted); }
.tour-plan-equation strong { flex: none; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tour-plan-equation .tour-plan-result strong { font-size: 14px; }
.tour-plan-difference { margin: 0; padding: 9px 11px; display: grid; gap: 4px; border-radius: 9px; background: var(--color-primary-soft); font-size: 10px; line-height: 15px; }
.tour-plan-difference strong { font-weight: 500; }
.tour-plan-difference span { color: var(--color-text-muted); }
.tour-page button:focus-visible, .tour-page summary:focus-visible, .tour-page input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tour-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; }
@media (max-width: 360px) {
  .tour-page { gap: 9px; }
  .tour-chat-user p, .tour-chat-assistant p { font-size: 13px; }
  .tour-chat-user, .tour-chat-assistant { max-width: 100%; }
  .tour-plan-row { padding-inline: 9px; }
}

/* Public landing discovery cards and manual product gallery. */
.discover, .landing-gallery, .landing-about { width: var(--landing-content-width); margin-inline: auto; }
.discover { padding: 92px 0 112px; }
.discover-heading { max-width: 820px; margin: 0 auto 34px; text-align: center; }
.discover-heading h2, .gallery-heading h2, .landing-about h2 { margin: 0; color: var(--color-text); font-size: clamp(34px, 4vw, 54px); line-height: 1.08; font-weight: 500; letter-spacing: -.055em; text-wrap: balance; }
.discover-heading > p:last-child, .gallery-heading > p, .landing-about > p:last-child { max-width: 580px; margin: 16px 0 0; color: var(--color-text-muted); font-size: 16px; line-height: 1.6; }
.discover-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 444px; align-items: end; gap: 16px; }
.discover-card { height: 310px; min-width: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: 20px; background: var(--color-surface-subtle); transition: height .24s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.discover-card[data-discover-card=money] { --wash: #f2ddc9; --drawing: #765138; }
.discover-card[data-discover-card=ai] { --wash: #dce8f4; --drawing: #365773; }
.discover-card[data-discover-card=strategy] { --wash: #e1ebdc; --drawing: #435c40; }
[data-theme=dark] .discover-card[data-discover-card=money] { --wash: #45372d; --drawing: #e9c6a7; }
[data-theme=dark] .discover-card[data-discover-card=ai] { --wash: #2d3a47; --drawing: #b7cfeb; }
[data-theme=dark] .discover-card[data-discover-card=strategy] { --wash: #303e34; --drawing: #c0d6b8; }
.discover-card[open] { height: 444px; background: var(--wash); }
.discover-heading > p:last-child { margin-inline: auto; }
.discover-card > summary { height: 308px; padding: 22px 22px 18px; display: grid; grid-template-rows: auto minmax(0,1fr); align-items: start; cursor: pointer; list-style: none; }
.discover-card > summary::-webkit-details-marker { display: none; }
.discover-card > summary::marker { content: ""; }
.discover-card > summary > strong { color: var(--color-text); font-size: 19px; line-height: 1.3; font-weight: 500; letter-spacing: -.025em; }
.discover-art { width: 100%; height: 100%; min-height: 0; display: grid; place-items: center; color: var(--color-text-muted); }
.discover-art svg { width: min(100%, 245px); height: auto; max-height: 180px; overflow: visible; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; transition: transform .28s ease, color .2s ease; }
.discover-paper { fill: var(--color-surface-subtle); }
.discover-card[open] .discover-paper { fill: var(--wash); }
.discover-float { transform-box: fill-box; transform-origin: center; transition: transform .35s ease; }
.discover-card[open] .discover-float { transform: translate(3px,-6px) rotate(3deg); }
.discover-more { height: 132px; padding: 0 22px 14px; animation: discover-in .2s ease both; }
.discover-more p { margin: 0 0 14px; color: var(--color-text-muted); font-size: 13px; line-height: 1.55; }
.discover-more a { color: var(--color-text); font-size: 12px; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.discover-card:hover, .discover-card:focus-within, .discover-card[open] { border-color: var(--color-border-strong); box-shadow: 0 18px 36px color-mix(in srgb, var(--color-text) 9%, transparent); }
.discover-card:hover .discover-art, .discover-card:focus-within .discover-art, .discover-card[open] .discover-art { color: var(--drawing); }
.discover-card:hover .discover-art svg, .discover-card:focus-within .discover-art svg, .discover-card[open] .discover-art svg { transform: scale(1.08); }
@keyframes discover-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.discover-card summary:focus-visible, .discover-more a:focus-visible, .gallery-nav a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }

.landing-gallery { padding: 72px 0 104px; scroll-margin-top: 28px; }
.gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.gallery-heading > div { max-width: 680px; }
.gallery-heading > p { max-width: 320px; margin: 0 0 4px; font-size: 14px; }
.gallery-layout { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(0, 1.6fr); align-items: stretch; gap: 36px; }
.gallery-nav { display: flex; flex-direction: column; gap: 8px; }
.gallery-nav a { min-width: 0; padding: 16px 14px; display: block; border: 1px solid transparent; border-bottom-color: var(--color-border); border-radius: 8px; color: var(--color-text-muted); text-decoration: none; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.gallery-nav a:hover, .gallery-nav a[aria-current="step"] { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); }
.gallery-mobile-caption { display: none; }
.gallery-nav-copy { min-width: 0; display: grid; gap: 5px; }
.gallery-nav-copy strong { font-size: 14px; line-height: 20px; font-weight: 500; }
.gallery-nav-copy [data-gallery-caption] { color: var(--color-text-muted); font-size: 11px; line-height: 16px; }
.gallery-nav-copy [data-gallery-caption][aria-hidden="true"] { display: none; }
.gallery-screen { min-width: 0; min-height: 486px; padding: 18px; position: relative; overflow: hidden; border: 1px solid var(--color-border); border-radius: 20px; background: var(--color-surface-subtle); box-shadow: 0 22px 52px color-mix(in srgb, var(--color-text) 7%, transparent); }
.gallery-fallback { max-height: 450px; overflow-y: auto; scrollbar-gutter: stable; display: grid; align-content: start; gap: 12px; }
.gallery-ready .gallery-fallback { display: none; }
.gallery-fallback > section, .gallery-overview-page { min-width: 0; padding: 16px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.gallery-overview > header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 13px; font-weight: 500; }
.gallery-overview > header small { color: var(--color-text-muted); font-size: 10px; font-weight: 400; }
.gallery-overview-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.gallery-overview-kpis article { min-width: 0; padding: 9px; display: grid; gap: 5px; border: 1px solid var(--color-border); border-radius: 9px; }
.gallery-overview-kpis small { color: var(--color-text-muted); font-size: 9px; line-height: 13px; }
.gallery-overview-kpis strong { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.gallery-overview-chart { margin-top: 10px; padding: 11px; border: 1px solid var(--color-border); border-radius: 9px; }
.gallery-overview-chart > strong { font-size: 11px; font-weight: 500; }
.gallery-overview-chart > div { height: 95px; margin: 8px 8px 0; display: flex; align-items: end; justify-content: space-around; gap: 10px; border-bottom: 1px solid var(--color-border); }
.gallery-overview-chart i { position: relative; width: 25px; height: var(--bar); border-radius: 5px 5px 0 0; background: var(--color-primary); }
.gallery-overview-chart i span { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); color: var(--color-text-muted); font-size: 8px; font-style: normal; }
.gallery-overview-chart > small, .gallery-overview > p { color: var(--color-text-muted); font-size: 9px; line-height: 14px; }
.gallery-overview > p { margin: 10px 0 0; }
.gallery-fallback-page { scroll-margin-top: 20px; }
.gallery-fallback-page h3 { margin: 0 0 8px; font-size: 17px; font-weight: 500; }
.gallery-fallback-page p { color: var(--color-text-muted); font-size: 12px; line-height: 1.5; }
.gallery-fallback-details { margin: 10px 0; display: grid; gap: 6px; }
.gallery-fallback-details > div { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 5px; border-bottom: 1px solid var(--color-border); font-size: 11px; }
.gallery-fallback-details dt { color: var(--color-text-muted); }
.gallery-fallback-details dd { margin: 0; font-weight: 500; text-align: right; }
.gallery-live-content { width: 100%; min-height: 448px; }
.gallery-overview-page { display: grid; gap: 12px; min-height: 448px; padding: 16px; }
.gallery-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gallery-preview-header > div { display: flex; align-items: baseline; gap: 12px; }
.gallery-preview-header > div > span { color: var(--color-text-muted); font-size: 11px; }
.gallery-preview-header strong { font-size: 19px; font-weight: 500; letter-spacing: -.03em; }
.gallery-preview-header small { color: var(--color-text-muted); font-size: 11px; }
.gallery-overview-kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.gallery-overview-kpis article { min-width: 0; min-height: 72px; padding: 10px 11px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); }
.gallery-overview-kpis article:nth-child(3) { background: var(--color-primary-soft); }
.gallery-overview-kpis small, .gallery-overview-kpis article > span { color: var(--color-text-muted); font-size: 9px; line-height: 13px; }
.gallery-overview-kpis strong { overflow-wrap: anywhere; font-size: 17px; line-height: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.gallery-overview-kpis article > span { display: none; }
.gallery-overview-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.gallery-weekly-chart, .gallery-category-chart { min-width: 0; padding: 12px; border: 1px solid var(--color-border); border-radius: 11px; background: var(--color-surface); }
.gallery-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11px; }
.gallery-panel-heading small { color: var(--color-text-muted); font-size: 9px; }
.gallery-bars { height: 114px; margin-top: 8px; display: flex; align-items: end; justify-content: space-around; gap: 8px; border-bottom: 1px solid var(--color-border); }
.gallery-bar-column { height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 4px; }
.gallery-bar-column > span, .gallery-bar-column > small { color: var(--color-text-muted); font-size: 8px; line-height: 11px; }
.gallery-bar-column > i { width: min(28px, 65%); min-height: 5px; display: block; border-radius: 5px 5px 2px 2px; background: var(--color-primary); }
.gallery-bar-column:nth-child(2) > i { opacity: .78; }
.gallery-bar-column:nth-child(3) > i { opacity: .58; }
.gallery-bar-column:nth-child(4) > i { opacity: .9; }
.gallery-category-track { height: 7px; margin: 14px 0 10px; display: flex; overflow: hidden; border-radius: 99px; }
.gallery-category-track i:nth-child(1) { width: 48%; background: var(--color-primary); }
.gallery-category-track i:nth-child(2) { width: 32%; background: color-mix(in srgb, var(--color-primary) 58%, var(--color-surface-subtle)); }
.gallery-category-track i:nth-child(3) { width: 20%; background: var(--color-border-strong); }
.gallery-category-chart ul { margin: 0; padding: 0; list-style: none; }
.gallery-category-chart li { min-width: 0; padding: 6px 0; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--color-border); font-size: 9px; }
.gallery-category-chart li:last-child { border-bottom: 0; }
.gallery-category-chart li > span { display: flex; align-items: center; gap: 5px; }
.gallery-category-chart li > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); }
.gallery-category-chart li:nth-child(2) > span i { opacity: .65; }
.gallery-category-chart li:nth-child(3) > span i { background: var(--color-border-strong); }
.gallery-category-chart li b { font-weight: 500; white-space: nowrap; }
.gallery-category-chart li small { color: var(--color-text-muted); }
.gallery-overview-footer { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.gallery-overview-footer span { display: flex; flex-direction: column; gap: 3px; color: var(--color-text-muted); font-size: 9px; }
.gallery-overview-footer b { color: var(--color-text); font-size: 11px; font-weight: 500; }
.gallery-demo-note { color: var(--color-text-muted); font-size: 9px; line-height: 14px; }
.gallery-live-content .tour-page { width: 100%; margin: 16px auto 0; align-content: start; }
.gallery-live-content .tour-chat-page { max-width: 560px; }
.gallery-live-content .tour-chat-thread { min-height: 240px; max-height: 310px; }
.gallery-live-content .tour-chat-user p, .gallery-live-content .tour-chat-assistant p { font-size: 13px; line-height: 1.55; }
.landing-about { padding: 72px 0 96px; border-top: 1px solid var(--color-border); }
.landing-about h2 { max-width: 720px; }
.landing-about > p:last-child { max-width: 650px; }
.landing-gallery a:focus-visible, .discover a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
@media (max-width: 900px) {
  .discover-grid { grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: 444px; }
  .discover-card:last-child { grid-column: 1 / -1; width: calc(50% - 8px); justify-self: center; }
  .gallery-layout { grid-template-columns: minmax(190px, .72fr) minmax(0,1.3fr); gap: 18px; }
  .gallery-screen { padding: 12px; }
  .gallery-overview-page { padding: 11px; }
  .gallery-overview-kpis { gap: 5px; }
  .gallery-overview-kpis article { padding: 8px; }
  .gallery-overview-kpis strong { font-size: 15px; }
}
@media (max-width: 680px) {
  .discover { padding: 64px 0 72px; }
  .discover-heading { margin-bottom: 24px; }
  .discover-heading h2, .gallery-heading h2, .landing-about h2 { font-size: clamp(31px, 9vw, 42px); }
  .discover-heading > p:last-child, .landing-about > p:last-child { font-size: 14px; }
  .discover-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 10px; }
  .discover-card:last-child { grid-column: auto; width: auto; justify-self: stretch; }
  .discover-card, .discover-card[open] { height: auto; min-height: 116px; }
  .discover-card > summary { height: auto; min-height: 114px; padding: 13px 15px; display: grid; grid-template-columns: minmax(0,1fr) 92px; grid-template-rows: auto minmax(0,1fr); align-items: center; column-gap: 8px; }
  .discover-card > summary > strong { grid-column: 1; grid-row: 1; font-size: 16px; }
  .discover-art { width: 92px; height: 84px; grid-column: 2; grid-row: 1 / span 2; }
  .discover-art svg { width: 90px; max-height: 80px; }
  .discover-more { height: auto; padding: 0 15px 14px; }
  .discover-more p { margin-bottom: 10px; }
  .gallery-heading { display: block; margin-bottom: 22px; }
  .gallery-heading > p { margin-top: 10px; font-size: 13px; }
  .landing-gallery { padding: 56px 0 72px; }
  .gallery-layout { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .gallery-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
  .gallery-nav a { padding: 10px; }
  .gallery-nav-copy strong { font-size: 11px; line-height: 14px; }
  .gallery-ready .gallery-nav-copy [data-gallery-caption] { display: none; }
  .gallery-mobile-caption { display: block; margin: 0 0 10px; color: var(--color-text-muted); font-size: 13px; line-height: 1.5; }
  .gallery-screen { min-height: 410px; padding: 9px; border-radius: 15px; }
  .gallery-fallback { max-height: 388px; }
  .gallery-live-content, .gallery-overview-page { min-height: 388px; }
  .gallery-overview-page { padding: 9px; gap: 9px; }
  .gallery-preview-header strong { font-size: 16px; }
  .gallery-overview-kpis article { min-height: 65px; padding: 7px; }
  .gallery-overview-kpis small { font-size: 8px; }
  .gallery-overview-kpis strong { font-size: 13px; line-height: 18px; }
  .gallery-overview-lower { grid-template-columns: minmax(0,1fr); }
  .gallery-bars { height: 72px; }
  .gallery-category-chart { padding: 9px; }
  .gallery-category-track { margin: 8px 0 4px; }
  .gallery-category-chart li { padding: 4px 0; }
  .gallery-overview-footer { gap: 5px; }
  .gallery-overview-footer b { font-size: 9px; }
  .gallery-live-content .tour-page { max-width: 100%; }
  .gallery-live-content .tour-chat-thread { min-height: 220px; }
  .gallery-live-content .tour-chat-user, .gallery-live-content .tour-chat-assistant { margin-inline: 0; }
  .landing-about { padding: 56px 0 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .discover-card, .discover-art svg, .discover-float, .gallery-nav a, .discover-more { animation: none !important; transition: none !important; }
  .discover-card[open] .discover-float { transform: none; }
  .discover-card:hover, .discover-card:focus-within, .discover-card[open] { transform: none; }
  .discover-card:hover .discover-art svg, .discover-card:focus-within .discover-art svg, .discover-card[open] .discover-art svg { transform: none; }
}
/* Presentation only: reports, quality signals and calculations remain server-owned. */
body[data-page="ai-analyses"] .analysis-summary { min-height: 0; padding: 24px; background: var(--color-primary-soft); border-color: var(--color-border); color: var(--color-text); }
body[data-page="ai-analyses"] .analysis-summary h2 { max-width: none; font-size: clamp(28px, 3vw, 36px); line-height: clamp(36px, 3.6vw, 44px); font-weight: 500; letter-spacing: -.035em; }
body[data-page="ai-analyses"] .analysis-summary p { color: var(--color-text-muted); }
body[data-page="ai-analyses"] .analysis-summary .v2-eyebrow { color: var(--color-text-muted); }
body[data-page="ai-analyses"] .recommendation-panel { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text); }
body[data-page="ai-analyses"] .recommendation-panel::after { display: none; }
body[data-page="ai-analyses"] .recommendation-panel ol { color: var(--color-text); }
body[data-page="ai-analyses"] .recommendation-panel li::marker { color: var(--foundation-link); font-weight: 500; }
body[data-page="ai-analyses"] .analysis-notices { margin-top: 24px; padding: 8px 20px; border: 1px solid color-mix(in srgb, var(--color-warning) 25%, var(--color-border)); border-radius: 16px; background: var(--foundation-warning); }
body[data-page="ai-analyses"] .analysis-notices > .v2-note,
body[data-page="ai-analyses"] .analysis-notices > .analysis-stale { display: grid; grid-template-columns: minmax(180px, .4fr) 1fr; gap: 8px 24px; padding: 12px 0; margin: 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; line-height: 22px; color: var(--color-warning); }
body[data-page="ai-analyses"] .analysis-notices > * + * { border-top: 1px solid color-mix(in srgb, var(--color-warning) 20%, transparent); }
body[data-page="ai-analyses"] .analysis-notices strong { font-weight: 500; }
body[data-page="ai-analyses"] .analysis-help { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--color-border); font-size: 14px; line-height: 22px; color: var(--color-text-muted); }
#ai-analysis-generate-action:empty { display: none; }
.ai-processing { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; }
.ai-processing h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.ai-processing p { margin: 4px 0 0; color: var(--color-text-muted); }
.analysis-wait-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: var(--color-text); background: var(--color-primary-soft); }
.ai-processing .typing-indicator { color: var(--color-text-muted); }
body[data-page="ai-analyses"] .v2-actions { justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 760px) {
  body[data-page="ai-analyses"] .analysis-notices { padding: 4px 16px; }
  body[data-page="ai-analyses"] .analysis-notices > .v2-note,
  body[data-page="ai-analyses"] .analysis-notices > .analysis-stale { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
}
.strategy-status-summary {
  margin: 18px 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--foundation-link);
  border-radius: 14px;
  background: color-mix(in srgb, var(--foundation-link) 6%, var(--color-surface));
}

.strategy-status-heading { font-weight: 650; }
.strategy-status-summary p { margin: 6px 0; color: var(--color-text-muted); }
.strategy-status-summary .v2-link { display: inline-block; margin-top: 4px; }
.strategy-choice-form { margin: 24px 0; }
.strategy-choice { margin: 0; }
.strategy-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 18px; padding: 4px; }

.strategy-choice-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 270px;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  color: var(--color-text);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.strategy-choice-content { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 12px; }
.strategy-choice-card h3 { margin: 4px 0 0; font-size: 1.22rem; line-height: 1.25; }
.strategy-choice-card p { margin: 0; color: var(--color-text-muted); line-height: 1.48; }
.strategy-choice-card small { color: var(--color-text-muted); }
.strategy-choice-card { background: color-mix(in srgb, var(--choice-tint) 5%, var(--color-surface)); overflow-wrap: anywhere; }
.strategy-choice-card.tone-amber { --choice-tint: #d9b18f; }
.strategy-choice-card.tone-blue { --choice-tint: #9cbfda; }
.strategy-choice-card.tone-green { --choice-tint: #9fc6a7; }
.strategy-choice-state { align-self: flex-end; color: var(--color-text-muted); font-size: .82rem; font-weight: 600; }
.strategy-choice-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.strategy-choice-card:focus-within { outline: 3px solid var(--foundation-link); outline-offset: 3px; }
.strategy-choice-card:not(.is-locked):is(:hover, :focus-within) { z-index: 1; transform: scale(1.015); box-shadow: var(--shadow-float); }
.strategy-choice-card.is-selected { border-color: var(--foundation-link); box-shadow: 0 0 0 2px color-mix(in srgb, var(--foundation-link) 28%, transparent), var(--shadow-card); }
.strategy-choice-card:not(.is-locked):is(:hover, :focus-within, .is-selected) { background: color-mix(in srgb, var(--choice-tint) 18%, var(--color-surface)); }
.strategy-choice-card.is-locked { opacity: .7; }

.strategy-choice-method { color: var(--color-text-muted); font-size: .92rem; }
.strategy-priority-flow { margin-top: auto; padding: 12px; border: 1px solid color-mix(in srgb, var(--choice-tint) 34%, var(--color-border)); border-radius: 12px; background: color-mix(in srgb, var(--choice-tint) 10%, var(--color-surface)); }
.strategy-priority-flow-label { display: block; margin-bottom: 5px; color: var(--color-text-muted); font-size: .8rem; }
.strategy-priority-flow-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; line-height: 1.4; }
.strategy-priority-flow-steps strong { color: var(--color-text); }
.strategy-priority-note { margin-top: -6px; }
.strategy-choice-actions { justify-content: flex-end; margin-top: 20px; }
.strategy-choice-actions .button { max-width: 100%; white-space: normal; }

.strategy-option-details { display: grid; }
.strategy-overview { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.strategy-overview > .v2-card { min-width: 0; }
.strategy-option-details > [data-strategy-option-details] { display: grid; gap: var(--space-6, 24px); }
.strategy-option-details > [data-strategy-option-details][hidden] { display: none !important; }
.strategy-parameters dl { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 0 20px; margin: 14px 0 0; }
.strategy-parameters dt, .strategy-parameters dd { min-width: 0; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.strategy-parameters dt { color: var(--color-text-muted); }
.strategy-parameters dd { font-weight: 550; }
.strategy-more { padding-top: 8px; padding-bottom: 8px; }
.strategy-accordion, .strategy-more > details { padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.strategy-more > :last-child { border-bottom: 0; }
.strategy-accordion summary, .strategy-more > details > summary { cursor: pointer; font-weight: 600; }
.strategy-accordion form { padding-top: 16px; }
.strategy-rationale, .strategy-comparisons { overflow-wrap: anywhere; }

@media (max-width: 680px) {
  .strategy-choice-grid { grid-template-columns: 1fr; gap: 14px; }
  .strategy-choice-card { min-height: auto; padding: 18px; }
  .strategy-parameters dl { grid-template-columns: minmax(0, 1fr); }
  .strategy-parameters dd { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .strategy-choice-card { transition: none; }
  .strategy-choice-card:not(.is-locked):is(:hover, :focus-within) { transform: none; }
}
.debt-balance-chart { min-width: 0; }
.debt-balance-chart .v2-chart { margin: 1rem 0; }
.debt-balance-chart .v2-bar-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; overflow: visible; }
.debt-balance-chart .v2-chart-column { min-width: 0; }
.debt-balance-chart .v2-chart-bar-space { padding-inline: 3px; justify-content: center; height: 150px; }
.debt-balance-chart .v2-bar { max-width: 2.5rem; }
.debt-balance-chart .v2-chart-label { overflow-wrap: anywhere; text-align: center; }
.debt-balance-chart .v2-money { white-space: normal; }
@media (max-width: 600px) {
  .debt-balance-chart .v2-chart-label .v2-money { display: none; }
  .debt-balance-chart .v2-chart-label { font-size: .7rem; }
}
.setup-import-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: .75rem 1rem;
  margin: 0 0 1rem;
}
.setup-import-counts dt { font-size: .875rem; }
.setup-import-counts dd { margin: .2rem 0 0; font-size: 1.3rem; font-weight: 650; }
.setup-statement-progress p { margin-block: .5rem; }
.statement-result-counts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .75rem; }
.statement-result-counts .v2-kpi { min-height: 0; padding: 1rem; }
.v2-card .statement-integrity { margin-block-start: 1rem; }

@media (max-width: 600px) {
  .statement-result-counts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
  .statement-result-counts .v2-card { padding: .65rem .75rem; }
  .statement-result-counts .v2-value { font-size: 1.25rem; }
}
.month-reset-card > :first-child { margin-top: 0; }
.month-reset-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr); gap: 24px; align-items: start; }
.month-reset-intro h2 { margin: 4px 0 8px; }
.month-reset-intro p { margin: 0; }
.month-reset-form { display: grid; gap: 20px; margin-top: 24px; }
.month-reset-date-fields { display: grid; grid-template-columns: repeat(2, minmax(180px, 260px)); gap: 16px; }
.month-reset-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.month-reset-groups legend { margin-bottom: 10px; font-weight: 600; }
.month-reset-group { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-subtle); cursor: pointer; }
.month-reset-group input { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; accent-color: var(--color-focus); }
.month-reset-group:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.month-reset-preview h2, .month-reset-confirm h2 { margin-top: 0; }
.month-reset-selected-groups { margin: 8px 0 0; color: var(--color-text-muted); overflow-wrap: anywhere; }
.month-reset-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; margin: 16px 0 0; }
.month-reset-count { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-subtle); }
.month-reset-count dt { color: var(--color-text-muted); }
.month-reset-count dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.month-reset-import-list { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.month-reset-import-list > li { min-width: 0; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-subtle); overflow-wrap: anywhere; }
.month-reset-import-list p { margin: 8px 0 0; color: var(--color-text-muted); }
.month-reset-range-count { font-variant-numeric: tabular-nums; }
.month-reset-import-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.month-reset-cross-month { margin-top: 12px !important; }
.month-reset-dependencies h2 { margin: 0 0 8px; }
.month-reset-dependencies ul { margin: 8px 0 0; padding-left: 1.25rem; }
.month-reset-confirm { border-color: var(--color-negative); }
.month-reset-confirm > p { color: var(--color-text-muted); }
.month-reset-confirm-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
.month-reset-confirm-form .v2-field { min-width: 0; }
.month-reset-confirm-form small { display: block; margin-top: 6px; color: var(--color-text-muted); }
.month-reset-confirm-form .v2-actions { margin: 0; }
.button-danger, .button-danger:hover, .button-danger:focus-visible { border-color: var(--color-negative); background: var(--color-negative); color: #fff; }
:root[data-theme="dark"] .button-danger, :root[data-theme="dark"] .button-danger:hover,
:root[data-theme="dark"] .button-danger:focus-visible { color: #202327; }
.month-reset-alert { margin: 0 0 24px; }

@media (max-width: 760px) {
  .month-reset-intro, .month-reset-confirm-form { grid-template-columns: minmax(0, 1fr); }
  .month-reset-date-fields { grid-template-columns: minmax(0, 1fr); }
  .month-reset-confirm-form .v2-actions, .month-reset-confirm-form .button { width: 100%; }
}
.receipt-tabs { display: flex; gap: 9px; margin: 0 0 20px; border-bottom: 1px solid var(--color-border); }
.receipt-tab { display: inline-flex; align-items: center; min-height: 42px; padding: 0 15px; border-bottom: 2px solid transparent; color: var(--color-text-muted); text-decoration: none; }
.receipt-tab:hover,.receipt-tab.is-active { color: var(--color-text); border-color: var(--color-accent); }
.receipt-start-grid { align-items: stretch; }
.receipt-consent { display: flex; align-items: flex-start; gap: 10px; max-width: 680px; margin-top: 20px; line-height: 1.5; }
.receipt-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--color-accent); }
.receipt-product-list { display: grid; }
.receipt-product-row { display: grid; grid-template-columns: minmax(100px,1.3fr) minmax(90px,.7fr) minmax(90px,.7fr) minmax(105px,.8fr); align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.receipt-product-row:last-child { border-bottom: 0; }
.receipt-product-row > * { min-width: 0; }
.receipt-product-row b { text-align: right; font-variant-numeric: tabular-nums; }
.receipt-product-row small { color: var(--color-text-muted); }
.receipt-product-row { cursor: pointer; }
.receipt-product-row strong::before { content: "›"; display: inline-block; margin-inline-end: .5em; }
details[open] > .receipt-product-row strong::before { transform: rotate(90deg); }
.receipt-positions { list-style: none; padding: 0; margin: 0 0 12px; }
.receipt-positions li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 6px 0; }
.receipt-items-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; }
.receipt-item-list { display: grid; gap: 14px; margin-top: 14px; }
.receipt-item-row { min-width: 0; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-card, 16px); }
.receipt-item-row legend { padding-inline: 6px; font-weight: 700; }
.receipt-item-row .v2-form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.receipt-item-row .v2-actions { margin-top: 12px; }
.receipt-details > p { margin: 8px 0; }
.v2-field-full { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .receipt-product-row { grid-template-columns: minmax(0,1fr) auto; gap: 5px 12px; }
  .receipt-product-row > strong { grid-column: 1; grid-row: 1; }
  .receipt-product-row > span { grid-column: 1; grid-row: 2; color: var(--color-text-muted); }
  .receipt-product-row > small { grid-column: 1; grid-row: 3; color: var(--color-text-muted); }
  .receipt-product-row b { grid-column: 2; grid-row: 1 / span 3; }
  .receipt-item-row .v2-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .receipt-items-heading { align-items: flex-start; flex-wrap: wrap; }
  .receipt-consent { font-size: .94rem; }
}
/* Page-level siblings share the foundation interval; nested component spacing stays local. */
.v2-page-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); min-width: 0; }
.v2-content .v2-page-content > * { min-width: 0; margin-block: 0; }
.v2-page-content > .v2-section { margin-top: 0; }
body[data-page="ai-chats"] .v2-page-content { display: contents; }
/*






















 */
