/* SOLOMIN: one visual system for everyday money entry.
   Loaded last. Safe area belongs outside the floating dock, never inside it. */
:root {
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --dock-height:66px;
  --dock-gap:calc(20px + var(--safe-bottom));
  --control-line:#deded9;
  --control-radius:14px;
  --control-height:48px;
  --panel-radius:22px;
}

/* Shared controls. Labels describe a field; the selected value is not a heading. */
input,select,.choice-trigger {
  min-height:var(--control-height);
  border-color:var(--control-line);
  border-radius:var(--control-radius);
  font-size:16px;
  font-weight:400;
  line-height:1.4;
}
label { gap:7px; margin-bottom:16px; font-size:12px; font-weight:500; }
.choice-trigger { padding:12px 14px; background:var(--paper); }
.choice-value { font-weight:400; }
.choice-label { line-height:1.4; }
.choice-trigger > .bi { font-size:13px; color:var(--muted); }
.choice-trigger[aria-expanded=true] { border-color:var(--focus); box-shadow:0 0 0 2px var(--accent-soft); }
.primary,.secondary,.month-control {
  min-height:46px;
  padding:11px 18px;
  border-radius:var(--control-radius);
  font-size:14px;
  font-weight:500;
  line-height:1.4;
}
.secondary,.month-control { color:var(--ink); background:var(--paper); border:1px solid var(--control-line); }
.primary { border:1px solid var(--action); }
.icon-button { width:44px; min-width:44px; height:44px; min-height:44px; border-radius:12px; }
.text-button { font-size:13px; }
button:disabled { opacity:.45; cursor:default; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline:2px solid var(--focus);
  outline-offset:3px;
}
.primary:focus-visible { outline-color:var(--focus); }

/* Filters belong to the list, with a quiet but explicit selected state. */
.topbar { gap:20px; margin-bottom:24px; }
.topbar h1 { font-size:30px; font-weight:500; line-height:1.2; }
.top-actions { align-items:center; gap:10px; }
#page-tools { display:flex; align-items:center; gap:10px; }
.month-control { display:inline-flex; align-items:center; justify-content:center; gap:10px; white-space:nowrap; }
.month-control .bi { color:var(--muted); font-size:16px; }
.search-line { gap:10px; margin-bottom:12px; }
.search-field input { min-height:48px; border-color:var(--control-line); }
.search-field > .bi { font-size:17px; }
.filter-toggle { min-height:48px; font-size:13px; gap:8px; }
.filter-toggle[aria-expanded=true] { background:var(--accent-soft); border-color:var(--accent); color:var(--on-accent); }
.filter-toggle span { display:grid; place-items:center; min-width:20px; height:20px; font-size:11px; }
.filter-chips { gap:7px; }
.filter-chips .chip {
  min-height:44px;
  padding:9px 16px;
  border-color:var(--control-line);
  font-size:13px;
  font-weight:500;
}
.filter-chips .chip.active { border-color:var(--accent); background:var(--accent-soft); color:var(--on-accent); }
.filter-panel {
  margin-top:14px;
  padding:16px;
  background:var(--surface);
  border-radius:16px;
  gap:14px;
}
.filter-panel .choice-trigger { min-height:48px; }
.ledger-meta { padding-top:6px; min-height:46px; font-size:12px; }
.ledger-meta > div { gap:16px; }
.gesture-hint { margin:0 0 8px; font-size:12px; }
.ledger-day { margin:20px 0 10px; color:var(--muted); font-size:13px; }
.ledger-front { min-height:86px; padding:16px 18px; }
.ledger-description strong { font-size:15px; line-height:1.4; }
.ledger-description span,.ledger-description p { font-size:12px; line-height:1.5; margin-top:3px; }
.ledger-value { font-size:15px; line-height:1.4; }
.ledger-value small { margin-top:4px; font-size:12px; }
.ledger-item { border-color:var(--line); }
.ledger-item:focus-visible { outline-offset:-2px; }
.pagination { margin:20px 0; gap:10px; }
.pagination .secondary { min-height:44px; padding:10px 16px; }

