/* Readable type, comfortable controls and consistent spacing across all languages. */
:root { --muted: #607269; }
html[data-theme=dark] { --muted: #acbdb3; }
body { font-size: 16px; line-height: 1.6; }
button, input, select, textarea { font-size: 16px; }
button { min-height: 44px; padding: 10px 16px; }
label { font-size: 15px; gap: 8px; margin: 18px 0; }
input, select, textarea { min-height: 46px; }
input[type=checkbox] { min-height: 20px; }
h1 { font-size: clamp(28px, 2.5vw, 36px); letter-spacing: -.8px; }
h2 { font-size: 25px; line-height: 1.35; }
h3 { font-size: 19px; line-height: 1.4; }
small { font-size: 14px; }
.eyebrow { font-size: 12px; letter-spacing: 1.3px; }
.sidebar { width: 260px; padding: 28px 18px 20px; }
.main-area { margin-left: 260px; }
.nav-caption { font-size: 11px; letter-spacing: 1.2px; }
.sidebar nav { gap: 4px; }
.sidebar nav a { min-height: 44px; font-size: 15px; padding: 10px 12px; line-height: 1.4; }
.sidebar nav a span { flex-shrink: 0; }
.plan-promo { padding: 16px; gap: 8px; }
.plan-promo strong { font-size: 15px; }
.plan-promo span { font-size: 13px; }
.topbar { min-height: 80px; height: auto; padding: 16px 36px; gap: 16px; }
.breadcrumb { font-size: 14px; }
.top-actions { gap: 14px; }
.connection { font-size: 13px; white-space: nowrap; }
.icon-button { min-width: 44px; height: 44px; }
.profile-badge { width: 40px; height: 40px; flex-shrink: 0; }
.content { padding: 36px; }
.page-heading { gap: 24px; margin-bottom: 30px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading p { font-size: 16px; line-height: 1.6; }
.heading-actions { flex-shrink: 0; }
.heading-actions select { font-size: 16px; width: 130px; }
.heading-actions button { font-size: 15px; }
.stat { padding: 26px; }
.stat .stat-label { font-size: 13px; line-height: 1.5; opacity: .95; }
.stat strong { font-size: clamp(30px, 2.5vw, 38px); font-variant-numeric: tabular-nums; }
.stat small { font-size: 14px; line-height: 1.5; opacity: .9; }
.panel { padding: 26px; margin-bottom: 24px; }
.panel-title { gap: 12px; margin-bottom: 18px; }
.panel-title a, .panel > p { font-size: 15px; }
.row { gap: 14px; padding: 18px 0; }
.row-main strong, .row-value { font-size: 16px; }
.row-main small, .row-value small { font-size: 14px; line-height: 1.6; }
.row-value { font-variant-numeric: tabular-nums; }
.service-icon { width: 42px; height: 42px; }
.actions { gap: 8px; }
.actions button { font-size: 14px; min-height: 40px; padding: 8px 12px; border-radius: 8px; }
table { font-size: 15px; }
th { font-size: 12px; letter-spacing: .35px; padding: 14px 12px; }
td { padding: 18px 12px; }
.badge { font-size: 13px; padding: 4px 9px; }
.empty { padding: 42px 20px; }
.empty strong { font-size: 18px; }
.empty p { font-size: 15px; }
.notice, .form-error { font-size: 15px; line-height: 1.65; padding: 15px 18px; }
.bar-column small { font-size: 12px; }
.grid-two > *, .stats > * { min-width: 0; }
.bar-column { min-width: 0; }
.bar-column small { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.calendar-week { font-size: 13px; padding: 10px 4px; }
.calendar-day { font-size: 14px; }
.calendar-day .event { font-size: 12px; padding: 4px; }
dialog { max-width: 640px; padding: 28px; }
.dialog-heading { gap: 16px; }
.dialog-heading h2 { min-width: 0; }
#toast { font-size: 15px; line-height: 1.5; }
#page-status:not([hidden]) { margin: 0 0 20px; padding: 14px 18px; border-radius: 10px; background: var(--soft); font-size: 15px; }
footer { font-size: 13px; }
.language-label { font-size: 13px; }
.language-switch select { font-size: 15px; max-width: 150px; min-height: 44px; }
.auth-box { max-width: 420px; }
.auth-box h2 { font-size: 32px; line-height: 1.3; }
.auth-box > p, .auth-switch { font-size: 16px; }
.auth-box > small, .forgot, .divider { font-size: 14px; }
.auth-story p { font-size: 18px; }
.auth-story > small, .story-card > span, .story-card small { font-size: 14px; }
.story-card > strong { font-size: 26px; }
.loading-placeholder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.loading-placeholder span { height: 150px; background: var(--line); opacity: .55; border-radius: 16px; }
#other-category-field { grid-column: 1 / -1; }
.subscription-picker { width: min(720px, calc(100% - 32px)); max-width: 720px; max-height: 88dvh; }
.subscription-picker h3 { margin-top: 22px; }
.picker-search { margin: 18px 0 24px; }
.picker-search .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.picker-search input { width: 100%; }
.picker-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.picker-services { display: grid; gap: 10px; }
.picker-card { width: 100%; display: flex; gap: 12px; align-items: center; padding: 18px; text-align: left; font-weight: 400; }
.picker-card:hover { background: var(--soft); }
.picker-card-text { display: grid; gap: 5px; min-width: 0; flex: 1; }
.picker-card strong { font-size: 16px; overflow-wrap: anywhere; }
.picker-card small { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.picker-initial { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--soft); color: var(--accent); font-size: 19px; flex-shrink: 0; }
.picker-price { max-width: 40%; font-size: 14px; color: var(--muted); text-align: right; }
.picker-custom { width: 100%; margin-top: 20px; border-style: dashed; color: var(--accent); }
.picker-back { margin-bottom: 4px; text-align: left; }
.subscription-selection { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--soft); border-radius: 12px; margin: 14px 0; }
@media(max-width:760px) {
    .picker-categories { grid-template-columns: 1fr; }
    .picker-card { padding: 16px; gap: 10px; }
    .picker-service { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 6px 10px; }
    .picker-service > :first-child { grid-column: 1; grid-row: 1 / span 2; }
    .picker-service .picker-card-text { grid-column: 2; grid-row: 1; }
    .picker-service .picker-price { grid-column: 2; grid-row: 2; max-width: 100%; text-align: left; }
    .picker-service > :last-child { grid-column: 3; grid-row: 1 / span 2; }
}

.expense-category-label { font-weight: 600; margin: 12px 0 8px; }
.expense-history-table .expense-column-filters th { padding-top: 4px; }
.expense-column-filters input { min-width: 145px; min-height: 42px; font-size: 14px; padding: 8px 10px; }
.expense-column-filters th:nth-child(-n+2) input { min-width: 180px; }
.expense-column-filters button { min-width: 42px; min-height: 42px; }
.notification-bell { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.event .notification-bell { width: 12px; height: 12px; }
.list-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.list-pagination label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 400; }
.list-pagination select { width: auto; min-width: 68px; min-height: 40px; padding: 7px 9px; }
.page-summary { color: var(--muted); font-variant-numeric: tabular-nums; }
.page-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.page-controls button { min-width: 40px; min-height: 40px; padding: 5px 9px; font-size: 18px; }
.page-controls button:disabled { cursor: default; }
.page-number { padding-inline: 5px; font-variant-numeric: tabular-nums; }
.category-children .list-pagination { align-items: start; }
@media(max-width:600px) { .list-pagination { justify-content: center; } .list-pagination .page-controls { flex-basis: 100%; } }
.expense-amount-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr); gap: 0 12px; align-items: start; }
.expense-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.expense-category-option { min-width: 0; min-height: 76px; padding: 9px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; white-space: normal; font-size: 12px; line-height: 1.25; }
.expense-category-symbol { font-size: 20px; line-height: 1; }
.expense-category-option.selected, .expense-subcategory-option.selected { border-color: var(--accent); background: var(--soft); color: var(--accent); }
.expense-subcategory-heading { color: var(--muted); font-size: 12px; font-weight: 600; margin: 4px 0 7px; }
.expense-subcategory-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.expense-subcategory-option, .expense-subcategory-add { padding: 7px 11px; border-radius: 999px; font-size: 12px; }
.expense-subcategory-add { min-width: 36px; padding-inline: 9px; color: var(--accent); }
.expense-category-picker, #expense-subcategory-picker { display: grid; gap: 10px; }
.expense-category-picker label { margin: 4px 0; }
.expense-selection-path { padding: 10px 12px; background: var(--soft); border-radius: 10px; font-weight: 600; overflow-wrap: anywhere; }
.expense-subcategory-add { justify-self: start; }
.category-groups { display: grid; gap: 14px; }
.category-group { border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; }
.category-group > .row { border-bottom: 0; }
.category-group summary { cursor: pointer; padding: 10px 0; color: var(--accent); }
.category-children { margin-inline-start: 16px; padding-inline-start: 14px; border-inline-start: 2px solid var(--line); }
.category-children > button { margin-top: 10px; }
.product-discovery { margin-bottom: 20px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.discovery-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 12px 16px; font-size: 14px; }
.discovery-status > span { flex: 1 1 230px; }
.discovery-status button { padding: 6px 0; font-size: inherit; }
.discovery-intro { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 16px; background: var(--soft); }
.discovery-intro p { margin: 5px 0; }
.product-guide { max-width: 760px; width: calc(100% - 32px); max-height: 85dvh; border: 1px solid var(--line); border-radius: 20px; padding: 24px; color: var(--ink); background: var(--surface); }
.product-guide::backdrop { background: #18352c66; }
.discovery-guide-links { display: grid; gap: 10px; margin-bottom: 20px; }
.discovery-guide-links a { display: grid; gap: 4px; padding: 14px; border-radius: 12px; background: var(--soft); }
.discovery-guide-links span { color: var(--muted); }
.plan-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.plan-summary-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.plan-summary-card.current { border-color: var(--accent); background: var(--soft); }
.plan-summary-card .badge { display: block; width: fit-content; margin-top: 8px; }
.plan-summary-card p { margin: 10px 0 0; font-size: 14px; }
.discovery-plan-link { display: inline-block; padding: 10px 0; }
@media(max-width:600px) { .plan-summary-grid { grid-template-columns: 1fr; } .product-guide { padding: 18px; } }
@media(min-width:900px) { .category-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media(max-width:520px) { .expense-category-option { font-size: 11px; min-height: 68px; } }
@media(max-width:1100px) {
    .sidebar { width: 232px; padding: 24px 12px; }
    .main-area { margin-left: 232px; }
    .topbar { padding: 14px 24px; }
    .content { padding: 30px 24px; }
    .page-heading { align-items: flex-start; flex-wrap: wrap; }
    .stat { padding: 22px; }
    .stat strong { font-size: 30px; }
    .row-value { margin-left: auto; }
}
@media(max-width:760px) {
    .sidebar { width: 272px; }
    .main-area { margin-left: 0; }
    .topbar { min-height: 72px; padding: 12px 16px; gap: 10px; }
    .topbar .connection { display: none; }
    .topbar .language-switch select { font-size: 16px; max-width: 130px; }
    .top-actions { gap: 8px; }
    .content { padding: 26px 18px; }
    .page-heading { margin-bottom: 24px; gap: 20px; }
    .page-heading h1 { font-size: 29px; }
    .page-heading p { font-size: 15px; }
    .heading-actions { flex-wrap: wrap; gap: 10px; }
    .heading-actions select { flex: 1 1 110px; width: auto; }
    .heading-actions button { flex: 1 1 150px; white-space: normal; }
    .stats { gap: 14px; }
    .stat, .panel { padding: 22px; border-radius: 16px; }
    .stat strong { font-size: 34px; }
    .row-main small, .row-value small { font-size: 13px; }
    .panel-title a { font-size: 14px; }
    .calendar-day { padding: 5px; min-height: 92px; }
    .calendar-day .event { font-size: 11px; }
    .calendar-week { font-size: 12px; }
    dialog { padding: 22px; max-height: 88dvh; }
    .dialog-heading h2 { font-size: 23px; }
    .auth-content { padding: 32px 24px; }
    .auth-box h2 { font-size: 30px; }
    .loading-placeholder { grid-template-columns: 1fr; gap: 14px; }
    .loading-placeholder span { height: 130px; }
}
/* Section introductions: native illustrations, shared account acknowledgements. */
#page-title { display: inline; vertical-align: middle; }
.section-guide-info { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; margin-inline-start: 8px; border-radius: 50%; color: var(--primary, #7365df); background: transparent; font-size: 24px; vertical-align: middle; }
.section-guide-info:focus-visible { outline: 3px solid #7365df; outline-offset: 3px; }
.section-guide { width: min(520px, calc(100vw - 24px)); max-height: 88dvh; overflow-y: auto; padding: 24px; }
.section-guide .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-guide h2 { margin: 0; font-size: 23px; }
.section-guide p { line-height: 1.65; }
.section-guide .guide-account-note { font-size: 12px; }
.section-guide .dialog-actions { margin-top: 20px; }
.section-guide .dialog-actions button { white-space: normal; }
.guide-demo { margin-top: 20px; padding: 20px; border-radius: 20px; background: #f1efff; color: #453b83; }
.guide-demo small { display: block; font-size: 12px; margin-bottom: 16px; }
.guide-budget-values { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.guide-budget-values span, .guide-budget-values strong { display: block; }
.guide-budget-values span { font-size: 12px; }
.guide-budget-values strong { font-size: 20px; margin-top: 4px; }
.guide-budget-bar { height: 12px; margin-top: 18px; background: #ded9f7; border-radius: 8px; overflow: hidden; }
.guide-budget-bar span { display: block; height: 100%; width: 73.333%; background: #7762db; border-radius: inherit; }
.guide-illustration { min-height: 86px; }
.guide-calendar, .guide-family { display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; letter-spacing: 3px; }
.guide-chart { display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.guide-chart i { width: 34px; height: 40px; background: #7762db; border-radius: 8px 8px 0 0; }
.guide-chart i:nth-child(2) { height: 75px; background: #aba0e8; }
.guide-chart i:nth-child(3) { height: 55px; }
.guide-chart i:nth-child(4) { height: 86px; background: #aba0e8; }
.guide-list { display: grid; gap: 10px; }
.guide-list span { display: flex; align-items: center; gap: 12px; }
.guide-list b { display: block; width: 75%; height: 10px; border-radius: 5px; background: #c8bff0; }
.guide-list span:nth-child(2) b { width: 55%; }
@media (max-width: 440px) { .section-guide { padding: 18px; } .guide-demo { padding: 16px; } }
.section-guide [hidden] { display: none !important; }
.section-guide.guide-walkthrough { width: min(640px, calc(100vw - 24px)); }
.section-guide .guide-demo { padding: 12px; background: #f4f8f5; color: #18352c; }
.section-guide .guide-demo small { margin: 0 0 8px 8px; color: #52685e; }
.guide-preview-image, .guide-tour-image img { display: block; width: 100%; height: auto; border-radius: 16px; background: #f4f8f5; }
.guide-tour-image { margin-top: 12px; touch-action: pan-y; }
.guide-tour-position { margin-top: 14px; color: var(--muted); font-size: 13px; }
.guide-tour h3 { margin: 6px 0; font-size: 21px; }
.guide-tour h3:focus { outline: none; }
.guide-tour-caption { margin-top: 6px; }
.guide-tour-dots { display: flex; justify-content: center; gap: 4px; }
.guide-tour-dots button { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; border: 0; padding: 0; background: transparent; }
.guide-tour-dots button::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); opacity: .4; }
.guide-tour-dots button[aria-current=step]::before { width: 25px; border-radius: 5px; background: var(--accent); opacity: 1; }
.guide-tour-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.guide-tour-nav button { white-space: normal; }
.guide-tour-nav button:disabled { opacity: .45; }
html[data-theme=dark] .guide-tour-image, html[data-theme=dark] .guide-demo { color-scheme: light; }
.notification-trigger { position: relative; min-width: 44px; height: 44px; }
.notification-count { position: absolute; top: 0; right: -3px; min-width: 19px; height: 19px; padding: 0 4px; display: grid; place-items: center; border-radius: 12px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.notification-count[hidden] { display: none; }
#notification-inbox { position: fixed; inset: 75px 16px auto auto; margin: 0; width: min(420px, calc(100vw - 24px)); max-height: min(640px, calc(100dvh - 100px)); padding: 20px; }
#notification-inbox h2 { margin: 0; }
#notification-inbox [data-notification-status] { margin: 16px 0 8px; }
.notification-row { display: grid; gap: 4px; width: 100%; margin: 8px 0; padding: 14px 16px; text-align: left; white-space: normal; overflow-wrap: anywhere; background: var(--soft); border-left: 3px solid var(--accent); }
.notification-row.is-read { background: var(--surface); border-left-color: var(--line); font-weight: 400; }
.notification-row span, .notification-row time { font-size: 12px; font-weight: 400; color: var(--muted); }
@media (max-width: 440px) { #notification-inbox { top: 65px; right: 12px; padding: 16px; } }

/* Sidebar icons: a small tile that fills with the accent on the active page. */
.sidebar nav a .nav-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-size: 0; transition: background .15s, color .15s, transform .15s, box-shadow .15s; }
.sidebar nav a .nav-icon svg { width: 22px; height: 22px; }
.sidebar nav a:hover .nav-icon { background: var(--soft); color: var(--accent); transform: translateY(-1px); }
.sidebar nav a.active .nav-icon { background: var(--accent); color: #fff; box-shadow: 0 4px 12px #0e9f6e40; }
@media (prefers-reduced-motion: reduce) { .sidebar nav a .nav-icon { transition: none; } .sidebar nav a:hover .nav-icon { transform: none; } }
