* { box-sizing: border-box; }

:root {
    --bg: #f5f7f6;
    --surface: #ffffff;
    --text: #17201c;
    --muted: #617068;
    --primary: #2d6f4e;
    --primary-dark: #22563d;
    --border: #dfe7e2;
    --shadow: 0 14px 40px rgba(20, 45, 33, .08);
}

html {
    min-height: 100%;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background: var(--bg);
}

.site-header,
.site-footer {
    padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
}

.site-header {
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: 1rem;
}

.site-footer {
    padding-top: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.container {
    width: min(100% - 2rem, 760px);
    margin-inline: auto;
}

.brand {
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

main {
    padding: 1.25rem max(0px, env(safe-area-inset-right)) 3rem max(0px, env(safe-area-inset-left));
    scroll-padding-top: calc(env(safe-area-inset-top) + 1rem);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: clamp(1.25rem, 5vw, 2.25rem);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 .5rem;
    color: var(--primary);
    font-weight: 750;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 8vw, 3.3rem);
    line-height: 1.04;
    letter-spacing: -.045em;
}

.lead {
    margin: 1rem 0 1.5rem;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.65;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: .85rem 1.15rem;
    border: 0;
    border-radius: .9rem;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.button:hover { background: var(--primary-dark); }

.notice {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: .9rem;
    background: #edf7f1;
    color: #24543a;
    line-height: 1.5;
}

.meta {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.5;
}


.site-footer .privacy-note {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: .45rem;
    margin: 0;
    text-align: left;
}

.site-footer .privacy-note > span:first-child {
    flex: 0 0 auto;
    line-height: 1.5;
}

.status-ok { color: #216b43; }
.status-error { color: #a42f2f; }

.progress {
    height: 4px;
    margin: 0 0 1rem;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe7e2;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width .3s ease;
}

.question-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: clamp(1.25rem, 5vw, 2.25rem);
    box-shadow: var(--shadow);
}

.choice-grid {
    display: grid;
    gap: .75rem;
    margin-top: 1.5rem;
}

.choice-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 5rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: #fff;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.choice-card:hover,
.choice-card:focus-within {
    transform: translateY(-1px);
    border-color: #86aa97;
    box-shadow: 0 10px 26px rgba(20, 45, 33, .08);
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card:has(input:checked) {
    border-color: var(--primary);
    background: #f0f8f3;
}

.choice-content {
    display: grid;
    gap: .25rem;
    flex: 1;
}

.choice-content strong { font-size: 1.05rem; }
.choice-content small { color: var(--muted); line-height: 1.4; }
.choice-arrow { color: var(--primary); font-size: 1.35rem; }

.form-error {
    margin: 1rem 0;
    padding: .9rem 1rem;
    border-radius: .85rem;
    background: #fff1f1;
    color: #8a2929;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1.4rem;
}

.trust-row span {
    padding: .45rem .65rem;
    border-radius: 999px;
    background: #edf7f1;
    color: #24543a;
    font-size: .83rem;
    font-weight: 650;
}

.button-secondary {
    margin-top: 1rem;
    background: #e9efeb;
    color: var(--text);
}

.page-transition { animation: pageIn .28s ease both; }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.choice-form.is-submitting { pointer-events: none; opacity: .72; }

@media (max-width: 520px) {
    .site-header { padding-bottom: .55rem; }
    main { padding-top: .65rem; }
    .choice-card { min-height: 4.75rem; }
}

/* v0.2.2: etusivun tekstihierarkian viimeistely */
.site-header {
    padding-top: max(env(safe-area-inset-top), clamp(1.25rem, 4vw, 2rem));
    padding-bottom: clamp(.9rem, 3vw, 1.35rem);
}

.site-header .container {
    display: flex;
    justify-content: center;
}

.brand {
    display: inline-block;
    font-size: clamp(1.5rem, 6vw, 2rem);
    line-height: 1;
    letter-spacing: -.035em;
    text-align: center;
}

.trust-list {
    display: grid;
    gap: .7rem;
    margin: 1.35rem 0 0;
    padding: 0;
    list-style: none;
}

.trust-list li {
    position: relative;
    padding-left: 1.65rem;
    color: #24543a;
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.35;
}

.trust-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: 900;
}

.choice-grid {
    grid-template-columns: minmax(0, 1fr);
}

.choice-card {
    width: 100%;
    align-items: flex-start;
    gap: .9rem;
    min-height: 5.25rem;
    padding: 1rem;
    -webkit-tap-highlight-color: transparent;
}

.choice-radio {
    position: relative;
    flex: 0 0 1.45rem;
    width: 1.45rem;
    height: 1.45rem;
    margin-top: .08rem;
    border: 2px solid #9aa59f;
    border-radius: 50%;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.choice-radio::after {
    content: "";
    position: absolute;
    inset: .25rem;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0;
    transform: scale(.45);
    transition: opacity .16s ease, transform .16s ease;
}

.choice-card:has(input:checked) .choice-radio {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 111, 78, .12);
}

.choice-card:has(input:checked) .choice-radio::after {
    opacity: 1;
    transform: scale(1);
}

.choice-content strong {
    display: block;
    font-size: 1.08rem;
    line-height: 1.25;
}

.choice-content small {
    display: block;
    margin-top: .22rem;
    font-size: .94rem;
}

.choice-arrow {
    align-self: center;
    flex: 0 0 auto;
}

@media (max-width: 520px) {
    .site-header { padding-top: max(env(safe-area-inset-top), 1.45rem); }
    .brand { font-size: 1.65rem; }
    .choice-card { border-radius: 1.05rem; }
}

/* v0.3: Tulot */
.step-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 .8rem;
}

.step-section,
.step-count {
    margin: 0;
    font-weight: 750;
}

.step-section {
    color: var(--text);
    font-size: 1.05rem;
}

.step-count {
    color: var(--muted);
    font-size: .92rem;
}

.income-form { margin-top: 1.5rem; }

.period-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin: 0 0 1.35rem;
    padding: 0;
    border: 0;
}

.period-selector legend {
    grid-column: 1 / -1;
    margin-bottom: .25rem;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 650;
}

.period-selector label { position: relative; }
.period-selector input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.period-selector span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.1rem;
    padding: .7rem .8rem;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

.period-selector input:checked + span {
    border-color: var(--primary);
    background: #edf7f1;
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.period-selector label:focus-within span {
    outline: 3px solid rgba(45, 111, 78, .18);
    outline-offset: 2px;
}

.amount-field { display: grid; gap: .55rem; }
.amount-label { font-weight: 750; }

.amount-control {
    display: flex;
    align-items: center;
    min-height: 3.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: .95rem;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.amount-control:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 111, 78, .13);
}

.amount-control input {
    min-width: 0;
    flex: 1;
    padding: 1rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1.25rem;
    font-weight: 750;
}

.amount-suffix {
    padding: 0 1rem 0 .5rem;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.field-help {
    margin: .55rem 0 1.3rem;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.45;
}

.button-full { width: 100%; }



/* v0.3.1: tuloapuri ja pienten puhelinten tiivistys */
.income-intro strong { color: var(--text); }
.income-helper {
    display: grid;
    gap: 1.15rem;
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--border);
}
.income-helper[hidden] { display: none; }
.helper-options { margin: 0; padding: 0; border: 0; }
.helper-options legend { margin-bottom: .25rem; font-weight: 750; }
.helper-help { margin-top: 0; margin-bottom: .75rem; }
.helper-choice {
    position: relative;
    display: flex;
    margin-top: .55rem;
}
.helper-choice input { position: absolute; opacity: 0; pointer-events: none; }
.helper-choice span {
    width: 100%;
    padding: .75rem .85rem;
    border: 1px solid var(--border);
    border-radius: .8rem;
    background: #fff;
    font-size: .94rem;
    font-weight: 650;
    line-height: 1.35;
    cursor: pointer;
}
.helper-choice input:checked + span {
    border-color: var(--primary);
    background: #edf7f1;
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.helper-choice:focus-within span { outline: 3px solid rgba(45, 111, 78, .18); outline-offset: 2px; }
.bonus-field { gap: .45rem; }
.amount-control-small { min-height: 3.25rem; }
.amount-control-small input { padding-block: .75rem; font-size: 1.1rem; }
.income-estimate {
    display: grid;
    gap: .18rem;
    padding: .9rem 1rem;
    border-radius: .9rem;
    background: #edf7f1;
    color: #24543a;
}
.income-estimate span { font-size: .88rem; font-weight: 650; }
.income-estimate strong { font-size: 1.35rem; }
.income-estimate small { color: #416a54; }
.final-help { margin-bottom: 1rem; }
.compact-lead { margin-top: -.75rem; }

@media (max-width: 430px) {
    .container { width: min(100% - 1.35rem, 760px); }
    .site-header { padding-top: max(env(safe-area-inset-top), 1.05rem); padding-bottom: .55rem; }
    .brand { font-size: 1.55rem; }
    main { padding-top: .45rem; padding-bottom: 1.5rem; }
    .progress { margin-bottom: .7rem; }
    .step-heading { margin-bottom: .55rem; }
    .question-card { padding: 1.1rem; }
    .question-card h1 { font-size: clamp(1.75rem, 8.3vw, 2.15rem); line-height: 1.06; }
    .question-card h1.result-title {
        font-size: clamp(1.15rem, 4.8vw, 1.35rem);
        line-height: 1.1;
        letter-spacing: -0.02em;
        margin-bottom: .6rem;
    }
    .lead { margin: .75rem 0 1rem; font-size: 1rem; line-height: 1.5; }
    .choice-grid { gap: .55rem; margin-top: 1rem; }
    .choice-card { min-height: 4.25rem; padding: .75rem .85rem; }
    .choice-content small { font-size: .88rem; line-height: 1.3; }
    .income-form { margin-top: 1.05rem; }
    .period-selector { gap: .5rem; margin-bottom: 1rem; }
    .period-selector span { min-height: 2.75rem; padding: .55rem .45rem; font-size: .94rem; }
    .amount-control { min-height: 3.35rem; }
    .amount-control input { padding: .8rem; font-size: 1.12rem; }
    .income-helper { gap: .9rem; margin-top: 1rem; padding-top: 1rem; }
    .helper-choice span { padding: .65rem .75rem; font-size: .89rem; }
    .site-footer { padding-top: .55rem; }
    .site-footer .meta { font-size: .84rem; }
}

/* v1.7: asumispolku ja katkeamattomat rahasummat */
.money { white-space: nowrap; }

.housing-fields {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.share-section {
    margin-top: 1.35rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
}

.share-section h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
}

.share-section .field-help { margin-bottom: .8rem; }
.share-field { max-width: 13rem; }

.housing-live-summary {
    display: grid;
    gap: .75rem;
    margin-top: 1.35rem;
    padding: 1rem;
    border-radius: .95rem;
    background: #edf7f1;
    color: #24543a;
}

.housing-live-summary > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.housing-live-summary span { font-size: .9rem; }
.housing-live-summary strong { white-space: nowrap; font-size: 1.05rem; }

/* Yhteinen osioiden tuloskortti asumisesta eteenpäin */
.result-card__summary { margin-top: 1.25rem; }
.result-card__bar {
    height: .7rem;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe7e2;
}
.result-card__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}
.result-card__values {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .7rem;
    color: var(--muted);
}
.result-card__values strong { color: var(--text); }
.result-card__panel {
    display: grid;
    gap: .18rem;
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: .9rem;
    background: #edf7f1;
    color: #24543a;
}
.result-card__panel > span { font-size: .88rem; font-weight: 650; }
.result-card__panel > strong { font-size: 1.35rem; }
.result-card__panel > small { color: #416a54; }
.result-card__panel-emphasis {
    margin-top: .2rem;
    font-size: .88rem;
    font-weight: 650;
}

@media (max-width: 430px) {
    .housing-live-summary > div {
        align-items: flex-start;
        flex-direction: column;
        gap: .15rem;
    }

    .share-field { max-width: none; }
}


/* v1.7.2: tulojen jakautuminen ja asumiskulujen jakotapa */
.income-split-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}
.income-split-summary > div {
    display: grid;
    gap: .2rem;
    padding: .9rem 1rem;
    border: 1px solid var(--border);
    border-radius: .9rem;
}
.income-split-summary span,
.income-split-summary small { color: var(--muted); }
.income-split-summary strong { font-size: 1.25rem; color: var(--primary-dark); }

.share-methods {
    display: grid;
    gap: .55rem;
    margin-bottom: 1rem;
}
.share-choice { position: relative; display: block; }
.share-choice input { position: absolute; opacity: 0; pointer-events: none; }
.share-choice > span {
    display: grid;
    gap: .18rem;
    padding: .8rem .9rem;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: #fff;
    cursor: pointer;
}
.share-choice strong { font-size: .96rem; }
.share-choice small { color: var(--muted); line-height: 1.35; }
.share-choice input:checked + span {
    border-color: var(--primary);
    background: #edf7f1;
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.share-choice:focus-within > span { outline: 3px solid rgba(45, 111, 78, .18); outline-offset: 2px; }
.share-field[hidden] { display: none; }

@media (max-width: 430px) {
    .income-split-summary { grid-template-columns: 1fr; }
}

/* v1.8: omakoti- ja paritalon kuukausi- ja vuosikulut */
.housing-cost-group + .housing-cost-group {
    margin-top: 1.5rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--border);
}
.housing-cost-group h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
}
.housing-cost-group > .field-help { margin: .35rem 0 0; }
.field-help-inline { display: block; margin: -.3rem 0 0; }

/* Keep centered desktop layouts from shifting when a shorter form removes the scrollbar. */
@supports not (scrollbar-gutter: stable) {
    @media (min-width: 769px) {
        html { overflow-y: scroll; }
    }
}


/* Autoilun sopimukseen sisältyvät kulut */
.choice-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: .9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: #fff;
    cursor: pointer;
}
.choice-row input {
    width: 1.25rem;
    height: 1.25rem;
    margin: .12rem 0 0;
    accent-color: var(--primary);
    flex: 0 0 auto;
}
.choice-row > span { display: grid; gap: .2rem; }
.choice-row strong { font-size: .98rem; }
.choice-row small { color: var(--muted); line-height: 1.35; }
.choice-row:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.choice-row:focus-within {
    outline: 3px solid rgba(45, 111, 78, .18);
    outline-offset: 2px;
}


