/* =====================================================================
   Chandler Memorial — Level 4 family-flow styles
   Layered on top of theme.css (which provides the color tokens).
   ===================================================================== */

.family-body { padding-bottom: 100px; }

/* ===================== Slim brand bar ===================== */
.brand-bar {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: var(--shadow-sm);
}
.brand-bar__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    border: none;
    flex: 1;
    min-width: 0;
}
.brand-bar__logo-img {
    height: 56px;
    width: auto;
    flex-shrink: 0;
    display: block;
}
.brand-bar__reset {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink-mute);
    padding: 8px 14px;
    border-radius: var(--rad-sm);
    font-family: var(--sans);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.brand-bar__reset:hover {
    border-color: var(--maroon);
    color: var(--maroon);
}
.brand-bar__call {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--maroon);
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    flex-shrink: 0;
}
.brand-bar__call svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
    .brand-bar { padding: 8px 10px; gap: 8px; }
    .brand-bar__logo-img { height: 48px; }
    .brand-bar__reset { padding: 6px 10px; font-size: 0.72rem; }
}

@media (min-width: 1024px) {
    .brand-bar { padding: 16px 32px; }
    .brand-bar__logo-img { height: 76px; }
}

/* ===================== Loved-one banner ===================== */
.loved-one-banner {
    background: var(--maroon);
    color: var(--paper);
    padding: 10px 16px;
    text-align: center;
    font-size: 0.85rem;
    position: sticky;
    top: 58px;
    z-index: 29;
    box-shadow: var(--shadow-sm);
}
.loved-one-banner strong {
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--gold-soft);
    font-weight: 500;
}

@media (max-width: 480px) {
    .loved-one-banner { top: 54px; }
}

/* ===================== Welcome / intro ===================== */
.welcome {
    text-align: center;
    padding: 36px 22px 28px;
    max-width: 620px;
    margin: 0 auto;
}
.welcome__title {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    color: var(--maroon);
    margin: 0 0 6px;
    line-height: 1.15;
    font-weight: 400;
}
.welcome__lede {
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 540px;
    margin: 16px auto 0;
}
.welcome__lede:first-of-type { margin-top: 18px; }

/* ===================== Sections ===================== */
.sections {
    padding: 0 14px;
    max-width: 720px;
    margin: 0 auto;
}

/* ===================== Layout (mobile: sections only; desktop: sidebar + sections) ===================== */
.layout {
    display: block;
}

@media (min-width: 1024px) {
    .layout {
        display: grid;
        /* Sidebar on left, content on right */
        grid-template-columns: 340px minmax(0, 1fr);
        gap: 32px;
        max-width: 1180px;
        margin: 0 auto;
        padding: 0 24px;
        align-items: start;
    }
    .sections {
        padding: 0;
        max-width: none;
        margin: 0;
        min-width: 0;
        grid-column: 2;        /* sections in the right column */
        grid-row: 1;
    }
    .plan-sidebar {
        grid-column: 1;        /* sidebar in the left column */
        grid-row: 1;
    }
}

@media (min-width: 1280px) {
    .layout {
        grid-template-columns: 380px minmax(0, 1fr);
        max-width: 1280px;
    }
}

/* ===================== Desktop typography boost ===================== */
/* Larger text sizes for the desktop reading distance.
   Mobile sizes stay as-is since touch targets and viewport width
   require their own carefully tuned values. */