/* Account ownership and category hierarchy remain structural, not decorative. */
.section-intro { margin-bottom:22px; gap:16px; }
.section-intro p { font-size:14px; line-height:1.6; }
.owner-heading { padding-bottom:14px; }
.account-list { border-radius:var(--panel-radius); }
.account-list-row { padding:18px 0; }
.account-row-main strong { font-size:13px; line-height:1.45; }
.account-row-main > span { margin-top:3px; font-size:22px; line-height:1.3; }
.currency-badge { height:40px; width:46px; border-radius:12px; font-size:11px; }
.settings-row { padding:14px 0; font-size:14px; line-height:1.5; }
.settings-section { padding:24px; border-radius:var(--panel-radius); }
.settings-section h2 { margin-bottom:14px; font-weight:500; }
.settings-section summary { min-height:44px; line-height:1.5; }
.category-manager { gap:14px; }
.category-manager h2 { margin:12px 0 0; font-size:17px; }
.category-family { border-radius:20px; }
.category-parent,.subcategory-row { min-height:62px; }
.category-parent strong,.subcategory-row strong { line-height:1.4; }
.category-parent > .category-glyph { width:36px; height:36px; }
.add-subcategory { color:var(--muted); }
.budget-category { padding:16px 0 20px; }
.budget-category-top h3 { font-size:16px; line-height:1.4; }
.budget-category-top .icon-button { flex-shrink:0; }
.budget-numbers { margin-top:6px; }
.budget-status { line-height:1.5; }

/* Select panels share field typography; focus and selection have separate roles. */
.choice-popover {
  padding:7px;
  border-color:var(--control-line);
  border-radius:16px;
  box-shadow:0 8px 28px #1515151a,0 2px 5px #15151508;
}
.choice-heading { padding:8px 10px 10px; font-size:12px; font-weight:500; }
.choice-option { min-height:48px; padding:11px 12px; border-radius:10px; font-size:15px; font-weight:400; }
.choice-option[aria-selected=true] { font-weight:500; }
.choice-option:focus-visible { outline-offset:-2px; }
.choice-icon { width:24px; font-size:19px; }
.choice-icon .category-glyph { width:24px; height:24px; font-size:20px; }
.choice-search { min-height:44px; border-radius:10px; }

/* A sheet has a stable heading, scrolling fields and one visible save action. */
dialog { padding:24px; border-radius:24px; background:var(--paper); overscroll-behavior:contain; }
dialog .dialog-head {
  position:sticky;
  top:-24px;
  z-index:4;
  margin:-24px -24px 20px;
  padding:22px 24px 16px;
  background:var(--paper);
  gap:12px;
}
.dialog-head h2 { font-size:24px; line-height:1.2; font-weight:500; }
.dialog-head .icon-button { flex-shrink:0; }
.dialog-actions {
  bottom:-24px;
  margin:20px -24px -24px;
  padding:14px 24px 20px;
  background:var(--paper);
  border-top:1px solid var(--line);
  gap:10px;
  z-index:4;
}
.dialog-actions > button { min-height:48px; }
.kind-switch { gap:5px; margin-bottom:20px; padding:4px; border-radius:15px; background:var(--surface); }
.kind-switch button { min-width:0; min-height:44px; padding:8px 9px; font-weight:500; border-radius:11px; border:1px solid transparent; background:transparent; }
.kind-switch button.active { background:var(--paper); border-color:var(--control-line); color:var(--ink); }
#kind-more { display:inline-flex; justify-content:center; align-items:center; gap:6px; }
.amount-field { display:grid; grid-template-columns:1fr auto; align-items:center; gap:7px; }
.amount-field > span { grid-column:2; grid-row:1; float:none; font-size:13px; font-weight:500; }
.amount-field input { grid-column:1/-1; min-height:74px; font-size:36px; font-weight:500; padding:12px 14px; }
.transaction-details { margin:8px 0 0; padding-top:8px; }
.transaction-details summary { min-height:44px; align-items:center; font-size:13px; }
.transaction-details label { margin-top:12px; }
.error:empty { min-height:0; }
#save-error:not(:empty),#settings-error:not(:empty) { padding-top:12px; }
.icon-selector { margin-top:12px; padding:14px; }
.icon-grid { gap:6px; }
.icon-grid button { font-size:20px; }
.icon-preview { margin:12px 0; }