/* v1.9.2: autoiluosion viimeistely */
.choice-row {
    column-gap: .9rem;
}
.choice-row input[type="checkbox"] {
    accent-color: var(--primary);
}
.choice-row-copy {
    display: grid;
    gap: .35rem;
    min-width: 0;
}
.choice-row-copy strong,
.choice-row-copy small {
    display: block;
}
.transport-extra-costs {
    gap: .12rem;
}
.transport-extra-costs .transport-extra-monthly {
    font-size: 1.05rem;
    line-height: 1.25;
}
.transport-extra-costs .transport-extra-annual {
    font-size: .88rem;
    font-weight: 650;
    color: #416a54;
    line-height: 1.25;
}
.transport-extra-costs small {
    margin-top: .2rem;
}


/* v1.9.3: mobiilin typografia ja autoilulomakkeen ilmavuus */
.transport-package-group {
    margin-bottom: 1.75rem;
}

.transport-cost-estimate {
    margin-top: .25rem;
}

.transport-summary-button {
    margin-top: 1.25rem;
}

@media (max-width: 430px) {
    .transport-package-group {
        margin-bottom: 1.9rem;
    }

    .transport-summary-button {
        margin-top: 1.35rem;
    }

    main {
        padding-bottom: calc(3rem + env(safe-area-inset-bottom));
    }
}


