/* Mortgage Tracker — an editorial "ledger" aesthetic:
   warm paper, ink, a single considered green accent, real typographic
   hierarchy, and restrained surfaces instead of floating drop-shadow cards. */

:root {
    --paper:      #f6f3ec;   /* page background — warm off-white */
    --surface:    #ffffff;   /* cards / panels */
    --surface-2:  #faf8f3;   /* insets, zebra rows, muted fills */
    --ink:        #1f1c16;   /* primary text — warm near-black */
    --ink-2:      #514c42;   /* secondary text */
    --muted:      #8b8578;   /* labels, captions */
    --line:       #e4dfd3;   /* hairline borders */
    --line-strong:#cfc9ba;

    --accent:      #1f6a4d;   /* deep ledger green — the "money" colour */
    --accent-deep: #164e39;
    --accent-soft: #eaf1ec;   /* tinted fills */
    --accent-line: #c7ddd0;
    --pos:         #1f9d5b;   /* brighter green — credits, reads clearly green */

    --gold:  #9a6b15;         /* used sparingly for "custom / edited" */
    --gold-soft: #f6efdd;
    --neg:   #a2402d;

    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(31, 28, 22, 0.05);

    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.5;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- Masthead ---------- */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    max-width: 960px;
    margin: 0 auto;
    /* Reclaim the iPhone notch / rounded corners: honour the safe-area insets
       but never drop below the base 20px gutter on ordinary screens. */
    padding: max(22px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 22px max(20px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
/* Auth controls, pushed to the right of the wordmark. */
.topbar-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}
.signout {
    display: flex;
    align-items: center;
    gap: 10px;
}
.signout-who {
    color: var(--muted);
    font-size: 0.85rem;
}
@media (max-width: 620px) {
    .signout-who { display: none; }
}
.mark {
    flex: none;
    width: 38px;
    height: 38px;
    color: var(--accent);
}
.wordmark { min-width: 0; flex: 1 1 auto; }
.wordmark h1 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.55rem;
    letter-spacing: -0.01em;
    line-height: 1.1;
}
.subtitle {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

/* ---------- Layout ---------- */
.container {
    max-width: 960px;
    margin: 0 auto;
    /* Side padding widens to clear the notch/home-indicator in landscape. */
    padding: 28px max(20px, env(safe-area-inset-right)) max(56px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    gap: 22px;
}
/* Flex items default to min-width:auto, so any fixed-width child (a table, a
   sized <input>) can force the whole column wider than the phone screen and
   push the page into a horizontal scroll. Clamping the direct children to the
   container width keeps wide content inside its own scroller (the table/tab
   strips already set overflow-x:auto) instead of blowing out the page. */
.container > * { min-width: 0; max-width: 100%; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
}

.section-title {
    margin: 0 0 4px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.18rem;
    letter-spacing: -0.005em;
}
.section-note {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.85rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 4px;
}
.card-header .section-title { margin-bottom: 0; }

/* ---------- Summary ---------- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.stat {
    background: var(--surface);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Hairline dividers via top/left borders; negative margins collapse the
       overlap with the container edge, so empty trailing tracks stay white. */
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    margin-top: -1px;
    margin-left: -1px;
}
.stat .label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.stat .value {
    font-size: 1.22rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.stat.highlight {
    background: var(--accent-soft);
}
.stat.highlight .label { color: var(--accent-deep); }
.stat.highlight .value { color: var(--accent-deep); }

/* Money direction: equity repaid reads as a credit (green); interest paid and
   the outstanding balance are money lost/owed (red). */
.stat .value.pos { color: var(--pos); }
.stat .value.neg { color: var(--neg); }

/* ---------- Overview dashboard ---------- */
/* A headline "where you stand" band: the balance still owed, the terms it's
   cleared on, and a repayment meter — the one thing to read at a glance. */
.dash-hero-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px 40px;
    flex-wrap: wrap;
}
.dash-hero-figure { display: flex; flex-direction: column; gap: 4px; }
.dash-hero-label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.dash-hero-value {
    font-family: var(--serif);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--accent-deep);
}
/* The balance still owed is a debit — shown negative, in ledger red. */
.dash-hero-value.is-neg { color: var(--neg); }
.dash-hero-context {
    font-size: 0.85rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.dash-hero-facts {
    display: flex;
    gap: 32px;
    margin: 4px 0 0;
    flex-wrap: wrap;
}
.dash-hero-facts > div { display: flex; flex-direction: column; gap: 4px; }
.dash-hero-facts dt {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.dash-hero-facts dd {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

/* Repayment meter */
.progress { margin-top: 22px; }
.progress-bar {
    height: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.progress-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.progress-legend strong { color: var(--accent-deep); font-weight: 700; }

.progress-paid {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.progress-paid strong { color: var(--accent-deep); font-weight: 700; }

/* Grouped stats — the numbers, sorted into what they answer. */
.dash-stats { display: flex; flex-direction: column; gap: 22px; }
.dash-group-title {
    margin: 0 0 9px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.0rem;
    color: var(--ink);
}
.dash-group-note {
    margin: -3px 0 12px;
    font-size: 0.82rem;
    color: var(--muted);
}

/* Interest rate history — one row per rate span. */
.rate-history { list-style: none; margin: 0; padding: 0; }
.rate-history-row {
    padding: 10px 0;
    border-top: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}
.rate-history-row:first-child { border-top: none; }
.rate-history-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.rate-history-period { color: var(--ink); font-weight: 500; }
.rate-history-meta { color: var(--muted); font-size: 0.82rem; }
.rate-history-rate {
    margin-left: auto;
    font-weight: 700;
    color: var(--accent-deep);
    font-size: 1.05rem;
}
.rate-history-amounts {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.84rem;
}
.rate-history-amounts .pos { color: var(--pos); font-weight: 600; }
.rate-history-amounts .neg { color: var(--neg); font-weight: 600; }
.rate-history-amounts .tot { color: var(--ink-2); font-weight: 600; }
.rate-history-amounts .dot { color: var(--line-strong); }

@media (max-width: 620px) {
    .dash-hero-value { font-size: 2.1rem; }
    .dash-hero-facts { gap: 24px; }
}

/* ---------- Inputs / form ---------- */
.section-toggle {
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink-2);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.section-toggle:hover { border-color: var(--accent-line); color: var(--accent-deep); }
.section-body { margin-top: 18px; }
.section-body.is-collapsed { display: none; }

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 16px;
    align-items: end;          /* keep all inputs on one baseline despite hints */
}
label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-2);
}
.field-hint {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.76rem;
    margin-left: 4px;
}
input {
    font: inherit;
    padding: 8px 11px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* Currency-prefixed money inputs */
.money-field { position: relative; display: block; }
.money-field input { width: 100%; padding-left: 22px; }
.money-sign {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}
input:hover { border-color: var(--muted); }
input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- Input sub-sections & line items ---------- */
.subsection {
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--line);
}
.subsection:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.subsection-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}
.subsection-title {
    margin: 0 0 1px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.0rem;
}
.subsection-total { font-size: 0.8rem; color: var(--muted); }
.subsection-total strong {
    color: var(--ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: 6px;
}
.subsection-note { margin: 2px 0 10px; color: var(--muted); font-size: 0.8rem; }

.line-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.line-item {
    display: grid;
    grid-template-columns: 1fr 148px 34px;
    gap: 8px;
    align-items: center;
}
.line-item .line-label { min-width: 0; }
.line-item input { padding-top: 7px; padding-bottom: 7px; }
.line-item .line-amount { text-align: right; }
.line-remove {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--muted);
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.line-remove:hover { border-color: var(--neg); color: var(--neg); background: #fbf1ef; }
.add-line {
    font: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--accent-deep);
    background: transparent;
    border: 1px dashed var(--accent-line);
    border-radius: var(--radius-sm);
    padding: 7px 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.add-line:hover { background: var(--accent-soft); border-color: var(--accent); }

@media (max-width: 480px) {
    .line-item { grid-template-columns: 1fr 116px 34px; gap: 6px; }
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn {
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-deep); }
.btn.primary:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.btn.subtle { background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); }
.btn.subtle:hover { border-color: var(--muted); color: var(--ink); }

/* ---------- Tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data th, table.data td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}
table.data th.num, table.data td.num { text-align: right; }
table.data thead th {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid var(--line-strong);
    padding-top: 4px;
    padding-bottom: 8px;
}
table.data tbody tr:nth-child(even) td { background: var(--surface-2); }
table.data tbody tr:hover td { background: var(--accent-soft); }
table.data td.month { color: var(--ink-2); }
.num.neg { color: var(--neg); }

tfoot tr.total td {
    font-weight: 700;
    border-top: 2px solid var(--ink);
    border-bottom: none;
    background: var(--surface);
    padding-top: 11px;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Primary view tabs ---------- */
.main-tabs {
    display: flex;
    gap: 4px;
    padding: 5px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.main-tab {
    flex: 1;
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink-2);
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 9px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.main-tab:hover { color: var(--ink); background: rgba(31, 106, 77, 0.07); }
.main-tab[aria-selected="true"] { background: var(--accent); color: #fff; }
.main-tab:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 1px; }

/* Each view stacks its cards with the same rhythm as the container. */
.main-panel { display: flex; flex-direction: column; gap: 22px; }
.main-panel[hidden] { display: none; }

/* ---------- Yearly schedule / tabs ---------- */
.ledger-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.payoff-note {
    color: var(--muted);
    font-size: 0.85rem;
}
.payoff-note strong { color: var(--accent-deep); font-weight: 600; }

.year-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    max-width: 100%;
}
.year-tab {
    flex: none;
    font: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink-2);
    background: transparent;
    border: none;
    border-radius: 5px;
    padding: 7px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.year-tab:hover { color: var(--ink); background: rgba(31, 106, 77, 0.07); }
.year-tab[aria-selected="true"] {
    background: var(--accent);
    color: #fff;
}
.year-tab:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 1px; }

.year-panel[hidden] { display: none; }

.year-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.year-panel-head h3 {
    margin: 0;
    margin-right: auto;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.15rem;
}
.mark-all-paid {
    align-self: center;
    background: none;
    border: 1px solid var(--accent-line);
    border-radius: 4px;
    color: var(--accent-deep);
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.mark-all-paid:hover { background: var(--accent-soft); border-color: var(--accent); }
.mark-all-paid[data-all-paid="1"] { color: var(--ink-2); border-color: var(--line-strong); }
.mark-all-paid:disabled { opacity: 0.5; cursor: default; }
.year-period {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--muted);
    letter-spacing: 0.01em;
    margin-left: 6px;
}
.year-meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 2px 0 16px;
}
.year-meta strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.year-meta .sep { margin: 0 8px; color: var(--line-strong); }

.interest-control {
    display: flex;
    align-items: center;
    gap: 8px;
}
.interest-control label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 0;
}
.interest-input {
    font: inherit;
    width: 78px;
    padding: 7px 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.interest-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.interest-input.overridden {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--gold);
    font-weight: 600;
}
.interest-override-badge {
    display: inline-block;
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid #e6d3a3;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Editable payment cell */
.payment-input {
    font: inherit;
    width: 100%;
    max-width: 108px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink);
    text-align: right;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s, background 0.15s;
}
.payment-input:hover { border-color: var(--line-strong); background: var(--surface); }
.payment-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
td.editable { position: relative; }
td.editable::after {
    content: "edit";
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}
tr:hover td.editable::after { opacity: 0.55; }
td.editable:focus-within::after { opacity: 0; }

