:root {
    color-scheme: dark;
    --bg: #090c11;
    --surface: #11161e;
    --surface-raised: #171e28;
    --surface-soft: #0e131a;
    --line: #404040;
    --line-bright: #3b4858;
    --text: #f4f7fb;
    --muted: #94a0af;
    --accent: #7dd3a7;
    --accent-strong: #55b98a;
    --accent-ink: #07140e;
    --purple-400: oklch(71.4% 0.203 305.504);
    --danger: #ff7a87;
    --danger-soft: rgba(255, 122, 135, .12);
    --radius: 16px;
    --shadow: 0 24px 70px rgba(0, 0, 0, .34);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 15% -10%, rgba(125, 211, 167, .09), transparent 32rem),
        var(--bg);
    font-size: 15px;
    line-height: 1.55;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }

.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.wide-shell { width: min(1600px, calc(100% - 40px)); margin-inline: auto; }
.page-shell { padding-block: 64px 90px; }
.narrow-page { max-width: 800px; }

.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid rgba(59, 72, 88, .65);
    background: rgba(9, 12, 17, .88);
    backdrop-filter: blur(18px);
}

.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font-size: 17px; font-weight: 800; letter-spacing: -.03em; text-decoration: none; }
.wordmark span, .login-card h1 span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: 6px; }
.site-header nav > a, .nav-button {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 11px;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
}
.site-header nav > a:hover, .nav-button:hover { color: var(--text); background: var(--surface-raised); }
.site-header nav form { margin: 0; }

.flash {
    margin-top: 22px;
    padding: 12px 16px;
    border: 1px solid rgba(125, 211, 167, .35);
    border-radius: 10px;
    color: #baf0d2;
    background: rgba(125, 211, 167, .09);
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.2rem, 5vw, 4.7rem); line-height: .98; letter-spacing: -.055em; }
h2 { margin-bottom: 5px; font-size: 1.3rem; letter-spacing: -.025em; }
h3 { margin-bottom: 4px; }
p { color: var(--muted); }
.eyebrow { margin-bottom: 14px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.page-heading { margin-bottom: 42px; }
.page-heading p:last-child { max-width: 620px; margin-bottom: 0; font-size: 1.04rem; }
.page-heading.centered { text-align: center; }
.page-heading.centered p:last-child { margin-inline: auto; }
.heading-row, .tracker-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }

.panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(23, 30, 40, .82), rgba(14, 19, 26, .94));
    box-shadow: 0 1px 0 rgba(255, 255, 255, .025) inset;
}
.section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.section-heading.spread { justify-content: space-between; }
.section-heading p { margin: 0; font-size: .9rem; }
.section-index {
    display: grid;
    flex: 0 0 35px;
    height: 35px;
    place-items: center;
    border: 1px solid var(--line-bright);
    border-radius: 50%;
    color: var(--accent);
    font-size: .74rem;
    font-weight: 800;
}
.count-badge { min-width: 36px; padding: 5px 10px; border-radius: 99px; color: var(--accent); background: rgba(125, 211, 167, .1); text-align: center; }

.form-stack { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 18px; }
.form-grid-three { grid-template-columns: 2fr .7fr 1fr; align-items: end; }
label { display: grid; gap: 7px; color: #c5ced8; }
label > span { font-size: .78rem; font-weight: 700; letter-spacing: .035em; }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: var(--surface-soft);
    padding: 10px 12px;
    transition: border-color .16s ease, box-shadow .16s ease;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(125, 211, 167, .11); }