/* v1.9.4: tiiviimmät mobiiliyhteenvetojen otsikot ja lisäkulut yhdellä rivillä */
.transport-extra-values {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .35rem;
}
.transport-extra-separator {
    color: #416a54;
    font-weight: 650;
}



/* v1.9.14: yhteinen result card asumiselle, autoilulle ja tuleville osioille */
@media (max-width: 430px) {
    .result-card {
        padding: 1rem;
    }

    .result-card .eyebrow {
        margin-bottom: .35rem;
    }

    .result-card__summary {
        margin-top: .9rem;
    }

    .result-card__values {
        flex-direction: row;
        align-items: baseline;
        gap: .5rem;
        margin-top: .55rem;
    }

    .result-card__values span {
        text-align: right;
    }

    .result-card__panel {
        margin-top: .75rem;
        padding: .75rem .85rem;
    }

    .result-card .meta {
        margin-block: .75rem;
        line-height: 1.4;
    }

    .result-card__actions {
        margin-top: .8rem;
    }
}


/* v1.9.13: tulosivujen tietosuojateksti kortin sisällä */
.card-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin: 1.35rem 0 0;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.5;
    text-align: left;
}

.card-privacy-note > span:first-child {
    flex: 0 0 auto;
    line-height: 1.5;
}

@media (max-width: 430px) {
    .card-privacy-note {
        margin-top: 1.1rem;
        font-size: .9rem;
        line-height: 1.45;
    }
}