/* Paid column — tick a month off the ledger */
table.data th.paid-col, table.data td.paid-col { text-align: center; width: 1%; white-space: nowrap; }
.paid-check {
    width: 17px;
    height: 17px;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
    vertical-align: middle;
}
/* A settled month reads as struck-through in muted ink, like a cleared entry */
table.data tbody tr.is-paid td { color: var(--muted); }
table.data tbody tr.is-paid td.month {
    text-decoration: line-through;
    text-decoration-color: var(--line-strong);
}
table.data tbody tr.is-paid .payment-input { color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    color: var(--muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer svg { color: var(--accent); flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
    body { font-size: 14px; }
    .card { padding: 18px 16px; }
    table.data th, table.data td { padding: 8px 8px; font-size: 0.85rem; }
    .ledger-head { align-items: stretch; }
    .year-panel-head { gap: 10px; }
    .wordmark h1 { font-size: 1.35rem; }

    /* iOS Safari zooms the whole page when a focused field's text is under
       16px. The UI runs at 14–15px, so pin every editable control to 16px on
       phones — this is the single biggest iPhone usability fix here. The cell
       inputs sit inside horizontally-scrolling containers, so the extra width
       costs nothing. */
    input,
    .interest-input,
    .payment-input { font-size: 16px; }
}

/* Roomier hit areas on touch devices (Apple's guidance is ~44px). These only
   grow vertically / in place, so they don't disturb the grid column widths. */
@media (pointer: coarse) {
    .paid-check { width: 22px; height: 22px; }
    .line-remove { height: 40px; }
    .section-toggle { padding: 9px 14px; }
    .main-tab { padding: 11px 12px; }
    .year-tab { padding: 9px 15px; }
    .mark-all-paid { padding: 7px 12px; }
}

/* Very narrow phones (iPhone SE / Mini, ~320–375px): let the three primary
   view tabs wrap their labels and tighten padding so the row never overflows
   the viewport and forces a horizontal page scroll. */
.main-tab { min-width: 0; }
@media (max-width: 400px) {
    .main-tab { padding: 8px 6px; font-size: 0.8rem; white-space: normal; line-height: 1.15; }
    .container { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
    .card { padding: 16px 13px; }
    .dash-hero-value { font-size: 1.85rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
