:root {
    --ink: #1d2924;
    --muted: #66736d;
    --paper: #f6f4ee;
    --card: #fffdfa;
    --line: #deded5;
    --green: #286347;
    --green-soft: #dfece4;
    --amber-soft: #f5e7bd;
    --blue-soft: #dfe9ef;
    --shadow: 0 18px 55px rgba(37, 53, 45, 0.08);
}

.rail-metrics > a {
    min-height: 48px;
    padding: 11px 8px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 120ms ease;
}
.rail-metrics > a span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.rail-metrics > a strong { color: var(--ink); font-size: 1rem; }
.rail-metrics > a:hover, .rail-metrics > a:focus-visible { background: var(--green-soft); }
.rail-metrics > a:hover span, .rail-metrics > a:focus-visible span { color: var(--green); }

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a { color: inherit; }

.chore-list-tools { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.edit-mode-control { display: flex; align-items: center; gap: 10px; font-weight: 750; }
.edit-mode-control input { appearance: none; width: 46px; height: 26px; border-radius: 20px; background: #a8b2aa; cursor: pointer; position: relative; }
.edit-mode-control input::after { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; background: white; border-radius: 50%; }
.edit-mode-control input:checked { background: var(--green); }
.edit-mode-control input:checked::after { left: 23px; }

button, input { font: inherit; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #7da68d;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--ink);
    color: white;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    width: 100%;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 250, 0.96);
}

.site-header-top {
    width: min(1180px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 760;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--green);
    color: white;
    font-family: Georgia, serif;
}

.phase-pill, .date-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    font-weight: 700;
}

.account-nav {
    min-height: 52px;
    padding: 0 max(20px, calc((100% - 1180px) / 2));
    display: flex;
    align-items: center;
    gap: 34px;
    border-top: 1px solid var(--line);
    background: #edf1ec;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 750;
}

.account-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.account-nav form { margin: 0; }
.account-nav form:last-child { margin-left: auto; }

.signed-in-person {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.signed-in-person > span:last-child { display: grid; }
.signed-in-person strong { font-size: 0.84rem; }
.signed-in-person small { color: var(--muted); font-size: 0.72rem; }

.person-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #bfc8c1;
    border-radius: 50%;
    color: var(--green);
    font-weight: 850;
}

.text-button {
    min-height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 750;
}

main { overflow: hidden; }

.hero {
    width: min(900px, calc(100% - 40px));
    margin: 74px auto 82px;
    text-align: center;
}

.eyebrow {
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    margin: 12px auto 20px;
    max-width: 760px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.2rem, 8vw, 6.5rem);
    font-weight: 500;
    letter-spacing: -0.065em;
    line-height: 0.94;
}

.hero-copy {
    max-width: 650px;
    margin: 0 auto;
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.2rem);
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.primary-action, .secondary-action {
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 750;
    text-decoration: none;
}

.primary-action { background: var(--green); color: white; }
.secondary-action { border: 1px solid var(--line); background: var(--card); }

.primary-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    background: var(--green);
    color: white;
    cursor: pointer;
    font-weight: 800;
}

.preview {
    width: min(1040px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 253, 250, 0.82);
    box-shadow: var(--shadow);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

h2 {
    margin: 6px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    font-weight: 500;
    letter-spacing: -0.035em;
}

.card-grid { display: grid; gap: 12px; }

.task-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
}

.task-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-weight: 850;
}