/* v1.10: lasten ikäryhmän mukaan mukautuva kululomake */
.children-cards { display: grid; gap: 1rem; margin: 1.2rem 0; }
.child-cost-panel { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; background: #fbfdfc; }
.child-cost-panel legend { padding: 0 .35rem; font-weight: 800; font-size: 1.05rem; color: var(--primary-dark); }
.child-cost-fields { display:grid; gap:.8rem; margin-top:1rem; padding-top:1rem; border-top:1px solid var(--border); }
.child-cost-field[hidden], .child-cost-fields[hidden] { display:none; }
.children-result-breakdown { gap:.45rem; }
.children-result-breakdown small { display:block; }

/* v1.10.1: lasten määrän ja ikäryhmän valinnat käyttävät yhteistä valintakorttia */
.child-age-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.child-age-choice {
    min-height: 4.25rem;
    padding: .8rem .85rem;
    align-items: center;
}

.child-age-choice .choice-radio {
    margin-top: 0;
}

.child-age-content {
    align-content: center;
}

.child-age-content strong {
    font-size: .98rem;
}

@media (max-width: 430px) {
    .child-age-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .child-age-choice {
        min-height: 4rem;
    }
}

@media (max-width:430px) { .child-cost-panel { padding:.85rem; } }


/* v1.10.2: lasten osion ulkoasun yhtenäistäminen */
.children-count-choices {
    display: grid;
    gap: .7rem;
    margin-top: 1.5rem;
}

.child-cost-fields {
    gap: 1rem;
}

.child-cost-fields .amount-control {
    width: 100%;
}

@media (max-width: 430px) {
    .children-count-choices {
        gap: .65rem;
        margin-top: 1.25rem;
    }

    .children-count-choices .choice-card {
        min-height: 4.5rem;
    }

    .child-cost-fields {
        gap: .9rem;
    }
}

/* v1.10.3: lasten kuukausi- ja vuosikulujen ryhmittely */
.cost-period-section + .cost-period-section {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border, #dbe5df);
}
.cost-period-title {
    margin: 0 0 .35rem;
    font-size: 1.25rem;
    line-height: 1.2;
}
.cost-period-help {
    margin: 0 0 1.25rem;
    color: var(--muted, #66756d);
    line-height: 1.45;
}
.child-cost-field .field-help {
    display: block;
    margin-top: .45rem;
    color: var(--muted, #66756d);
    font-size: .9rem;
    line-height: 1.4;
}


/* v1.10.7: lasten yhteissumman ja toimintopainikkeen väli */
.children-cost-card .live-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem 0 .9rem;
}
.children-cost-card .live-total strong {
    flex: 0 0 auto;
}

@media (max-width: 430px) {
    .children-cost-card .live-total {
        margin-top: 1.35rem;
        margin-bottom: .85rem;
    }
}


/* v1.10.8: yhtenäiset jatko-, muokkaus- ja yhteenvetopainikkeet */
.result-actions {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1rem;
}

.result-actions .button {
    margin-top: 0;
}

.result-actions .button-secondary {
    margin-top: 0;
}

.button-full {
    display: flex;
    width: 100%;
}

@media (max-width: 360px) {
    .result-actions .button {
        width: 100%;
    }
}


/* v1.10.9: yhteenvetosivujen toimintojen selkeä hierarkia */
.result-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .7rem;
    margin-top: 1rem;
}

.result-actions .button {
    width: 100%;
    justify-content: center;
    margin-top: 0;
}

.result-actions .result-action-edit {
    order: 1;
}

.result-actions .result-action-continue,
.result-actions .result-action-next,
.result-actions .button:not(.result-action-edit) {
    order: 2;
}

.result-card__notes--compact {
    display: grid;
    gap: .45rem;
    margin-top: 1rem;
}

.result-card__notes--compact .meta {
    margin: 0;
    line-height: 1.42;
}

.result-card__notes--compact + .result-actions {
    margin-top: .8rem;
}


/* v1.10.10: asumisen lisätiedot ja tulojen yhteenvedon pienemmän näytön tiivistys */
.result-card__details {
    margin-top: 1rem;
}

.result-card__details summary {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .55rem .1rem;
    color: var(--primary-dark);
    font-weight: 750;
    cursor: pointer;
    list-style: none;
}

.result-card__details summary::-webkit-details-marker {
    display: none;
}

.result-card__details summary:focus-visible {
    outline: 3px solid rgba(45, 111, 78, .18);
    outline-offset: 3px;
    border-radius: .35rem;
}

.result-card__details-hide {
    display: none;
}

.result-card__details[open] .result-card__details-show {
    display: none;
}

.result-card__details[open] .result-card__details-hide {
    display: inline;
}

.result-card__details .result-card__notes--compact {
    margin-top: .35rem;
}

.result-card__details + .result-actions {
    margin-top: .7rem;
}

@media (max-width: 400px) {
    .income-complete-card {
        padding: 1rem;
    }

    .income-complete-card h1 {
        font-size: clamp(1.7rem, 8vw, 1.95rem);
        line-height: 1.04;
    }

    .income-complete-card .lead {
        margin: .65rem 0 .85rem;
        font-size: .96rem;
        line-height: 1.42;
    }

    .income-complete-card .income-estimate {
        padding: .75rem .85rem;
    }

    .income-complete-card .income-split-summary {
        gap: .55rem;
        margin-top: .75rem;
    }

    .income-complete-card .income-split-summary > div {
        padding: .72rem .85rem;
    }

    .income-complete-card .field-help {
        margin-top: .7rem;
        line-height: 1.4;
    }

    .income-complete-card .result-actions {
        margin-top: .75rem;
    }

    .income-complete-card .card-privacy-note {
        margin-top: .9rem;
    }
}


/* v1.10.11: tulojen ja autoilun yhteenvetojen mobiiliystävällinen yhtenäistys */
.income-split-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: .65rem;
}

