/* Senior UI/UX review, 26 Oct 2026: one home per card, one top bar, readable type. Loaded last. */

/* Home Daily is budget, chips and the ledger. */
.main-layout.home-ledger-layout { display:block; }

/* Statistics: Week by week. Weeks still ahead read as upcoming, not as ₹0. */
.stats-studio[data-stats-view=weeks]>:is(.stats-ledger,.stats-inspector-wrap) { display:none; }
/* The card spans the whole wide-screen grid; on its own it took one of twelve columns and wrapped letter by letter. */
.stats-studio>.stats-weeks { grid-column:1/-1; min-width:0; }
.stats-weeks .week summary small { font-variant-numeric:tabular-nums; }
.stats-weeks .week-future summary { color:var(--muted); }
.stats-weeks .week-future summary strong { font-weight:500; }
.week-upcoming { font-size:var(--text-xs); color:var(--muted); font-weight:500; }
.week-now { display:inline-block; margin-left:8px; padding:2px 8px; border-radius:var(--radius-pill); background:var(--brand-soft); color:var(--brand); font-size:var(--text-2xs); font-weight:600; vertical-align:middle; }
.stats-month-review { margin:0 0 16px; grid-column:1/-1; }
.stats-month-review .button { width:100%; justify-content:space-between; }