input::placeholder, textarea::placeholder { color: #657181; }

.button {
    display: inline-flex;
    width: fit-content;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: var(--accent-ink); background: var(--accent); }
.button.primary:hover { background: #9be0bb; }
.button.secondary { border-color: var(--line-bright); color: var(--text); background: var(--surface-raised); }
.button.secondary:hover { border-color: #59687a; }
.button.danger { border-color: rgba(255, 122, 135, .28); color: var(--danger); background: var(--danger-soft); }
.button.small { min-height: 36px; padding: 6px 11px; font-size: .83rem; }
.button.full { width: 100%; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.error-box { padding: 12px 14px; border: 1px solid rgba(255, 122, 135, .35); border-radius: 10px; color: #ffc0c7; background: var(--danger-soft); }
.error-summary { margin-bottom: 24px; }
.error-summary ul { margin: 7px 0 0; padding-left: 20px; }

.login-page { display: grid; place-items: center; }
.login-shell { width: min(430px, calc(100% - 34px)); padding-block: 50px; }
.login-card {
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 22, 30, .92);
    box-shadow: var(--shadow);
}
.brand-mark { display: grid; width: 52px; height: 52px; margin-bottom: 30px; place-items: center; border-radius: 14px; color: var(--accent-ink); background: var(--accent); font-weight: 900; letter-spacing: -.04em; }
.login-card h1 { margin-bottom: 32px; font-size: clamp(2.1rem, 10vw, 3rem); line-height: 1; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.login-divider::before, .login-divider::after { height: 1px; flex: 1; background: var(--line); content: ''; }
.form-status { min-height: 1.4em; margin: 10px 0 0; font-size: .84rem; }
.form-status.is-error { color: var(--danger); }

.menu-page { min-height: calc(100vh - 68px); display: grid; align-content: center; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.menu-card {
    position: relative;
    min-height: 240px;
    padding: 25px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.menu-card:hover { transform: translateY(-4px); border-color: var(--line-bright); background: var(--surface-raised); }
.menu-card.accent { border-color: rgba(125, 211, 167, .34); background: linear-gradient(155deg, rgba(125, 211, 167, .13), var(--surface) 60%); }
.menu-number { display: block; margin-bottom: 67px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.menu-card strong { display: block; margin-bottom: 7px; font-size: 1.35rem; }
.menu-card small { color: var(--muted); }
.menu-arrow { position: absolute; right: 23px; bottom: 20px; color: var(--accent); font-size: 1.5rem; }
.placeholder-panel { padding-block: 70px; text-align: center; }
.placeholder-panel h1 { max-width: 600px; margin-inline: auto; font-size: clamp(2.2rem, 6vw, 4rem); }
.placeholder-panel .button { margin-inline: auto; }
.profile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.security-panel { margin-top: 22px; }
.section-heading-copy { display: flex; align-items: flex-start; gap: 14px; }
.security-stack { display: grid; gap: 16px; }
.security-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(9, 12, 17, .42); }
.security-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px; }
.security-card-heading .eyebrow { margin-bottom: 6px; }
.security-card-heading h3, .security-card-heading p { margin-bottom: 0; }
.security-card-heading p:last-child { margin-top: 5px; font-size: .86rem; }
.security-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 20px; border-top: 1px solid var(--line); }
.security-row small { display: block; margin-top: 3px; color: var(--muted); }
.security-empty { padding: 18px 20px; border-top: 1px solid var(--line); color: var(--muted); }
.recovery-count { margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); font-size: .8rem; }
.app-pin-panel { margin-top: 22px; }
.pin-status { flex: 0 0 auto; padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--surface-soft); font-size: .74rem; font-weight: 800; }
.pin-status.is-active { border-color: rgba(125, 211, 167, .34); color: var(--accent); background: rgba(125, 211, 167, .09); }
.pin-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pin-settings-grid > .security-card { padding: 22px; }
.pin-settings-grid h3 { margin-bottom: 7px; }
.pin-explanation { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.pin-explanation p:last-child { margin-bottom: 0; }
.pin-remove-form { padding-top: 20px; border-top: 1px solid var(--line); }
.security-note { padding: 13px 14px; border: 1px solid rgba(125, 211, 167, .2); border-radius: 10px; background: rgba(125, 211, 167, .06); font-size: .84rem; }
.pin-input { font-variant-numeric: tabular-nums; letter-spacing: .34em; }
.pin-input::placeholder { letter-spacing: .34em; }
.pin-challenge-page { display: grid; min-height: calc(100vh - 68px); max-width: 560px; align-content: center; }
.pin-challenge-panel { padding: 42px; box-shadow: var(--shadow); }
.pin-lock-mark { width: fit-content; margin: 0 auto 28px; padding: 10px 14px 10px 19px; border: 1px solid rgba(125, 211, 167, .3); border-radius: 10px; color: var(--accent); background: rgba(125, 211, 167, .08); font-size: .8rem; font-weight: 900; letter-spacing: .45em; }
.pin-challenge-form { width: min(330px, 100%); margin-inline: auto; }
.pin-challenge-form .button { width: 100%; }
.pin-input-large { min-height: 58px; padding-left: 1.05em; font-size: 1.35rem; text-align: center; }

.budget-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 22px; align-items: start; }
.create-block { margin-bottom: 22px; border: 1px solid var(--line); border-radius: 12px; background: rgba(9, 12, 17, .42); }
.create-block > summary { padding: 15px 18px; color: var(--accent); font-weight: 760; cursor: pointer; }
.create-block[open] > summary { border-bottom: 1px solid var(--line); }
.create-block form { padding: 18px; }
.tracker-list { display: grid; gap: 10px; }
.tracker-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: rgba(9, 12, 17, .44); }
.tracker-summary { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tracker-summary h3, .tracker-summary p { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.tracker-summary p { font-size: .85rem; }
.year-stamp { display: grid; flex: 0 0 54px; height: 54px; place-items: center; border-radius: 11px; color: var(--accent); background: rgba(125, 211, 167, .09); font-size: .78rem; font-weight: 800; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.row-actions form { margin: 0; }
.inline-details > summary { list-style: none; }
.inline-details > summary::-webkit-details-marker { display: none; }
.floating-form { position: absolute; z-index: 10; top: calc(100% - 8px); right: 10px; width: min(310px, calc(100vw - 60px)); padding: 18px; border: 1px solid var(--line-bright); border-radius: 12px; background: #151b24; box-shadow: var(--shadow); }
.empty-state, .mini-empty { padding: 24px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); text-align: center; }
.category-panel { position: sticky; top: 92px; }
.category-create { display: grid; grid-template-columns: 1fr .72fr auto; gap: 8px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.category-group { padding-top: 23px; }
.category-group h3 { display: flex; justify-content: space-between; color: #d6dde5; font-size: .85rem; text-transform: uppercase; letter-spacing: .09em; }
.category-group h3 span { color: var(--muted); }
.category-list { display: grid; gap: 7px; }
.category-row { display: flex; align-items: center; gap: 8px; }
.category-name-form { display: flex; flex: 1; align-items: center; gap: 5px; }
.category-name-form input { min-height: 37px; padding: 6px 9px; }
.text-button { border: 0; color: var(--accent); background: transparent; font-size: .75rem; cursor: pointer; }
.category-actions { display: flex; gap: 3px; }
.category-actions form { margin: 0; }
.icon-button { display: grid; width: 29px; height: 29px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-soft); cursor: pointer; text-decoration: none; }
.icon-button:disabled { opacity: .28; cursor: default; }
.danger-text { color: var(--danger); }
.mini-empty { padding: 12px; font-size: .82rem; }

.tracker-page { padding-top: 42px; }
.tracker-heading { margin-bottom: 26px; }
.tracker-heading h1 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.4rem); }
.back-link { display: inline-block; margin-bottom: 19px; color: var(--muted); font-size: .83rem; text-decoration: none; }
.tracker-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.view-switcher { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.view-switcher a { padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: .82rem; text-decoration: none; }
.view-switcher a.active { color: var(--accent-ink); background: var(--accent); font-weight: 800; }
.year-switcher { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.year-switcher select { min-height: 36px; padding: 0 28px 0 0; border: 0; border-radius: 8px; color: var(--text); background-color: transparent; font-weight: 760; box-shadow: none; }
.item-modal { width: min(860px, calc(100% - 32px)); max-height: 90vh; padding: 0; overflow: visible; border: 0; border-radius: 18px; color: var(--text); background: transparent; }
[data-item-modal] { width: min(860px, calc(100% - 32px)); height: min(860px, calc(100dvh - 32px)); max-height: min(860px, calc(100dvh - 32px)); }
[data-item-modal] .modal-surface { height: 100%; max-height: 100%; }
.item-modal::backdrop { background: rgba(2, 4, 7, .78); backdrop-filter: blur(8px); }
.modal-surface { max-height: 90vh; overflow: auto; border: 1px solid var(--line-bright); border-radius: 18px; background: #111720; box-shadow: var(--shadow); }
.modal-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: rgba(17, 23, 32, .96); backdrop-filter: blur(15px); }
.modal-header .eyebrow { margin-bottom: 5px; }
.modal-header h2 { margin: 0; }
.modal-close { display: grid; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-soft); font-size: 1.45rem; line-height: 1; cursor: pointer; }
.modal-close:hover { border-color: var(--line-bright); color: var(--text); }
.item-modal .error-summary { margin: 22px 22px 0; }
[data-item-panel].is-loading { opacity: .45; }
.item-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 18px 22px 0; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); width: fit-content; }
.item-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: .82rem; text-decoration: none; }
.item-tabs a.active { color: var(--accent-ink); background: var(--accent); font-weight: 800; }
.item-tabs a.active .section-count { background: rgba(0, 0, 0, .16); color: var(--accent-ink); }
.item-transactions { display: grid; gap: 16px; padding: 22px; }
.item-chart { display: grid; gap: 18px; padding: 22px; }
.range-pills { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); }
.range-pills a { padding: 7px 14px; border-radius: 999px; color: var(--muted); font-size: .82rem; text-decoration: none; }
.range-pills a.active { color: var(--accent-ink); background: var(--accent); font-weight: 800; }
.chart-frame { position: relative; height: 360px; }
.transaction-description { white-space: normal; max-width: 420px; }
.unlink-form { display: grid; justify-items: end; gap: 8px; }
.unlink-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(255, 122, 135, .28); border-radius: 10px; color: var(--danger); background: var(--danger-soft); cursor: pointer; }
.unlink-button:hover { border-color: var(--danger); }
.unlink-choice { width: min(420px, 70vw); padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); text-align: left; }
.unlink-choice[hidden] { display: none; }
.unlink-choice p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.unlink-choice b { color: var(--text); }
.item-form { grid-template-columns: repeat(4, minmax(140px, 1fr)); padding: 22px; }
.period-hint { margin: 0; color: var(--muted); font-size: .85rem; }
.item-periods { display: grid; gap: 12px; align-content: start; padding: 22px; }
.item-periods-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.item-periods-heading h3 { margin: 0; font-size: 1rem; }
.item-periods-heading p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.period-table { width: 100%; border-collapse: collapse; }
.period-table th, .period-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.period-table th { color: var(--muted); font-size: .75rem; font-weight: 700; }
.period-table td strong, .period-table td small { display: block; }
.period-table td small { color: var(--muted); }
.period-table .period-amount, .period-table th:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
.period-table th:last-child, .period-table td:last-child { width: 48px; text-align: right; }
.period-modal { width: min(720px, calc(100% - 32px)); }
.period-modal .modal-delete-form { grid-template-columns: minmax(0, 1fr) auto; }
.modal-delete-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr) auto; align-items: end; gap: 16px; margin: 0 22px 22px; padding: 18px; border: 1px solid rgba(255, 122, 135, .3); border-radius: 12px; background: var(--danger-soft); }
.delete-copy p { margin: 4px 0 0; font-size: .85rem; }
.span-two { grid-column: span 2; }
.span-full { grid-column: 1 / -1; }
.custom-frequency { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.forecast-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.table-scroll { max-height: 70vh; overflow: auto; border-radius: inherit; }
.forecast-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.forecast-table th, .forecast-table td { min-width: 112px; padding: 12px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.forecast-table thead th { position: sticky; z-index: 4; top: 0; background: #171e28; }
.forecast-table th:first-child, .forecast-table td:first-child { width: 260px; min-width: 260px; text-align: left; }
.forecast-table .actual-row td:first-child { width: auto; min-width: 112px; text-align: right; }
.forecast-table .planned-row td { color: #bedbff;}
.forecast-table .actual-row td { color: #ffa1ad;}
.forecast-table .sticky-cell { position: sticky; z-index: 3; left: 0; background: #111720; }
.forecast-table thead .sticky-cell { z-index: 6; background: #171e28; }
.forecast-table tfoot .sticky-cell { z-index: 5; }
.forecast-table thead small { display: block; color: var(--muted); font-size: .66rem; font-weight: 500; }
.type-row th, .type-row td { color: var(--accent); background: #18231f; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.type-row .sticky-cell { background: #18231f; }
.group-row th, .group-row td { color: #cad4de; background: #151b24; font-size: .75rem; }
.group-row .sticky-cell { padding-left: 22px; background: #151b24; }
.item-cell { padding-left: 28px !important; vertical-align: middle; }
.item-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.item-copy strong, .item-copy small { display: block; }
.item-copy small { color: var(--muted); }
.item-label a { flex: none; color: var(--accent); font-size: .72rem; }
.item-note { color: #d5b778 !important; }
.total-cell { color: var(--text); font-weight: 800; background: rgba(255, 255, 255, .018); }
.forecast-table tfoot th { position: sticky; z-index: 4; bottom: 0; background: #19212b; }
.forecast-table tfoot tr:nth-last-child(2) th { bottom: 43px; }
.forecast-table tfoot tr:nth-last-child(3) th { bottom: 86px; }
.forecast-table .net-row th { color: var(--accent); background: #1a2a24; }
.muted-cell { color: var(--muted); }

.budget-sections { display: flex; flex-wrap: wrap; gap: 5px; width: fit-content; margin: -8px 0 16px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.budget-sections a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: .82rem; text-decoration: none; }
.budget-sections a.active { color: var(--accent-ink); background: var(--accent); font-weight: 800; }
.section-count { min-width: 1.4rem; padding: 1px 6px; border-radius: 99px; background: rgba(125, 211, 167, .12); color: var(--accent); font-size: .72rem; text-align: center; }
.budget-sections a.active .section-count { background: rgba(0, 0, 0, .16); color: var(--accent-ink); }
.tracker-page .budget-sections { flex: 0 0 auto; }
.import-layout, .transaction-layout { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; gap: 18px; overflow: auto; padding: 22px; }
.import-lead, .transaction-count { margin: 0; color: var(--muted); }
.mapping-summary { display: grid; justify-items: end; gap: 10px; }
.mapping-reset-code { margin: 0; padding: 12px 14px; border: 1px dashed var(--line-bright); border-radius: 12px; color: var(--text); letter-spacing: .28em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.35rem; font-weight: 800; text-align: center; }
.clear-mapping-copy { margin: 0; color: var(--muted); line-height: 1.5; }
.transaction-layout .section-heading { justify-content: space-between; }
.transaction-search { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.transaction-search label { flex: 1 1 260px; max-width: 460px; }
.transaction-search .amount-search { flex: 0 1 140px; }
.transaction-search .type-search { flex: 0 1 220px; }
.map-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.map-select { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.map-selected-count { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.map-toolbar-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-left: auto; }
.map-toolbar-actions label { min-width: 180px; margin: 0; }
.import-form { max-width: 860px; }
.source-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; border: 0; }
.source-picker legend { grid-column: 1 / -1; padding: 0; color: #c5ced8; font-size: .78rem; font-weight: 700; letter-spacing: .035em; }
.source-option { position: relative; display: block; cursor: pointer; }
.source-option input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.source-option span { display: grid; gap: 6px; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(9, 12, 17, .46); }
.source-option strong { color: var(--text); }
.source-option small { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.source-option input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.source-option input:focus-visible + span { outline: 2px solid white; outline-offset: 3px; }
.transaction-scroll { overflow: visible; }
.tracker-page .transaction-scroll { flex: none; max-height: none; }
.transaction-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.transaction-table th, .transaction-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.transaction-table th { position: sticky; top: 0; z-index: 2; background: #171e28; color: #cad4de; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.transaction-table td small { display: block; margin-top: 3px; color: var(--muted); }
.transaction-table td:nth-child(4), .transaction-table th:nth-child(4) { text-align: right; white-space: nowrap; }
.transaction-table td:last-child { min-width: 280px; }
.map-table th, .map-table td { padding: 6px 10px; vertical-align: middle; }
.map-table td:nth-child(4), .map-table th:nth-child(4) { text-align: left; }
.map-table td:last-child, .map-table th:last-child { min-width: 0; text-align: right; white-space: nowrap; }
.map-table .transaction-check { width: 28px; padding-right: 0; }
.map-table input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--accent); }
.map-table .sort-heading { display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 0; border: 0; border-radius: 0; color: inherit; background: transparent; box-shadow: none; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.map-table .sort-heading [data-sort-label] { color: var(--accent); letter-spacing: 0; text-transform: none; font-weight: 700; }
.map-table .transaction-date { min-width: 11rem; white-space: nowrap; }
.map-table .transaction-where, .map-table .transaction-type { white-space: nowrap; }
.map-table .transaction-details { width: 100%; }
.transaction-amount { font-weight: 800; }
.transaction-amount.is-expense { color: #ffb4bc; }
.transaction-amount.is-income { color: var(--accent); }
.map-form { display: grid; gap: 8px; }
.map-choice { display: grid; gap: 8px; }
.map-choice[hidden], .map-note[hidden], .map-form label[hidden] { display: none; }
.map-note { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.modal-delete-form .reallocate-field { grid-column: 1 / -1; }
.map-choice p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.map-choice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.transaction-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; color: var(--muted); }
.transaction-pager [aria-disabled="true"] { opacity: .4; pointer-events: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.compact-modal { width: min(560px, calc(100% - 32px)); }
.security-modal { width: min(920px, calc(100% - 32px)); }
.authenticator-grid { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(300px, 1fr); gap: 24px; padding: 24px; }
.qr-panel { display: grid; align-content: center; justify-items: center; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); text-align: center; }
.qr-panel canvas { width: 200px; height: 200px; padding: 8px; border-radius: 10px; background: white; }
.qr-panel p { margin: 14px 0 0; font-size: .84rem; }
.security-form { align-content: start; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.copy-field .button { flex: 0 0 auto; }
.modal-form { padding: 22px; }
.compact-heading { margin: 0; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.recovery-panel { text-align: center; }
.recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recovery-grid code { padding: 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); background: var(--surface-soft); font-size: 1rem; letter-spacing: .12em; }
.recovery-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

.button { gap: 8px; }
.profile-tabs { display: flex; gap: 7px; margin: -20px 0 28px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.profile-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 8px; color: var(--muted); font-size: .84rem; font-weight: 750; text-decoration: none; }
.profile-tabs a:hover { color: var(--text); }
.profile-tabs a.is-active { color: var(--accent-ink); background: var(--accent); }
.dashboard-config { display: grid; gap: 22px; }
.refresh-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.input-with-unit { display: flex; align-items: center; gap: 10px; }
.input-with-unit input { flex: 1; }
.input-with-unit small { flex: 0 0 auto; padding-right: 10px; color: var(--muted); }
.school-terms-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.school-term-card { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(9, 12, 17, .46); }
.school-term-card legend { padding: 0 7px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.school-term-dates { display: grid; gap: 12px; }
.robot-vacuum-colour { color: var(--purple-400); }
.robot-vacuum-schedule { min-width: 0; margin: 0; padding: 0; border: 0; }
.robot-vacuum-schedule legend { margin-bottom: 9px; color: #c5ced8; font-size: .78rem; font-weight: 700; letter-spacing: .035em; }
.robot-vacuum-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.robot-vacuum-day { position: relative; display: block; cursor: pointer; }
.robot-vacuum-day > input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.robot-vacuum-day > span { display: flex; min-height: 72px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgba(9, 12, 17, .46); transition: border-color .16s ease, box-shadow .16s ease, color .16s ease, background .16s ease; }
.robot-vacuum-day i { color: var(--purple-400); font-size: 1.05rem; opacity: .42; transition: opacity .16s ease, scale .16s ease; }
.robot-vacuum-day strong { font-size: .78rem; }
.robot-vacuum-day input:checked + span { border-color: var(--purple-400); color: #f4e8ff; background: color-mix(in srgb, var(--purple-400) 13%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple-400) 30%, transparent), 0 0 22px color-mix(in srgb, var(--purple-400) 10%, transparent); }
.robot-vacuum-day input:checked + span i { opacity: 1; scale: 1.08; }
.robot-vacuum-day input:focus-visible + span { outline: 2px solid white; outline-offset: 3px; }
.birthday-colour { color: #ec4899; }
.calendar-config-panel, .birthday-config-panel { display: grid; }
.calendar-config-list, .birthday-config-list { display: grid; gap: 12px; }
.calendar-config-row, .birthday-config-row { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: rgba(9, 12, 17, .46); }
.calendar-config-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(145px, .7fr) minmax(280px, 2fr); gap: 16px; min-width: 0; flex: 1; }
.birthday-config-fields { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(90px, .5fr) minmax(170px, 1fr) minmax(130px, .75fr); gap: 16px; min-width: 0; flex: 1; }
.calendar-colour-picker { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.calendar-colour-picker legend { margin-bottom: 9px; color: #c5ced8; font-size: .78rem; font-weight: 700; letter-spacing: .035em; }
.calendar-colour-picker > div { display: flex; flex-wrap: wrap; gap: 8px; }
.calendar-colour-picker label { position: relative; display: block; cursor: pointer; }
.calendar-colour-picker input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.calendar-colour-picker label > span { display: block; width: 27px; height: 27px; border: 3px solid var(--surface-soft); border-radius: 8px; background: var(--calendar-colour); box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); transition: scale .15s ease, box-shadow .15s ease; }
.calendar-colour-picker label > small { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0 0 0 0); white-space: nowrap; }
.calendar-colour-picker input:checked + span { scale: 1.08; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--calendar-colour); }
.calendar-colour-picker input:focus-visible + span { outline: 2px solid white; outline-offset: 4px; }
.calendar-remove, .birthday-remove { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255, 122, 135, .24); border-radius: 9px; color: var(--danger); background: var(--danger-soft); cursor: pointer; }
.calendar-config-empty, .birthday-config-empty { padding: 34px; border: 1px dashed var(--line-bright); border-radius: 13px; color: var(--muted); text-align: center; }
.calendar-config-empty i, .birthday-config-empty i { color: var(--accent); font-size: 1.8rem; }
.birthday-config-empty i { color: #ec4899; }
.calendar-config-empty p, .birthday-config-empty p { margin: 10px 0 0; }
.dashboard-config-actions { display: flex; justify-content: flex-end; gap: 10px; }

[data-calendar-colour="sky-400"] { --calendar-colour: #38bdf8; }
[data-calendar-colour="cyan-400"] { --calendar-colour: #22d3ee; }
[data-calendar-colour="emerald-400"] { --calendar-colour: #34d399; }
[data-calendar-colour="amber-400"] { --calendar-colour: #fbbf24; }
[data-calendar-colour="orange-500"] { --calendar-colour: #f97316; }
[data-calendar-colour="rose-500"] { --calendar-colour: #f43f5e; }
[data-calendar-colour="pink-500"] { --calendar-colour: #ec4899; }
[data-calendar-colour="violet-500"] { --calendar-colour: #8b5cf6; }
[data-calendar-colour="purple-600"] { --calendar-colour: #9333ea; }
[data-calendar-colour="indigo-500"] { --calendar-colour: #6366f1; }

.dashboard-body { overflow-x: hidden; background: #030507; }
.hud-page { width: 100%; padding: 20px; }
.home-hud { width: 100%; min-height: calc(100dvh - 108px); overflow: hidden; border: 1px solid #28313d; border-radius: 18px; color: #f8fafc; background: #05080c; box-shadow: 0 30px 90px rgba(0, 0, 0, .48); }
.hud-preview-toolbar { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 12px 9px 17px; border-bottom: 1px solid #242d38; background: #0d1218; }
.hud-preview-status, .hud-preview-actions { display: flex; align-items: center; gap: 12px; }
.hud-preview-status { color: #8794a4; font-size: .77rem; }
.hud-preview-status strong { color: #e7edf4; }
.hud-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #67e8a8; box-shadow: 0 0 0 5px rgba(103, 232, 168, .08), 0 0 16px rgba(103, 232, 168, .65); }
.hud-viewport { position: relative; height: max(720px, calc(100dvh - 167px)); min-height: 0; overflow: auto; background: #05080c; isolation: isolate; }
.dashboard-slides { width: 100%; height: 100%; min-width: 1040px; }
.hud-slide { display: none; width: 100%; height: 100%; min-height: 680px; padding: clamp(9px, 1vw, 20px); overflow: hidden; background: #05080c; }
.hud-slide.is-active { display: grid; }
.hud-kicker { margin: 0 0 7px; color: #8290a2; font-size: clamp(.58rem, .7vw, .76rem); font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.hud-kicker i { margin-right: 5px; color: #78dda9; }
.hud-card { border: 1px solid rgba(147, 164, 184, .14); border-radius: clamp(12px, 1.1vw, 20px); background: linear-gradient(145deg, rgba(17, 24, 33, .9), rgba(8, 12, 17, .92)); box-shadow: 0 1px rgba(255, 255, 255, .025) inset; }
.hud-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.hud-card-heading h2 { margin: 0; font-size: clamp(1rem, 1.25vw, 1.45rem); }
.hud-card-heading > i { color: #78dda9; font-size: clamp(1.1rem, 1.5vw, 1.7rem); }
.astronomy-slide { grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(14px, 1.5vw, 24px); background: radial-gradient(circle at 78% 0%, rgba(70, 112, 155, .15), transparent 30%), radial-gradient(circle at 8% 85%, rgba(76, 168, 126, .08), transparent 32%), #05080c; }
.astro-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.astro-header h1 { margin: 0; font-size: clamp(2rem, 3.2vw, 4.2rem); line-height: .9; letter-spacing: -.055em; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.calendar-header h1 { margin: 0; font-size: clamp(1.65rem, 2.5vw, 3.2rem); line-height: .9; letter-spacing: -.055em; }
.astro-clock { display: grid; justify-items: end; }
.astro-clock strong { font-size: clamp(2rem, 3.4vw, 4.4rem); font-weight: 520; line-height: .9; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.astro-clock span { margin-top: 8px; color: #8290a2; font-size: clamp(.7rem, .9vw, 1rem); letter-spacing: .08em; text-transform: uppercase; }
.astro-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: minmax(0, 1.05fr) minmax(0, .9fr) minmax(105px, .64fr); gap: clamp(10px, 1vw, 17px); min-height: 0; }
.stargazing-score { position: relative; grid-column: 1 / 4; grid-row: 1 / 3; display: grid; align-content: space-between; padding: clamp(20px, 2vw, 34px); overflow: hidden; border-color: rgba(120, 221, 169, .27); background: radial-gradient(circle at 85% 13%, rgba(120, 221, 169, .14), transparent 34%), linear-gradient(150deg, rgba(18, 34, 30, .96), rgba(8, 13, 17, .96)); }
.score-orbit { position: absolute; top: clamp(20px, 2vw, 34px); right: clamp(20px, 2vw, 34px); display: grid; width: clamp(42px, 4vw, 68px); aspect-ratio: 1; place-items: center; border: 1px solid rgba(120, 221, 169, .25); border-radius: 50%; color: #78dda9; background: rgba(120, 221, 169, .07); font-size: clamp(1rem, 1.5vw, 1.6rem); }
.score-value { display: flex; align-items: baseline; gap: 8px; margin: clamp(20px, 2.5vh, 38px) 0 0; }
.score-value strong { font-size: clamp(5rem, 8.5vw, 10.5rem); font-weight: 500; line-height: .72; letter-spacing: -.1em; font-variant-numeric: tabular-nums; }
.score-value span { color: #718091; font-size: clamp(.8rem, 1vw, 1.1rem); }
.stargazing-score h2 { margin: 18px 0 6px; color: #9eebc2; font-size: clamp(1.35rem, 2vw, 2.4rem); }
.stargazing-score p { margin: 0; font-size: clamp(.72rem, .86vw, .95rem); }
.stargazing-score p strong { color: #eaf5ef; }
.score-signals { display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid rgba(147, 164, 184, .12); }
.score-signals span { display: flex; align-items: center; gap: 8px; color: #aeb9c6; font-size: clamp(.66rem, .72vw, .82rem); }
.score-signals .is-good i { color: #78dda9; }
.score-signals .is-warn i { color: #f6c76f; }
.tonight-metrics { grid-column: 4 / 10; grid-row: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: clamp(8px, .8vw, 13px); min-height: 0; }
.metric-card { display: grid; align-content: center; justify-items: start; padding: clamp(13px, 1.25vw, 20px); }
.metric-card i { margin-bottom: auto; color: #7ddfb0; font-size: clamp(1rem, 1.3vw, 1.55rem); }
.metric-card span { margin-top: 9px; color: #758396; font-size: clamp(.58rem, .64vw, .72rem); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.metric-card strong { overflow: hidden; width: 100%; margin-top: 2px; font-size: clamp(.85rem, 1.25vw, 1.45rem); text-overflow: ellipsis; white-space: nowrap; }
.moon-card { grid-column: 10 / 13; grid-row: 1; display: grid; grid-template-columns: auto 1fr; align-content: center; gap: clamp(11px, 1.1vw, 18px); padding: clamp(14px, 1.4vw, 23px); }
.moon-visual { display: grid; width: 90px; height: 90px; place-items: center; color: #d6e4f4; font-size: clamp(1rem, 1.5vw, 1.6rem); }
.moon-visual img { display: block; width: auto; max-width: 90px; height: auto; max-height: 90px; object-fit: contain; object-position: center; filter: drop-shadow(0 0 14px rgba(174, 201, 233, .18)); }
.moon-card h2 { margin: 0; font-size: clamp(.95rem, 1.25vw, 1.45rem); }
.moon-card > div > strong { color: #9eabb9; font-size: clamp(.62rem, .7vw, .78rem); font-weight: 600; }
.moon-card dl { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 3px 0 0; }
.moon-card dl div { padding-top: 9px; border-top: 1px solid rgba(147, 164, 184, .12); }
.moon-card dt { color: #718091; font-size: .61rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.moon-card dd { margin: 2px 0 0; font-size: clamp(.7rem, .78vw, .88rem); font-weight: 700; }
.targets-card { grid-column: 4 / 13; grid-row: 2; display: grid; grid-template-rows: auto 1fr; padding: clamp(15px, 1.4vw, 24px); }
.target-list-carousel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch; gap: 8px; min-height: 0; margin-top: 12px; }
.target-list { --target-list-gap: clamp(7px, .65vw, 11px); position: relative; display: flex; gap: var(--target-list-gap); min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scroll-behavior: smooth; scroll-snap-type: inline mandatory; scrollbar-width: none; touch-action: pan-x pan-y; }
.target-list::-webkit-scrollbar { display: none; }
.target-list-nav { display: grid; width: clamp(26px, 2vw, 32px); align-self: stretch; place-items: center; border: 1px solid rgba(147, 164, 184, .12); border-radius: 10px; color: #8491a1; background: rgba(255, 255, 255, .025); cursor: pointer; transition: border-color .18s ease, color .18s ease, background-color .18s ease; }
.target-list-nav:hover:not(:disabled) { border-color: rgba(120, 221, 169, .42); color: #78dda9; background: rgba(120, 221, 169, .055); }
.target-list-nav:focus-visible { outline: 2px solid #78dda9; outline-offset: 2px; }
.target-list-nav:disabled { color: #35404d; cursor: default; }
.target-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; flex: 0 0 calc((100% - var(--target-list-gap) - var(--target-list-gap)) / 3); gap: clamp(7px, .65vw, 12px); min-width: 0; padding: clamp(9px, .8vw, 14px); border: 1px solid rgba(147, 164, 184, .1); border-radius: 11px; color: inherit; background: rgba(255, 255, 255, .02); cursor: pointer; font: inherit; scroll-snap-align: start; scroll-snap-stop: always; text-align: left; transition: border-color .18s ease, background-color .18s ease; }
.target-card:hover { border-color: rgba(120, 221, 169, .34); background: rgba(120, 221, 169, .05); }
.target-card:focus-visible { outline: 2px solid #78dda9; outline-offset: 2px; }
.target-card > i:first-child { display: grid; width: clamp(28px, 2.5vw, 40px); aspect-ratio: 1; place-items: center; border-radius: 9px; color: #78dda9; background: rgba(120, 221, 169, .08); }
.target-card > i:last-child { color: #455262; font-size: .65rem; transition: color .18s ease, transform .18s ease; }
.target-card:hover > i:last-child { color: #78dda9; transform: translateX(2px); }
.target-card span { min-width: 0; }
.target-card strong, .target-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.target-card strong { font-size: clamp(.75rem, .88vw, 1rem); }
.target-card small { margin-top: 2px; color: #718091; font-size: clamp(.58rem, .64vw, .72rem); }
.target-card em { display: block; margin-top: 5px; overflow: hidden; color: #78dda9; font-size: clamp(.54rem, .59vw, .68rem); font-style: normal; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.forecast-strip { grid-column: 1 / 13; grid-row: 3; display: grid; grid-template-columns: 1.12fr repeat(7, 1fr); overflow: hidden; }
.forecast-intro, .forecast-night-trigger { padding: clamp(10px, 1vw, 17px); }
.forecast-intro { display: grid; align-content: center; border-right: 1px solid rgba(147, 164, 184, .12); }
.forecast-intro h2 { margin: 0; font-size: clamp(1rem, 1.2vw, 1.4rem); }
.forecast-intro small { color: #718091; }
.forecast-night { min-width: 0; border-right: 1px solid rgba(147, 164, 184, .1); }
.forecast-night:last-child { border-right: 0; }
.forecast-night-trigger { display: grid; width: 100%; height: 100%; align-content: center; justify-items: center; border: 0; color: inherit; background: transparent; cursor: pointer; font: inherit; transition: background-color .18s ease, box-shadow .18s ease; }
.forecast-night.is-tonight .forecast-night-trigger { background: rgba(120, 221, 169, .055); }
.forecast-night-trigger:hover { background: rgba(120, 221, 169, .075); }
.forecast-night-trigger:focus-visible { outline: 2px solid #78dda9; outline-offset: -3px; }
.forecast-night-trigger .forecast-day { color: #8491a1; font-size: clamp(.56rem, .62vw, .7rem); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.forecast-stars, .forecast-dialog-stars { display: flex; align-items: center; justify-content: center; gap: clamp(1px, .14vw, 3px); color: #7ddfb0; }
.forecast-stars { margin: 6px 0 4px; }
.forecast-stars i { font-size: clamp(.53rem, .58vw, .67rem); }
.forecast-night-trigger > strong { font-size: clamp(.85rem, 1.2vw, 1.45rem); font-variant-numeric: tabular-nums; }
.forecast-night-trigger > small { color: #647184; font-size: clamp(.5rem, .55vw, .64rem); }
.forecast-score-dialog, .seasonal-target-dialog { max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 1px solid rgba(120, 221, 169, .28); border-radius: 18px; color: #dce5ef; background: #0a1017; box-shadow: 0 24px 80px rgba(0, 0, 0, .72), 0 0 38px rgba(120, 221, 169, .08); }
.forecast-score-dialog { width: min(620px, calc(100% - 32px)); }
.seasonal-target-dialog { width: min(860px, calc(100% - 32px)); }
.forecast-score-dialog::backdrop, .seasonal-target-dialog::backdrop { background: rgba(1, 4, 8, .82); backdrop-filter: blur(5px); }
.forecast-score-dialog-card { display: grid; gap: 18px; max-height: calc(100dvh - 32px); padding: clamp(20px, 2.2vw, 30px); overflow-y: auto; }
.forecast-score-dialog-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.forecast-score-dialog-card h2 { margin: 2px 0 0; font-size: clamp(1.15rem, 1.8vw, 1.6rem); }
.forecast-dialog-close { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid rgba(147, 164, 184, .2); border-radius: 9px; color: #c8d2de; background: rgba(255, 255, 255, .035); cursor: pointer; font: inherit; font-size: .72rem; font-weight: 750; }
.forecast-dialog-close:hover { border-color: rgba(120, 221, 169, .5); color: white; }
.forecast-dialog-close:focus-visible { outline: 2px solid #78dda9; outline-offset: 2px; }
.forecast-score-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border: 1px solid rgba(147, 164, 184, .13); border-radius: 13px; background: rgba(255, 255, 255, .025); }
.forecast-score-summary > div { display: grid; }
.forecast-score-summary strong { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-variant-numeric: tabular-nums; line-height: 1; }
.forecast-score-summary strong small { margin-left: 3px; color: #718091; font-size: .8rem; }
.forecast-score-summary > div > span { margin-top: 5px; color: #78dda9; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.forecast-dialog-stars { gap: clamp(5px, .65vw, 9px); }
.forecast-dialog-stars i { font-size: clamp(1.1rem, 2vw, 1.55rem); }
.forecast-score-breakdown { display: grid; gap: 7px; }
.forecast-score-breakdown > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 12px; border-bottom: 1px solid rgba(147, 164, 184, .1); }
.forecast-score-breakdown > div:last-child { border-bottom: 0; }
.forecast-score-breakdown span { display: grid; gap: 2px; }
.forecast-score-breakdown strong { font-size: .77rem; }
.forecast-score-breakdown small { color: #718091; font-size: .66rem; }
.forecast-score-breakdown output { color: #a7e8c5; font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.forecast-score-breakdown > p { margin: 0; color: #8491a1; font-size: .78rem; }
.forecast-score-dialog-card > footer { color: #657285; font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; }
.target-dialog-shell { display: grid; grid-template-rows: repeat(4, auto); gap: 13px; max-height: calc(100dvh - 32px); padding: clamp(18px, 2vw, 28px); overflow-y: auto; }
.target-dialog-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.target-dialog-shell h2 { margin: 2px 0 0; font-size: clamp(1.15rem, 1.8vw, 1.6rem); }
.target-carousel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.target-carousel-toolbar > span { color: #8491a1; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.target-carousel-toolbar > div { display: flex; gap: 7px; }
.target-carousel-toolbar button { display: grid; width: 34px; aspect-ratio: 1; place-items: center; border: 1px solid rgba(147, 164, 184, .18); border-radius: 9px; color: #c8d2de; background: rgba(255, 255, 255, .035); cursor: pointer; }
.target-carousel-toolbar button:hover:not(:disabled) { border-color: rgba(120, 221, 169, .5); color: #78dda9; }
.target-carousel-toolbar button:focus-visible { outline: 2px solid #78dda9; outline-offset: 2px; }
.target-carousel-toolbar button:disabled { color: #3f4b59; cursor: default; }
.target-carousel { display: flex; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scroll-behavior: smooth; scroll-snap-type: inline mandatory; scrollbar-color: #334155 transparent; scrollbar-width: thin; touch-action: pan-x pan-y; }
.target-slide { display: grid; grid-template-columns: minmax(230px, .9fr) minmax(0, 1.25fr); flex: 0 0 100%; gap: clamp(18px, 2vw, 28px); min-width: 0; padding: 2px; scroll-snap-align: start; scroll-snap-stop: always; }
.target-slide figure { position: relative; min-width: 0; min-height: 280px; margin: 0; overflow: hidden; border: 1px solid rgba(147, 164, 184, .14); border-radius: 14px; background: radial-gradient(circle at 45% 35%, #213c4f, #090e15 72%); }
.target-slide figure::after { position: absolute; inset: 0; content: ''; pointer-events: none; box-shadow: inset 0 0 40px rgba(1, 4, 8, .42); }
.target-slide img { width: 100%; height: 100%; object-fit: cover; }
.target-slide figcaption { position: absolute; z-index: 1; right: 8px; bottom: 7px; left: 8px; color: rgba(255, 255, 255, .82); font-size: .55rem; text-align: right; text-shadow: 0 1px 3px rgba(0, 0, 0, .95); }
.target-slide-content { display: grid; align-content: start; gap: 13px; min-width: 0; padding: 3px 4px 3px 0; }
.target-slide-content h3 { margin: 2px 0 0; font-size: clamp(1.35rem, 2.3vw, 2rem); letter-spacing: -.035em; }
.target-slide-content > p { margin: 0; color: #aeb9c6; font-size: clamp(.7rem, .78vw, .82rem); line-height: 1.55; }
.target-slide-content dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.target-slide-content dl > div { min-width: 0; padding: 9px 10px; border: 1px solid rgba(147, 164, 184, .1); border-radius: 9px; background: rgba(255, 255, 255, .02); }
.target-slide-content dt { color: #657285; font-size: .54rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.target-slide-content dd { margin: 3px 0 0; color: #d6e0ea; font-size: .68rem; font-weight: 700; }
.target-viewing-note { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; padding: 11px 12px; border-left: 3px solid #78dda9; border-radius: 8px; background: rgba(120, 221, 169, .055); }
.target-viewing-note > i { margin-top: 2px; color: #78dda9; font-size: .83rem; }
.target-viewing-note p { margin: 0; color: #97a5b5; font-size: .67rem; line-height: 1.45; }
.target-viewing-note strong { display: block; margin-bottom: 2px; color: #dce5ef; font-size: .66rem; }
.target-slide-content > a { display: inline-flex; align-items: center; gap: 7px; justify-self: start; color: #78dda9; font-size: .64rem; font-weight: 750; text-decoration: none; }
.target-slide-content > a:hover { color: #a7e8c5; }
.target-dialog-shell > footer { color: #657285; font-size: .61rem; letter-spacing: .06em; text-transform: uppercase; }
.hud-data-status { display: flex; justify-content: space-between; gap: 20px; color: #657285; font-size: clamp(.55rem, .64vw, .72rem); letter-spacing: .07em; text-transform: uppercase; }
.calendar-footer { display: flex; justify-content: space-between; gap: 20px; color: #657285; font-size: clamp(.55rem, .64vw, .72rem); letter-spacing: .07em; text-transform: uppercase; }
.hud-data-status i { margin-right: 5px; color: #78dda9; }

.calendar-slide { grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(14px, 1.35vw, 22px); background: radial-gradient(circle at 100% 0%, rgba(80, 112, 151, .13), transparent 28%), #05080c; }
.calendar-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; max-width: 54%; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; color: #8b98a8; font-size: clamp(.58rem, .65vw, .75rem); }
.calendar-legend i { width: 7px; height: 7px; border-radius: 3px; background: var(--calendar-colour, #64748b); box-shadow: 0 0 8px color-mix(in srgb, var(--calendar-colour, #64748b) 70%, transparent); }
.calendar-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: clamp(9px, .9vw, 15px); min-height: 0; }
.calendar-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; padding: clamp(9px, .8vw, 13px); overflow: hidden; border: 1px solid rgba(147, 164, 184, .13); border-radius: clamp(12px, 1vw, 18px); background: rgba(9, 14, 20, .7); }
.current-week-panel { grid-row: 1 / 3; }
.next-week-panel { grid-column: 2; grid-row: 1; }
.upcoming-events-panel { grid-column: 2; grid-row: 2; }
.calendar-section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 3px clamp(8px, .65vw, 11px); }
.calendar-section-header p { margin: 0 0 2px; color: #718094; font-size: clamp(.52rem, .56vw, .64rem); font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.calendar-section-header h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; margin: 0; font-size: clamp(.82rem, .95vw, 1.08rem); letter-spacing: -.02em; }
.calendar-section-header h2 small { color: #78dda9; font-size: inherit; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-section-header > i { color: #78dda9; font-size: clamp(.8rem, .9vw, 1rem); }
.calendar-section-header > span { color: #6f7e90; font-size: clamp(.52rem, .57vw, .65rem); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.current-week-calendar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); gap: clamp(5px, .45vw, 8px); min-height: 0; }
.next-week-calendar { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: clamp(5px, .45vw, 8px); min-height: 0; }
.next-week-calendar .calendar-day { grid-column: span 3; }
.next-week-calendar .calendar-day:nth-child(n + 5) { grid-column: span 4; }
.calendar-day { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; overflow: hidden; border: 1px solid rgba(147, 164, 184, .13); border-radius: clamp(10px, .9vw, 16px); background: linear-gradient(145deg, rgba(16, 23, 31, .94), rgba(8, 12, 17, .94)); }
.calendar-day.is-weekend { background: linear-gradient(145deg, rgba(20, 24, 35, .94), rgba(10, 12, 20, .94)); }
.calendar-day.is-today { border-color: rgba(120, 221, 169, .64); box-shadow: 0 0 0 1px rgba(120, 221, 169, .14), 0 0 28px rgba(120, 221, 169, .07); }
.calendar-day > header { --calendar-day-number-size: clamp(1.25rem, 1.55vw, 1.9rem); position: relative; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 7px; padding: clamp(7px, .62vw, 10px); border-bottom: 1px solid rgba(147, 164, 184, .1); }
.calendar-day > header span { grid-column: 1; grid-row: 1; color: #8794a4; font-size: clamp(.58rem, .65vw, .72rem); font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.calendar-day > header strong { grid-column: 2; grid-row: 1 / span 2; justify-self: center; font-size: var(--calendar-day-number-size); font-weight: 520; line-height: .9; letter-spacing: -.06em; }
.calendar-day > header small { grid-column: 1; grid-row: 2; color: #536173; font-size: clamp(.52rem, .58vw, .64rem); font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.calendar-day > header .calendar-robot-vacuum-icon { grid-column: 2; grid-row: 3; justify-self: center; color: var(--purple-400); font-size: 1.25rem; line-height: .9; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--purple-400) 42%, transparent)); }
.calendar-day > header em { position: absolute; right: 8px; bottom: 5px; color: #78dda9; font-size: clamp(.46rem, .49vw, .56rem); font-style: normal; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.calendar-events { display: grid; align-content: start; gap: clamp(3px, .3vw, 5px); min-height: 0; padding: clamp(5px, .45vw, 8px); overflow: hidden; }
.calendar-event { display: grid; grid-template-columns: auto max-content minmax(0, 1fr); align-items: start; gap: 6px; min-width: 0; padding: clamp(4px, .35vw, 6px); overflow: hidden; border-left: 3px solid var(--calendar-colour); border-radius: 6px; color: color-mix(in srgb, var(--calendar-colour) 40%, white); background: color-mix(in srgb, var(--calendar-colour) 12%, transparent); }
.calendar-event.is-title-only { grid-template-columns: auto minmax(0, 1fr); }
.calendar-event > i { color: var(--calendar-colour); font-size: 2rem; }
.calendar-event strong { min-width: 0; overflow-wrap: anywhere; font-size: 1.5rem; line-height: 1.25; white-space: normal; }
.calendar-event .calendar-birthday-title { grid-column: 2 / -1; }
.calendar-event small { color: color-mix(in srgb, var(--calendar-colour) 60%, #8491a1); font-size: 1.5rem; line-height: 1.25; white-space: normal; }
.calendar-event.is-birthday, .upcoming-event.is-birthday { color: white; background: linear-gradient(45deg, #c89b3c 0%, #8f3d5a 20%, #344b9b 40%, #3f6f5a 60%, #b85f3f 80%, #63447d 100%); }
.calendar-event.is-birthday > *, .upcoming-event.is-birthday > * { text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
.calendar-event.is-birthday > i, .upcoming-event.is-birthday > i { color: white; }
.calendar-event.is-birthday small, .upcoming-event.is-birthday small { color: white; }
.current-week-calendar .calendar-day { grid-column: 1 / -1; grid-template-columns: clamp(82px, 7.5vw, 108px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.current-week-calendar .calendar-day.is-current-weekend { grid-column: span 1; }
.current-week-calendar .calendar-day > header { border-right: 1px solid rgba(147, 164, 184, .1); border-bottom: 0; }
.current-week-calendar .calendar-day > header em { right: auto; left: 8px; }
.current-week-calendar .calendar-day-empty { grid-column: 1 / -1; }
.calendar-day-empty { align-self: center; padding-block: 18px; color: #465365; font-size: clamp(.58rem, .64vw, .72rem); text-align: center; }
.calendar-more { color: #718091; font-size: clamp(.52rem, .56vw, .64rem); }
.upcoming-events-list { display: grid; align-content: start; gap: clamp(7px, .6vw, 10px); min-height: 0; padding-right: 3px; overflow-y: auto; scrollbar-color: #334155 transparent; scrollbar-width: thin; }
.upcoming-event-day { display: grid; grid-template-columns: minmax(88px, .34fr) minmax(0, 1fr); gap: clamp(8px, .7vw, 12px); padding-bottom: clamp(7px, .6vw, 10px); border-bottom: 1px solid rgba(147, 164, 184, .1); }
.upcoming-event-day:last-child { padding-bottom: 0; border-bottom: 0; }
.upcoming-event-day > header { display: grid; align-content: start; gap: 2px; padding: 5px 0 0 3px; }
.upcoming-event-day > header strong { color: #d8e1eb; font-size: clamp(.62rem, .68vw, .78rem); }
.upcoming-event-day > header time { color: #718094; font-size: clamp(.52rem, .57vw, .65rem); font-weight: 700; }
.upcoming-event-day > div { display: grid; gap: 5px; }
.upcoming-event { display: grid; grid-template-columns: auto max-content minmax(0, 1fr); align-items: start; gap: 7px; min-width: 0; padding: clamp(5px, .42vw, 7px); border-left: 3px solid var(--calendar-colour); border-radius: 7px; color: color-mix(in srgb, var(--calendar-colour) 38%, white); background: color-mix(in srgb, var(--calendar-colour) 11%, transparent); }
.upcoming-event.is-title-only { grid-template-columns: auto minmax(0, 1fr); }
.upcoming-event > i { color: var(--calendar-colour); font-size: 1.44rem; }
.upcoming-event strong { min-width: 0; overflow-wrap: anywhere; font-size: clamp(1.16rem, 1.28vw, 1.46rem); line-height: 1.25; white-space: normal; }
.upcoming-event .upcoming-birthday-title { grid-column: 2 / -1; }
.upcoming-event small { color: #738296; font-size: clamp(.98rem, 1.06vw, 1.2rem); line-height: 1.25; white-space: normal; }
.upcoming-events-empty { display: grid; height: 100%; place-content: center; justify-items: center; gap: 8px; color: #566477; font-size: clamp(.58rem, .64vw, .72rem); }
.upcoming-events-empty i { color: #78dda9; font-size: 1.15rem; }
.calendar-feed-warning { color: #f6c76f; }
.hud-edge-next { display: none; }
.hud-transition, .hud-screen-wash { position: absolute; z-index: 80; inset: 0; pointer-events: none; opacity: 0; }
.hud-transition { background: #000; transition: opacity .26s ease; }
.hud-transition.is-visible { opacity: 1; }
.hud-screen-wash { z-index: 90; background: #fff; }
.hud-screen-wash.is-solid { opacity: 1; }
.hud-screen-wash.is-fading { opacity: 0; transition: opacity 5s linear; }

.home-hud:fullscreen { width: 100vw; height: 100vh; min-height: 100vh; border: 0; border-radius: 0; }
.home-hud:fullscreen .hud-preview-toolbar { display: none; }
.home-hud:fullscreen .hud-viewport { width: 100vw; height: 100vh; min-height: 100vh; overflow: hidden; }
.home-hud:fullscreen .dashboard-slides { min-width: 0; }
.home-hud:fullscreen .hud-slide { min-height: 100vh; }
.home-hud:fullscreen .calendar-slide { grid-template-rows: auto minmax(0, 1fr); }
.home-hud:fullscreen .calendar-footer { display: none; }
.home-hud:fullscreen .hud-edge-next { position: absolute; z-index: 60; top: 0; right: 0; display: block; width: 12vw; height: 100%; padding: 0; border: 0; opacity: 0; background: transparent; cursor: pointer; }

.tracker-page { width: 100%; height: calc(100dvh - 68px); min-height: 520px; margin: 0; padding: 15px; overflow: hidden; display: flex; flex-direction: column; }
.tracker-page .tracker-heading { flex: 0 0 auto; }
.tracker-page .forecast-panel { display: flex; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.tracker-page .table-scroll { width: 100%; max-height: none; flex: 1 1 auto; }
.tracker-page .transaction-scroll { flex: none; max-height: none; overflow: visible; }
.tracker-page .forecast-table { height: 100%; }
.tracker-page .forecast-table tfoot tr { height: 43px; }

@media (max-width: 980px) {
    .menu-grid, .profile-grid, .pin-settings-grid { grid-template-columns: 1fr; }
    .school-terms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .robot-vacuum-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .birthday-config-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-config-fields { grid-template-columns: 1fr; }
    .calendar-colour-picker { grid-column: auto; }
    .menu-card { min-height: 175px; }
    .menu-number { margin-bottom: 30px; }
    .budget-layout { grid-template-columns: 1fr; }
    .category-panel { position: static; }
    .item-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .shell, .wide-shell { width: min(100% - 24px, 1180px); }
    .page-shell { padding-block: 38px 65px; }
    .header-inner { min-height: 62px; }
    .site-header nav > a { display: none; }
    .wordmark { font-size: 15px; }
    .login-card { padding: 28px 22px; }
    .heading-row, .tracker-heading { align-items: flex-start; flex-direction: column; }
    .page-heading { margin-bottom: 28px; }
    .panel { padding: 19px; }
    .profile-tabs, .refresh-settings-grid, .school-terms-grid { grid-template-columns: 1fr; }
    .robot-vacuum-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-tabs { display: grid; }
    .calendar-config-row, .birthday-config-row { padding: 14px; }
    .calendar-config-panel .section-heading.spread, .birthday-config-panel .section-heading.spread { align-items: stretch; flex-direction: column; }
    .calendar-config-panel .section-heading .button, .birthday-config-panel .section-heading .button { width: 100%; }
    .birthday-config-fields { grid-template-columns: 1fr; }
    .dashboard-config-actions { align-items: stretch; flex-direction: column-reverse; }
    .dashboard-config-actions .button { width: 100%; }
    .hud-page { padding: 10px; }
    .home-hud { min-height: calc(100dvh - 82px); border-radius: 13px; }
    .hud-preview-toolbar { align-items: flex-start; flex-direction: column; }
    .hud-preview-status { flex-wrap: wrap; }
    .hud-preview-actions, .hud-preview-actions .button { width: 100%; }
    .hud-viewport { height: 700px; }
    .target-dialog-shell { padding: 16px; }
    .target-slide { grid-template-columns: 1fr; gap: 15px; }
    .target-slide figure { min-height: 210px; max-height: 240px; }
    .target-slide-content dl { grid-template-columns: 1fr; }
    .pin-challenge-page { min-height: calc(100vh - 62px); }
    .pin-challenge-panel { padding: 30px 20px; }
    .form-grid-three, .category-create, .item-form { grid-template-columns: 1fr; }
    .span-two, .span-full { grid-column: auto; }
    .custom-frequency { grid-template-columns: 1fr; }
    .tracker-card { align-items: flex-start; flex-direction: column; }
    .row-actions { width: 100%; flex-wrap: wrap; }
    .floating-form { right: auto; left: 0; }
    .category-row { align-items: flex-start; flex-direction: column; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
    .category-name-form { width: 100%; }
    .tracker-heading { margin-bottom: 20px; }
    .tracker-tools { width: 100%; justify-content: stretch; }
    .view-switcher { width: 100%; }
    .view-switcher a { flex: 1; text-align: center; }
    .year-switcher { width: 100%; }
    .year-switcher select { width: 100%; }
    .budget-sections { width: 100%; }
    .budget-sections a { flex: 1; justify-content: center; }
    .source-picker { grid-template-columns: 1fr; }
    .tracker-tools > .button { width: 100%; }
    .item-modal { width: calc(100% - 20px); }
    .item-form { padding: 18px; }
    .modal-delete-form { grid-template-columns: 1fr; margin: 0 18px 18px; }
    .modal-delete-form .button { width: 100%; }
    .security-card-heading, .security-row { align-items: flex-start; flex-direction: column; }
    .security-card-heading .button { width: 100%; }
    .authenticator-grid, .recovery-grid { grid-template-columns: 1fr; }
    .authenticator-grid { padding: 18px; }
    .tracker-page { width: 100%; height: calc(100dvh - 62px); min-height: 480px; padding: 15px; }
    .forecast-table th:first-child, .forecast-table td:first-child { width: 210px; min-width: 210px; }
}