.income-split-summary > div {
    gap: .3rem;
    padding: .78rem .95rem;
}

.income-split-summary__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.income-split-summary__row span {
    min-width: 0;
    line-height: 1.3;
}

.income-split-summary__row strong {
    flex: 0 0 auto;
    white-space: nowrap;
}

.income-split-summary small {
    display: block;
}

@media (max-width: 400px) {
    .income-complete-card .income-split-summary > div {
        padding: .68rem .8rem;
    }
}

/* v1.10.15: lemmikkien kululomake yhtenäiseksi lasten osion kanssa */
.pets-cards {
    margin-top: 1.2rem;
}

.pet-species-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: .65rem;
}

.pet-species-choice {
    border-radius: 0;
    min-height: 4.25rem;
}

.pet-species-choice:first-child {
    border-radius: 1rem 1rem 0 0;
}

.pet-species-choice:last-child {
    border-radius: 0 0 1rem 1rem;
}

.pet-species-choice + .pet-species-choice {
    margin-top: -1px;
}

.pet-cost-fields {
    margin-top: 1rem;
}

.pet-cost-fields .amount-control {
    width: 100%;
}

.pets-cost-card .live-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem 0 .9rem;
}

.pets-cost-card .live-total strong {
    flex: 0 0 auto;
}

@media (max-width: 430px) {
    .pets-cards {
        margin-top: 1.15rem;
    }

    .pet-species-choice {
        min-height: 4rem;
    }

    .pets-cost-card .live-total {
        margin-top: 1.35rem;
        margin-bottom: .85rem;
    }
}

/* v1.10.17: budjetin kertymä autoilun yhteenvedossa */
.budget-progress-card {
    display: grid;
    gap: .2rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: .95rem;
    background: #edf7f1;
    color: #24543a;
}

.budget-progress-card__title {
    font-size: .92rem;
    font-weight: 700;
}

.budget-progress-card__total {
    margin-top: .1rem;
    font-size: 1.55rem;
    color: var(--text);
}

.budget-progress-card__percentage {
    color: #416a54;
}

.budget-progress-card__bar {
    display: flex;
    height: 1.25rem;
    margin-top: .75rem;
    overflow: hidden;
    border-radius: .45rem;
    background: #dfe7e2;
}

.budget-progress-card__segment {
    display: block;
    height: 100%;
}

.budget-progress-card__segment--previous {
    background: #a8d9b5;
}

.budget-progress-card__segment--current {
    background: var(--primary);
}

.budget-progress-card__legend {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-top: .65rem;
    font-size: .78rem;
    color: #315d46;
}

.budget-progress-card__legend span {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
}

.budget-progress-card__key {
    width: .72rem;
    height: .72rem;
    flex: 0 0 auto;
    border-radius: .18rem;
}

.budget-progress-card__key--previous {
    background: #a8d9b5;
}

.budget-progress-card__key--current {
    background: var(--primary);
}

@media (max-width: 430px) {
    .budget-progress-card {
        margin-top: .75rem;
        padding: .85rem;
    }

    .budget-progress-card__total {
        font-size: 1.4rem;
    }

    .budget-progress-card__bar {
        height: 1.05rem;
        margin-top: .6rem;
    }

    .budget-progress-card__legend {
        display: grid;
        gap: .4rem;
    }
}



/* v1.10.19: autoilun varaus tiiviiksi, tarkemmat tiedot lisätietoihin */
.result-card__reserve-teaser {
    margin: 1rem .15rem 0;
    color: var(--primary-dark);
    font-size: .95rem;
    font-weight: 750;
    line-height: 1.35;
}

.result-card__reserve-teaser + .result-card__details {
    margin-top: .2rem;
}

.result-card__reserve-details {
    display: grid;
    gap: .3rem;
    margin-bottom: .8rem;
    padding: .8rem .9rem;
    border-radius: .8rem;
    background: #edf7f1;
    color: #24543a;
}

.result-card__reserve-details p {
    margin: 0;
    line-height: 1.42;
}

.result-card__reserve-details strong {
    font-size: .9rem;
}


/* v1.12.4: vakuutusten tarkka yhteissumma */
.insurance-live-total {
    display: grid;
    gap: .12rem;
    margin: .35rem 0 1rem;
    padding-top: .15rem;
}
.insurance-live-total > span {
    color: var(--muted);
    font-size: .98rem;
}
.insurance-live-total strong {
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1.15;
}
.insurance-live-total small {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.35;
}

/* v1.13.0: puhelin- ja digipalvelut */
.form-info {
    margin: 0 0 1rem;
    padding: .95rem 1rem;
    border-radius: 1rem;
    background: var(--soft-green);
    color: var(--green-dark);
    line-height: 1.45;
}
.form-total--stacked {
    display: grid;
    gap: .2rem;
    margin: .55rem 0 1.1rem;
}
.form-total--stacked span {
    color: var(--muted);
}
.form-total--stacked strong {
    font-size: 1.35rem;
    line-height: 1.15;
}

/* v1.14.0: harrastukset ja henkilökohtaiset menot */
.cost-group {
    display: grid;
    gap: .75rem;
    margin: 0 0 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
}
.cost-group legend {
    padding: 0 .35rem;
    font-weight: 800;
}
.cost-group--shared {
    margin-top: 1rem;
}
.person-subtotal {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
}
.person-subtotal strong {
    color: var(--text);
    white-space: nowrap;
}
.optional-person-card {
    margin: 0 0 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}