/* Explicit date/kind/confirmation sheets; no platform-specific date chrome assumptions. */
#month-dialog { width:min(390px,calc(100vw - 24px)); }
.year-switch { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; gap:12px; margin:0 0 18px; text-align:center; }
.year-switch > :nth-child(2) { font-size:18px; font-weight:500; }
.year-switch button { min-height:44px; border:1px solid var(--control-line); border-radius:12px; background:var(--paper); color:var(--ink); }
.month-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.month-grid button { min-height:48px; padding:10px 8px; border:1px solid var(--control-line); border-radius:12px; background:var(--paper); color:var(--ink); font-size:14px; }
.month-grid button[aria-pressed=true],.month-grid button.active { background:var(--accent-soft); border-color:var(--accent); color:var(--on-accent); font-weight:500; }
.month-grid button[aria-current=date]:not([aria-pressed=true]) { border-color:var(--focus); }
#kind-dialog .kind-option { display:flex; align-items:center; gap:12px; width:100%; min-height:56px; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--paper); color:var(--ink); text-align:left; font-size:15px; margin-top:8px; }
.kind-option .bi { font-size:20px; color:var(--muted); }
#kind-dialog .kind-option[aria-pressed=true] { background:var(--accent-soft); border-color:var(--accent); }
#confirm-dialog { width:min(420px,calc(100vw - 24px)); }
#confirm-dialog p { font-size:15px; line-height:1.6; }
.dialog-actions .destructive-action,.dialog-actions .danger-button { background:var(--danger); border-color:var(--danger); color:white; }