@media (min-width: 1024px) {

    /* Base body up one notch */
    .family-body { font-size: 17px; }

    /* Welcome / intro */
    .welcome__lede { font-size: 1.1rem; line-height: 1.7; }

    /* Section headers and content */
    .section__title { font-size: 1.45rem; }
    .section__hint  { font-size: 0.92rem; }
    .section--complete .section__hint { font-size: 1.05rem; }
    .section__lede  { font-size: 1.05rem; line-height: 1.65; }
    .section__num   { width: 36px; height: 36px; font-size: 1rem; }

    /* Disposition buttons */
    .dispo-btn__title { font-size: 1.2rem; }
    .dispo-btn__sub   { font-size: 0.95rem; }
    .dispo-btn__icon  { width: 52px; height: 52px; }
    .dispo-btn__icon svg { width: 26px; height: 26px; }

    /* Package list */
    .pkg__name  { font-size: 1.2rem; }
    .pkg__price { font-size: 1.35rem; }
    .pkg__desc  { font-size: 1.02rem; }
    .pkg__includes-text { font-size: 0.95rem; }

    /* Casket / urn / vault item rows */
    .item-row { padding: 16px 18px; min-height: 72px; }
    .item-row__name  { font-size: 1.15rem; }
    .item-row__meta  { font-size: 0.9rem; }
    .item-row__price { font-size: 1.15rem; }

    /* Add-on checkboxes */
    .addon-item__name { font-size: 1.05rem; }
    .addon-item__desc { font-size: 0.92rem; }
    .addon-item__price { font-size: 1.1rem; }

    /* Form inputs */
    .field__label { font-size: 0.78rem; }
    .field input, .field textarea { font-size: 1.02rem; padding: 13px 15px; }

    /* Continue / submit buttons */
    .section__continue, .section__submit { font-size: 1.02rem; padding: 16px; }
    .pkg__select { font-size: 1.02rem; padding: 14px; }

    /* Type filter tabs */
    .type-tab { font-size: 0.92rem; padding: 9px 16px; }

    /* Subsection labels */
    .subsection-title { font-size: 0.85rem; }

    /* Review section */
    .review-row__name { font-size: 1.1rem; }
    .review-row__price { font-size: 1.1rem; }
    .review-section-label { font-size: 0.78rem; }
    .review-total span:last-child { font-size: 1.8rem; }

    /* Sidebar */
    .plan-sidebar__loved { font-size: 1.3rem; }
    .ps-label { font-size: 0.78rem; }
    .ps-value { font-size: 1.05rem; }
    .ps-price { font-size: 1.05rem; }
    .plan-sidebar__total-amount { font-size: 1.55rem; }
    .plan-sidebar__hint { font-size: 0.9rem; }
}

/* ===================== Desktop sidebar ===================== */
.plan-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .plan-sidebar {
        display: block;
        position: sticky;
        top: 100px;
    }
}

.plan-sidebar__inner {
    background: var(--paper);
    border-radius: var(--rad-md);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--gold);
    overflow: hidden;
}

.plan-sidebar__head {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--line);
}
.plan-sidebar__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--gold);
    font-weight: 600;
}
.plan-sidebar__loved {
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--maroon);
    font-weight: 500;
    margin-top: 4px;
    font-style: italic;
}
.plan-sidebar__loved:empty { display: none; }
.plan-sidebar__loved:empty + ul { padding-top: 6px; }

.plan-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 8px 18px;
}

.ps-entry {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.ps-entry:last-child { border-bottom: none; }
.ps-entry--pending { opacity: 0.5; }

.ps-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.ps-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    margin-top: 2px;
}
.ps-icon--done    { background: var(--sage); color: var(--paper); }
.ps-icon--skipped { background: var(--ivory-deep); color: var(--ink-mute); font-weight: normal; }
.ps-icon--active  { background: var(--maroon); }
.ps-icon--active::after { content: ""; width: 6px; height: 6px; background: var(--gold-soft); border-radius: 50%; }
.ps-icon--pending { background: var(--ivory-deep); border: 1px dashed var(--line); }