.optional-person-card summary {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1rem;
    cursor: pointer;
    color: var(--primary-dark);
    font-weight: 800;
    list-style: none;
}
.optional-person-card__arrow {
    display: inline-block;
    flex: 0 0 auto;
    width: .65rem;
    height: .65rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .18s ease;
}
.optional-person-card[open] .optional-person-card__arrow {
    transform: rotate(45deg) translate(-.1rem, -.1rem);
}
.optional-person-card summary::-webkit-details-marker { display: none; }
.optional-person-card__open { display: none; }
.optional-person-card[open] .optional-person-card__closed { display: none; }
.optional-person-card[open] .optional-person-card__open { display: inline; }
.optional-person-card__closed small,
.optional-person-card__open small {
    font-weight: 600;
    color: var(--muted);
}
.optional-person-card__content {
    display: grid;
    gap: .75rem;
    padding: 0 1rem 1rem;
}
.result-card__notice {
    margin: 1rem 0 0;
    padding: .85rem 1rem;
    border-radius: .9rem;
    background: var(--soft-green);
    color: var(--green-dark);
    line-height: 1.4;
}


/* v1.14.2: paluu tarkasta syötöstä nopeaan arvioon */
.form-choice-actions {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
}

.form-choice-actions .button {
    margin-top: 0;
}

/* v1.17.0: lopullinen yhteenveto */
.final-summary-card { margin-bottom: 1rem; }
.final-summary-section { margin-top: 1rem; }
.final-summary-section h2 { margin: .25rem 0 .75rem; font-size: clamp(1.35rem, 4vw, 1.7rem); line-height: 1.15; }
.final-summary-breakdown { display: grid; gap: .55rem; margin-top: 1rem; }
.final-summary-breakdown__row { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem .9rem; border:1px solid var(--border); border-radius:14px; color:inherit; text-decoration:none; background:#fff; }
.final-summary-breakdown__row:hover { border-color:var(--primary); }
.final-summary-breakdown__label { display:grid; gap:.15rem; min-width:0; }
.final-summary-breakdown__label small { color:var(--muted); }
.final-summary-breakdown__row > .money { white-space:nowrap; font-weight:750; }
.final-summary-highlight { margin-top:1rem; padding:.9rem 1rem; border-radius:14px; background:#f4f8f5; }
.final-summary-highlight p { margin:.25rem 0 0; }
.final-summary-reserve-list { display:grid; gap:.15rem; margin-top:1rem; }
.final-summary-reserve-list p { display:flex; justify-content:space-between; gap:1rem; margin:0; padding:.65rem 0; border-bottom:1px solid var(--border); }
.final-summary-reserve-list p:last-child { border-bottom:0; }
.final-summary-reserve-list strong { white-space:nowrap; }
.final-summary-estimates { display:grid; gap:.45rem; margin-top:.75rem; }
.final-summary-estimates a { display:flex; justify-content:space-between; gap:1rem; padding:.7rem .8rem; border-radius:12px; background:#f7f8f7; color:inherit; text-decoration:none; }
.final-summary-estimates strong { white-space:nowrap; color:var(--primary-dark); }
.final-summary-accuracy { border-color:#d7c98b; background:#fffdf4; }
.final-summary-check { background:#f8faf8; }
.final-summary-locked-list { display:grid; gap:.55rem; margin-top:.9rem; }
.final-summary-locked-list p { margin:0; padding:.7rem .8rem; border-radius:12px; background:#f5f6f5; }
@media (max-width:430px) {
    .final-summary-breakdown__row { align-items:flex-start; }
    .final-summary-reserve-list p { align-items:flex-start; }
}

/* v1.17.1: yhteenvetonäkymän visuaalinen viimeistely */
.final-summary-card__label {
    margin: .35rem 0 .1rem;
    color: var(--muted);
    font-size: .98rem;
    font-weight: 700;
}
.final-summary-card .result-title {
    margin-top: 0;
}
.final-summary-breakdown {
    gap: .7rem;
}
.final-summary-breakdown__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: .85rem .95rem;
}
.final-summary-breakdown__main {
    display: grid;
    grid-template-columns: 1.55rem minmax(0, 1fr);
    align-items: center;
    gap: .7rem;
    min-width: 0;
}
.final-summary-breakdown__icon {
    font-size: 1.15rem;
    line-height: 1;
    text-align: center;
}
.final-summary-breakdown__label {
    gap: .45rem;
}
.final-summary-breakdown__bar {
    display: block;
    width: 100%;
    height: .42rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e4ebe7;
}
.final-summary-breakdown__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}
.final-summary-breakdown__numbers {
    display: grid;
    gap: .12rem;
    text-align: right;
    white-space: nowrap;
}
.final-summary-breakdown__numbers small {
    color: var(--muted);
    font-size: .9rem;
}
.final-summary-podium {
    display: grid;
    gap: .55rem;
    margin-top: .65rem;
}
.final-summary-podium span {
    font-weight: 700;
}
.final-summary-reserve-table {
    display: grid;
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
}
.final-summary-reserve-table__header,
.final-summary-reserve-table__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(7.2rem, auto) minmax(5.4rem, auto);
    gap: 1rem;
    align-items: start;
    padding: .72rem .9rem;
}
.final-summary-reserve-table__header {
    background: #f4f8f5;
    color: var(--primary-dark);
    font-size: .9rem;
    font-weight: 800;
}
.final-summary-reserve-table__row {
    border-top: 1px solid var(--border);
}
.final-summary-reserve-table__header > :nth-child(2),
.final-summary-reserve-table__row > :nth-child(2),
.final-summary-reserve-table__header > :last-child,
.final-summary-reserve-table__row > :last-child {
    text-align: right;
    white-space: nowrap;
}
.final-summary-reserve-table__annual {
    color: var(--muted);
    font-size: .9rem;
}
.final-summary-reserve-table__monthly {
    color: var(--text);
    font-weight: 800;
}
.final-summary-reserve-details {
    margin-top: .9rem;
}
.final-summary-reserve-details .final-summary-reserve-table {
    margin-top: .8rem;
}
.final-summary-accuracy .lead strong {
    color: var(--text);
}
.final-summary-estimates {
    gap: .55rem;
}
.final-summary-estimates a {
    align-items: center;
    padding: .78rem .9rem;
    border: 1px solid var(--border);
    background: #fff;
}
.final-summary-estimates a:hover {
    border-color: var(--primary);
}
.final-summary-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem 1rem;
    margin: 1rem 0;
}
.final-summary-checklist span {
    line-height: 1.35;
}
.final-summary-upcoming .lead {
    margin-bottom: 1rem;
}

@media (max-width: 430px) {
    .final-summary-breakdown__row {
        align-items: center;
    }
    .final-summary-breakdown__main {
        grid-template-columns: 1.35rem minmax(0, 1fr);
        gap: .55rem;
    }
    .final-summary-breakdown__numbers .money {
        font-size: .95rem;
    }
    .final-summary-reserve-table__header,
    .final-summary-reserve-table__row {
        grid-template-columns: minmax(0, 1fr) 6.7rem 5.2rem;
        gap: .65rem;
        padding: .68rem .75rem;
    }
    .final-summary-checklist {
        grid-template-columns: 1fr;
    }
}

/* v1.17.2: yhteenvedon taulukot ja listat */
.final-summary-breakdown {
    display: grid;
    gap: 0;
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}
.final-summary-breakdown__header,
.final-summary-breakdown__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(7.5rem, auto) 4.25rem;
    gap: 1rem;
    align-items: center;
    padding: .78rem .9rem;
}
.final-summary-breakdown__header {
    background: #f4f8f5;
    color: var(--primary-dark);
    font-size: .88rem;
    font-weight: 800;
}
.final-summary-breakdown__header > :nth-child(2),
.final-summary-breakdown__header > :nth-child(3) {
    text-align: right;
}
.final-summary-breakdown__row {
    border-top: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
}
.final-summary-breakdown__row:hover {
    background: #f8faf8;
}
.final-summary-breakdown__category {
    display: grid;
    gap: .5rem;
    min-width: 0;
}
.final-summary-breakdown__category-line {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}
.final-summary-breakdown__category-line strong {
    overflow-wrap: anywhere;
}
.final-summary-breakdown__amount,
.final-summary-breakdown__percentage {
    text-align: right;
    white-space: nowrap;
}
.final-summary-breakdown__percentage {
    color: var(--muted);
}
.final-summary-podium {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.final-summary-podium > span {
    padding: .7rem .75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    text-align: center;
}
.final-summary-reserve-table__row:nth-child(even) {
    background: #fbfcfb;
}
.final-summary-reserve-table::after {
    content: "Yhteensä";
    display: none;
}
.final-summary-estimates a {
    min-height: 3rem;
}
.final-summary-estimates a span {
    font-weight: 700;
}
.final-summary-checklist {
    list-style: none;
    padding: 0;
}
.final-summary-checklist li {
    position: relative;
    padding-left: 1.65rem;
    line-height: 1.4;
}
.final-summary-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: 900;
}

@media (max-width: 600px) {
    .final-summary-breakdown__header {
        display: none;
    }
    .final-summary-breakdown__row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: .4rem .8rem;
        padding: .8rem .75rem;
    }
    .final-summary-breakdown__category {
        grid-row: 1 / span 2;
    }
    .final-summary-breakdown__amount,
    .final-summary-breakdown__percentage {
        grid-column: 2;
    }
    .final-summary-breakdown__percentage {
        font-size: .88rem;
    }
    .final-summary-podium {
        grid-template-columns: 1fr;
    }
}