@media(hover:hover) {
  .secondary:hover,.month-control:hover,.year-switch button:hover,.month-grid button:hover { background:var(--bg); }
  .filter-chips .chip:hover:not(.active) { background:var(--surface); }
  .settings-row:hover { color:var(--on-accent); }
  .dialog-actions .danger-button:hover,.dialog-actions .destructive-action:hover { background:#973232; }
}
@media(max-width:800px) {
  /* 66 = 52 px targets + 6 px top/bottom + 2 px borders. No safe inset inside. */
  .sidebar nav {
    height:var(--dock-height);
    left:10px;
    right:10px;
    bottom:var(--dock-gap);
    margin:0;
    padding:6px;
    gap:2px;
    border:1px solid var(--line);
    border-radius:22px;
    box-shadow:0 4px 20px #1515150a;
    align-items:center;
  }
  #nav button { height:52px; min-height:52px; padding:6px 2px; gap:4px; border-radius:16px; justify-content:center; font-size:19px; }
  #nav button .bi { line-height:1; }
  #nav span { font-size:11px; line-height:1.2; letter-spacing:-.25px; }
  #nav button.active { background:var(--accent-soft); color:var(--on-accent); }
  main { padding:22px 18px calc(var(--dock-height) + var(--dock-gap) + 20px); }
  .toast { bottom:calc(var(--dock-height) + var(--dock-gap) + 12px); }
  .topbar { gap:12px; margin-bottom:20px; align-items:center; }
  .topbar h1 { font-size:26px; }
  .top-actions { gap:8px; flex:0 1 auto; flex-wrap:wrap; }
  #page-tools { gap:8px; }
  .top-actions .primary { padding:11px 14px; }
  .month-control { padding:11px 13px; font-size:14px; gap:8px; }
  .search-line { gap:8px; margin-bottom:10px; }
  .filter-toggle { padding:11px 13px; }
  .filter-panel { padding:14px; gap:12px; }
  .filter-panel .choice-trigger { font-size:14px; padding:11px 12px; }
  .ledger-meta { padding-top:4px; }
  .ledger-day { margin-top:18px; }
  .ledger-front { min-height:84px; padding:14px 12px; gap:10px; }
  .ledger-description strong,.ledger-value { font-size:14px; }
  .ledger-description span,.ledger-description p,.ledger-value small { font-size:12px; }
  .ledger-value { max-width:145px; }
  .section-intro { margin-bottom:20px; gap:12px; }
  .settings-section { padding:22px 18px; }
  .account-row-main > span { font-size:21px; }
  dialog {
    width:100%;
    max-width:100%;
    max-height:calc(var(--visible-height,100dvh) - env(safe-area-inset-top,0px) - 12px);
    padding:20px 20px max(20px,var(--safe-bottom));
    border-radius:24px 24px 0 0;
  }
  dialog:has(.dialog-actions) { padding-bottom:0; }
  dialog .dialog-head { top:-20px; margin:-20px -20px 18px; padding:20px 20px 14px; }
  .dialog-head h2 { font-size:23px; }
  .dialog-actions { bottom:0; margin:20px -20px 0; padding:14px 20px max(16px,var(--safe-bottom)); }
  .kind-switch { gap:3px; padding:4px; }
  .kind-switch button { min-height:44px; padding:8px 5px; font-size:12px; }
  #month-dialog,#confirm-dialog { width:100%; }
}
@media(max-width:359px) {
  #nav span { font-size:10px; }
  .sidebar nav { left:8px; right:8px; padding:6px 4px; }
  .topbar h1 { font-size:24px; }
  .top-actions { width:100%; justify-content:flex-start; }
  #page-tools { margin-left:auto; }
  .filter-panel { padding:12px; }
  .ledger-front { padding:14px 10px; gap:8px; }
  .ledger-value { max-width:120px; }
  .pagination .secondary { padding:10px 12px; }
  .month-grid { gap:6px; }
}

@media(max-width:760px) {
  .plan-overview strong { font-size:clamp(24px,7.4vw,29px); }
}

/* The entire account row is one target; no nested menu button. */
button.account-list-row {
  width:100%;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  background:transparent;
  color:var(--ink);
  font:inherit;
  text-align:left;
}
button.account-list-row > .bi { margin-left:auto; color:var(--muted); font-size:14px; flex-shrink:0; }
button.account-list-row:focus-visible { outline-offset:-3px; border-radius:12px; }
#kind-more { flex:1.2; white-space:nowrap; }
@media(hover:hover) { button.account-list-row:hover { background:var(--bg); } }
#page-tools:empty { display:none; }
@media(max-width:359px) {
  .search-line { flex-wrap:nowrap; }
  .search-field { min-width:0; flex-basis:0; }
  .filter-toggle { margin-left:0; }
}

/* Gesture distance matches the available actions, including a single restore. */
.swipe-actions { touch-action:pan-y pinch-zoom; }
.ledger-item:has([data-restore]) { --swipe-width:88px; }
.ledger-item:has([data-restore]) .swipe-actions { width:88px; }
.actions-open .ledger-front { transform:translateX(calc(-1 * var(--swipe-width,176px))); }
.transaction-details summary > span { max-width:72%; text-align:right; overflow-wrap:anywhere; }
.money-currency { display:inline-block; white-space:nowrap; overflow-wrap:normal; word-break:normal; }
.filter-panel { grid-template-columns:2fr 1fr 1fr; }
.search-field input { padding-right:44px; }
#search::-webkit-search-cancel-button { -webkit-appearance:none; appearance:none; }
#clear-search {
  position:absolute;
  right:4px;
  top:4px;
  width:40px;
  height:40px;
  min-height:40px;
  padding:0;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--muted);
}
#clear-search:hover { background:var(--bg); color:var(--ink); }
@media(max-width:1100px) {
  .filter-panel { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .filter-panel > label:first-child { grid-column:1/-1; }
}

/* Fixed icon boxes avoid font-baseline jumps as search gains a clear action. */
.search-field > .bi { top:50%; transform:translateY(-50%); width:20px; height:20px; display:grid; place-items:center; line-height:1; pointer-events:none; }
.search-field > .bi::before,#clear-search .bi::before { display:block; line-height:1; vertical-align:0; }
#clear-search { display:grid; place-items:center; min-width:40px; }
#clear-search[hidden] { display:none; }
#clear-search .bi { position:static; display:block; width:16px; height:16px; font-size:16px; line-height:1; transform:none; }
.account-list { padding:0; }
button.account-list-row { padding:18px; transition:background-color .12s ease; }
button.account-list-row:first-child { border-radius:var(--panel-radius) var(--panel-radius) 0 0; }
button.account-list-row:last-child { border-radius:0 0 var(--panel-radius) var(--panel-radius); }
button.account-list-row:only-child { border-radius:var(--panel-radius); }

/* Ownership is also written in each row; tint repeats the home's two avatars. */
.person-tone-0 { --person-row:#f6f3fc; --person-row-hover:#eee9fb; --person-marker:#b9a9e4; }
.person-tone-1 { --person-row:#f1f6f3; --person-row-hover:#e8efeb; --person-marker:#9cbba8; }
.ledger-item[class*="person-tone-"] .ledger-front,.ledger-front[class*="person-tone-"],.tx-row-preview[class*="person-tone-"] { background:var(--person-row); }
.recent-card .tx-row-preview[class*="person-tone-"] { padding-left:10px; padding-right:10px; border-radius:12px; margin:4px -10px; }
@media(hover:hover) {
  .ledger-item[class*="person-tone-"] .ledger-front:hover,.ledger-front[class*="person-tone-"]:hover,.tx-row-preview[class*="person-tone-"]:hover { background:var(--person-row-hover); }
}

/* Debts remain separate from spendable account balances and from each other. */
.debt-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:20px; padding-top:18px; border-top:1px solid #1515151a; }
.debt-summary-item { min-width:0; display:flex; flex-direction:column; gap:6px; }
.debt-summary-item:is(button) { border:0; padding:8px 0; border-radius:10px; background:transparent; color:var(--ink); text-align:left; font:inherit; }
.debt-label { font-size:12px; color:var(--muted); line-height:1.4; }
.household .debt-label { color:var(--accent-muted); }
.debt-amount { font-size:20px; font-weight:500; line-height:1.25; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.debt-section { margin-top:28px; }
.debt-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.debt-heading h2 { margin:0; font-size:22px; font-weight:500; }
.debt-list { display:grid; gap:10px; }
.debt-card { display:flex; align-items:center; gap:14px; width:100%; min-width:0; padding:20px; border:1px solid var(--line); border-radius:18px; background:var(--paper); color:var(--ink); text-align:left; font:inherit; }
.debt-main { flex:1; min-width:0; }
.debt-main > strong { font-size:16px; font-weight:500; overflow-wrap:anywhere; }
.debt-meta { display:block; color:var(--muted); font-size:12px; line-height:1.5; margin-top:5px; }
.debt-value { font-size:18px; font-weight:500; text-align:right; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.debt-actions { display:flex; flex-wrap:wrap; gap:8px; }
@media(max-width:359px) {
  button.account-list-row { padding:18px 12px; }
  .topbar:has(#month-picker[hidden]) .top-actions { width:auto; }
  .debt-card { padding:16px; flex-wrap:wrap; }
  .debt-value { max-width:100%; }
  .debt-amount { font-size:18px; }
}
@media(prefers-reduced-motion:reduce) { button.account-list-row { transition:none; } }

.emoji-catalog { margin-top:16px; min-width:0; }
.emoji-search-label { display:block; font-size:12px; }
.emoji-search { margin-top:7px; width:100%; min-height:48px; font-size:16px; }
.emoji-groups { display:flex; gap:6px; overflow-x:auto; overscroll-behavior-x:contain; padding:8px 2px 10px; scrollbar-width:thin; }
.emoji-groups .chip { flex-shrink:0; min-height:44px; padding:9px 12px; font-size:12px; white-space:nowrap; }
.emoji-groups .chip[aria-pressed=true] { background:var(--accent-soft); border-color:var(--accent); color:var(--on-accent); }
.emoji-current { margin:5px 0 12px; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.emoji-catalog-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(44px,1fr)); gap:6px; max-height:310px; overflow-y:auto; overscroll-behavior:contain; padding:3px; }
.emoji-option { display:grid; place-items:center; min-width:0; min-height:44px; height:44px; padding:4px; border:1px solid transparent; border-radius:12px; background:var(--bg); font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; font-size:25px; line-height:1; }
.emoji-option[aria-pressed=true] { background:var(--accent-soft); border-color:var(--focus); }
.emoji-option:focus-visible { outline-offset:-2px; }
.emoji-pages { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.emoji-pages[hidden] { display:none; }
.emoji-status { margin:12px 0; color:var(--muted); font-size:12px; line-height:1.5; }
@media(hover:hover) { .emoji-option:hover { background:var(--accent-soft); } }

/* A nearly white canvas quietly separates the white surfaces. */
:root { --bg:#fafafa; --surface-outline:#e9e9eb; }
body,main,#content { background:var(--bg); }
.filter-panel,.kind-switch,.amount-field input,.emoji-option { background:var(--bg,#f7f7f5); }
@media(hover:hover) { button.account-list-row:hover { background:var(--bg,#f7f7f5); } }
.ledger-front > .tx-icon,.recent-card .tx-row-preview > .tx-icon {
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  min-width:40px;
  flex-shrink:0;
  border-radius:50%;
  background:var(--paper);
  color:var(--ink);
  font-size:20px;
}
.tx-icon .category-glyph { background:transparent; width:auto; height:auto; font-size:21px; }
.ledger-front,.recent-card .tx-row-preview { grid-template-columns:40px minmax(0,1fr) auto; }
.ledger-front > .tx-icon .bi { font-size:19px; }

/* Charts and the compact monthly plan share a single information hierarchy. */
.analytics-panel { min-width:0; margin-bottom:30px; }
.analytics-panel h2 { font-size:22px; font-weight:500; margin-bottom:18px; }
.analytics-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.analytics-heading h2 { margin:0; }
.analytics-filters { display:grid; grid-template-columns:minmax(80px,.7fr) minmax(110px,1fr) minmax(120px,1.4fr) minmax(100px,1fr) minmax(80px,.7fr); gap:12px; margin:0 0 16px; }
.analytics-filters label { min-width:0; margin:0; font-size:12px; }
.analytics-filters .choice-trigger { min-width:0; min-height:46px; font-size:14px; }
.analytics-types { display:flex; gap:6px; margin:14px 0 20px; padding:4px; width:max-content; max-width:100%; background:var(--bg,#f7f7f5); border-radius:14px; }
.analytics-types button { display:flex; align-items:center; justify-content:center; gap:7px; min-width:44px; min-height:44px; padding:9px 13px; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--muted); font-size:13px; }
.analytics-types button[aria-pressed=true],.analytics-types button.active { color:var(--ink); border-color:var(--line); background:var(--paper); }

.analytics-heading .analytics-types { margin:0; }
.analytics-summary { display:flex; align-items:center; flex-wrap:wrap; gap:10px 22px; margin:20px 0 8px; }
.analytics-summary > div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.analytics-summary #chart-total-label { font-size:12px; color:var(--muted); }
.analytics-summary #chart-total { font-size:28px; font-weight:500; line-height:1.25; letter-spacing:-.6px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
#chart-refunds { font-size:12px; line-height:1.6; color:var(--muted); }
#chart-status:empty { display:none; }
.analytics-chart { min-width:0; }
.chart-graphic { width:100%; min-width:0; }
.chart-graphic svg { display:block; overflow:visible; font-family:var(--font-sans); }
.chart-scroll { max-height:420px; overflow:auto; overscroll-behavior:contain; }
.chart-grid { stroke:var(--line,#ededeb); stroke-width:1; }
.chart-zero { stroke:var(--muted,#878780); stroke-width:1; }
.chart-tick { fill:var(--muted,#656562); font-size:11px; }
.chart-category { fill:var(--ink,#343431); font-size:12px; }
.chart-center { fill:var(--ink); font-size:34px; font-weight:500; }
.chart-center-label { fill:var(--muted); font-size:13px; }
.chart-legend { list-style:none; margin:10px 0 18px; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; }
.chart-legend li { display:flex; align-items:center; gap:10px; min-width:0; padding:10px 0; border-bottom:1px solid var(--line); }
.chart-swatch { display:grid; place-items:center; width:23px; height:23px; flex-shrink:0; border-radius:7px; color:#151515; font-size:11px; }
.chart-legend-name { flex:1; min-width:0; font-size:13px; overflow-wrap:anywhere; }
.chart-legend-value { font-size:13px; font-variant-numeric:tabular-nums; text-align:right; }
.chart-legend-value small { display:block; color:var(--muted); font-size:11px; margin-top:2px; }
.chart-note { font-size:12px; line-height:1.6; color:var(--muted); margin:14px 0; }
.chart-empty { padding:40px 18px; text-align:center; color:var(--muted); font-size:14px; }
.chart-data { border-top:1px solid var(--line); }
.chart-data summary { display:flex; align-items:center; min-height:44px; font-size:13px; cursor:pointer; }
.chart-data summary::before { content:'+'; margin-right:9px; color:var(--muted); font-size:18px; }
.chart-data[open] summary::before { content:'−'; }
.chart-data table { width:100%; border-collapse:collapse; font-size:13px; }
.chart-data caption { text-align:left; color:var(--muted); font-size:12px; padding:8px 0 12px; }
.chart-data th,.chart-data td { padding:10px 4px; text-align:left; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.chart-data th { font-weight:500; }
.chart-data td:last-child,.chart-data th:last-child { text-align:right; font-variant-numeric:tabular-nums; }
.chart-data tfoot { font-weight:500; }
.plan-section { margin-top:28px; padding-top:24px; border-top:1px solid var(--line); }
.plan-section > header,.plan-section-heading,.plan-section-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.plan-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.plan-section h2 { font-size:22px; font-weight:500; }
.plan-overview { grid-template-columns:repeat(2,minmax(0,1fr)); padding:16px 18px; gap:18px; border-radius:16px; background:var(--bg,#f7f7f5); }
.plan-overview p { font-size:12px; margin-bottom:5px; }
.plan-overview strong { font-size:21px; letter-spacing:-.5px; }
.plan-overview > div + div { border-top:0; padding-top:0; }
.plan-rule { margin:10px 0 12px; }
.plan-list { padding:0; border-radius:0; }
.budget-category { padding:14px 0; }
.budget-category-top h3 { font-size:15px; }
.budget-numbers { margin:3px 0 8px; gap:6px 12px; }
.budget-numbers strong { font-size:17px; }
.budget-status { margin-top:7px; }
@media(min-width:1000px) {
  .analytics-chart:has(.chart-legend) { display:grid; grid-template-columns:minmax(280px,.9fr) minmax(0,1.1fr); column-gap:28px; align-items:center; }
  .analytics-chart .chart-legend { grid-template-columns:1fr; }
  .analytics-chart .chart-note,.analytics-chart .chart-data { grid-column:1/-1; }
}
@media(max-width:760px) {
  .analytics-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .chart-legend { grid-template-columns:1fr; }
  .analytics-types button { padding:9px 11px; }
}
@media(min-width:761px) and (max-width:1000px) {
  .analytics-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:359px) {
  .ledger-front > .tx-icon,.recent-card .tx-row-preview > .tx-icon { display:grid; width:36px; height:36px; min-width:36px; font-size:19px; }
  .tx-icon .category-glyph { font-size:19px; }
  .recent-card .tx-row-preview { grid-template-columns:36px minmax(0,1fr) auto; }
  .ledger-front { grid-template-columns:36px minmax(0,1fr) auto; gap:8px; }
  .ledger-value { max-width:112px; }
  .plan-overview { padding:14px; gap:12px; }
  .plan-overview strong { font-size:19px; }
  .analytics-types button { gap:5px; padding:9px 10px; font-size:12px; }
}

.analytics-types .bi { font-size:18px; line-height:1; }

@media(max-width:800px) {
  .ledger-front.has-long-value .ledger-description { grid-column:2/-1; }
  .ledger-front.has-long-value .ledger-value { grid-column:1/-1; max-width:none; white-space:nowrap; overflow-wrap:normal; }
}

/* Quiet surfaces, complete day groups, and a secondary debt beside the balance. */
.card,.person-card,.account-list,.settings-section,.plan-list,.ledger-empty,.debt-card {
  border:1px solid var(--surface-outline);
}
.recent-card .tx-row-preview { border-top:0; }
.ledger-item:has(+ .ledger-day),.ledger-item:last-child {
  border-bottom-left-radius:18px;
  border-bottom-right-radius:18px;
  border-bottom:0;
}
.ledger-day + .ledger-item { border-top-left-radius:18px; border-top-right-radius:18px; }
.household-balance { display:flex; align-items:flex-start; gap:24px; min-width:0; }
.balance-main { min-width:0; }
.household-balance .debt-summary { flex-shrink:0; max-width:42%; }
.household-balance .balance-value { font-size:clamp(36px,4.1vw,60px); letter-spacing:-1.8px; }
.household-summary .debt-summary { display:flex; flex-direction:column; gap:12px; margin:0; padding:0; border:0; }
.household-summary .debt-summary-item { padding:0; gap:8px; min-height:44px; }
.household-summary .debt-label { line-height:1.4; }
.household-summary .debt-amount { color:#675b7d; font-size:clamp(22px,2.5vw,32px); font-weight:500; letter-spacing:-.5px; }
.household-summary [data-debt-direction="receivable"] .debt-amount { color:#44685c; }
@media(max-width:800px) {
  .household-balance { gap:16px; }
  .household-balance .balance-value { font-size:clamp(28px,8vw,42px); letter-spacing:-1px; }
  .household-summary .debt-amount { font-size:clamp(17px,4.5vw,24px); letter-spacing:-.3px; }
  .household-summary .debt-label { font-size:12px; }
}

.household-balance .balance-caption,.household-summary .debt-label { font-size:13px; line-height:1.4; font-weight:400; }
.household-balance .balance-caption { margin:0 0 8px; }
.household-balance .debt-summary { position:relative; align-self:stretch; }
.household-balance .debt-summary::before { content:""; position:absolute; left:-12px; top:26px; bottom:0; width:1px; background:#51446630; }
@media(max-width:800px) {
  .household-balance .balance-caption,.household-summary .debt-label { font-size:12px; }
  .household-balance .debt-summary::before { left:-8px; top:25px; }
}

.sidebar .solomin-brand { display:block; font-weight:400; font-size:26px; line-height:1.15; letter-spacing:-.6px; }
@media(max-width:800px) { .sidebar .solomin-brand { font-size:22px; } }

/* The mobile dock remains; the redundant brand header does not. */
@media(max-width:800px) {
  .sidebar { padding:0; border:0; gap:0; }
  .sidebar > .brand { display:none; }
}
@media(min-width:1151px) { .household-summary { grid-template-columns:minmax(0,1fr) auto; } }
@media(max-width:359px) {
  .household { padding:16px; }
  .household-balance .balance-value { font-size:26px; }
  .household-balance { gap:12px; }
  .household-summary .debt-amount { font-size:14px; }
  .household-balance .debt-summary::before { left:-6px; }
}
.recent-card { padding:16px; }
.recent-card .tx-row-preview[class*="person-tone-"] { margin:4px 0; }
.recent-card .tx-row-preview:last-child { margin-bottom:0; }
.recent-card .section-heading { margin-bottom:12px; }
body[data-page="transactions"],body[data-page="transactions"] main,body[data-page="transactions"] #content { background:var(--paper); }
.analytics-filters { grid-template-columns:repeat(4,minmax(0,1fr)); align-items:start; }
.analytics-view-filter { grid-column:span 2; display:flex; flex-direction:column; gap:7px; min-width:0; }
.analytics-view-filter > span { font-size:12px; font-weight:500; }
.analytics-view-filter .analytics-types { margin:0; padding:0; background:transparent; }
.analytics-view-filter .analytics-types button { min-height:46px; }
@media(max-width:1000px) { .analytics-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