.task-icon.zero { background: var(--green-soft); color: var(--green); }
.task-icon.paid { background: var(--amber-soft); color: #72530f; }
.task-icon.calm { background: var(--blue-soft); color: #315970; }

.task-copy h3 { margin-bottom: 3px; font-size: 1rem; }
.task-copy p { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }
.reward { color: var(--green); font-weight: 800; font-size: 0.86rem; }

.auth-shell {
    width: min(1000px, calc(100% - 40px));
    min-height: calc(100vh - 110px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr minmax(340px, 440px);
    align-items: center;
    gap: clamp(40px, 8vw, 100px);
    padding: 50px 0 90px;
}

.auth-intro p, .dashboard-heading p, .status-shell p {
    max-width: 560px;
    color: var(--muted);
}

.auth-title {
    margin: 12px 0 20px;
    font-size: clamp(3rem, 6vw, 5.6rem);
    text-align: left;
}

.auth-card {
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.card-heading h2 { margin-bottom: 4px; }
.card-heading p { margin-bottom: 24px; color: var(--muted); }

.auth-form { display: grid; gap: 18px; }
.field-group { display: grid; gap: 7px; }
.field-group label { font-size: 0.84rem; font-weight: 780; }

.field-group input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    color: var(--ink);
    outline: none;
}

.field-group input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-soft);
}

.form-alert {
    margin-bottom: 18px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #f8e4df;
    color: #7b3528;
    font-size: 0.86rem;
}

.field-error { margin: 0; color: #7b3528; font-size: 0.8rem; }
.privacy-note { margin: 20px 0 0; color: var(--muted); font-size: 0.78rem; text-align: center; }

.dashboard-shell {
    width: min(1040px, calc(100% - 40px));
    margin: 58px auto 0;
    padding-bottom: 70px;
}

.dashboard-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-heading p { margin-bottom: 0; }

.dashboard-title {
    margin: 8px 0 12px;
    max-width: 800px;
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-align: left;
}

.role-chip {
    flex: none;
    padding: 9px 13px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 800;
}

.role-chip.parent { background: var(--amber-soft); color: #72530f; }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.summary-card {
    min-height: 130px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
}

.summary-card strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.2rem;
    font-weight: 500;
}

.summary-card span { color: var(--muted); font-size: 0.86rem; font-weight: 700; }
.summary-card.attention { background: #fffaf0; }

.empty-panel {
    min-height: 300px;
    padding: 44px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cdd2ca;
    border-radius: 24px;
    text-align: center;
}

.empty-panel h2 { margin: 16px 0 8px; }
.empty-panel p { max-width: 470px; margin-bottom: 0; color: var(--muted); }

.empty-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 900;
}

.empty-icon.parent { background: var(--amber-soft); color: #72530f; }

.status-shell {
    width: min(600px, calc(100% - 40px));
    margin: 110px auto;
    text-align: center;
}

.status-shell .empty-icon { margin: 0 auto 20px; }
.status-title { margin-bottom: 14px; font-size: clamp(2.5rem, 7vw, 4.5rem); }
.status-shell p { margin: 0 auto; }

.message-stack {
    position: relative;
    z-index: 2;
    width: min(1040px, calc(100% - 40px));
    margin: 10px auto -28px;
    display: grid;
    gap: 8px;
}

.message {
    padding: 12px 15px;
    border: 1px solid #bed6c5;
    border-radius: 12px;
    background: #e7f2e9;
    color: #24513a;
    font-size: 0.88rem;
    font-weight: 700;
}

.message.info { border-color: #c8d5dc; background: #edf3f6; color: #315970; }
.message.error { border-color: #dfbdb5; background: #f8e4df; color: #7b3528; }

.content-shell, .form-shell {
    width: min(1040px, calc(100% - 40px));
    margin: 58px auto 0;
    padding-bottom: 70px;
}

.narrow-shell { max-width: 800px; }

.content-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.content-heading p { max-width: 600px; margin-bottom: 0; color: var(--muted); }

.page-title {
    margin: 7px 0 10px;
    font-size: clamp(3rem, 7vw, 5.5rem);
    text-align: left;
}

.primary-action.compact, .secondary-action.compact { min-height: 42px; margin-top: 20px; }

.chore-list, .request-list { display: grid; gap: 12px; }

.chore-card {
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
}

.chore-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.chore-title-line h2 { margin: 0; font-family: inherit; font-size: 1.08rem; font-weight: 800; }
.chore-main > p { margin: 7px 0; color: var(--muted); font-size: 0.9rem; }

.reward-badge {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--amber-soft);
    color: #72530f;
    font-size: 0.76rem;
    font-weight: 850;
}

.reward-badge.zero { background: var(--green-soft); color: var(--green); }

.chore-meta {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 0.78rem;
}

.chore-meta span:not(:last-child)::after { content: "·"; margin-left: 7px; }

.chore-actions {
    display: flex;
    gap: 8px;
}

.chore-actions a, .below-list-link a, .panel-heading a, .attention-bar a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    color: var(--green);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.chore-actions .quiet-danger { color: #8b4a3c; }
.below-list-link { margin-top: 20px; }

.form-shell { max-width: 820px; }
.form-page-heading { margin-bottom: 24px; }

.chore-form { display: grid; gap: 16px; }

.form-section {
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
}

.form-section h2 { margin-bottom: 18px; font-family: inherit; font-size: 1.05rem; font-weight: 850; }
.section-help { margin: -10px 0 20px; color: var(--muted); font-size: 0.84rem; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field-group.wide { grid-column: 1 / -1; }
[data-schedule-for][hidden] { display: none; }
.field-label { font-size: 0.84rem; font-weight: 780; }
.help-text { color: var(--muted); font-size: 0.76rem; }

.form-control {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: white;
    color: var(--ink);
    outline: none;
}

textarea.form-control { resize: vertical; }
.form-control:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

.weekday-options ul {
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
}

.weekday-options label {
    min-height: 42px;
    padding: 9px 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-size: 0.78rem;
}

.form-actions, .confirm-actions, .request-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.primary-button.fit { width: auto; padding-inline: 20px; }

.danger-button, .secondary-button {
    min-height: 46px;
    padding: 11px 17px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
}

.danger-button { border-color: #dfbdb5; background: #f8e4df; color: #7b3528; }
.confirm-shell p { max-width: 500px; }
.confirm-actions { justify-content: center; margin-top: 26px; }
.empty-icon.danger { background: #f8e4df; color: #7b3528; }

.request-card {
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
}

.request-card h2 { margin: 4px 0; font-family: inherit; font-size: 1.05rem; font-weight: 850; }
.request-card p { margin: 0; color: var(--muted); }
.request-person { color: var(--green); font-size: 0.76rem; font-weight: 800; }

.attention-bar {
    margin-bottom: 18px;
    padding: 14px 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 14px;
    background: var(--amber-soft);
    color: #654b17;
    font-size: 0.88rem;
    font-weight: 750;
}

.today-panel {
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
}

.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-heading h2 { margin: 0; }
.compact-list { margin-top: 14px; display: grid; }

.compact-row {
    min-height: 64px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.compact-row span { display: grid; }
.compact-row small { color: var(--muted); }
.compact-row b { color: var(--green); }

.row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.row-actions form { margin: 0; }

.done-button {
    min-height: 42px;
    padding: 9px 13px;
    border: 0;
    border-radius: 12px;
    background: var(--green);
    color: white;
    cursor: pointer;
    font-weight: 800;
}

.dashboard-links {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.dashboard-links a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    color: var(--green);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.review-attention { background: var(--blue-soft); color: #315970; }
.payment-attention { background: var(--green-soft); color: #24513a; }

.workflow-list, .history-list { display: grid; gap: 12px; }

.workflow-card, .history-card {
    padding: clamp(18px, 4vw, 26px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
}

.workflow-heading, .history-main {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}

.workflow-heading h2, .history-main h2 {
    margin: 3px 0;
    font-family: inherit;
    font-size: 1.08rem;
    font-weight: 850;
}

.workflow-heading p, .history-main p { margin: 0; color: var(--muted); font-size: 0.84rem; }

.status-badge {
    flex: none;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: #315970;
    font-size: 0.74rem;
    font-weight: 850;
}

.status-badge.approved, .status-badge.paid { background: var(--green-soft); color: var(--green); }
.status-badge.awaiting_payment { background: var(--amber-soft); color: #72530f; }
.status-badge.needs_work { background: #f8e4df; color: #7b3528; }

.item-note {
    margin: 15px 0 0;
    padding: 11px 13px;
    border-radius: 11px;
    background: #f2f1ec;
    color: var(--muted);
    font-size: 0.84rem;
}

.review-form {
    margin-top: 18px;
    padding-top: 16px;
    display: grid;
    gap: 9px;
    border-top: 1px solid var(--line);
}

.review-form label { font-size: 0.8rem; font-weight: 800; }
.review-form label span { color: var(--muted); font-weight: 500; }
.review-form input, .payment-form input, .history-filter select {
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: white;
    color: var(--ink);
    font: inherit;
}

.payment-heading { align-items: center; }

.total-chip {
    min-width: 135px;
    padding: 13px 16px;
    display: grid;
    border-radius: 16px;
    background: var(--green-soft);
    color: var(--green);
}

.total-chip span { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.total-chip strong { font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.payment-amount { color: var(--green); font-family: Georgia, serif; font-size: 1.7rem; }

.payment-form {
    margin-top: 18px;
    padding-top: 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
    border-top: 1px solid var(--line);
}

.history-heading { align-items: center; }

.history-filter { display: grid; gap: 5px; }
.history-filter label { color: var(--muted); font-size: 0.72rem; font-weight: 800; }
.history-filter select { min-width: 170px; }

.history-state { display: flex; align-items: center; gap: 10px; }
.history-state strong { color: var(--green); }

.event-line {
    margin: 16px 0 0;
    padding: 14px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
    border-top: 1px solid var(--line);
    list-style: none;
}

.event-line li { display: flex; gap: 6px; color: var(--muted); font-size: 0.75rem; }
.event-line span { color: var(--ink); font-weight: 750; }

footer {
    width: min(1040px, calc(100% - 40px));
    margin: 28px auto 0;
    padding: 22px 0 42px;
    color: var(--muted);
    text-align: center;
    font-size: 0.82rem;
}

/* Account-style dashboard layout */
.account-dashboard {
    width: min(1180px, calc(100% - 40px));
    margin-top: 38px;
}

.bank-heading { margin-bottom: 26px; }
.bank-heading .dashboard-title {
    margin: 5px 0 3px;
    font-family: inherit;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 650;
    letter-spacing: -0.045em;
}

.dashboard-workspace {
    display: grid;
    grid-template-columns: 275px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.overview-rail { display: grid; gap: 12px; }
.rail-label {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.rail-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
}

.rail-card-title {
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--green);
    font-size: 0.94rem;
    font-weight: 850;
}

.mini-mark {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--green-soft);
    font-family: Georgia, serif;
}
.mini-mark.parent { background: var(--amber-soft); color: #72530f; }

.rail-metrics { margin: 0; padding: 0 18px 14px; }
.rail-metrics > div {
    padding: 11px 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
}
.rail-metrics dt { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.rail-metrics dd { margin: 0; color: var(--ink); font-size: 1rem; font-weight: 850; }

.rail-card-link {
    min-height: 46px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #edf1ec;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 850;
    text-decoration: none;
}

.quick-links { display: grid; }
.quick-links a {
    min-height: 50px;
    padding: 10px 16px;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 780;
    text-decoration: none;
}
.quick-links a:last-child { border-bottom: 0; }
.quick-links a > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #c8d1ca;
    border-radius: 9px;
    color: var(--green);
}
.quick-links a > b {
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--amber-soft);
    color: #72530f;
    text-align: center;
    font-size: 0.7rem;
}

.dashboard-main { min-width: 0; display: grid; gap: 18px; }

.dashboard-hero {
    min-height: 230px;
    padding: clamp(26px, 4vw, 42px);
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    position: relative;
    border-radius: 19px;
    background: var(--green);
    color: white;
    box-shadow: var(--shadow);
}

.dashboard-hero::before,
.dashboard-hero::after {
    content: "";
    position: absolute;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.07);
    transform: rotate(35deg);
}
.dashboard-hero::before { width: 360px; height: 180px; right: -70px; top: -70px; }
.dashboard-hero::after { width: 300px; height: 130px; left: 30%; bottom: -100px; }
.parent-hero { background: #3f594a; }
.dashboard-hero > * { position: relative; z-index: 1; }
.hero-kicker {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.dashboard-hero h2 {
    max-width: 560px;
    margin: 0;
    font-family: inherit;
    font-size: clamp(1.65rem, 3.5vw, 2.65rem);
    font-weight: 650;
    line-height: 1.08;
}
.dashboard-hero p { max-width: 560px; margin: 13px 0 0; color: rgba(255, 255, 255, 0.78); }
.hero-stat {
    min-width: 155px;
    padding-left: 24px;
    display: grid;
    border-left: 1px solid rgba(255, 255, 255, 0.38);
}
.hero-stat strong { font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 500; }
.hero-stat span { color: rgba(255, 255, 255, 0.75); font-size: 0.76rem; font-weight: 750; }
.hero-queue-link { color: inherit; text-decoration: none; }
.hero-queue-link:hover, .hero-queue-link:focus-visible { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.hero-queue-link:focus-visible { outline: 3px solid white; outline-offset: 5px; }

.dashboard-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dashboard-action-card {
    min-height: 112px;
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    text-decoration: none;
}
.dashboard-action-card.active { border-color: #a8c4b1; box-shadow: 0 10px 30px rgba(37, 53, 45, 0.07); }
.dashboard-action-card > span:nth-child(2) { display: grid; }
.dashboard-action-card small { color: var(--muted); font-size: 0.74rem; font-weight: 750; }
.dashboard-action-card strong { font-size: 1.04rem; }
.dashboard-action-card > b { color: var(--green); }
.action-icon, .task-check {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 900;
}
.action-icon.money { background: var(--amber-soft); color: #72530f; }

.dashboard-card {
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--card);
}
.dashboard-card .panel-heading { align-items: end; }
.dashboard-card .panel-heading h2 { margin: 2px 0 0; font-family: inherit; font-size: 1.3rem; font-weight: 800; }
.section-kicker { color: var(--muted); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.count-chip { min-width: 30px; padding: 4px 9px; border-radius: 999px; background: #f8e4df; color: #7b3528; text-align: center; font-size: 0.78rem; font-weight: 850; }
.action-list { margin-top: 16px; }
.action-row {
    min-height: 72px;
    padding: 13px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--line);
}
.action-row-link { color: inherit; text-decoration: none; }
.action-row:first-child { border-top: 0; }
.action-copy { min-width: 0; flex: 1; }
.action-copy > strong { display: block; }
.action-copy p { margin: 3px 0 0; color: var(--muted); font-size: 0.78rem; }
.action-copy p b { color: #7b3528; }
.action-reward { flex: none; color: var(--green); }
.task-check { width: 36px; height: 36px; flex: none; }
.task-check.parent { background: var(--blue-soft); color: #315970; font-size: 0.76rem; }
.row-arrow { color: var(--green); font-weight: 850; }

.needs-work-panel { border-left: 4px solid #b86551; }
.needs-work-row { align-items: start; }
.resubmit-form { width: min(380px, 48%); display: flex; gap: 8px; }
.resubmit-form input {
    min-width: 0;
    flex: 1;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: white;
}

.dashboard-notice {
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 14px;
    background: var(--amber-soft);
    color: #654b17;
}
.dashboard-notice > span { display: grid; font-size: 0.8rem; }
.dashboard-notice a { color: inherit; font-size: 0.8rem; font-weight: 850; }
.dashboard-empty { min-height: 105px; display: flex; align-items: center; justify-content: center; gap: 13px; color: var(--muted); }
.dashboard-empty > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 900; }
.dashboard-empty p { margin: 2px 0 0; font-size: 0.8rem; }

/* Plaid bank balance card */
.child-balance { display: grid; gap: 6px; padding: 12px 0; }
.child-balance .balance-value { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--green); line-height: 1.15; }
.child-balance small { color: var(--muted); }
.child-balance-card { border-top: 4px solid var(--green); }
.transaction-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 15px 0; }
.transaction-filter input { width: 85px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.transaction-pagination { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.bank-account-picker { margin-top: 14px; font-size: 0.85rem; }
.bank-account-picker summary { cursor: pointer; color: var(--green); }
.bank-account-picker form { display: grid; gap: 12px; margin-top: 12px; }
.bank-account-picker p { margin: 0; color: var(--muted); }
.bank-account-picker label { display: flex; gap: 8px; align-items: center; }
.bank-account-picker input { width: auto; }
.bank-panel-heading { align-items: center; }
.bank-panel-heading form { margin: 0; }
.plaid-connect-button { width: auto; padding: 9px 14px; }
.bank-setup-state { padding: 28px 18px; border-radius: 14px; background: var(--blue-soft); text-align: center; }
.bank-setup-state p { margin: 5px 0 0; color: var(--muted); font-size: 0.8rem; }
.bank-connection-list { display: grid; gap: 14px; }
.bank-connection { padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.bank-connection > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bank-connection > header > div:first-child { display: grid; }
.bank-connection small { color: var(--muted); font-size: 0.72rem; }
.bank-actions { display: flex; align-items: center; gap: 12px; }
.bank-actions form { margin: 0; }
.bank-actions .danger { color: #8a3529; }
.bank-account-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); }
.bank-account-row:first-of-type { margin-top: 12px; }
.bank-account-row > span { display: grid; }
.bank-account-row > b { color: var(--green); }
.bank-error { margin: 12px 0 0; padding: 9px 11px; border-radius: 10px; background: #f8e4df; color: #7b3528; font-size: 0.78rem; }
.bank-empty { margin: 14px 0 0; color: var(--muted); font-size: 0.8rem; }
.plaid-status { min-height: 1em; margin: 10px 0 0; color: var(--muted); font-size: 0.78rem; }
.plaid-status:empty { margin: 0; min-height: 0; }
.plaid-status.error { color: #7b3528; }

/* Notification preferences */
.notification-shell { max-width: 900px; }
.notification-heading { align-items: center; }
.notification-heading .page-title { font-size: clamp(2.6rem, 7vw, 5rem); }
.delivery-state {
    flex: none;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 850;
}
.delivery-state.ready { background: var(--green-soft); color: var(--green); }
.delivery-state.paused { background: var(--amber-soft); color: #72530f; }
.settings-notice {
    margin-bottom: 16px;
    padding: 15px 17px;
    display: grid;
    border-radius: 14px;
    background: var(--blue-soft);
    color: #315970;
    font-size: 0.82rem;
}
.notification-form { display: grid; gap: 14px; }
.settings-card, .delivery-history {
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
}
.settings-card-heading { margin-bottom: 20px; display: flex; align-items: center; gap: 13px; }
.settings-card-heading h2, .delivery-history h2 { margin: 0; font-family: inherit; font-size: 1.2rem; font-weight: 850; }
.settings-card-heading p { margin: 2px 0 0; color: var(--muted); font-size: 0.8rem; }
.settings-icon {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 900;
}
.preference-list { border-top: 1px solid var(--line); }
.preference-row {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}
.preference-row:last-child { border-bottom: 0; }
.preference-row > span { display: grid; }
.preference-row strong { font-size: 0.88rem; }
.preference-row small { color: var(--muted); font-size: 0.76rem; }
.master-switch { margin-top: 18px; padding: 12px 15px; border: 0; border-radius: 13px; background: #f0f2ed; }
.preference-row input[type="checkbox"] {
    width: 46px;
    height: 26px;
    flex: none;
    appearance: none;
    position: relative;
    border-radius: 999px;
    background: #c6cbc6;
    cursor: pointer;
    transition: background 150ms ease;
}
.preference-row input[type="checkbox"]::after {
    content: "";
    width: 20px;
    height: 20px;
    position: absolute;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    transition: transform 150ms ease;
}
.preference-row input[type="checkbox"]:checked { background: var(--green); }
.preference-row input[type="checkbox"]:checked::after { transform: translateX(20px); }
.preference-row input[type="checkbox"]:focus-visible { outline: 3px solid var(--green-soft); outline-offset: 2px; }
.summary-options { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.delivery-history { margin-top: 26px; }
.delivery-list { margin-top: 14px; }
.delivery-row {
    min-height: 66px;
    padding: 11px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--line);
}
.delivery-row > span:first-child { min-width: 0; display: grid; }
.delivery-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.84rem; }
.delivery-row small { color: var(--muted); font-size: 0.74rem; }
.status-badge.pending { background: var(--amber-soft); color: #72530f; }
.status-badge.failed { background: #f8e4df; color: #7b3528; }
.status-badge.sent { background: var(--green-soft); color: var(--green); }

@media (max-width: 850px) and (min-width: 621px) {
    .dashboard-workspace { grid-template-columns: 225px minmax(0, 1fr); gap: 18px; }
    .dashboard-hero { align-items: start; flex-direction: column; }
    .hero-stat { width: 100%; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.38); border-left: 0; }
    .dashboard-action-grid { grid-template-columns: 1fr; }
    .resubmit-form { width: 100%; }
    .needs-work-row { flex-wrap: wrap; }
}

@media (max-width: 620px) {
    .site-header-top { width: min(100% - 28px, 1120px); min-height: 66px; }
    .phase-pill { display: none; }
    .hero { width: min(100% - 28px, 900px); margin: 48px auto 58px; text-align: left; }
    h1 { font-size: clamp(3.4rem, 18vw, 5rem); }
    .hero-actions { justify-content: stretch; }
    .primary-action, .secondary-action { width: 100%; }
    .preview { width: min(100% - 20px, 1040px); padding: 22px 14px; border-radius: 24px; }
    .date-chip { display: none; }
    .task-card { grid-template-columns: auto 1fr; align-items: start; padding: 15px; }
    .reward { grid-column: 2; }
    .account-nav { width: 100%; min-height: 48px; padding: 0 14px; justify-content: space-between; gap: 8px; font-size: 0.76rem; }
    .account-nav form:last-child { margin-left: 0; }
    .signed-in-person small { display: none; }
    .auth-shell { width: min(100% - 28px, 1000px); min-height: auto; grid-template-columns: 1fr; gap: 30px; padding: 48px 0 60px; }
    .auth-title { font-size: clamp(3rem, 15vw, 4.3rem); }
    .auth-card { padding: 22px 18px; border-radius: 22px; }
    .dashboard-shell { width: min(100% - 28px, 1040px); margin-top: 42px; }
    .dashboard-heading { align-items: start; flex-direction: column; margin-bottom: 24px; }
    .dashboard-title { font-size: clamp(2.8rem, 15vw, 4.4rem); }
    .summary-grid { grid-template-columns: 1fr; }
    .summary-card { min-height: 96px; padding: 17px; }
    .empty-panel { min-height: 250px; padding: 34px 18px; }
    .message-stack { width: min(100% - 28px, 1040px); margin-bottom: -18px; }
    .content-shell, .form-shell { width: min(100% - 28px, 1040px); margin-top: 42px; }
    .content-heading { align-items: stretch; flex-direction: column; }
    .content-heading > .primary-action { width: 100%; }
    .page-title { font-size: clamp(3rem, 17vw, 4.7rem); }
    .chore-card { grid-template-columns: 1fr; gap: 12px; padding: 17px; }
    .chore-actions { border-top: 1px solid var(--line); padding-top: 6px; }
    .chore-actions a { flex: 1; }
    .form-grid { grid-template-columns: 1fr; }
    .field-group.wide { grid-column: auto; }
    .form-actions { align-items: stretch; flex-direction: column; }
    .form-actions .primary-button.fit, .form-actions .secondary-action { width: 100%; }
    .request-card { align-items: stretch; flex-direction: column; }
    .request-actions { align-items: stretch; }
    .request-actions form { flex: 1; }
    .request-actions button { width: 100%; }
    .attention-bar { align-items: start; flex-direction: column; }
    .compact-row { align-items: start; flex-direction: column; }
    .row-actions { width: 100%; justify-content: space-between; }
    .workflow-heading, .history-main { align-items: start; flex-direction: column; }
    .request-actions { flex-direction: column; }
    .request-actions .primary-button.fit, .request-actions .secondary-button { width: 100%; }
    .payment-heading, .history-heading { align-items: stretch; }
    .total-chip { width: 100%; }
    .payment-form { grid-template-columns: 1fr; }
    .payment-form .primary-button.fit { width: 100%; }
    .history-filter select { width: 100%; }
    .history-state { width: 100%; justify-content: space-between; }
    .account-dashboard { width: min(100% - 20px, 1180px); margin-top: 28px; }
    .bank-heading { margin-left: 4px; }
    .dashboard-workspace { grid-template-columns: 1fr; gap: 18px; }
    .overview-rail { grid-template-columns: 1fr; }
    .overview-rail .rail-label { display: none; }
    .quick-links { grid-template-columns: repeat(3, 1fr); }
    .quick-links a { min-height: 76px; padding: 10px 6px; grid-template-columns: 1fr; justify-items: center; gap: 4px; border-right: 1px solid var(--line); border-bottom: 0; text-align: center; font-size: 0.7rem; }
    .quick-links a:last-child { border-right: 0; }
    .quick-links a > b { position: absolute; }
    .dashboard-hero { min-height: 245px; padding: 25px 21px; align-items: start; flex-direction: column; }
    .hero-stat { width: 100%; padding: 15px 0 0; border-top: 1px solid rgba(255,255,255,.38); border-left: 0; }
    .dashboard-action-grid { grid-template-columns: 1fr; }
    .dashboard-card { padding: 19px 16px; }
    .bank-panel-heading, .bank-connection > header { align-items: stretch; flex-direction: column; }
    .plaid-connect-button { width: 100%; }
    .bank-actions { justify-content: space-between; }
    .action-row { align-items: flex-start; flex-wrap: wrap; }
    .action-row form:not(.resubmit-form) { margin-left: 50px; }
    .resubmit-form { width: 100%; flex-direction: column; }
    .resubmit-form .done-button { width: 100%; }
    .dashboard-notice { align-items: flex-start; flex-direction: column; }
    .notification-heading { align-items: flex-start; }
    .delivery-state { margin-top: -8px; }
    .settings-card, .delivery-history { padding: 19px 16px; }
    .summary-options { grid-template-columns: 1fr; }
    .preference-row { gap: 12px; }
    .delivery-row { align-items: flex-start; flex-direction: column; gap: 7px; }
    .delivery-row strong { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
}
