:root{--color-surface-page: oklch(97.5% .008 85);--color-surface-card: #ffffff;--color-surface-muted: oklch(93% .012 80);--color-surface-header: oklch(98% .006 80);--color-surface-stripe: oklch(98.5% .006 80);--color-text-primary: oklch(24% .012 80);--color-text-secondary: oklch(48% .015 80);--color-text-muted: oklch(45% .015 80);--color-text-on-accent: white;--color-border: oklch(90% .012 80);--color-border-row: oklch(93% .012 80);--color-debit: oklch(45% .13 30);--color-credit: oklch(42% .1 150);--color-accent: #3a6d94;--color-badge-bg: oklch(90% .09 85);--color-badge-text: oklch(38% .09 70);--color-error-bg: #fbe6e6;--font-family-base: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--font-family-serif: "Source Serif 4", serif;--font-family-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;--font-size-2xs: .7rem;--font-size-xs: .8rem;--font-size-sm: .9rem;--font-size-md: .95rem;--font-size-base: 1rem;--font-size-xl: 1.6rem;--font-weight-semibold: 600;--space-1: .25rem;--space-2: .5rem;--space-3: .75rem;--space-4: 1rem;--space-5: 1.5rem;--space-6: 2rem;--radius-sm: 4px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 14px;--radius-pill: 99px;--line: var(--color-border);--paper: var(--color-surface-card);--ink: var(--color-text-primary);--debit: var(--color-debit);--credit: var(--color-credit);--accent: var(--color-accent)}*{box-sizing:border-box}body{margin:0;font-family:var(--font-family-base);color:var(--color-text-primary);background:var(--color-surface-page)}.app{max-width:1100px;margin:0 auto;padding:var(--space-5) var(--space-4) var(--space-6)}h1{font-size:var(--font-size-xl);margin:0 0 var(--space-4)}.app-shell{min-height:100vh}.app-header{background:var(--color-surface-card);border-bottom:1px solid var(--color-border)}.app-header-inner{max-width:1160px;margin:0 auto;padding:1.4rem clamp(1rem,4vw,2rem) 0}.app-title{font-family:var(--font-family-serif);font-size:var(--font-size-xl);font-weight:var(--font-weight-semibold);color:#202a32;margin-bottom:1.1rem}.app-nav{display:flex;gap:clamp(1rem,4vw,2rem);flex-wrap:wrap}.area-tab{display:inline-block;border:none;border-bottom:2px solid transparent;background:transparent;padding:0 0 .9rem;font-size:var(--font-size-base);font-family:inherit;cursor:pointer;text-decoration:none;color:#68625a}.area-tab.active{border-bottom-color:var(--color-accent);font-weight:var(--font-weight-semibold);color:var(--color-accent)}.app-main{max-width:1160px;margin:0 auto;padding:2.25rem clamp(1rem,4vw,2rem) 4rem}.loading{padding:var(--space-4);color:var(--color-text-muted)}.error{color:var(--color-debit);background:var(--color-error-bg);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);margin-bottom:var(--space-4)}.empty{padding:var(--space-4);color:var(--color-text-muted)}.pill-control{display:inline-flex;background:var(--color-surface-muted);border-radius:10px;padding:4px;gap:2px}.pill{display:inline-block;border:none;background:transparent;padding:.5rem 1.1rem;font-size:var(--font-size-sm);font-family:inherit;cursor:pointer;border-radius:var(--radius-md);text-decoration:none;color:var(--color-text-muted)}.pill.active{background:var(--color-surface-card);font-weight:var(--font-weight-semibold);color:var(--color-accent);box-shadow:0 1px 2px #18161114}.ledger-controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--space-4);margin-bottom:1.75rem}.opening-stat{text-align:right}.opening-stat-label{font-size:var(--font-size-xs);color:var(--color-text-secondary);margin-bottom:.15rem}.opening-stat-value{font-size:1.25rem;font-weight:var(--font-weight-semibold);font-variant-numeric:tabular-nums}.register-card{background:var(--color-surface-card);border:1px solid var(--color-border);border-radius:var(--radius-xl);overflow-x:auto;-webkit-overflow-scrolling:touch;box-shadow:0 1px 3px #1816110a}table.register{width:100%;min-width:640px;border-collapse:collapse;font-size:var(--font-size-sm)}.register th{text-align:left;padding:.75rem 1.1rem;border-bottom:1px solid var(--color-border);background:var(--color-surface-header);font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-secondary);font-weight:var(--font-weight-semibold)}.register th.num{text-align:right}.register td{text-align:left;padding:.85rem 1.1rem;border-bottom:1px solid var(--color-border-row);vertical-align:top}.register tbody tr:nth-child(2n){background:var(--color-surface-stripe)}.register .num{text-align:right;font-variant-numeric:tabular-nums;font-family:var(--font-family-mono);white-space:nowrap}.register .date{white-space:nowrap;font-variant-numeric:tabular-nums}.register .memo{color:var(--color-text-muted);font-size:.88rem}.num.debit{color:var(--color-debit)}.num.credit{color:var(--color-credit)}.badge{display:inline-block;margin-left:.5rem;padding:.15rem .55rem;font-size:.72rem;font-weight:500;border-radius:var(--radius-pill);background:var(--color-badge-bg);color:var(--color-badge-text);white-space:nowrap}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.info-tip{position:relative;display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border-radius:50%;background:#e5ddd0;color:#5b5449;font-size:10px;font-weight:var(--font-weight-semibold);font-style:normal;font-family:inherit;cursor:help;margin-left:5px;vertical-align:middle;border:none;padding:0;line-height:1}.info-tip:hover:after,.info-tip:focus-visible:after{content:attr(title);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:#221f19;color:#fff;padding:.4rem .7rem;border-radius:6px;font-size:.78rem;font-weight:400;line-height:1.5;max-width:240px;width:max-content;white-space:normal;word-break:normal;z-index:100;pointer-events:none;text-align:left;text-transform:none;letter-spacing:0;box-shadow:0 2px 8px #18161133}.register .info-tip:hover:after,.register .info-tip:focus-visible:after{bottom:auto;top:calc(100% + 6px);left:0;transform:none}.budget .pill-control{margin-bottom:1.75rem}.pager{display:flex;align-items:center;gap:var(--space-4);margin-top:1.25rem;font-size:var(--font-size-sm);color:var(--color-text-muted)}.pager a,.pager .pager-disabled{display:inline-block;padding:.45rem .9rem;border:1px solid var(--color-border);background:var(--color-surface-card);border-radius:var(--radius-md);cursor:pointer;font-family:inherit;text-decoration:none;color:inherit}.pager .pager-disabled{opacity:.5;cursor:default;background:var(--color-surface-muted)}.budget-stack{display:flex;flex-direction:column;gap:.75rem}.budget-item{background:var(--color-surface-card);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:1.1rem 1.4rem;box-shadow:0 1px 3px #1816110a}.budget-totals{background:#f8f5ef;margin-top:.4rem}.budget-item-header{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:.6rem;gap:var(--space-4);flex-wrap:wrap}.budget-totals .budget-item-header{margin-bottom:0}.budget-item-name{font-weight:var(--font-weight-semibold)}.budget-totals .budget-item-name{font-weight:700}.budget-item-stats{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem 1.5rem;font-size:.88rem;font-variant-numeric:tabular-nums;color:var(--color-text-muted)}.budget-item-stats strong{color:var(--color-text-primary)}.budget-stat-debit strong{color:var(--color-debit)}.bar{position:relative;height:8px;background:var(--color-surface-muted);border-radius:var(--radius-pill);overflow:hidden}.bar-fill{height:100%;background:var(--color-accent)}.bar[data-overspent=true] .bar-fill{background:var(--color-debit)}.uncategorized{display:flex;justify-content:space-between;max-width:26rem;margin:1.5rem 0 0;padding:.9rem 1.2rem;background:var(--color-surface-card);border:1px dashed oklch(85% .012 80);border-radius:10px;color:var(--color-text-muted);font-size:var(--font-size-sm)}.uncategorized-amount{font-variant-numeric:tabular-nums;font-weight:var(--font-weight-semibold)}.unit-tabs{display:flex;gap:var(--space-2);margin-bottom:1.75rem;flex-wrap:wrap}.unit-tab{display:inline-block;border:1px solid var(--color-border);background:var(--color-surface-card);padding:.45rem var(--space-4);font-size:.88rem;font-family:inherit;cursor:pointer;border-radius:var(--radius-pill);text-decoration:none;color:var(--color-text-muted)}.unit-tab.active{border-color:var(--color-accent);background:#d9effd;font-weight:var(--font-weight-semibold);color:var(--color-accent)}.unit-summary-card{background:var(--color-surface-card);border:1px solid var(--color-border);border-radius:var(--radius-xl);padding:1.75rem;margin-bottom:var(--space-5);box-shadow:0 1px 3px #1816110a}.unit-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:1.4rem 2rem}.unit-summary dt{font-size:var(--font-size-xs);color:var(--color-text-muted);margin-bottom:.25rem}.unit-summary dd{margin:0;font-weight:var(--font-weight-semibold);font-size:var(--font-size-base)}.unit-summary .num{font-variant-numeric:tabular-nums}.unit-suggested{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--space-2);padding-top:1.4rem;margin-top:1.4rem;border-top:1px solid oklch(92% .012 80)}.unit-suggested dt{font-size:var(--font-size-xs);color:var(--color-text-muted);margin-bottom:0}.unit-suggested dd{font-size:1.2rem;font-weight:700;color:var(--color-accent)}.payments-card{background:var(--color-surface-card);border:1px solid var(--color-border);border-radius:var(--radius-xl);overflow-x:auto;-webkit-overflow-scrolling:touch;box-shadow:0 1px 3px #1816110a}table.payments{border-collapse:collapse;width:100%;min-width:280px;font-size:var(--font-size-sm)}.payments th{text-align:left;padding:.75rem 1.1rem;border-bottom:1px solid var(--color-border);background:var(--color-surface-header);font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-secondary);font-weight:var(--font-weight-semibold)}.payments td{padding:.85rem 1.1rem;border-bottom:1px solid var(--color-border-row);text-align:left}.payments .num{text-align:right;font-variant-numeric:tabular-nums}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem var(--space-4)}.login-page>div{width:100%;max-width:380px}.login-header{text-align:center;margin-bottom:2rem}.login-title{font-family:var(--font-family-serif);font-size:1.7rem;font-weight:var(--font-weight-semibold);color:#20303b;margin-bottom:.4rem}.login-subcopy{font-size:var(--font-size-md);color:var(--color-text-muted)}.login-form{display:flex;flex-direction:column;gap:var(--space-4);padding:2rem;background:var(--color-surface-card);border:1px solid var(--color-border);border-radius:var(--radius-xl);box-shadow:0 1px 3px #1816110f}.login-form label{display:block;font-size:var(--font-size-xs);font-weight:500;color:#47423a;margin-bottom:.4rem}.login-form input{width:100%;padding:.65rem .8rem;border:1px solid oklch(85% .012 80);border-radius:var(--radius-md);font-size:var(--font-size-base);font-family:inherit}.login-form button{margin-top:var(--space-2);padding:.75rem;border:none;border-radius:var(--radius-md);background:var(--color-accent);color:var(--color-text-on-accent);font-size:var(--font-size-base);font-weight:var(--font-weight-semibold);cursor:pointer;font-family:inherit}.login-form button:disabled{opacity:.5;cursor:default}.login-form .error{margin-bottom:0}.not-found{padding:var(--space-6) 0;max-width:34rem}.not-found-title{font-family:var(--font-family-serif);font-size:var(--font-size-xl);font-weight:var(--font-weight-semibold);margin-bottom:var(--space-3)}.not-found-body{color:var(--color-text-muted);margin-bottom:var(--space-4)}.not-found-link{color:var(--color-accent);font-weight:var(--font-weight-semibold)}