/* v1.18.0: jaettava yhteenveto */
.shared-budget-notice {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    margin: 0 0 1rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(45, 111, 78, .22);
    border-radius: 14px;
    background: rgba(45, 111, 78, .08);
    color: #214f3a;
}

.shared-budget-notice span {
    font-size: .92rem;
}

.final-summary-breakdown__row--readonly {
    cursor: default;
}

.final-summary-estimates__readonly {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.final-summary-estimates__readonly strong {
    color: var(--muted, #6b7280);
    font-size: .9rem;
}

.final-summary-share__ready {
    display: grid;
    gap: .85rem;
    margin-top: 1rem;
}

.final-summary-share__ready > p:first-child {
    margin: 0;
    font-weight: 700;
    color: #2d6f4e;
}

.final-summary-share__url {
    overflow-wrap: anywhere;
    padding: .8rem .9rem;
    border: 1px solid var(--border, #d8ddd9);
    border-radius: 12px;
    background: #f7f9f8;
    color: #334155;
    font-size: .9rem;
}

.final-summary-share__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
}

.final-summary-share .full-width {
    width: 100%;
}

.shared-budget-empty {
    text-align: center;
}

@media (max-width: 430px) {
    .final-summary-share__actions {
        grid-template-columns: 1fr;
    }
}

/* v1.18.1: jaettavan yhteenvetonäkymän valinta */
.final-summary-share__views { margin: 1.25rem 0; }
.final-summary-share__views .choice-list { margin-top: .65rem; }
.final-summary-share__ready[hidden] { display: none; }

/* v1.19.0: yhteenvetonäkymät ja säästöön jäävä osuus */
.summary-view-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
    margin: 0 0 1rem;
    padding: .3rem;
    border: 1px solid var(--border, #d8ddd9);
    border-radius: 14px;
    background: #f3f6f4;
}

.summary-view-switcher a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: .55rem .65rem;
    border-radius: 10px;
    color: var(--muted, #64748b);
    font-size: .9rem;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
}

.summary-view-switcher a.is-active {
    background: #fff;
    color: var(--primary-dark, #24543a);
    box-shadow: 0 1px 5px rgba(20, 50, 35, .1);
}

.summary-key-figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: 1.15rem 0;
}

.summary-key-figures > div {
    display: grid;
    gap: .25rem;
    min-width: 0;
    padding: .85rem .8rem;
    border: 1px solid var(--border, #d8ddd9);
    border-radius: 13px;
    background: #fff;
}

.summary-key-figures span {
    color: var(--muted, #64748b);
    font-size: .82rem;
    font-weight: 700;
}

.summary-key-figures strong {
    overflow-wrap: anywhere;
    font-size: 1.12rem;
    line-height: 1.15;
}

.summary-key-figures__remaining--good {
    border-color: rgba(45, 111, 78, .28) !important;
    background: rgba(45, 111, 78, .07) !important;
}

.summary-key-figures__remaining--low {
    border-color: rgba(180, 120, 25, .3) !important;
    background: rgba(245, 184, 74, .1) !important;
}

.summary-key-figures__remaining--negative {
    border-color: rgba(180, 55, 55, .28) !important;
    background: rgba(190, 55, 55, .07) !important;
}

.summary-remaining-status {
    display: grid;
    gap: .25rem;
    margin: 0 0 1rem;
    padding: .85rem .95rem;
    border-radius: 12px;
    line-height: 1.4;
}

.summary-remaining-status span {
    font-size: .92rem;
}

.summary-remaining-status--good {
    background: rgba(45, 111, 78, .09);
    color: #24543a;
}

.summary-remaining-status--low {
    background: rgba(245, 184, 74, .14);
    color: #74520e;
}

.summary-remaining-status--negative {
    background: rgba(190, 55, 55, .09);
    color: #7d2929;
}

@media (max-width: 430px) {
    .summary-view-switcher a {
        min-height: 2.55rem;
        padding: .45rem .35rem;
        font-size: .82rem;
    }

    .summary-key-figures {
        grid-template-columns: 1fr 1fr;
    }

    .summary-key-figures__remaining {
        grid-column: 1 / -1;
    }

    .summary-key-figures__remaining strong {
        font-size: 1.35rem;
    }
}

/* v1.20.5: etusivun yhteenvetoesimerkki */
.home-hero__button {
    width: 100%;
}

.home-preview {
    margin-top: 1.35rem;
}

.home-preview > h2 {
    margin: 0 0 .85rem;
    font-size: clamp(1.25rem, 4vw, 1.55rem);
    line-height: 1.25;
    letter-spacing: -.02em;
}

.home-preview__card {
    overflow: hidden;
    padding: clamp(1rem, 4vw, 1.35rem);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.home-preview__eyebrow {
    margin: 0 0 .85rem;
    color: var(--primary);
    font-size: .88rem;
    font-weight: 800;
}

.home-preview__figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

.home-preview__figures > div {
    display: grid;
    gap: .2rem;
    min-width: 0;
    padding: .8rem;
    border: 1px solid var(--border);
    border-radius: .9rem;
    background: #fff;
}

.home-preview__figures span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.home-preview__figures strong {
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
}

.home-preview__figures .home-preview__remaining {
    border-color: rgba(45, 111, 78, .25);
    background: #edf7f1;
}

.home-preview__breakdown {
    display: grid;
    margin-top: .85rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: .95rem;
    background: #fff;
}

.home-preview__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .85rem;
}

.home-preview__row + .home-preview__row {
    border-top: 1px solid var(--border);
}

.home-preview__row > span {
    min-width: 0;
}

.home-preview__row strong {
    flex: 0 0 auto;
    font-size: .92rem;
    white-space: nowrap;
}

.home-preview__recommendation {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-top: .85rem;
    padding: .85rem .9rem;
    border-radius: .95rem;
    background: #edf7f1;
    color: #24543a;
}

.home-preview__recommendation-icon {
    flex: 0 0 auto;
    line-height: 1.35;
}

.home-preview__recommendation p {
    margin: .15rem 0 0;
    font-size: .9rem;
    line-height: 1.4;
}

.home-preview__note {
    margin: .7rem .15rem 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.4;
}

@media (max-width: 430px) {
    .home-preview {
        margin-top: 1rem;
    }

    .home-preview > h2 {
        margin-bottom: .7rem;
        font-size: 1.17rem;
    }

    .home-preview__card {
        padding: .9rem;
        border-radius: 1.1rem;
    }

    .home-preview__figures {
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
    }

    .home-preview__figures > div {
        padding: .68rem .72rem;
    }

    .home-preview__figures .home-preview__remaining {
        grid-column: 1 / -1;
    }

    .home-preview__figures .home-preview__remaining strong {
        font-size: 1.2rem;
    }

    .home-preview__row {
        padding: .68rem .72rem;
    }
}

/* v1.20.6: etusivun esimerkkiosion otsikko ja kortin varmistus */
.home-preview > h2 {
    font-size: clamp(1.2rem, 3.8vw, 1.5rem);
}

.home-preview__card.card {
    padding: clamp(1rem, 4vw, 1.35rem);
}

@media (max-width: 430px) {
    .home-preview > h2 {
        font-size: 1.15rem;
        line-height: 1.25;
    }

    .home-preview__card.card {
        padding: .9rem;
    }
}


/* v1.20.5: etusivun yhteenvetonäkymä */
.home-preview__card{padding:1.4rem}
.home-preview__card::before{content:"Koko talouden yhteenveto";display:block;color:var(--primary);font-weight:800;margin-bottom:.2rem}
.home-preview__card h3{margin:.2rem 0 1rem;font-size:2rem;line-height:1.05}
.home-preview__status{margin:1rem 0;padding:.9rem 1rem;border-radius:1rem;background:#edf7f1;color:#24543a}
.home-preview__more{margin-top:.9rem;padding-top:.9rem;border-top:1px solid var(--border);color:var(--muted);font-weight:700}