/* Search lives in the top bar of every tab: an icon on phones, a labelled field-style button on wide screens. Both open the full search page. */
.topbar-search-label,.topbar-search kbd { display:none; }
@media (min-width:640px) {
 #app .topbar .overview-tools .topbar-search { display:flex; align-items:center; gap:10px; width:clamp(220px,26vw,320px); height:40px; min-height:40px; padding:0 8px 0 14px; border:1px solid var(--control-border,var(--border)); border-radius:var(--radius-pill); background:var(--surface); color:var(--muted); font:inherit; font-size:var(--text-sm); transition:border-color .16s var(--motion-ease),color .16s var(--motion-ease); }
 #app .topbar .topbar-search .icon { width:16px; height:16px; flex:none; }
 .topbar-search-label { display:block; flex:1; min-width:0; overflow:hidden; text-align:left; text-overflow:ellipsis; white-space:nowrap; }
 .topbar-search kbd { display:grid; place-items:center; flex:none; min-width:22px; height:22px; padding:0 6px; border:1px solid var(--border); border-radius:6px; background:var(--subtle); color:var(--muted); font:inherit; font-size:var(--text-2xs); }
 @media (hover:hover) and (pointer:fine){#app .topbar .topbar-search:hover{ border-color:var(--brand); color:var(--text); }}
 #app[data-search-open=true] .topbar .topbar-search { border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-soft); }
}

/* Accounts: the explanation is one tap away instead of always on screen. */
.balances-explained { display:block; }
.balances-explained summary { display:flex; align-items:center; gap:10px; min-height:44px; cursor:pointer; list-style:none; color:var(--muted); font-size:var(--text-sm); font-weight:500; }
.balances-explained summary::-webkit-details-marker { display:none; }
.balances-explained summary .icon { width:18px; height:18px; color:var(--muted); flex:none; }
.balances-explained p { margin:4px 0 8px 28px; font-size:var(--text-sm); color:var(--muted); }
.accounts-summary + .section-heading, .account-grid + .home-goals-card { margin-top:20px; }

/* One top bar on phones: the tab's title on the left, then sync, search and help, matching Home's month bar. */
@media (max-width:639px) {
  html[data-theme] #app:not([data-route=home])[data-route] .topbar { position:sticky; top:0; left:auto; right:auto; z-index:30; display:flex; align-items:center; gap:0; width:auto; height:auto; min-height:52px; padding:calc(8px + env(safe-area-inset-top)) 4px 0 16px; background:var(--bg); }
  #app:not([data-route=home])[data-route] .topbar-title { display:block; position:static; margin-right:auto; opacity:1; transform:none; font-size:1.125rem; font-weight:600; letter-spacing:-.01em; color:var(--text); }
  #app:not([data-route=home])[data-route] .topbar .overview-tools { display:flex; margin:0; }
  #app:not([data-route=home]) .page-heading { position:absolute; width:1px; height:1px; margin:0; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  #app:not([data-route=home]) main { padding-top:12px; }
}
/* The page title takes focus after a tab change for screen readers; it is not a control, so no ring. */
#app .page-heading h1:focus { outline:none; box-shadow:none; }

/* Type in rem so the phone's text-size setting reaches it; nothing you read is smaller than 13px (12px, --text-2xs, is for tiny caps labels only). */
:root {
  --text-2xs:.75rem; --text-xs:.8125rem; --text-sm:.875rem; --text-md:.875rem; --text-base:.9375rem; --text-lg:1rem;
  --text-xl:1.125rem; --text-2xl:1.25rem; --text-3xl:1.5rem; --text-4xl:1.75rem; --text-5xl:2.25rem; --text-hero:3rem;
  --display-sm:clamp(1.125rem,.9rem + 1.5vw,1.5rem); --display-md:clamp(1.5rem,1.1rem + 2vw,2rem); --display-lg:clamp(2rem,1.5rem + 2.5vw,2.75rem); --display-xl:clamp(2.25rem,1.75rem + 2vw,3.25rem);
}

/* One progress bar style: the thin rounded bar from the Home budget card, for budget and goals alike. */
html[data-theme] #app .stats-budget-instrument, html[data-theme] #app .budget-battery { display:none; }
html[data-theme=dark] #app .budget-classic-progress { display:block; }
html[data-theme] #app :is(.goal,.home-goal) .bar-track { display:block; width:100%; height:4px; border-radius:2px; overflow:hidden; -webkit-mask-image:none; mask-image:none; }
html[data-theme] #app :is(.goal,.home-goal) .bar-track rect:first-child { fill:var(--chart-track); }
html[data-theme] #app :is(.goal,.home-goal) .bar-track rect:last-child { fill:var(--brand); }
html[data-theme] #app .stats-inline-budget progress { -webkit-appearance:none; appearance:none; height:4px; border:0; border-radius:2px; overflow:hidden; background:var(--chart-track); color:var(--brand); }
html[data-theme] #app .stats-inline-budget progress::-webkit-progress-bar { background:var(--chart-track); border-radius:2px; }
html[data-theme] #app .stats-inline-budget progress::-webkit-progress-value { background:var(--brand); border-radius:2px; }
html[data-theme] #app .stats-inline-budget progress::-moz-progress-bar { background:var(--brand); border-radius:2px; }
/* Light keeps the Home bar's reference blue. */
html[data-theme=light] #app :is(.goal,.home-goal) .bar-track rect:last-child { fill:var(--reference-blue); }
html[data-theme=light] #app .stats-inline-budget progress::-webkit-progress-value { background:var(--reference-blue); }
html[data-theme=light] #app .stats-inline-budget progress::-moz-progress-bar { background:var(--reference-blue); }

/* Add transaction: description and date sit on the sheet; Details keeps account, payer, note and repeat. */
.entry-primary-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(128px,40%); gap:12px; align-items:start; margin:4px 0 4px; }
.entry-primary-fields label { margin:0; }
.entry-primary-fields input[type=date] { min-height:44px; }
#transaction-form .entry-primary-fields .entry-date-picker{margin-top:7px}
html[data-theme] #transaction-form .entry-primary-fields :is(.entry-description input,.entry-date-trigger){height:44px;min-height:44px;border:1px solid var(--control-border);border-radius:var(--radius-control);background:var(--surface)}
html[data-theme] #transaction-form .entry-primary-fields .entry-date-trigger{gap:6px;padding:0 9px;font-size:var(--text-sm);font-weight:500}
#transaction-form .entry-primary-fields .entry-date-trigger>.icon{width:15px;height:15px;flex:none}
#transaction-form .entry-primary-fields .entry-date-trigger>span{white-space:nowrap}
@media(max-width:359px){#transaction-form .entry-primary-fields .entry-date-trigger>.icon:last-child{display:none}}
html[data-theme] .category-choice-rows [data-action=category-select][aria-pressed=true]{background:var(--selection-soft,var(--subtle));color:var(--text);box-shadow:inset 0 0 0 1px var(--reference-blue)}
html[data-theme] .category-chooser .category-search{border-radius:var(--radius-control);background:var(--surface-raised,var(--surface));border-color:var(--control-border)}
html[data-theme] .te-controls .field-picker{width:100%}
.entry-primary-fields .entry-date-label { display:block; margin-top:6px; color:var(--muted); font-size:var(--text-xs); font-weight:500; }
.entry-fields > .merchant-suggestions { margin-bottom:8px; }
/* Category tiles carry the same names as the ledger; long names wrap onto two lines. */
.quick-categories .quick-category small { white-space:normal; text-overflow:clip; font-size:var(--text-2xs); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; text-align:center; line-height:1.2; hyphens:auto; overflow-wrap:anywhere; word-break:normal; }

/* Calendar: days that haven't happened yet are dimmed, so they don't read as no-spend days. */
.calendar-day.future:not(.selected) { opacity:.45; }

/* Ledger: a salary day shows what came in. */
.ledger-day-heading .income { color:var(--income); }

/* Category breakdown: one two-way switch instead of a green label and a pill. */
.report-scope { margin:0 0 12px; }
.report-scope button { padding:0 16px; font-size:var(--text-sm); font-weight:500; }
html[data-theme] .report-category-menu > summary { min-height:24px; padding-block:0; justify-content:flex-end; }

/* Settings: the way into the private section reads as a plain group heading above Data & sync, not as a feature. */
#app .settings-private { padding:0; margin:8px 0 -8px; background:none; border:0; box-shadow:none; }
#app .settings-private > .settings-group-heading { display:inline-flex; align-items:center; min-height:44px; padding:0 4px; background:none; border:0; box-shadow:none; color:var(--muted); font-size:var(--text-2xs); font-weight:600; letter-spacing:.08em; text-transform:uppercase; cursor:default; }
#app .settings-private > .settings-group-heading:focus-visible { outline:2px solid var(--brand); outline-offset:2px; border-radius:var(--radius-2xs); }

/* Statistics: period on the left, report image and filters together on the right of one row. */
#app[data-route=stats] .stats-studio>.stats-compact-controls { grid-template-columns:minmax(0,1fr) auto; }
#app[data-route=stats] .stats-compact-controls>.stats-control-actions { grid-column:2; grid-row:1; display:flex; gap:0; }
.stats-control-actions>[data-action=story-filters] { position:relative; }
.stats-control-actions>[data-action=story-filters] .count { position:absolute; top:0; right:0; min-width:15px; height:15px; border-radius:50%; background:var(--brand-soft); color:var(--text); font-size:var(--text-2xs); line-height:15px; text-align:center; }
/* Week by week: a thin bar under each week compares it with the busiest week. */
.week-bar { display:block; width:160px; max-width:100%; height:4px; margin-top:6px; overflow:visible; }
.week-bar rect:first-child { fill:var(--border); }
.week-bar rect + rect { fill:var(--brand); }

/* Loans: the payoff planner is one tap away; the list and what's coming up come first. */
.private-strategy-fold { border:1px solid var(--border); border-radius:var(--radius-card); background:var(--surface); }
.private-strategy-fold > summary { display:grid; gap:2px; padding:14px 16px; min-height:44px; cursor:pointer; list-style:none; font-weight:600; }
.private-strategy-fold > summary::-webkit-details-marker { display:none; }
.private-strategy-fold > summary small { color:var(--muted); font-weight:400; font-size:var(--text-sm); }
.private-strategy-fold > .private-strategy { border:0; background:none; padding-top:0; }
.private-usual-note { display:block; margin-top:4px; font-weight:400; }
/* Statement: what will be shared is shown first. */
.private-statement-preview { display:grid; gap:8px; margin-top:16px; padding:16px; border:1px solid var(--border); border-radius:var(--radius-card); background:var(--surface); }
.private-statement-preview h3 { margin:0; font-size:var(--text-lg); }
.private-statement-preview pre { margin:0; max-height:40vh; overflow:auto; padding:12px; border-radius:var(--radius-xs); background:var(--bg); font:var(--text-sm)/1.5 var(--font-ui); white-space:pre-wrap; }
.private-statement-actions { display:flex; justify-content:flex-end; gap:8px; }
/* Payoff curve: what's left owing month by month under the plan. */
.payoff-curve { margin:0 0 4px; }
.payoff-curve svg { display:block; width:100%; height:96px; }
.payoff-curve-area { fill:var(--brand-soft); opacity:.6; }
.payoff-curve-line { fill:none; stroke:var(--brand); stroke-width:2; stroke-linejoin:round; }
.payoff-curve-mark { stroke:var(--muted); stroke-width:1; stroke-dasharray:3 3; }
.payoff-curve figcaption { display:flex; justify-content:space-between; gap:8px; margin-top:6px; font-size:var(--text-xs); color:var(--muted); }
.payoff-curve figcaption span:last-child { text-align:right; }
.payoff-curve figcaption strong { display:block; color:var(--text); font-weight:600; }
/* Lock stays labelled on phones so it's easy to find. */
html[data-theme] .private-workspace .dialog-heading .private-header-lock { font-size:var(--text-sm); gap:6px; width:auto; min-width:44px; padding:8px 12px; color:var(--text); }

/* Statistics, spending pulse (27 Oct 2026): safe to spend, comparable weeks, repeat payments, savings rate. */
.stats-safe { display:grid; gap:4px; align-content:start; padding:16px 18px; border-radius:var(--radius-card,16px); background:color-mix(in srgb,var(--brand-soft) 30%,var(--surface)); color:var(--text); }
.stats-safe-label { font-size:var(--text-sm); font-weight:600; color:var(--brand); }
.stats-safe-value { font-size:var(--display-md); line-height:1.15; font-weight:700; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.stats-safe-value small { font-size:var(--text-md); font-weight:500; letter-spacing:0; color:var(--muted); }
.stats-safe p { margin:0; font-size:var(--text-sm); line-height:1.55; color:var(--muted); }
.stats-safe-tight { background:var(--warning-soft); }
.stats-safe-tight .stats-safe-label, .stats-safe-over .stats-safe-label { color:var(--warning); }
.stats-safe-over { background:var(--expense-soft); }
#app[data-route=stats] .stats-hero-copy:has(>.stats-safe) { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); }
#app[data-route=stats] .stats-hero-copy>.stats-safe { grid-column:2; grid-row:1; align-self:stretch; }
#app[data-route=stats] .stats-hero-copy>.stats-hero-tiles { grid-column:1/-1; grid-row:auto; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:16px 24px; padding:16px 0 0; border-left:0; border-top:1px solid var(--divider); }
.stats-hero-tiles>div>small { font-size:var(--text-xs); line-height:1.5; color:var(--muted); }
.stats-hero-tiles .stats-tile-above>small { color:var(--warning); }
#app[data-route=stats] .stats-hero-tiles .stats-number { font-size:var(--text-2xl); }
#app[data-route=stats] .stats-hero-tiles .stats-number span { font-size:inherit; color:inherit; line-height:inherit; }
#app[data-route=stats] .stats-hero-tiles>div>small span { font-size:inherit; color:inherit; }
@media (max-width:1100px) { #app[data-route=stats] .stats-hero-copy>.stats-safe { grid-column:1; grid-row:auto; } #app[data-route=stats] .stats-hero-copy:has(>.stats-safe) { grid-template-columns:minmax(0,1fr); } }
@media (max-width:639px) { #app[data-route=stats] .stats-hero-copy>.stats-hero-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); } .stats-safe-value { font-size:var(--display-sm); } }

/* Weeks: day-to-day bars with a tick for a usual week; bills named underneath. */
.stats-weeks-summary { margin:-8px 0 12px; font-size:var(--text-sm); line-height:1.6; color:var(--muted); }
.stats-weeks .week summary { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; column-gap:12px; }
.stats-weeks .week summary>span { display:block; min-width:0; }
.stats-weeks .week summary>span>:is(small,.week-bar) { display:block; margin-top:4px; }
.week-bar { width:min(100%,360px); height:8px; }
.week-bar .bar-fill.over { fill:var(--warning); }
.week-usual { stroke:var(--text); stroke-width:1.5; vector-effect:non-scaling-stroke; opacity:.7; }
.week-split { color:var(--muted); }
.stats-weeks .week summary>strong { font-variant-numeric:tabular-nums; }

/* Repeat payments and unusually large ones. */
/* Overview only, and the full row unless the wide layout below pairs it; on its own it took one of twelve columns. */
.stats-studio>.stats-watch { grid-column:1/-1; min-width:0; }
.stats-studio:not([data-stats-view=overview])>.stats-watch { display:none; }
.stats-watch-list { list-style:none; margin:0 0 12px; padding:0; }
.stats-watch-row { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:56px; padding:10px 0; border:0; border-bottom:1px solid var(--divider); background:none; color:inherit; font:inherit; text-align:left; }
button.stats-watch-row { cursor:pointer; }
@media (hover:hover) and (pointer:fine){button.stats-watch-row:hover strong{ text-decoration:underline; text-underline-offset:3px; }}
.stats-watch-list li:last-child .stats-watch-row { border-bottom:0; }
.stats-watch-row>span { display:grid; gap:2px; min-width:0; }
.stats-watch-row strong { font-size:var(--text-md); font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stats-watch-row small { font-size:var(--text-xs); color:var(--muted); }
.stats-watch-row>.report-amount { flex:none; font-variant-numeric:tabular-nums; font-weight:500; }
.stats-watch-change { font-weight:600; }
.stats-watch-change.up { color:var(--warning); }
.stats-watch-change.down { color:var(--income); }
.stats-watch-subhead { margin:8px 0 0; font-size:var(--text-sm); font-weight:600; color:var(--muted); }

/* Savings rate beside the six-month bars. */
.stats-savings-trend { margin-top:20px; padding-top:16px; border-top:1px solid var(--divider); }
.stats-savings-trend h3 { margin:0; font-size:var(--text-md); font-weight:600; }
.stats-savings-trend svg { display:block; width:100%; height:80px; margin-top:8px; }
.stats-savings-axis { stroke:var(--divider); stroke-width:1; vector-effect:non-scaling-stroke; }
.stats-savings-bar.kept { fill:var(--income); }
.stats-savings-bar.short { fill:var(--expense); }
.stats-savings-labels { display:grid; grid-auto-flow:column; grid-auto-columns:1fr; margin:4px 0 0; padding:0; list-style:none; text-align:center; font-size:var(--text-xs); color:var(--muted); }
.stats-savings-labels b { display:block; font-weight:600; color:var(--text); font-variant-numeric:tabular-nums; }
.stats-savings-labels b.kept { color:var(--income); }
.stats-savings-labels b.short { color:var(--expense); }

/* Category rows: a visible "more" mark instead of a lone disclosure triangle. */
.report-category-menu>summary { list-style:none; }
.report-category-menu>summary::-webkit-details-marker { display:none; }
.report-category-menu>summary>[aria-hidden] { display:inline-flex; align-items:center; justify-content:center; min-width:32px; border-radius:var(--radius-xs); color:var(--muted); font-size:var(--text-lg); line-height:1; }
@media (hover:hover) and (pointer:fine){.report-category-menu>summary:hover>[aria-hidden]{ background:var(--brand-soft); }}

/* The cumulative chart keeps a readable height on wide screens instead of growing with the width. */
.stats-trend .report-plot { height:clamp(200px,22vw,320px); }

/* Wide screens: two columns so the chart, the breakdown and the observations sit side by side. */
@media (min-width:1200px) {
  .stats-studio[data-stats-view=overview]>.stats-trend { grid-column:1/span 7; }
  .stats-studio[data-stats-view=overview]>.stats-analyzer { grid-column:8/-1; }
  .stats-studio[data-stats-view=overview]>.stats-trend[hidden]+.stats-analyzer { grid-column:1/-1; }
  .stats-studio[data-stats-view=overview]>.stats-watch { grid-column:1/span 6; }
  .stats-studio[data-stats-view=overview]>.stats-watch~.stats-insights { grid-column:7/-1; }
  .stats-studio[data-stats-view=overview] .report-breakdown-layout { grid-template-columns:minmax(0,1fr); }
}

/* Phones: the observations become a row of cards you swipe through, with the next one peeking in. */
@media (max-width:639px) {
  /* position:relative keeps the screen-reader copies of amounts inside the scroller, or they widen the page. */
  .stats-insights .report-insight-track { position:relative; display:grid; grid-auto-flow:column; grid-auto-columns:86%; gap:12px; margin:12px -16px 0; padding:0 16px 4px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; scroll-padding-inline:16px; scrollbar-width:none; }
  .stats-insights .report-insight-track::-webkit-scrollbar { display:none; }
  .stats-insights .report-insight-track>.report-insight { scroll-snap-align:start; align-content:start; padding:16px; border:1px solid var(--divider); border-radius:var(--radius-card,16px); background:var(--surface); }}

/* Stats quality: explanations stay reachable; wide data scrolls inside its own containing block. */
#app[data-route=stats] .stats-studio{min-width:0}
#app[data-route=stats] .stats-studio>.stats-hero .stats-summary-details{display:block!important}
/* One disclosure row on Stats: title, optional one-line subtitle, chevron, and the card's 16px inset. */
#app[data-route=stats] :is(.stats-summary-details,.stats-allowance,.stats-allowance-details,.stats-week-method,.chart-data,.stats-longer-history,.stats-disclosure-section)>summary,#app[data-route=stats] .stats-month-review .button{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px;min-height:48px;padding:12px 0;margin:0;cursor:pointer;color:var(--text);font-size:var(--text-md);font-weight:500;line-height:1.35;text-align:left}
#app[data-route=stats] .stats-month-review .button{padding-inline:16px}
#app[data-route=stats] :is(.stats-summary-details,.stats-allowance,.stats-allowance-details,.stats-week-method,.chart-data,.stats-longer-history,.stats-disclosure-section)>summary>:is(span:not(.disclosure-chevron),small){grid-column:1;min-width:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:inherit;font-weight:inherit;line-height:inherit}
#app[data-route=stats] :is(.stats-summary-details,.stats-allowance,.stats-allowance-details,.stats-week-method,.chart-data,.stats-longer-history,.stats-disclosure-section)>summary>small{color:var(--muted);font-size:var(--text-xs);font-weight:400}
#app[data-route=stats] :is(.stats-summary-details,.stats-allowance,.stats-allowance-details,.stats-week-method,.chart-data,.stats-longer-history,.stats-disclosure-section)>summary>.disclosure-chevron{grid-column:2;grid-row:1;position:static;margin:0;align-self:center}
#app[data-route=stats] .stats-disclosure-section>summary:has(>small)>.disclosure-chevron{grid-row:1/span 2}
#app[data-route=stats] .stats-disclosure-section{padding:0 16px}
#app[data-route=stats] .table-scroll,#app[data-route=stats] .report-matrix-scroll{position:relative;contain:inline-size layout;min-width:0;max-width:100%;overflow:auto;overscroll-behavior:contain}
#app[data-route=stats] .stats-studio .sr-only{inset-block-start:0;inset-inline-start:0}
#app[data-route=stats] .stats-analyzer .section-heading{flex-wrap:wrap;gap:12px}
#app[data-route=stats] .stats-segment{max-width:100%}
#app[data-route=stats] .stats-segment>button{min-width:0;white-space:normal;padding-inline:10px;overflow-wrap:anywhere}
#app[data-route=stats] .stats-inline-budget{padding:12px 0;border-top:1px solid var(--divider);color:var(--muted)}
#app[data-route=stats] .report-comparison-label{display:grid;gap:6px;max-width:320px;font-size:var(--text-xs);margin-block:12px}
/* Same soft pill as the "Cumulative spending" view menu beside it. */
#app[data-route=stats] .report-comparison-label select{justify-self:start;width:auto;max-width:100%;min-height:44px;padding:8px 32px 8px 14px;border:1px solid var(--border);border-radius:var(--radius-pill);background-color:transparent;font-size:var(--text-sm);font-weight:500}
#app[data-route=stats] .report-plot{height:296px}
#app[data-route=stats] .report-axis{font-size:12px;fill:var(--muted);font-family:inherit}
#app[data-route=stats] .report-grid{stroke:var(--divider);stroke-width:1;vector-effect:non-scaling-stroke}
#app[data-route=stats] .report-legend{gap:8px 14px;margin-block:12px}
#app[data-route=stats] .stats-safe{padding:14px}
#app[data-route=stats] .stats-safe p{margin-top:6px}
#app[data-route=stats] .report-insight-track{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-flow:row;grid-auto-columns:auto;overflow:visible;gap:12px;margin:12px 0 0;padding:0}
#app[data-route=stats] .report-insight{width:auto;min-width:0}
#app[data-route=stats] .stats-extra-observations>summary{min-height:44px;cursor:pointer;padding-block:12px}
.stats-period-short,.report-phone-month,.report-phone-compare{display:none}
#app[data-route=settings] .settings-jump{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;padding:0;background:none;border:0;box-shadow:none}
#app[data-route=settings] .settings-jump-label{color:var(--muted);font-size:var(--text-xs)}
#app[data-route=settings] .settings-jump button{border:0;border-radius:0;background:none;color:var(--muted);min-height:44px;text-decoration:underline;text-underline-offset:5px;font-size:var(--text-sm)}
#app[data-route=settings] .settings-jump button[aria-current]{color:var(--text);font-weight:600}
@media(max-width:639px){
 #app[data-route=stats] .stats-safe{padding:12px}
 #app[data-route=stats] .stats-hero-copy{gap:12px}
 #app[data-route=stats] .stats-hero-sub{gap:12px}
 #app[data-route=stats] .report-insights{padding:16px}
 #app[data-route=stats] .report-phone-month{display:grid;gap:6px;font-size:var(--text-xs);margin-block:12px}
 #app[data-route=stats] .report-phone-month select{min-height:44px}
 #app[data-route=stats] .report-history .report-matrix{min-width:0;width:100%;table-layout:fixed}
 #app[data-route=stats] .report-history .report-matrix tr>*:first-child{min-width:0;width:58%;position:static;overflow-wrap:anywhere}
 #app[data-route=stats] .report-history:not(.report-compare-months) .report-matrix .report-other-month{display:none}
 #app[data-route=stats] .report-matrix :is(th,td){padding:8px}
 #app[data-route=stats] .report-matrix-toggle{max-width:100%;text-align:left;overflow-wrap:anywhere}
 #app[data-route=stats] .stats-period-label{min-width:0;padding-inline:6px}
}
@media(max-width:359px){
 #app[data-route=stats] .stats-period-full{display:none}
 #app[data-route=stats] .stats-period-short{display:inline}
 #app[data-route=stats] .stats-period-navigation{gap:0;min-width:0}
 #app[data-route=stats] .stats-period-label{font-size:var(--text-sm);white-space:nowrap}
 #app[data-route=stats] .stats-compact-controls{column-gap:4px}
 #app[data-route=stats] .stats-segment>button{font-size:var(--text-xs);padding-inline:8px}
}

#app[data-route=stats] .report-insight-track>.report-insight{min-height:0;max-width:100%;padding:12px}
#app[data-route=stats] .report-insight-figure{font-size:var(--text-lg)}
#app[data-route=stats] .report-insight-main{gap:6px}
#app[data-route=stats] .report-insights h3{font-size:var(--text-sm)}
#app[data-route=stats] .report-phone-month+.table-scroll .report-matrix caption{max-width:100%}
@media(max-width:639px){#app[data-route=stats] .report-swipe-hint{display:none}}

#app[data-route=stats] .stats-more-categories>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:var(--text-sm)}
#app[data-route=stats] .stats-more-categories>.report-category-list{margin:0;padding:0}
@media(max-width:639px){
 #app[data-route=stats] .report-phone-compare{display:flex;align-items:center;gap:10px;min-height:44px;font-size:var(--text-xs);margin-bottom:10px}
 #app[data-route=stats] .report-phone-compare input{width:20px;height:20px;margin:0}
 #app[data-route=stats] .report-history.report-compare-months .report-matrix{min-width:680px;table-layout:auto}
 #app[data-route=stats] .report-history.report-compare-months .report-matrix tr>*:first-child{width:auto;min-width:150px;position:sticky;left:0;background:var(--surface);z-index:1}
 #app[data-route=stats] .report-category-list>li{position:relative}
 #app[data-route=stats] .report-category-row{padding-right:52px}
 #app[data-route=stats] .report-category-row .report-spark{display:none}
 #app[data-route=stats] .report-category-menu{margin:0;padding:0;border:0}
 #app[data-route=stats] .report-category-menu>summary{position:absolute;top:0;right:0;min-width:44px;min-height:44px;display:grid;place-items:center;padding:0}
 #app[data-route=stats] .report-category-menu>summary .disclosure-chevron{display:none}
 /* The ⋯ button centres on the category name (first line); allocation rows have 6px padding. */
 #app[data-route=stats] .report-allocation .report-category-menu>summary{top:-5px}
}