.ps-body { flex: 1; min-width: 0; }
.ps-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-mute);
    font-weight: 600;
}
.ps-value {
    font-family: var(--serif);
    font-size: 0.95rem;
    color: var(--ink);
    margin-top: 2px;
    word-break: break-word;
}
.ps-entry--done .ps-value { color: var(--maroon); font-weight: 500; }
.ps-value--placeholder {
    color: var(--ink-mute);
    font-style: italic;
    font-family: var(--sans);
    font-size: 0.85rem;
}
.ps-price {
    font-family: var(--serif);
    font-size: 0.95rem;
    color: var(--gold);
    font-weight: 600;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.ps-children {
    margin-top: 6px;
    margin-left: 28px;
    padding-left: 10px;
    border-left: 1px solid var(--line);
}
.ps-child {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--ink-soft);
    padding: 2px 0;
}

.plan-sidebar__total {
    background: var(--maroon);
    color: var(--paper);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.plan-sidebar__total > span:first-child {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--gold-soft);
}
.plan-sidebar__total-amount {
    font-family: var(--serif);
    font-size: 1.4rem;
    color: var(--gold-soft);
    font-weight: 600;
}

.plan-sidebar__hint {
    padding: 12px 18px;
    background: var(--ivory);
    color: var(--ink-soft);
    font-size: 0.82rem;
    display: flex;
    gap: 10px;
    align-items: center;
    line-height: 1.45;
}
.plan-sidebar__hint svg {
    width: 18px;
    height: 18px;
    color: var(--maroon);
    flex-shrink: 0;
}
.plan-sidebar__hint a { color: var(--maroon); font-weight: 500; }

/* On desktop, hide the bottom running-total bar since the sidebar covers it */
@media (min-width: 1024px) {
    .running-total { display: none !important; }
    .family-body { padding-bottom: 40px; }
}

/* ===================== Desktop typography bump =====================
   Larger sizes for desktop viewing where there's room to breathe.
   Mobile sizes remain unchanged — these only apply at ≥1024px.
   ================================================================= */
@media (min-width: 1024px) {

    /* Body text scale */
    body { font-size: 17px; }

    /* Welcome intro paragraphs */
    .welcome__lede { font-size: 1.1rem; line-height: 1.7; }

    /* Section titles & hints */
    .section__title       { font-size: 1.45rem; }
    .section__hint        { font-size: 0.92rem; margin-top: 5px; }
    .section--complete .section__hint { font-size: 1.08rem; }
    .section__num         { width: 36px; height: 36px; font-size: 1rem; }
    .section--complete .section__num::before { font-size: 1.15rem; }

    /* Section body / lede text */
    .section__lede        { font-size: 1.05rem; line-height: 1.65; }

    /* Disposition buttons */
    .dispo-btn__title     { font-size: 1.2rem; }
    .dispo-btn__sub       { font-size: 0.95rem; }
    .dispo-btn__icon      { width: 52px; height: 52px; }
    .dispo-btn__icon svg  { width: 26px; height: 26px; }

    /* Package list */
    .pkg__name            { font-size: 1.2rem; }
    .pkg__price           { font-size: 1.3rem; }
    .pkg__desc            { font-size: 1.02rem; }
    .pkg__includes-text   { font-size: 0.98rem; }
    .pkg__select          { padding: 14px; font-size: 1.05rem; }

    /* Filter tabs */
    .type-tab             { padding: 10px 18px; font-size: 0.95rem; }
    .type-tab__count      { font-size: 0.85rem; }

    /* Casket/urn/vault rows */
    .item-row             { padding: 16px 18px; min-height: 72px; }
    .item-row__name       { font-size: 1.15rem; }
    .item-row__meta       { font-size: 0.88rem; }
    .item-row__price      { font-size: 1.15rem; }
    .item-row__radio      { width: 24px; height: 24px; }

    /* Add-on checkboxes */
    .addon-item           { padding: 16px 18px; }
    .addon-item__name     { font-size: 1.05rem; }
    .addon-item__desc     { font-size: 0.92rem; }
    .addon-item__price    { font-size: 1.05rem; }
    .addon-item__box      { width: 22px; height: 22px; }

    /* Subsection labels */
    .subsection-title     { font-size: 0.85rem; }

    /* Form fields */
    .field__label         { font-size: 0.8rem; }
    .field input,
    .field textarea       { font-size: 1.02rem; padding: 13px 15px; }

    /* Buttons */
    .section__continue    { padding: 16px; font-size: 1.05rem; }
    .section__submit      { padding: 18px; font-size: 1.1rem; }
    .section__skip        { padding: 13px; font-size: 0.95rem; }

    /* Review summary */
    .review-row__name     { font-size: 1.1rem; }
    .review-row__price    { font-size: 1.1rem; }
    .review-total span:last-child { font-size: 1.85rem; }

    /* Confirmation checkbox */
    .confirm-check        { font-size: 0.98rem; padding: 16px 18px; }

    /* ----- Sidebar typography bump ----- */
    .plan-sidebar__label  { font-size: 0.78rem; }
    .plan-sidebar__loved  { font-size: 1.3rem; margin-top: 6px; }
    .ps-label             { font-size: 0.78rem; }
    .ps-value             { font-size: 1.05rem; }
    .ps-value--placeholder { font-size: 0.92rem; }
    .ps-price             { font-size: 1.05rem; }
    .ps-child             { font-size: 0.9rem; }
    .ps-icon              { width: 20px; height: 20px; }
    .plan-sidebar__total > span:first-child { font-size: 0.78rem; }
    .plan-sidebar__total-amount { font-size: 1.55rem; }
    .plan-sidebar__hint   { font-size: 0.9rem; padding: 14px 18px; }
}

