@charset "UTF-8";

:root {
  --page: #f6f5f0;
  --paper: #fffefa;
  --ink: #303a32;
  --muted: #898c80;
  --green: #47674f;
  --green-dark: #344e3b;
  --green-pale: #edf0e7;
  --line: #e8e9df;
  --sand: #b6986d;
  --danger: #ad5b43;
  --serif: "Iowan Old Style", "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #aac197; outline-offset: 4px; }
button { transition: background .18s, color .18s, border-color .18s, transform .18s; }
button:disabled { cursor: not-allowed; opacity: .5; }
svg { flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
input, select, textarea { min-width: 0; }
.skip-link { position: fixed; left: 15px; top: -80px; z-index: 100; padding: 12px 18px; background: var(--green); color: white; border-radius: 8px; }
.skip-link:focus { top: 15px; }
.sidebar { width: 222px; position: fixed; inset: 0 auto 0 0; background: #eeefe6; border-right: 1px solid #e3e5da; padding: 36px 22px 21px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 13px; }
.brand-symbol { width: 43px; height: 45px; border-radius: 13px 13px 13px 3px; color: #f6f4e9; background: var(--green); display: grid; place-items: center; }
.brand-name { font-family: var(--serif); font-size: 29px; font-weight: 700; letter-spacing: 4px; line-height: 1.2; }
.brand-name small { display: block; font-family: var(--sans); font-size: 10px; font-weight: 400; letter-spacing: 3.1px; color: #7c8576; margin-top: 5px; }
.sidebar-label { margin: 53px 16px 13px; font-size: 10px; color: #949889; letter-spacing: 1.5px; }
.desktop-nav { display: grid; gap: 9px; }
.nav-item { display: flex; align-items: center; gap: 13px; text-align: left; min-height: 48px; padding: 12px 16px; border-radius: 8px; color: #788170; font-size: 13px; position: relative; }
.nav-item:hover { background: #e5e9dc; }
.nav-item.active { background: #dde5d6; color: #365740; font-weight: 600; }
.nav-item i { width: 5px; height: 5px; background: #557449; border-radius: 50%; margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding-top: 50px; }
.sidebar-note { margin: 0 13px 29px; padding-bottom: 30px; border-bottom: 1px solid #dcdfd2; color: #82916f; }
.sidebar-note p { font-family: var(--serif); color: #6d785e; font-size: 17px; line-height: 1.9; margin: 13px 0 15px; letter-spacing: 1px; }
.sidebar-note > span { font-size: 7px; letter-spacing: 2px; }
.sidebar-tool { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 10px 15px; width: 100%; font-size: 12px; color: #7e8577; text-align: left; border-radius: 8px; }
.sidebar-tool:hover { background: #e4e8db; }
.storage-label { display: flex; align-items: center; gap: 7px; font-size: 9px; color: #929887; margin: 23px 10px 0; white-space: nowrap; }
.status-dot { height: 5px; width: 5px; border-radius: 50%; background: #88a174; }
.has-error { color: var(--danger); }
.has-error .status-dot { background: var(--danger); }
.workspace { margin-left: 222px; }
.topbar { height: 75px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 42px; }
.breadcrumb { display: flex; align-items: center; gap: 11px; font-size: 11px; color: #616c5c; }
.breadcrumb > span { color: #9b9e91; }
.topbar-right { display: flex; align-items: center; gap: 24px; }
.today { font-size: 10px; display: flex; gap: 9px; align-items: center; color: #878e7c; }
.today svg { color: #a49673; }
.avatar { width: 33px; height: 33px; border-radius: 50%; background: #e7e7d9; color: #778161; font-family: var(--serif); font-size: 14px; }
.mobile-brand, .mobile-nav { display: none; }
main { max-width: 1420px; margin: auto; padding: 31px 42px 0; outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { font-size: 9px; letter-spacing: 1.6px; color: #929585; margin-bottom: 8px; }
h1 { font-size: 28px; font-family: var(--serif); font-weight: 600; letter-spacing: 1.4px; line-height: 1.45; overflow-wrap: anywhere; }
.page-heading p { color: #8d9284; font-size: 11px; margin-top: 8px; }
.meta-divider { display: inline-block; margin: 0 10px; color: #c2c5b7; }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.button { min-height: 42px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 17px; font-size: 12px; line-height: 1.5; white-space: nowrap; font-weight: 500; }
.primary { background: var(--green); color: #fffef7; border: 1px solid var(--green); box-shadow: 0 2px 3px #3d583812; }
.primary:hover { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); }
.secondary { border: 1px solid #dddfd3; background: #fcfcf7; color: #68735e; }
.secondary:hover { background: #eeefe6; border-color: #b8c1a8; }
.small { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.welcome-banner { position: relative; min-height: 237px; border: 1px solid #dfe4d3; border-radius: 11px; background: #e9eddf; overflow: hidden; display: grid; grid-template-columns: 1.2fr 1fr; }
.welcome-copy { padding: 27px 31px; z-index: 1; }
.tiny-label { font-size: 9px; color: #8c997c; display: inline-flex; align-items: center; gap: 7px; letter-spacing: 1.1px; }
.tiny-label > span { width: 5px; height: 5px; border-radius: 50%; background: #76906c; }
.welcome-copy h2 { font-family: var(--serif); font-size: 32px; font-weight: 500; letter-spacing: 2px; line-height: 1.5; color: #3a513c; margin-top: 10px; }
.welcome-copy p { font-size: 10px; color: #8b967c; margin-top: 10px; }
.welcome-link { display: inline-flex; align-items: center; gap: 16px; font-size: 11px; color: #537149; margin-top: 12px; min-height: 30px; padding: 0; }
.welcome-link:hover { gap: 22px; }
.welcome-art { position: relative; display: flex; justify-content: center; align-items: center; padding: 0 17px 15px 0; }
.house-drawing { width: 100%; max-width: 360px; transform: translateY(-1px); }
.art-tag { position: absolute; bottom: 20px; right: 37px; font-size: 8px; color: #95a085; letter-spacing: 2px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-top: 21px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 17px 21px; min-height: 143px; }
.metric-top { color: #838b7b; font-size: 11px; display: flex; align-items: center; justify-content: space-between; }
.icon-tint { width: 29px; height: 29px; background: #f0f3e9; border-radius: 7px; color: #8b9b78; display: grid; place-items: center; }
.icon-tint.sand { background: #f6f1e7; color: #baa17b; }
.icon-tint.clay { background: #f5eee7; color: #b99d86; }
.metric-value { display: flex; gap: 3px; align-items: baseline; font-size: 33px; font-weight: 500; letter-spacing: -1.2px; line-height: 1.3; font-variant-numeric: tabular-nums; margin-top: 7px; }
.metric-value > small { font-size: 17px; font-weight: 400; letter-spacing: 0; margin-right: 3px; }
.metric-badge { font-size: 9px; font-weight: 400; letter-spacing: .3px; color: #809271; background: #f1f4e9; border-radius: 4px; padding: 3px 6px; margin-left: 10px; align-self: center; }
.unset-value { font-size: 25px; color: #a4aa99; letter-spacing: 1px; }
.mini-progress { height: 3px; background: #eff1e6; margin-top: 10px; border-radius: 4px; overflow: hidden; }
.mini-progress > span { display: block; background: #8ca378; height: 100%; border-radius: inherit; }
.metric p { font-size: 10px; color: #919787; margin-top: 10px; }
.metric p strong { color: #77876a; font-weight: 500; }
.metric .inline-link { font-size: 10px; margin-top: 15px; }
.inline-link, .text-button { color: #778d68; display: inline-flex; align-items: center; gap: 7px; padding: 0; min-height: 32px; font-size: 11px; }
.inline-link:hover, .text-button:hover { color: var(--green-dark); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stages-panel { margin-top: 21px; padding: 18px 23px 23px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading h2 { font-size: 14px; font-weight: 600; letter-spacing: .4px; }
.count-label { font-size: 9px; font-weight: 400; color: #a1a591; margin-left: 10px; letter-spacing: 0; }
.stage-track { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin-top: 26px; }
.stage-step { display: flex; flex-direction: column; align-items: center; position: relative; padding: 0 0 4px; min-width: 0; }
.stage-step::before { content: ''; position: absolute; top: 17px; left: calc(-50% + 24px); right: calc(50% + 24px); height: 1px; background: #e4e8db; }
.stage-step:first-child::before { display: none; }
.stage-node { height: 35px; width: 35px; border: 1px solid #e5e7dc; border-radius: 50%; background: #f7f7f1; display: grid; place-items: center; font-size: 11px; color: #a6ac98; }
.stage-step strong { font-size: 10px; font-weight: 500; color: #89917e; margin-top: 11px; }
.stage-step > span:last-child { font-size: 8px; color: #b1b6a6; margin-top: 4px; }
.stage-step.current .stage-node { background: var(--green); border-color: var(--green); color: white; box-shadow: 0 0 0 5px #edf1e7; }
.stage-step.current strong { color: #4b6443; font-weight: 600; }
.stage-step.current > span:last-child { color: #789368; }
.stage-step.finished .stage-node { background: #e6ecdd; color: #6a8857; border-color: #d4e1c4; }
.stage-step:hover .stage-node { transform: translateY(-3px); }
.overview-columns { display: grid; grid-template-columns: 1.16fr 1fr; gap: 21px; margin-top: 21px; align-items: start; }
.next-panel > .section-heading, .spending-panel > .section-heading, .ledger-categories > .section-heading { padding: 17px 22px 12px; }
.small-pill { display: inline-block; font-size: 8px; font-weight: 400; letter-spacing: .5px; color: #90a17d; background: #f1f4e9; padding: 3px 6px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }
.icon-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; color: #969e87; border-radius: 6px; flex-shrink: 0; }
.icon-button:hover { background: #eef1e5; color: var(--green); }
.task-list { padding: 0 23px; }
.task-row { display: flex; align-items: center; gap: 13px; min-height: 69px; border-top: 1px solid #eff0e7; padding: 10px 0; }
.task-check { display: flex; align-items: center; justify-content: center; width: 25px; min-height: 44px; position: relative; cursor: pointer; flex-shrink: 0; border: 0; background: none; padding: 0; }
.task-check > span { width: 17px; height: 17px; display: grid; place-items: center; border: 1.3px solid #d8ddce; border-radius: 4px; color: transparent; transition: all .15s; pointer-events: none; }
.task-check[data-status="doing"] > span { color: #a8762a; background: #fbf1de; border-color: #e8c483; }
.task-check[data-status="done"] > span { color: white; background: #738d61; border-color: #738d61; }
.task-check:focus-visible > span { outline: 3px solid #aac197; outline-offset: 4px; }
.task-content { text-align: left; flex: 1; padding: 6px 0; min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.task-title { font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.task-content:hover .task-title { color: var(--green); }
.task-note { font-size: 10px; color: #9a9f90; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; margin-top: 3px; }
.task-meta { font-size: 9px; color: #99a18c; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.task-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.is-done .task-title { text-decoration: line-through; color: #a7ad9c; }
.status-tag { font-size: 8px; border-radius: 3px; padding: 2px 4px; display: inline-block; margin-top: 3px; color: #a8762a; background: #fbf1de; }
.task-edit { opacity: .5; }
.task-row:hover .task-edit { opacity: 1; }
.subtask-toggle { opacity: .6; transition: transform .15s, opacity .15s; }
.subtask-toggle.expanded, .task-row:hover .subtask-toggle { opacity: 1; }
.subtask-toggle.expanded svg { transform: rotate(90deg); }
.subtask-list { display: flex; flex-direction: column; padding: 2px 23px 8px 61px; }
.subtask-row { min-height: 38px; gap: 10px; border-top: none; padding: 3px 0; }
.subtask-row .task-check { width: 20px; min-height: 32px; }
.subtask-row .task-check > span { width: 14px; height: 14px; border-radius: 4px; }
.subtask-title { font-size: 11px; }
.subtask-editor #subtask-rows { display: flex; flex-direction: column; gap: 8px; }
.subtask-edit-row { display: flex; align-items: center; gap: 8px; }
.subtask-edit-row input[name="subtask-title"] { flex: 1; }
.compact .task-row { min-height: 56px; padding: 3px 0; gap: 9px; }
.compact .task-title { font-size: 11px; }
.compact .task-edit { width: 26px; }
.panel-bottom-link { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; border-top: 1px solid var(--line); min-height: 41px; font-size: 10px; color: #869878; margin-top: 8px; background: #fdfdf8; }
.panel-bottom-link:hover { background: #f2f4e9; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 27px 15px; text-align: center; }
.empty-state h3 { font-weight: 500; font-size: 12px; margin-top: 15px; color: #808b70; }
.empty-state p { color: #a1a795; font-size: 10px; margin-top: 7px; line-height: 1.8; }
.empty-state .button { margin-top: 18px; }
.empty-illustration { width: 60px; height: 60px; background: #f1f3e8; border-radius: 18px; display: grid; place-items: center; position: relative; color: #a0ae8a; transform: rotate(-6deg); }
.empty-illustration > svg { transform: rotate(6deg); }
.empty-illustration > span { position: absolute; right: -6px; bottom: -4px; border: 2px solid var(--paper); background: #e8ddc5; color: #ae9970; border-radius: 50%; width: 25px; height: 25px; font-size: 12px; font-family: var(--serif); }
.budget-empty { padding: 17px 15px 24px; }
.budget-empty .empty-illustration { height: 51px; width: 51px; border-radius: 14px; }
.budget-empty h3 { margin-top: 14px; }
.spending-foot { padding: 12px 15px; border-top: 1px dashed #e8e9df; font-size: 9px; color: #a2ab93; display: flex; align-items: center; justify-content: center; gap: 7px; }
.spending-total { padding: 3px 23px 13px; display: flex; justify-content: space-between; align-items: baseline; }
.spending-total > span { font-size: 10px; color: var(--muted); }
.spending-total > strong { font-size: 22px; font-weight: 500; letter-spacing: -.5px; }
.spending-total small { font-size: 13px; }
.category-bar { display: flex; height: 9px; margin: 0 23px; gap: 3px; border-radius: 3px; overflow: hidden; }
.category-legend { padding: 18px 23px; }
.category-legend-row { padding: 6px 0; }
.category-legend-head { display: flex; align-items: center; font-size: 10px; color: #8c937f; gap: 7px; }
.category-dot { height: 6px; width: 6px; border-radius: 2px; flex-shrink: 0; }
.category-legend-head strong { margin-left: auto; color: #6c785e; font-weight: 500; }
.category-budget-bar { height: 4px; border-radius: 2px; background: #e7e9dc; margin: 6px 0 0 13px; overflow: hidden; }
.category-budget-bar > span { display: block; height: 100%; }
.category-legend-row.over-budget .category-legend-head strong { color: #a8623f; }
.page-footer { min-height: 67px; display: flex; align-items: center; justify-content: space-between; font-size: 9px; color: #adb19e; gap: 12px; }
.page-footer button { display: flex; gap: 5px; align-items: center; font-size: 9px; color: #98a189; min-height: 36px; padding: 0; }
.checklist-summary { display: flex; gap: 22px; align-items: center; padding: 23px 28px; background: #e9eddf; border: 1px solid #dfe5d2; border-radius: 10px; margin-bottom: 25px; }
.progress-ring { --progress: 0%; width: 71px; height: 71px; background: conic-gradient(#729363 var(--progress), #d9e0cd 0); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.progress-ring > span { background: #e9eddf; width: 59px; height: 59px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #526847; font-size: 22px; }
.progress-ring small { font-size: 11px; margin-top: 5px; margin-left: 1px; }
.checklist-summary h2 { font-weight: 500; font-size: 17px; color: #596b4c; }
.checklist-summary p { font-size: 11px; color: #939e84; margin-top: 7px; }
.summary-decoration { color: #b4c3a0; margin-left: auto; padding-right: 5px; }
.checklist-layout { display: grid; grid-template-columns: 173px minmax(0, 1fr); gap: 24px; align-items: start; }
.stage-filters { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 20px; padding-top: 6px; }
.stage-filter { min-height: 45px; border-radius: 6px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #919986; font-size: 11px; white-space: nowrap; }
.stage-filter small { margin-left: auto; color: #adb49f; font-size: 9px; }
.stage-filter.selected { background: #e5eadb; color: #627c50; }
.stage-filter.selected small { color: #7b956a; }
.stage-filter:hover { background: #eaede2; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; gap: 10px; }
.segmented { display: inline-flex; border: 1px solid #e4e7db; background: #eeefe7; padding: 3px; border-radius: 7px; gap: 2px; }
.segmented button { min-height: 31px; padding: 5px 13px; font-size: 10px; border-radius: 5px; white-space: nowrap; color: #929b85; }
.segmented button.selected { background: #fffefa; color: #5c7750; box-shadow: 0 1px 3px #27351d0d; }
.subtle { font-size: 10px; color: #a0a791; }
.checklist-group { margin-bottom: 18px; }
.group-heading { display: flex; align-items: center; padding: 20px 24px; gap: 12px; }
.group-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: #9ba785; background: #f1f3e8; }
.group-icon.completed { color: #6c8c56; background: #e9efdf; }
.group-heading h2 { font-size: 14px; font-weight: 600; }
.group-heading p { color: #a0a791; font-size: 10px; margin-top: 2px; }
.group-count { margin-left: auto; font-size: 17px; color: #758c60; }
.group-count span { font-size: 11px; color: #b0b79f; }
.add-task-row { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 45px; font-size: 10px; color: #a0ad8c; background: #fdfdf8; border-top: 1px dashed #e9ebdf; }
.add-task-row:hover { background: #f2f5e9; color: #6e8659; }
.filter-empty { padding: 28px 20px; border-top: 1px solid #eff0e7; text-align: center; color: #a2ab94; font-size: 11px; }
.ledger-summary { display: grid; grid-template-columns: 1.2fr 1fr 1fr; align-items: center; background: #e8ecde; border: 1px solid #dce3d0; border-radius: 10px; padding: 25px 28px; gap: 30px; margin-bottom: 24px; }
.ledger-label { color: #879778; font-size: 11px; display: flex; align-items: center; gap: 13px; }
.ledger-label button { color: #8da17a; padding: 0; width: 30px; height: 27px; }
.ledger-amount { font-size: 35px; font-weight: 500; color: #42593a; letter-spacing: -1px; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ledger-amount > small { font-size: 20px; }
.set-budget { color: #758c63; font-size: 26px; padding: 5px 0 7px; display: flex; align-items: center; gap: 17px; }
.budget-track { height: 4px; background: #d5deca; border-radius: 3px; margin-top: 9px; overflow: hidden; }
.budget-track > span { display: block; background: #7f986c; height: 100%; }
.budget-track .over-budget { background: #bb876d; }
.ledger-budget > p { color: #93a083; font-size: 9px; margin-top: 10px; }
.ledger-number { border-left: 1px solid #d4ddc7; padding-left: 31px; min-width: 0; }
.ledger-number > span { color: #869879; font-size: 11px; }
.ledger-number > strong { font-size: 28px; color: #5a704e; font-weight: 500; display: block; letter-spacing: -.5px; margin: 5px 0; overflow-wrap: anywhere; }
.ledger-number small { font-size: 16px; }
.ledger-number p { font-size: 10px; color: #9da98d; }
.ledger-percent > strong { font-size: 34px; color: #47613c; }
.ledger-percent.over-budget > strong { color: #a8623f; }
.ledger-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 21px; align-items: start; }
.ledger-list > .section-heading { padding: 21px 23px 17px; }
.expense-tools { display: flex; gap: 13px; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 0 23px 17px; border-bottom: 1px solid var(--line); }
.category-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 240px; min-width: 0; }
.category-pill { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; font-size: 10px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; background: color-mix(in srgb, var(--category-color, #7f986c) 12%, transparent); color: var(--category-color, #647559); }
.category-pill.selected { background: var(--category-color, #7f986c); color: #fff; }
.category-pill:focus-visible { outline: 2px solid #94a681; outline-offset: 2px; }
.search-box { min-width: 150px; width: 170px; display: flex; align-items: center; gap: 7px; border: 1px solid #e9ebdf; border-radius: 6px; padding: 0 10px; color: #a3ad91; background: #fffefa; }
.search-box input { border: 0; width: 100%; outline: none; background: transparent; font-size: 10px; height: 36px; color: var(--ink); padding: 0; }
.search-box:focus-within { border-color: #94a681; box-shadow: 0 0 0 2px #e7eddf; }
.search-box input:focus-visible { outline: none; }
.search-box input::placeholder { color: #b0b89f; }
.ledger-empty { min-height: 305px; }
.ledger-categories > .section-heading { padding-top: 22px; }
.ledger-categories .tiny-label { font-size: 7px; }
.ledger-categories .empty-state { padding: 24px 14px 31px; }
.ledger-categories .empty-state .button { display: none; }
.ledger-categories .empty-state p { max-width: 180px; }
.ledger-categories .spending-total { padding-top: 10px; }
.expense-row { display: flex; align-items: center; gap: 12px; padding: 17px 21px; border-bottom: 1px solid #eff0e7; }
.expense-row:hover { background: #f8f9f1; }
.expense-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 0; text-align: left; }
.expense-icon { width: 40px; height: 42px; border-radius: 9px; background: color-mix(in srgb, var(--category-color) 10%, transparent); color: var(--category-color); display: grid; place-items: center; flex-shrink: 0; }
.expense-photo { display: block; width: 64px; height: 64px; border-radius: 11px; overflow: hidden; flex-shrink: 0; border: 1px solid #dfe5d3; padding: 0; cursor: zoom-in; }
.expense-photo:hover { border-color: #95aa7e; }
.expense-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.expense-detail { min-width: 0; flex: 1; }
.expense-detail > strong { display: block; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-subtitle { display: block; font-size: 12px; font-weight: 600; color: #47613c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.expense-spec { display: block; font-size: 11px; font-weight: 500; color: #5e6d50; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.expense-meta { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.category-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 9px; font-weight: 600; letter-spacing: .2px; white-space: nowrap; flex-shrink: 0; background: color-mix(in srgb, var(--category-color) 18%, transparent); color: var(--category-color); }
.expense-date { font-size: 9px; color: #78826c; white-space: nowrap; }
.expense-memo { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #8a6a45; margin-top: 5px; }
.expense-memo svg { flex-shrink: 0; }
.expense-money { text-align: right; flex-shrink: 0; }
.expense-money > strong { display: block; font-size: 14px; font-weight: 500; color: #5e6d50; font-variant-numeric: tabular-nums; }
.expense-main > svg { color: #bbc3aa; }
.ledger-list-footer { display: flex; justify-content: space-between; padding: 16px 23px; color: #a3ad91; font-size: 10px; }
.ledger-list-footer strong { color: #6b7e59; font-weight: 500; font-size: 13px; margin-left: 8px; }
.budget-warning, .storage-warning { display: flex; align-items: center; gap: 9px; padding: 13px 17px; margin-bottom: 22px; border-radius: 7px; font-size: 11px; line-height: 1.8; background: #f5ece0; color: #ac815e; }
.couple-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 13px 20px; margin-bottom: 20px; background: #f6ece7; border: 1px solid #ecdbd3; border-radius: 10px; }
.couple-names { display: flex; align-items: center; gap: 7px; font-family: var(--serif); font-size: 16px; font-weight: 600; color: #6b4a3a; }
.couple-names svg { color: #c1685a; flex-shrink: 0; }
.couple-heart { color: #c1685a; }
.couple-countdown { flex-shrink: 0; font-size: 11px; font-weight: 600; color: #8a6a45; padding: 4px 11px; background: #fffaf3; border-radius: 999px; }
.couple-quote { font-family: var(--serif); font-size: 12px; color: #93826c; font-style: italic; flex-basis: 100%; }
.storage-warning .text-button { flex-shrink: 0; margin-left: auto; }
.text-danger, .text-danger strong { color: var(--danger) !important; }
dialog { position: fixed; border: 1px solid #e1e5d7; border-radius: 16px; background: var(--paper); color: var(--ink); width: 485px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 48px); padding: 27px 30px 26px; overflow-x: hidden; overflow-y: auto; box-shadow: 0 20px 100px #26311d30; }
dialog::backdrop { background: #2a342658; backdrop-filter: blur(4px); }
dialog[open] { animation: modal-in .22s ease-out; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.dialog-header .eyebrow { font-size: 8px; margin-bottom: 5px; color: #a0ab8b; }
.dialog-header h2 { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: .7px; }
.dialog-description { color: #929c82; font-size: 12px; line-height: 1.9; margin-bottom: 23px; overflow-wrap: anywhere; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; min-width: 0; }
.field > span { color: #7e8e6a; font-size: 11px; }
.field > small { font-size: 10px; color: #a3ad91; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; background: #fafbf4; border: 1px solid #dfe5d3; border-radius: 7px; color: #5b6c4c; font-size: 14px; min-height: 44px; outline: none; }
.field textarea { resize: vertical; line-height: 1.8; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #95aa7e; box-shadow: 0 0 0 3px #edf2e5; }
.field input::placeholder, .field textarea::placeholder { color: #b1bca0; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-note { display: flex; align-items: flex-start; gap: 9px; padding: 13px; background: #f2f5e9; color: #99a587; font-size: 10px; line-height: 1.8; border-radius: 6px; margin: 4px 0 12px; }
.form-note svg { margin-top: 2px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 18px; border-top: 1px solid #e9ecdf; margin-top: 18px; align-items: center; }
.delete-button { display: flex; align-items: center; gap: 5px; color: #b38871; font-size: 11px; min-height: 42px; margin-right: auto; padding: 0 5px; }
.delete-button:hover { color: #9a573c; }
.danger { background: #ac7055; color: #fff9ed; }
.danger:hover { background: #915940; }
.form-error { color: var(--danger); font-size: 11px; line-height: 1.8; margin-top: 10px; }
.form-error:empty { display: none; }
.form-checkbox { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #7e916a; min-height: 35px; }
.form-checkbox input { width: 17px; height: 17px; accent-color: var(--green); }
.amount-field { background: #edf2e3; border-radius: 9px; padding: 15px 19px 3px; margin-bottom: 20px; }
.amount-field .field { margin-bottom: 12px; }
.amount-input { display: flex; align-items: center; gap: 10px; color: #6d8754; }
.amount-input > span { font-size: 27px; }
.amount-input input { background: none; border: none; border-radius: 0; padding: 0; font-size: 37px; height: 48px; color: #48653a; box-shadow: none !important; }
.amount-input input::placeholder { font-size: 37px; color: #bbc9a8; }
.amount-input:focus-within { box-shadow: 0 1px 0 #91a67a; }
.amount-input input::-webkit-inner-spin-button { -webkit-appearance: none; }
.backup-summary { display: flex; align-items: center; gap: 14px; border: 1px solid #e4ead9; border-radius: 8px; background: #f1f5e8; padding: 18px; color: #8b9f75; margin-bottom: 20px; }
.backup-summary > div { min-width: 0; }
.backup-summary strong { display: block; font-weight: 500; font-size: 14px; color: #6f8659; overflow-wrap: anywhere; }
.backup-summary span { display: block; font-size: 10px; color: #9dad8b; margin-top: 3px; }
.backup-option { display: flex; align-items: center; width: 100%; gap: 14px; padding: 16px 6px; border-bottom: 1px solid #ebefe1; text-align: left; color: #8c9f76; position: relative; }
.backup-option > span { flex: 1; }
.backup-option strong { display: block; font-size: 13px; font-weight: 500; color: #758965; }
.backup-option small { display: block; font-size: 10px; color: #a3b18f; margin-top: 4px; }
.backup-option:hover { background: #f7faef; }
.import-option { cursor: pointer; margin-bottom: 18px; }
.import-option input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.import-option:focus-within { outline: 3px solid #aac197; outline-offset: 2px; }
.receipt-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.receipt-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.receipt-preview { display: block; width: 84px; height: 84px; border-radius: 9px; overflow: hidden; border: 1px solid #dfe5d3; flex-shrink: 0; padding: 0; cursor: zoom-in; }
.receipt-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.receipt-preview:hover { border-color: #95aa7e; }
.receipt-preview-wrap { position: relative; display: inline-block; }
.thumb-remove { position: absolute; top: -6px; right: -6px; width: 19px; height: 19px; border-radius: 50%; background: #fff; border: 1px solid #dfe5d3; display: grid; place-items: center; color: #7e8e6a; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.thumb-remove:hover { color: #b5583f; border-color: #e0b3a4; }
#lightbox { padding: 0; border: 0; background: transparent; box-shadow: none; width: auto; max-width: min(94vw, 920px); }
#lightbox::backdrop { background: rgba(20, 24, 16, .78); backdrop-filter: blur(2px); }
#lightbox img { display: block; max-width: 100%; max-height: calc(100dvh - 48px); border-radius: 12px; box-shadow: 0 20px 80px rgba(0, 0, 0, .4); }
.lightbox-close { position: absolute; top: 14px; right: 14px; background: rgba(255, 255, 255, .92); color: #333; }
.lightbox-close:hover { background: #fff; color: #333; }
.receipt-picker { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border: 1px dashed #c7d1b3; border-radius: 7px; color: #7e8e6a; font-size: 12px; cursor: pointer; position: relative; min-height: 44px; }
.receipt-picker:hover { border-color: #95aa7e; color: #5b6c4c; background: #f7faef; }
.receipt-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.receipt-actions { margin-top: 10px; }
.receipt-status { font-size: 11px; color: #a3ad91; margin: 6px 0 0; min-height: 14px; }
.receipt-status.loading { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: #5c7750; margin-top: 10px; }
.spinner { width: 17px; height: 17px; flex-shrink: 0; border: 2px solid #cddabb; border-top-color: #5c7750; border-radius: 50%; animation: spin .7s linear infinite; }
.resource-card { padding: 23px; margin-bottom: 20px; }
.resource-card > .section-heading { margin-bottom: 16px; }
.resource-card .heading-actions { gap: 0; }
.resource-text { font-size: 12px; color: #5e6d50; line-height: 1.8; margin-bottom: 12px; white-space: pre-wrap; }
.floorplan-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.floorplan-thumb { display: block; width: 140px; height: 140px; border-radius: 10px; overflow: hidden; border: 1px solid #dfe5d3; padding: 0; cursor: zoom-in; background: #fbfbf6; }
.floorplan-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.floorplan-thumb:hover { border-color: #95aa7e; }
.vr-link-card { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border: 1px solid #dfe5d3; border-radius: 9px; color: #47613c; background: #f7faef; }
.vr-link-card:hover { border-color: #95aa7e; background: #f2f7e9; }
.vr-link-card span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.quote-totals { padding: 21px 23px; margin-bottom: 20px; }
.quote-totals-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 14px; color: #5e6d50; }
.quote-totals-row strong { color: #47613c; font-weight: 500; font-variant-numeric: tabular-nums; }
.quote-totals-row.grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 13px; font-size: 15px; color: #47613c; }
.quote-totals-row.grand strong { font-size: 18px; }
.quote-totals-row.final { color: #8a6a45; font-weight: 600; }
.quote-totals-row.final strong { color: #8a6a45; font-size: 20px; }
.quote-totals-note { font-size: 13px; color: #6b7a5c; line-height: 1.8; margin-top: 8px; }
.quote-section { padding: 20px 23px; margin-bottom: 16px; }
.quote-section > .section-heading { margin-bottom: 10px; }
.quote-section > .section-heading strong { font-size: 15px; color: #5e6d50; font-weight: 500; }
.quote-items { display: flex; flex-direction: column; }
.quote-item { padding: 13px 0; border-top: 1px solid var(--line); }
.quote-item:first-child { border-top: 0; padding-top: 0; }
.quote-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 500; color: #46503c; }
.quote-item-amount { flex-shrink: 0; font-variant-numeric: tabular-nums; color: #5e6d50; }
.quote-item-meta { font-size: 13px; color: #6b7a5c; margin-top: 4px; }
.quote-item-note { font-size: 13px; color: #4c5943; line-height: 1.8; margin-top: 7px; }
.quote-section-note { font-size: 13px; color: #4c5943; line-height: 1.8; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.quote-item-confirms { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.quote-item-confirms .confirm-item { padding: 12px 14px; }
.quote-payment { padding: 21px 23px; margin-bottom: 20px; }
.payment-summary { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #5e6d50; margin-bottom: 10px; gap: 10px; }
.payment-summary strong { color: #47613c; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.payment-summary strong small { font-size: 12px; font-weight: 400; color: #8c937f; }
.payment-track { height: 6px; border-radius: 3px; background: #e7e9dc; overflow: hidden; margin-bottom: 18px; }
.payment-track > span { display: block; height: 100%; background: #7f986c; }
.payment-milestones { display: flex; flex-direction: column; gap: 13px; }
.payment-milestone { display: flex; gap: 10px; align-items: flex-start; color: #a3ad91; }
.payment-milestone svg { flex-shrink: 0; margin-top: 2px; }
.payment-milestone strong { display: block; font-size: 13px; font-weight: 500; color: #6c785e; }
.payment-milestone .milestone-detail { display: block; font-size: 12px; color: #9aa38a; margin-top: 2px; }
.payment-milestone.done { color: #6b8754; }
.payment-milestone.done strong { color: #3f5636; }
.payment-milestone.done .milestone-detail { color: #7c8a6c; }
.quote-confirmations { padding: 21px 23px; margin-bottom: 20px; }
.confirm-list { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.confirm-item { display: flex; gap: 12px; padding: 14px 16px; background: #f6ece7; border: 1px solid #ecdbd3; border-radius: 8px; }
.confirm-index { flex-shrink: 0; width: 23px; height: 23px; border-radius: 50%; background: #e8cfc4; color: #8a5a45; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.confirm-item strong { display: block; font-size: 14px; color: #6b4a3a; margin-bottom: 5px; }
.confirm-item p { font-size: 13px; color: #8a7364; line-height: 1.8; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 27px; transform: translate(-50%, 20px); background: #3d583e; color: #f2f4e8; font-size: 12px; padding: 13px 20px; border-radius: 9px; box-shadow: 0 5px 20px #263e2126; z-index: 100; display: flex; gap: 9px; align-items: center; opacity: 0; visibility: hidden; transition: .22s ease; max-width: calc(100% - 32px); width: max-content; pointer-events: none; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.page-heading, .welcome-banner, .metrics, .stages-panel, .overview-columns { animation: rise-in .4s both; }
.metrics { animation-delay: .04s; }
.stages-panel { animation-delay: .08s; }
.overview-columns { animation-delay: .12s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1600px) {
  main { padding-top: 40px; }
  .welcome-banner { min-height: 264px; }
  .welcome-copy { padding: 33px 38px; }
  .welcome-copy h2 { font-size: 37px; }
  .house-drawing { max-width: 390px; }
  .metric { min-height: 154px; }
  .stage-track { margin-top: 29px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 190px; padding-left: 16px; padding-right: 16px; }
  .brand { padding-left: 7px; gap: 9px; }
  .brand-name { font-size: 27px; }
  .workspace { margin-left: 190px; }
  main { padding-left: 27px; padding-right: 27px; }
  .topbar { padding-left: 27px; padding-right: 27px; }
  .metric { padding: 16px; }
  .metric-value { font-size: 29px; }
  .money-value { font-size: 27px; }
  .metric p .subtle { display: none; }
  .metric .meta-divider { margin: 0 5px; }
  .welcome-copy { padding-left: 26px; }
  .welcome-copy h2 { font-size: 29px; }
  .welcome-copy p { max-width: 265px; line-height: 1.9; }
  .ledger-layout { grid-template-columns: minmax(0, 1fr) 235px; gap: 16px; }
  .ledger-summary { gap: 20px; padding: 23px; }
  .ledger-number { padding-left: 22px; }
  .ledger-number > strong { font-size: 24px; }
  .ledger-percent > strong { font-size: 29px; }
  .ledger-amount { font-size: 31px; }
  .search-box { width: 100%; }
}
@media (max-width: 960px) {
  .sidebar { width: 174px; padding-left: 11px; padding-right: 11px; }
  .workspace { margin-left: 174px; }
  .sidebar-label { font-size: 9px; }
  .nav-item { gap: 10px; padding-left: 13px; font-size: 12px; }
  .sidebar-note p { font-size: 16px; }
  .storage-label { font-size: 8px; margin-left: 6px; }
  main { padding-left: 22px; padding-right: 22px; }
  .topbar { padding-left: 22px; padding-right: 22px; }
  .page-heading { gap: 10px; }
  h1 { font-size: 26px; }
  .heading-actions { gap: 7px; }
  .button { padding-left: 12px; padding-right: 12px; font-size: 11px; }
  .welcome-banner { grid-template-columns: 1.1fr 1fr; min-height: 235px; }
  .welcome-copy { padding: 22px; }
  .welcome-copy h2 { font-size: 27px; }
  .welcome-art { padding-right: 0; }
  .art-tag { right: 14px; font-size: 7px; }
  .metrics { gap: 10px; }
  .metric { padding: 13px; }
  .metric-value { font-size: 27px; }
  .money-value { font-size: 24px; flex-wrap: wrap; }
  .metric-badge { font-size: 8px; padding: 2px 4px; margin-left: 5px; }
  .metric p { font-size: 9px; }
  .metric .inline-link { font-size: 9px; }
  .icon-tint { width: 25px; height: 25px; }
  .stage-track { grid-template-columns: repeat(4, 1fr); row-gap: 22px; }
  .stage-step:nth-child(5)::before { display: none; }
  .stage-step strong { font-size: 11px; }
  .overview-columns { grid-template-columns: 1fr; }
  .budget-empty { padding: 18px 15px 25px; }
  .checklist-layout { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .stage-filters { position: static; flex-direction: row; overflow-x: auto; padding: 4px 1px 8px; gap: 6px; }
  .stage-filter { min-height: 39px; padding: 8px 11px; border: 1px solid #e3e8d8; background: #f9faf4; }
  .stage-filter svg { display: none; }
  .stage-filter.selected { border-color: #ccdbba; }
  .stage-filter small { margin-left: 2px; }
  .checklist-summary { margin-bottom: 18px; padding: 21px; }
  .ledger-layout { grid-template-columns: minmax(0, 1fr); }
  .ledger-categories .budget-empty { padding-bottom: 30px; }
  .expense-tools { flex-wrap: nowrap; }
  .search-box { width: 180px; }
  .ledger-summary { gap: 18px; padding: 22px 18px; }
  .ledger-number { padding-left: 16px; }
  .ledger-number > strong { font-size: 21px; }
  .ledger-percent > strong { font-size: 25px; }
  .ledger-amount { font-size: 27px; }
  .page-heading .export-csv { font-size: 0; gap: 0; width: 40px; padding: 0; }
}
@media (max-width: 700px) {
  body { padding-bottom: calc(73px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .topbar { height: 64px; padding: 0 21px; background: #f6f5f0ed; }
  .breadcrumb, .today { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; color: var(--green); }
  .mobile-brand strong { font-family: var(--serif); font-size: 23px; letter-spacing: 2px; }
  .mobile-brand > span { font-size: 9px; color: #929a86; margin-left: 2px; border-left: 1px solid #dfe3d4; padding-left: 11px; letter-spacing: 2px; }
  .avatar { width: 36px; height: 36px; }
  main { padding: 24px 20px 0; }
  .page-heading { align-items: center; margin-bottom: 21px; gap: 13px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.1px; margin-bottom: 6px; }
  h1 { font-size: 27px; }
  .page-heading p { font-size: 10px; line-height: 1.9; margin-top: 5px; }
  .page-heading .meta-divider { margin: 0 6px; }
  .heading-actions { gap: 7px; }
  .heading-actions .button { min-height: 40px; font-size: 11px; padding: 9px 12px; gap: 5px; }
  .heading-actions .project-btn { display: none; }
  .heading-actions .export-csv { display: none; }
  .welcome-banner { min-height: 211px; grid-template-columns: 1fr; border-radius: 10px; }
  .welcome-copy { padding: 22px 21px 19px; }
  .welcome-copy h2 { font-size: 27px; line-height: 1.5; margin-top: 9px; letter-spacing: 1px; }
  .welcome-copy .tiny-label { font-size: 8px; letter-spacing: .6px; }
  .welcome-copy p { max-width: 165px; font-size: 9px; margin-top: 9px; }
  .welcome-link { font-size: 10px; margin-top: 10px; gap: 9px; min-height: 33px; }
  .welcome-art { position: absolute; right: -30px; top: 22px; width: 195px; height: 174px; padding: 0; opacity: .86; }
  .house-drawing { width: 224px; max-width: none; transform: rotate(0deg); }
  .art-tag { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
  .metric { padding: 15px; min-height: 127px; border-radius: 9px; }
  .metric:first-child { grid-column: 1 / -1; min-height: 87px; display: grid; grid-template-columns: 1fr auto; gap: 0 20px; padding: 14px 17px; }
  .metric:first-child .metric-top { grid-column: 1; grid-row: 1; align-self: center; font-size: 11px; justify-content: flex-start; gap: 9px; }
  .metric:first-child .icon-tint { width: 20px; height: 20px; background: none; order: -1; }
  .metric:first-child .metric-value { grid-column: 2; grid-row: 1 / 3; margin: 0; align-self: center; font-size: 34px; }
  .metric:first-child .metric-value > small { font-size: 16px; }
  .metric:first-child .metric-badge { display: none; }
  .metric:first-child p { grid-column: 1; grid-row: 2; margin-top: 2px; font-size: 9px; }
  .metric:first-child .mini-progress { grid-column: 1 / -1; grid-row: 3; margin-top: 9px; height: 3px; }
  .metric-top { font-size: 10px; }
  .metric-value { font-size: 26px; margin-top: 10px; gap: 2px; letter-spacing: -.9px; }
  .metric-value > small { font-size: 14px; }
  .unset-value { font-size: 23px; line-height: 1.5; }
  .metric p { margin-top: 10px; font-size: 9px; line-height: 1.8; }
  .metric .inline-link { font-size: 9px; line-height: 1.8; text-align: left; margin-top: 7px; min-height: 33px; }
  .metric .inline-link svg { display: none; }
  .metric .meta-divider { margin: 0 5px; }
  .icon-tint { width: 26px; height: 26px; }
  .stages-panel { padding: 16px 16px 20px; margin-top: 16px; }
  .section-heading h2 { font-size: 13px; letter-spacing: 0; }
  .count-label { font-size: 8px; margin-left: 5px; }
  .section-heading .text-button { font-size: 9px; gap: 5px; min-height: 36px; }
  .stage-track { margin-top: 20px; row-gap: 21px; }
  .stage-node { height: 33px; width: 33px; font-size: 10px; }
  .stage-step::before { top: 16px; left: calc(-50% + 23px); right: calc(50% + 23px); }
  .stage-step strong { font-size: 10px; margin-top: 10px; }
  .stage-step > span:last-child { font-size: 8px; }
  .overview-columns { gap: 16px; margin-top: 16px; }
  .next-panel > .section-heading, .spending-panel > .section-heading { padding: 13px 17px 10px; }
  .task-list { padding-left: 16px; padding-right: 16px; }
  .task-row { gap: 8px; min-height: 69px; padding: 8px 0; }
  .task-title { font-size: 12px; }
  .task-check { width: 28px; }
  .task-check > span { width: 19px; height: 19px; border-radius: 5px; }
  .subtask-list { padding: 2px 16px 8px 42px; }
  .compact .task-row { min-height: 59px; }
  .compact .task-title { font-size: 11px; }
  .task-edit { opacity: .65; width: 31px; min-height: 44px; }
  .compact .task-edit { width: 31px; }
  .panel-bottom-link { min-height: 44px; font-size: 10px; }
  .page-footer { min-height: 62px; font-size: 8px; gap: 5px; }
  .page-footer button { min-height: 44px; font-size: 8px; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; border-top: 1px solid #e3e7d8; background: #fffef9f5; backdrop-filter: blur(16px); padding: 5px 20px calc(7px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .mobile-nav .nav-item { display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; min-height: 55px; width: 80px; padding: 7px 10px 4px; border-radius: 9px; font-size: 10px; color: #a4ab96; }
  .mobile-nav .nav-item.active { color: #507044; background: transparent; }
  .mobile-nav .nav-item.active svg { stroke-width: 2; }
  .mobile-nav .nav-item i { display: none; }
  .mobile-nav .nav-item.active::before { content: ''; position: absolute; top: 2px; width: 31px; height: 27px; background: #eaf0e0; border-radius: 9px; z-index: -1; }
  .mobile-nav .nav-item svg { width: 21px; height: 21px; }
  .checklist-summary { gap: 15px; padding: 19px 17px; margin-bottom: 13px; }
  .progress-ring { width: 59px; height: 59px; }
  .progress-ring > span { width: 49px; height: 49px; font-size: 20px; }
  .checklist-summary h2 { font-size: 13px; }
  .checklist-summary p { font-size: 9px; line-height: 1.8; max-width: 215px; }
  .summary-decoration { display: none; }
  .checklist-layout { gap: 13px; }
  .stage-filters { margin-right: -20px; padding: 3px 20px 8px 1px; scrollbar-width: none; }
  .stage-filters::-webkit-scrollbar { display: none; }
  .stage-filter { min-height: 40px; font-size: 10px; }
  .list-toolbar { margin-bottom: 14px; }
  .segmented button { min-height: 36px; font-size: 10px; padding: 6px 12px; }
  .toolbar-hint { font-size: 8px; }
  .group-heading { padding: 18px 18px; gap: 11px; }
  .group-icon { width: 36px; height: 36px; border-radius: 8px; }
  .group-heading h2 { font-size: 13px; }
  .group-heading p { font-size: 9px; }
  .group-count { font-size: 17px; }
  .group-count span { font-size: 10px; }
  .add-task-row { min-height: 46px; }
  .ledger-summary { grid-template-columns: 1fr 1fr; gap: 10px 0; padding: 14px; margin-bottom: 12px; }
  .ledger-budget { grid-column: 1 / -1; }
  .ledger-label { font-size: 9px; gap: 8px; }
  .ledger-label button { width: 24px; height: 22px; }
  .ledger-amount { font-size: 21px; margin-top: 1px; }
  .ledger-amount > small { font-size: 13px; }
  .budget-track { margin-top: 5px; height: 3px; }
  .ledger-budget > p { margin-top: 5px; font-size: 8px; }
  .ledger-number { border-left: 0; padding-left: 0; padding-top: 0; }
  .ledger-number:last-child { border-left: 1px solid #d4ddc7; padding-left: 23px; }
  .ledger-number > span { font-size: 8px; }
  .ledger-number > strong { font-size: 15px; margin: 1px 0; }
  .ledger-percent > strong { font-size: 17px; }
  .ledger-number p { font-size: 7px; }
  .expense-tools { flex-wrap: wrap; gap: 13px; padding: 0 17px 17px; }
  .search-box { width: 100%; }
  .search-box input { height: 40px; font-size: 12px; }
  .ledger-list > .section-heading { padding: 17px; }
  .ledger-layout { gap: 16px; }
  .ledger-empty { min-height: 310px; padding: 28px 18px; }
  .ledger-empty h3 { font-size: 12px; }
  .ledger-empty p { font-size: 10px; }
  .ledger-empty .button { font-size: 11px; min-height: 42px; }
  .expense-row { gap: 10px; padding: 16px; }
  .expense-main > svg { display: none; }
  .expense-icon { width: 36px; height: 39px; border-radius: 8px; }
  .expense-photo { width: 52px; height: 52px; border-radius: 9px; }
  .expense-detail > strong { font-size: 11px; }
  .expense-subtitle { font-size: 12px; }
  .expense-spec, .expense-memo { font-size: 11px; }
  .category-chip, .expense-date { font-size: 8px; }
  .expense-money > strong { font-size: 13px; }
  .ledger-list-footer { padding: 15px 17px; font-size: 9px; }
  .ledger-list-footer strong { font-size: 12px; }
  .budget-warning, .storage-warning { padding: 12px; align-items: flex-start; font-size: 10px; }
  .couple-banner { padding: 12px 16px; margin-bottom: 16px; gap: 6px 12px; }
  .couple-names { font-size: 14px; }
  .couple-countdown { font-size: 10px; }
  .couple-quote { font-size: 11px; }
  .budget-warning > svg, .storage-warning > svg { margin-top: 2px; }
  .storage-warning { flex-wrap: wrap; }
  .storage-warning > span { flex: 1; }
  dialog { width: calc(100% - 24px); max-width: 470px; max-height: calc(100dvh - 32px); border-radius: 14px; padding: 23px 21px; margin: auto; }
  .dialog-header { margin-bottom: 22px; }
  .dialog-header h2 { font-size: 22px; }
  .dialog-header .icon-button { height: 44px; width: 35px; }
  .dialog-description { font-size: 11px; }
  .field { margin-bottom: 17px; }
  .field input, .field select, .field textarea { font-size: 16px; min-height: 46px; padding: 10px; }
  .field input[type=date] { display: block; -webkit-appearance: none; min-width: 0; font-size: 13px; }
  .form-grid { gap: 12px; }
  .field > span { font-size: 11px; }
  .field input::placeholder, .field textarea::placeholder { font-size: 12px; }
  .amount-input input { font-size: 35px; }
  .amount-input input::placeholder { font-size: 35px; }
  .dialog-actions { gap: 9px; }
  .dialog-actions .button { font-size: 12px; min-height: 44px; padding: 10px 14px; }
  .form-note { font-size: 10px; }
  .backup-option small { font-size: 9px; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); padding: 12px 15px; font-size: 11px; }
}
@media (max-width: 360px) {
  main { padding-left: 15px; padding-right: 15px; }
  .topbar { padding-left: 17px; padding-right: 17px; }
  .page-heading { gap: 7px; }
  .page-heading h1 { font-size: 24px; }
  .eyebrow { font-size: 7px; }
  .heading-actions .button { font-size: 10px; padding: 9px 10px; }
  .welcome-copy { padding-left: 17px; }
  .welcome-copy h2 { font-size: 25px; }
  .welcome-art { right: -47px; width: 190px; opacity: .7; }
  .welcome-copy p { max-width: 145px; }
  .metric { padding: 12px; }
  .money-value { font-size: 24px; }
  .metric p { font-size: 8px; }
  .metric .meta-divider { margin: 0 3px; }
  .stages-panel { padding-left: 12px; padding-right: 12px; }
  .section-heading .count-label { display: none; }
  .stage-step strong { font-size: 9px; }
  .stage-filters { margin-right: -15px; padding-right: 15px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .expense-money > strong { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Keep useful labels readable on phones, including in bright rooms. */
.metric-top, .metric p, .page-heading p, .task-meta, .task-note { color: #78826c; }
.stage-step > span:last-child, .count-label { color: #929b83; }
.stage-step strong { color: #748064; }
.task-title { color: #46503c; }
.money-value { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .page-heading p { font-size: 11px; }
  .heading-actions .button { min-height: 44px; font-size: 12px; }
  .welcome-copy .tiny-label { font-size: 10px; }
  .welcome-copy p { font-size: 11px; color: #7a886c; max-width: 165px; }
  .welcome-link { min-height: 44px; font-size: 12px; }
  .welcome-art { top: 48px; }
  .metric-top, .metric:first-child .metric-top { font-size: 12px; }
  .metric p, .metric:first-child p { font-size: 11px; }
  .metric .inline-link { font-size: 11px; }
  .metric .meta-divider { margin: 0 3px; }
  .section-heading h2 { font-size: 15px; }
  .section-heading .text-button { font-size: 11px; min-height: 44px; }
  .count-label { font-size: 10px; }
  .stage-step strong { font-size: 12px; }
  .stage-step > span:last-child { font-size: 10px; }
  .stage-node { font-size: 12px; }
  .stage-step { min-height: 92px; }
  .task-title, .compact .task-title { font-size: 13px; }
  .task-meta, .task-note { font-size: 11px; }
  .task-check { width: 36px; }
  .small-pill { font-size: 10px; }
  .panel-bottom-link { min-height: 46px; font-size: 12px; }
  .empty-state h3 { font-size: 14px; }
  .empty-state p { font-size: 12px; color: #8a967a; }
  .empty-state .button { font-size: 12px; min-height: 44px; }
  .spending-foot { font-size: 10px; }
  .mobile-nav .nav-item { font-size: 11px; }
  .checklist-summary h2 { font-size: 15px; }
  .checklist-summary p { font-size: 11px; color: #849375; }
  .stage-filter { min-height: 44px; font-size: 12px; }
  .stage-filter small { font-size: 10px; }
  .segmented button { min-height: 38px; font-size: 12px; }
  .toolbar-hint { font-size: 10px; }
  .group-heading h2 { font-size: 15px; }
  .group-heading p { font-size: 11px; color: #8d997c; }
  .add-task-row { font-size: 12px; }
  .filter-empty { font-size: 12px; }
  .ledger-label, .ledger-number > span { font-size: 12px; }
  .ledger-budget > p, .ledger-number p { font-size: 11px; color: #849574; }
  .expense-detail > strong { font-size: 13px; }
  .expense-subtitle { font-size: 12px; }
  .expense-spec, .expense-memo { font-size: 11px; }
  .category-chip, .expense-date { font-size: 10px; }
  .expense-tools { gap: 11px; }
  .expense-money > strong { font-size: 14px; }
  .category-legend-head { font-size: 12px; }
  .field > span { font-size: 12px; }
  .field input[type=date] { font-size: 16px; }
  .dialog-description { font-size: 13px; }
  .backup-option small { font-size: 11px; }
  .backup-summary span { font-size: 11px; }
  .form-note { font-size: 11px; }
  .form-error { font-size: 12px; }
}