.section {
    background: var(--paper);
    border-radius: var(--rad-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
    overflow: hidden;
    transition: opacity .25s;
    scroll-margin-top: 130px;
}

.section--locked { opacity: 0.55; pointer-events: none; }
.section--locked .section__body { display: none; }

/* Streamlined state: the section is "complete" automatically but its content
   is replaced with an explanation that there's nothing to plan here. */
.section--streamlined .section__hint::after {
    content: " — not applicable for this package";
    color: var(--ink-mute);
    font-style: italic;
    font-weight: normal;
    font-family: var(--sans);
    font-size: 0.85em;
    margin-left: 4px;
}

.streamlined-notice {
    display: flex;
    gap: 16px;
    padding: 22px 24px;
    background: var(--ivory);
    border: 1px dashed var(--gold-pale);
    border-radius: var(--rad-md);
    margin-bottom: 20px;
}
.streamlined-notice__icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    background: var(--gold-soft);
    border-radius: 50%;
    color: var(--maroon);
    display: flex;
    align-items: center;
    justify-content: center;
}
.streamlined-notice__icon svg { width: 20px; height: 20px; }
.streamlined-notice__body { flex: 1; }
.streamlined-notice__title {
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--maroon);
    font-weight: 500;
    margin-bottom: 6px;
}
.streamlined-notice__text {
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 0 0 12px;
}
.streamlined-notice__cta {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin: 0;
}
.link-btn {
    background: transparent;
    border: none;
    color: var(--maroon);
    text-decoration: underline;
    text-decoration-color: rgba(107, 31, 46, 0.4);
    text-underline-offset: 3px;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
}
.link-btn:hover {
    text-decoration-color: var(--maroon);
    color: var(--maroon-dark);
}

.section__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}
.section__num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--ivory-deep);
    color: var(--ink-mute);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .25s;
}
.section--active .section__num { background: var(--maroon); color: var(--paper); }
.section--complete .section__num {
    background: var(--sage);
    color: var(--paper);
}
.section--complete .section__num span { display: none; }
.section--complete .section__num::before { content: "✓"; font-size: 1rem; }

.section__title-wrap { flex: 1; min-width: 0; }
.section__title {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--maroon);
    font-weight: 600;
    line-height: 1.2;
}
.section--complete .section__title { color: var(--ink-soft); }
.section__hint {
    font-size: 0.82rem;
    color: var(--ink-mute);
    margin-top: 3px;
}
.section--complete .section__hint {
    color: var(--maroon);
    font-family: var(--serif);
    font-size: 0.95rem;
    font-weight: 500;
}

.section__chevron {
    color: var(--gold);
    font-size: 1rem;
    transition: transform .25s;
    flex-shrink: 0;
}
.section--open .section__chevron { transform: rotate(180deg); }

.section__body {
    padding: 4px 20px 24px;
    border-top: 1px solid var(--line);
    animation: sectionFadeIn .25s ease-out;
}
@keyframes sectionFadeIn { from { opacity: 0; } to { opacity: 1; } }

.section__lede {
    color: var(--ink-soft);
    font-size: 0.95rem;
    margin: 14px 0;
    line-height: 1.6;
}
.section__lede strong { color: var(--ink); }

.section__helper {
    text-align: center;
    margin-top: 18px;
    color: var(--ink-mute);
    font-size: 0.88rem;
}
.section__helper a { color: var(--maroon); }

.section__continue {
    display: block;
    width: 100%;
    margin-top: 18px;
    background: var(--maroon);
    color: var(--paper);
    border: none;
    padding: 14px;
    border-radius: var(--rad-sm);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background .15s;
}
.section__continue:hover:not([disabled]) { background: var(--maroon-dark); }
.section__continue[disabled] { opacity: 0.4; cursor: not-allowed; }

.section__skip {
    display: block;
    width: 100%;
    margin-top: 14px;
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    padding: 12px;
    border-radius: var(--rad-sm);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}
.section__skip:hover { border-color: var(--maroon); color: var(--maroon); }

.section__submit {
    display: block;
    width: 100%;
    background: var(--maroon);
    color: var(--paper);
    border: none;
    padding: 16px;
    border-radius: var(--rad-sm);
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin-top: 18px;
}
.section__submit[disabled] { opacity: 0.4; cursor: not-allowed; }

.section__save-later {
    display: block;
    margin: 12px auto 0;
    background: transparent;
    border: none;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 8px;
}

.subsection-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold);
    margin: 22px 0 12px;
    font-weight: 600;
    font-family: var(--sans);
}

/* ===================== Disposition buttons ===================== */
.dispo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
}
@media (min-width: 600px) {
    .dispo-grid { grid-template-columns: 1fr 1fr; }
}
.dispo-btn {
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--rad-md);
    padding: 18px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.dispo-btn:active { transform: scale(0.98); }
.dispo-btn--selected {
    border-color: var(--maroon);
    background: linear-gradient(0deg, rgba(184, 146, 58, 0.04), rgba(184, 146, 58, 0.04));
}
.dispo-btn__icon {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--gold-pale);
    color: var(--maroon);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.dispo-btn__icon svg { width: 22px; height: 22px; }
.dispo-btn__body { flex: 1; }
.dispo-btn__title { font-family: var(--serif); font-size: 1.1rem; color: var(--maroon); font-weight: 600; line-height: 1.2; }
.dispo-btn__sub { font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; line-height: 1.45; }

/* ===================== Package accordion overrides for SPA ===================== */
.pkg-list { margin: 18px 0 0; }

.pkg__name {
    flex: 1;
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--maroon);
    font-weight: 600;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.pkg__chev {
    color: var(--ink-mute);
    font-size: 1.2rem;
    transition: transform .2s;
    flex-shrink: 0;
    line-height: 1;
}
.pkg--open .pkg__chev { transform: rotate(90deg); color: var(--maroon); }

.pkg__select {
    width: 100%;
    background: var(--maroon);
    color: var(--paper);
    border: none;
    padding: 13px;
    border-radius: var(--rad-sm);
    font-family: var(--sans);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background .15s;
    margin-top: 4px;
}
.pkg__select:hover { background: var(--maroon-dark); }
.pkg--selected .pkg__select {
    background: var(--sage);
    cursor: default;
}
.pkg--selected .pkg__select::before { content: "✓ "; }

.pkg__badge { display: none; }
.pkg--selected .pkg__badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 9px;
    background: var(--maroon);
    color: var(--paper);
    border-radius: 999px;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    font-family: var(--sans);
}

.pkg--open .pkg__body { display: block; }
.pkg__body { display: none; padding: 4px 16px 16px; background: var(--ivory); border-top: 1px solid var(--line); }

/* ===================== Type filter tabs ===================== */
.type-tabs {
    display: flex;
    gap: 4px;
    margin: 14px 0 12px;
    background: var(--ivory-deep);
    padding: 4px;
    border-radius: var(--rad-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.type-tabs::-webkit-scrollbar { display: none; }
.type-tab {
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--rad-sm);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .15s;
}
.type-tab--active {
    background: var(--paper);
    color: var(--maroon);
    box-shadow: var(--shadow-sm);
}
.type-tab__count {
    color: var(--ink-mute);
    font-weight: 400;
    margin-left: 5px;
    font-size: 0.78rem;
}
.type-tab--active .type-tab__count { color: var(--gold); }

/* ===================== Item list (caskets/urns/vaults) ===================== */
.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--rad-md);
    overflow: hidden;
    background: var(--paper);
}
.item-row {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background .15s;
    min-height: 64px;
}
.item-row:last-child { border-bottom: none; }
.item-row:active { background: var(--ivory); }
.item-row--selected { background: rgba(184, 146, 58, 0.07); }
.item-row__radio {
    width: 22px; height: 22px;
    border: 2px solid var(--line);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.item-row--selected .item-row__radio {
    border-color: var(--maroon);
    background: var(--maroon);
}
.item-row--selected .item-row__radio::after {
    content: "✓"; color: var(--paper); font-size: 0.72rem; font-weight: bold;
}
.item-row__info { flex: 1; min-width: 0; }
.item-row__name {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: var(--maroon);
    font-weight: 600;
    line-height: 1.2;
}
.item-row__meta {
    font-size: 0.8rem;
    color: var(--ink-mute);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.item-row__price {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: var(--gold);
    font-weight: 600;
    flex-shrink: 0;
}

/* ===================== Add-on checks ===================== */
.addon-list { display: flex; flex-direction: column; gap: 8px; }
.addon-item {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--rad-sm);
    cursor: pointer;
    background: var(--paper);
    align-items: flex-start;
    transition: all .15s;
}
.addon-item--selected {
    border-color: var(--maroon);
    background: rgba(184, 146, 58, 0.04);
}
.addon-item input { position: absolute; opacity: 0; pointer-events: none; }
.addon-item__box {
    width: 20px; height: 20px;
    border: 2px solid var(--line);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all .15s;
}
.addon-item--selected .addon-item__box {
    background: var(--maroon);
    border-color: var(--maroon);
}
.addon-item--selected .addon-item__box::after {
    content: "✓"; color: var(--paper); font-size: 0.75rem; font-weight: bold;
}
.addon-item__body { flex: 1; min-width: 0; }
.addon-item__name { font-weight: 500; font-size: 0.95rem; color: var(--ink); }
.addon-item__desc { font-size: 0.83rem; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }
.addon-item__price {
    font-family: var(--serif);
    color: var(--gold);
    font-weight: 600;
    flex-shrink: 0;
    align-self: center;
}

/* ===================== Confirm checkbox ===================== */
.confirm-check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--ivory);
    padding: 14px 16px;
    border-radius: var(--rad-sm);
    margin-top: 18px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
}
.confirm-check input[type=checkbox] {
    width: 18px; height: 18px;
    accent-color: var(--maroon);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===================== Review summary ===================== */
.review-summary { margin-top: 16px; }
.review-section-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold);
    font-weight: 600;
    margin: 16px 0 6px;
}
.review-section-label:first-child { margin-top: 0; }
.review-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}
.review-row__name { font-family: var(--serif); color: var(--ink); font-size: 1rem; font-weight: 500; }
.review-row__meta { font-size: 0.82rem; color: var(--ink-mute); margin-top: 2px; }
.review-row__price { font-family: var(--serif); color: var(--maroon); font-weight: 600; white-space: nowrap; }

.review-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding: 16px 18px;
    background: var(--maroon);
    color: var(--paper);
    border-radius: var(--rad-sm);
}
.review-total span:first-child {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
.review-total span:last-child {
    font-family: var(--serif);
    font-size: 1.6rem;
    color: var(--gold-soft);
    font-weight: 600;
}
.review-note {
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--ink-mute);
    line-height: 1.5;
}

/* ===================== Sticky running total ===================== */
.running-total {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--paper);
    border-top: 1px solid var(--gold-soft);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 40;
    box-shadow: 0 -4px 16px rgba(58, 24, 32, 0.1);
}
.running-total__label {
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.16em;
    color: var(--gold); font-weight: 600;
}
.running-total__count {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: 2px;
}
.running-total__amount {
    font-family: var(--serif);
    font-size: 1.5rem; color: var(--maroon);
    font-weight: 600;
}

/* ===================== Modal ===================== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(43, 24, 27, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal {
    background: var(--paper);
    border-radius: var(--rad-md);
    padding: 28px;
    max-width: 460px;
    width: 100%;
    border-top: 4px solid var(--gold);
}
.modal h2 { margin-bottom: 10px; }
.modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}
.btn--danger { background: var(--maroon); color: var(--paper); border-color: var(--maroon); }
.btn--danger:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); }

@media (max-width: 480px) {
    .modal { padding: 22px; }
    .modal__actions { flex-direction: column-reverse; }
    .modal__actions .btn { width: 100%; }
}

/* ===================== Toast ===================== */
.toast {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--paper);
    padding: 12px 18px;
    border-radius: var(--rad-sm);
    font-size: 0.9rem;
    max-width: 90%;
    text-align: center;
    z-index: 50;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.25s ease-out;
}
.toast--error { background: var(--maroon); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ====================================================================
   Planning mode toggle (at-need vs preneed) — lives inside Section 1
   Subtle, integrated styling rather than a separate notice box.
   ==================================================================== */
.mode-toggle {
    margin: 20px 0 4px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.mode-toggle__prompt {
    font-size: 0.88rem;
    color: var(--ink-mute);
    margin-bottom: 10px;
    font-style: italic;
}
.mode-toggle__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mode-toggle__option {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--rad-sm);
    cursor: pointer;
    transition: all .15s;
    background: var(--paper);
}
.mode-toggle__option:hover {
    border-color: var(--maroon);
    background: var(--ivory);
}
.mode-toggle__option--active {
    border-color: var(--maroon);
    background: rgba(107, 31, 46, 0.04);
    box-shadow: inset 0 0 0 1px var(--maroon);
}
.mode-toggle__option input[type="radio"] {
    margin: 0;
    accent-color: var(--maroon);
    flex-shrink: 0;
}
.mode-toggle__option-title {
    font-size: 0.92rem;
    color: var(--ink);
    line-height: 1.35;
}
.mode-toggle__option--active .mode-toggle__option-title {
    color: var(--maroon);
    font-weight: 500;
}
.mode-toggle__disclosure {
    margin: 12px 0 0;
    padding: 10px 14px;
    background: rgba(184, 146, 58, 0.06);
    border-left: 2px solid var(--gold);
    border-radius: 0 var(--rad-sm) var(--rad-sm) 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--ink-soft);
}
.mode-toggle__disclosure strong { color: var(--ink); }

@media (max-width: 560px) {
    .mode-toggle__option { min-width: 0; }
}

/* Preneed mode badge — shown in the loved-one banner and the sidebar header */
.banner-mode-tag {
    display: inline-block;
    background: var(--gold);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
}
