:root {
    --paper: #f7f5ee;
    --white: #fffefa;
    --ink: #2d352d;
    --muted: #747a6c;
    --green: #4c6044;
    --sage: #e8ecdf;
    --line: #dcded3;
    --gold: #b09969;
    --red: #a75445;
    --yellow: #b69a47;
}
* {
    box-sizing: border-box;
}
[hidden] {
    display: none !important;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family:
        "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo,
        sans-serif;
    font-size: 15px;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
    -webkit-tap-highlight-color: transparent;
}
button,
select,
summary {
    cursor: pointer;
}
a {
    color: inherit;
    text-underline-offset: 4px;
}
button {
    color: inherit;
}
button:disabled {
    opacity: 0.5;
    cursor: wait;
}
:focus-visible {
    outline: 3px solid #b3bd9c;
    outline-offset: 3px;
}
h1,
h2,
.footer-message {
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
    font-weight: 500;
    letter-spacing: 0.07em;
}
h1 {
    margin: 14px 0 22px;
    font-size: clamp(28px, 3.6vw, 43px);
    line-height: 1.65;
}
h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.7;
}
h3 {
    font-size: 17px;
    font-weight: 500;
    margin: 20px 0;
}
h4 {
    margin: 0 0 20px;
    font-size: 14px;
}
p {
    margin: 16px 0;
}
.wrap {
    width: min(1100px, calc(100% - 80px));
    margin-inline: auto;
}
.site-header {
    height: 88px;
    padding: 0 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: rgba(247, 245, 238, 0.97);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.brand {
    text-decoration: none;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    letter-spacing: 0.07em;
    line-height: 1.1;
    flex: none;
}
.brand span {
    font-size: 0.8em;
}
.brand small {
    display: block;
    margin-top: 7px;
    font-family: sans-serif;
    font-size: 8px;
    letter-spacing: 0.26em;
}
.header-label {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.13em;
}
.home-link {
    font-size: 12px;
    text-decoration: none;
}
.home-link span {
    margin-left: 12px;
}
.skip {
    position: fixed;
    top: -100px;
    z-index: 100;
    background: white;
    padding: 12px;
}
.skip:focus {
    top: 0;
}
.local-banner {
    padding: 6px 20px;
    background: #ebe6d6;
    color: #6b644c;
    text-align: center;
    font-size: 12px;
}
.hero {
    padding-block: 64px 60px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 50px;
}
.eyebrow {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.22em;
    font-family: sans-serif;
    font-weight: 500;
    margin: 0 0 12px;
}
.hero-copy {
    font-size: 15px;
    letter-spacing: 0.06em;
    color: #656d5f;
    line-height: 2;
}
.hero-tags {
    display: flex;
    gap: 20px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 11px;
}
.hero-tags span::before {
    content: "✓";
    margin-right: 5px;
    color: var(--green);
}
.hero-illustration {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-illustration svg {
    width: 100%;
    max-width: 390px;
}
.hero-illustration span {
    font-family: "Yu Mincho", serif;
    font-size: 12px;
    letter-spacing: 0.17em;
    color: #7b806d;
    margin-top: 12px;
}
.category-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--line);
    margin-bottom: 42px;
}
.category-nav button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 20px 10px;
    background: transparent;
    border: 0;
    border-bottom: 2px solid var(--line);
    color: #8f9287;
    font-size: 12px;
}
.category-nav span {
    font-size: 15px;
    letter-spacing: 0.06em;
}
.category-nav button.active {
    color: var(--green);
    border-color: var(--green);
    background: #eff0e7;
}
.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    align-items: start;
    gap: 44px;
}
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.section-heading h2 {
    font-size: 21px;
}
.section-heading > span {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}
.section-index {
    font-size: 52px !important;
    font-family: Georgia, serif;
    color: #d6d8c9 !important;
}
.progress-track {
    height: 3px;
    margin-bottom: 26px;
    background: #e5e7dc;
}
.progress-track span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--green);
    transition: width 0.3s ease;
}
.accordion {
    border: 1px solid var(--line);
    background: var(--white);
    margin-bottom: 14px;
}
.accordion > summary {
    padding: 24px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
}
summary::-webkit-details-marker {
    display: none;
}
.step-number {
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 20px;
}
.summary-title {
    flex: 1;
    font-size: 15px;
}
.summary-title small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: normal;
    margin-top: 3px;
}
.completion {
    color: var(--green);
    font-size: 15px;
}
.accordion[data-complete="true"] {
    border-color: #b9c3aa;
}
.chevron {
    width: 8px;
    height: 8px;
    border-right: 1px solid #727c66;
    border-bottom: 1px solid #727c66;
    transform: rotate(45deg);
    transition: transform 0.2s;
}
.accordion[open] .chevron {
    transform: rotate(225deg);
}
.accordion[open] > summary {
    border-bottom: 1px solid #e9ebdf;
}
.accordion-body {
    padding: 26px;
}
fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}
.segmented {
    display: flex;
    padding: 4px;
    gap: 4px;
    background: #f0f1e9;
    margin-bottom: 30px;
}
.segmented label {
    flex: 1;
    position: relative;
    cursor: pointer;
}
.segmented input {
    position: absolute;
    opacity: 0;
}
.segmented span {
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.segmented input:checked + span {
    background: var(--white);
    box-shadow: 0 2px 5px #2d352d0a;
    color: var(--green);
}
.segmented input:focus-visible + span {
    outline: 2px solid var(--green);
}
.field {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 23px;
    min-width: 0;
}
.field > span:first-child {
    font-size: 13px;
    color: #5a6453;
}
.field small {
    font-size: 10px;
    color: var(--muted);
    margin-left: 7px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #d9dccf;
    border-radius: 0;
    background: #fffefa;
    color: var(--ink);
    font-size: 16px;
    min-height: 48px;
}
input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}
input::-webkit-inner-spin-button {
    opacity: 0.5;
}
.input-unit {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
}
.input-unit input {
    text-align: right;
}
.input-unit > span {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}
.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}
.range-field {
    position: relative;
    margin: 8px 0 28px;
}
.range-field > label {
    color: #5a6453;
    font-size: 13px;
    display: block;
    margin-bottom: 8px;
}
.range-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: end;
    margin: -30px 0 16px;
}
.range-value input {
    width: 105px !important;
    border: none !important;
    border-bottom: 1px solid var(--line) !important;
    background: transparent !important;
    text-align: right;
    font-family: Georgia, serif;
    font-size: 32px !important;
    min-height: 44px !important;
    padding: 0 6px !important;
}
.range-value span {
    font-size: 12px;
    color: var(--muted);
}
input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    margin: 18px 0 0;
    background: linear-gradient(
        to right,
        var(--green) var(--position, 25%),
        #e2e5d7 var(--position, 25%)
    );
    border-radius: 4px;
    cursor: pointer;
    touch-action: pan-y;
}
input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    background: #fffefa;
    border: 2px solid var(--green);
    border-radius: 50%;
    box-shadow: 0 2px 5px #35452b18;
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 2px solid var(--green);
    border-radius: 50%;
    background: #fffefa;
}
.range-ends {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #939988;
    margin-top: 10px;
}
.hint {
    display: block;
    font-size: 11px;
    line-height: 1.85;
    color: var(--muted);
    font-weight: normal;
    letter-spacing: 0.02em;
}
.inline-note {
    border-top: 1px solid var(--line);
    padding-top: 13px;
    margin: 24px 0;
    font-size: 12px;
}
.inline-note > summary {
    color: #5e6a51;
    font-size: 12px;
}
.inline-note > summary::after {
    content: " ＋";
    float: right;
}
.inline-note[open] > summary::after {
    content: " −";
}
.next-button {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--green);
    padding: 10px 0;
    margin-top: 8px;
    font-size: 12px;
    color: var(--green);
    display: flex;
    gap: 40px;
    margin-left: auto;
}
.primary-button,
.outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--green);
    padding: 17px 24px;
    background: var(--green);
    color: white;
    font-size: 13px;
    text-decoration: none;
    line-height: 1.7;
    transition: background 0.2s;
}
.primary-button:hover {
    background: #3b5033;
}
.primary-button span {
    margin-left: 20px;
}
.outline-button {
    background: transparent;
    color: var(--green);
    padding: 11px 18px;
    font-size: 12px;
}
.outline-button:hover {
    background: #eef0e6;
}
.full {
    width: 100%;
}
.result-card {
    padding: 30px;
    background: #eef0e5;
    border: 1px solid #d9dfcb;
    position: sticky;
    top: 112px;
}
.result-card h2 {
    font-family: inherit;
    font-size: 15px;
    letter-spacing: 0.02em;
    font-weight: normal;
    margin-top: 22px;
}
.amount-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
}
.amount-line strong {
    font-family: Georgia, serif;
    font-weight: normal;
    font-size: 43px;
    color: #35472d;
    letter-spacing: -0.02em;
    line-height: 1.4;
}
.amount-line span {
    font-size: 12px;
}
.result-caption {
    font-size: 10px;
    color: var(--muted);
    margin: 8px 0 28px;
}
.breakdown {
    border-top: 1px solid #d5dbc9;
    margin-top: 14px;
    padding-top: 14px;
}
.breakdown > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 7px 0;
    font-size: 11px;
}
.breakdown dt {
    color: #6c7563;
}
.breakdown dd {
    margin: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.status {
    font-size: 11px;
    min-height: 18px;
    color: var(--muted);
}
.error,
.warning {
    padding: 13px 16px;
    background: #f5e9df;
    color: #8b4f3d;
    border-left: 2px solid #b17754;
    font-size: 12px;
    line-height: 1.8;
}
.final-trial {
    margin-top: 76px;
    padding: 44px 48px;
    background: #edeedc;
    border: 1px solid #dcdfc8;
}
.final-trial .section-heading h2 {
    font-size: 27px;
}
.final-trial > p {
    color: #69705f;
    line-height: 2.1;
    font-size: 13px;
    margin-bottom: 28px;
}
.handoff-panel {
    background: #fffefa;
    padding: 24px;
    margin-top: 28px;
    font-size: 13px;
}
.code-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.code-row code {
    font-size: 17px;
    color: var(--green);
    overflow-wrap: anywhere;
    user-select: all;
}
.text-link {
    display: inline-block;
    color: var(--green);
    font-size: 12px;
    margin-top: 10px;
}
.line-button {
    margin: 10px 0;
}
.bottom-note {
    margin-block: 48px 60px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.9;
}
.bottom-note details {
    margin-top: 24px;
}
.disclaimer {
    border-top: 1px solid var(--line);
    padding-top: 24px;
}
.rate-row {
    border: 1px solid var(--line);
    padding: 18px;
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: center;
}
.rate-row .field {
    margin-bottom: 0;
}
.remove-button {
    color: #898171;
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 11px;
    padding: 8px 4px;
}
.life-intro {
    padding-block: 36px 28px;
}
.life-intro h1 {
    font-size: 30px;
    margin: 8px 0 12px;
}
.life-intro > p:last-child {
    font-size: 13px;
    color: var(--muted);
}
.code-gate {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 36px;
    margin-bottom: 64px;
    max-width: 680px;
}
.code-gate h2 {
    font-size: 23px;
    margin: 12px 0;
}
.code-gate > p {
    font-size: 13px;
    color: var(--muted);
}
.chart-dock {
    background: #f1f2e9;
    border-block: 1px solid #d9dfce;
    padding: 18px 0 10px;
    position: sticky;
    top: 88px;
    z-index: 30;
    box-shadow: 0 10px 20px #25322006;
}
.chart-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.chart-heading .eyebrow {
    font-size: 9px;
    margin-bottom: 2px;
}
.chart-heading h2 {
    font-size: 20px;
}
.chart-last {
    text-align: right;
    line-height: 1.5;
}
.chart-last > span {
    display: block;
    font-size: 10px;
    color: var(--muted);
}
.chart-last strong {
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: normal;
    color: var(--green);
}
.chart-last small {
    font-size: 10px;
    margin-left: 6px;
}
.chart-box {
    position: relative;
    height: 185px;
}
#asset-chart {
    width: 100%;
    height: 100%;
    overflow: visible;
}
#chart-line {
    fill: none;
    stroke: #5b7452;
    stroke-width: 2.5;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}
#chart-area {
    fill: #96ac7a20;
    stroke: none;
}
.grid-line {
    stroke: #d9dfce;
    stroke-width: 1;
}
.zero-line {
    stroke: #ac7868;
    stroke-dasharray: 5 5;
}
.axis-label {
    font-family: sans-serif;
    font-size: 11px;
    fill: #8c9482;
}
#chart-cursor {
    stroke: #8a957b;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}
.chart-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    color: #969d89;
    font-size: 12px;
    background: #f1f2e9ec;
    border-bottom: 1px solid #dce1d2;
}
.chart-status {
    font-size: 10px;
    margin: 4px 0;
    color: #7f8872;
    min-height: 16px;
}
.chart-tooltip {
    position: absolute;
    bottom: 26px;
    left: 12%;
    width: min(680px, 85%);
    padding: 12px 16px;
    background: #fffef9f5;
    border: 1px solid #d2d8c5;
    box-shadow: 0 6px 16px #26351b12;
    pointer-events: none;
    font-size: 10px;
    line-height: 1.7;
}
.chart-tooltip strong {
    font-weight: 500;
    color: var(--green);
}
.chart-tooltip p {
    margin: 3px 0;
}
.chart-tooltip small {
    color: var(--gold);
}
.chart-dock.outdated #chart-line,
.chart-dock.outdated #chart-area {
    opacity: 0.35;
}
.life-input-wrap {
    max-width: 850px;
    margin-top: 38px;
}
body[data-page="lifeplan"] {
    scroll-padding-top: 400px;
}
body[data-page="lifeplan"] .accordion {
    scroll-margin-top: 395px;
}
body[data-page="lifeplan"] .life-results {
    scroll-margin-top: 390px;
}
.compact {
    margin-bottom: 12px;
}
.compact h3 {
    margin: 0;
}
.child-card,
.event-card,
.income-change-card {
    background: #f6f7ef;
    border: 1px solid #dfe3d3;
    padding: 22px;
    margin: 18px 0;
}
.mini-result {
    background: #edf0e3;
    padding: 14px 18px;
    font-size: 12px;
    color: #617051;
    margin-bottom: 26px;
}
.check-label {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 13px;
    margin: 20px 0;
}
.check-label input {
    width: 17px;
    height: 17px;
    margin: 4px 0 0;
    accent-color: var(--green);
    flex: none;
}
.check-label .hint {
    margin-top: 6px;
}
.life-results {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    padding-top: 40px;
}
.life-results h2 {
    font-size: 28px;
}
.budget-stats {
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.8fr;
    gap: 25px;
    margin: 36px 0 32px;
}
.budget-stats > div {
    border-right: 1px solid var(--line);
    padding-right: 20px;
}
.budget-stats > div:last-child {
    border: 0;
}
.budget-stats span {
    display: block;
    font-size: 12px;
    line-height: 1.8;
    color: var(--muted);
    min-height: 44px;
}
.budget-stats strong {
    font-family: Georgia, serif;
    font-weight: normal;
    font-size: 39px;
    color: var(--green);
}
.budget-stats small {
    font-size: 11px;
    margin-left: 8px;
}
.budget-bar {
    background: #e0e3d7;
    height: 17px;
    border-radius: 2px;
    overflow: hidden;
}
.budget-bar > span {
    display: block;
    height: 100%;
    width: 0;
    transition:
        width 0.3s,
        background 0.3s;
    background: var(--green);
}
#budget-fill[data-tone="green"] {
    background: #6b8559;
}
#budget-fill[data-tone="yellow"] {
    background: #c2a856;
}
#budget-fill[data-tone="red"] {
    background: #b66f59;
}
.bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    color: var(--muted);
}
.budget-message {
    font-size: 14px;
    margin-top: 24px;
}
.consult-section {
    margin-top: 70px;
    padding: 42px;
    background: #eceedf;
}
.consult-section h2 {
    font-size: 28px;
}
.consult-section > p:not(.eyebrow) {
    color: var(--muted);
    font-size: 13px;
    line-height: 2;
}
.consult-details > summary {
    list-style: none;
    margin-top: 26px;
}
#consult-form {
    margin-top: 30px;
    padding: 30px;
    background: #fffefa;
}
.honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}
.thanks-page {
    min-height: 650px;
    padding: 70px 0;
    text-align: center;
}
.thanks-mark {
    border: 1px solid #a2b092;
    border-radius: 50%;
    color: var(--green);
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    margin: 0 auto 28px;
    font-size: 25px;
}
.thanks-page h1 {
    font-size: 30px;
}
.thanks-page p {
    font-size: 13px;
    line-height: 2;
}
.thanks-page .outline-button {
    margin-top: 24px;
}
.prose {
    max-width: 760px;
    padding: 50px 0 80px;
}
.prose h1 {
    font-size: 30px;
}
.prose h2 {
    font-size: 22px;
    margin-top: 32px;
}
.prose p {
    font-size: 13px;
    line-height: 2;
}
.site-footer {
    margin-top: 70px;
    padding: 48px 40px;
    border-top: 1px solid var(--line);
    text-align: center;
    background: #efeee5;
}
.footer-message {
    font-size: 20px;
    line-height: 1.9;
    margin-bottom: 32px;
}
.site-footer p {
    font-size: 11px;
    line-height: 1.9;
    color: var(--muted);
}
.site-footer > a:not(.brand) {
    display: block;
    margin-top: 22px;
    font-size: 10px;
}
.site-footer > small {
    display: block;
    margin-top: 34px;
    font-size: 9px;
    letter-spacing: 0.1em;
    color: #999f8d;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (min-width: 1600px) {
    .hero {
        padding-block: 82px;
    }
}
@media (max-width: 900px) {
    .wrap {
        width: calc(100% - 48px);
    }
    .calculator-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 26px;
    }
    .result-card {
        padding: 24px;
    }
    .amount-line strong {
        font-size: 37px;
    }
    .hero {
        gap: 20px;
    }
}
@media (max-width: 700px) {
    html {
        scroll-padding-top: 75px;
    }
    .wrap {
        width: calc(100% - 36px);
    }
    .site-header {
        height: 64px;
        padding: 0 18px;
        gap: 10px;
    }
    .brand {
        font-size: 21px;
    }
    .brand small {
        font-size: 7px;
        margin-top: 5px;
    }
    .header-label {
        display: none;
    }
    .home-link {
        font-size: 10px;
    }
    .local-banner {
        font-size: 10px;
        padding-inline: 10px;
    }
    .hero {
        padding: 35px 0 30px;
        grid-template-columns: 1fr;
        gap: 0;
    }
    h1 {
        font-size: 30px;
        margin-block: 12px 16px;
    }
    .hero-copy {
        font-size: 13px;
    }
    .hero-tags {
        font-size: 10px;
        gap: 14px;
        margin-top: 22px;
    }
    .hero-illustration {
        display: none;
    }
    .category-nav {
        margin-bottom: 24px;
    }
    .category-nav button {
        padding: 15px 3px;
        gap: 9px;
        font-size: 10px;
    }
    .category-nav span {
        font-size: 12px;
    }
    .calculator-layout {
        display: flex;
        flex-direction: column;
        gap: 22px;
    }
    .result-card {
        order: -1;
        width: 100%;
        position: static;
        padding: 20px 24px;
    }
    .result-card .eyebrow {
        margin: 0;
        font-size: 9px;
    }
    .result-card h2 {
        margin-top: 8px;
        font-size: 13px;
    }
    .amount-line {
        margin: 0;
    }
    .amount-line strong {
        font-size: 39px;
    }
    .result-caption {
        margin: 3px 0 0;
    }
    .breakdown {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 18px;
        padding-top: 10px;
        margin-bottom: 2px;
    }
    .breakdown > div {
        font-size: 10px;
        padding-block: 4px;
        flex-wrap: wrap;
        gap: 0 6px;
    }
    .result-card > .hint {
        margin-bottom: 0;
    }
    .result-card .status {
        min-height: 0;
        margin: 0;
    }
    .input-column {
        width: 100%;
    }
    .section-heading {
        margin-bottom: 18px;
    }
    .section-heading h2 {
        font-size: 18px;
    }
    .section-heading > span {
        font-size: 10px;
    }
    .accordion > summary {
        padding: 20px 18px;
        gap: 13px;
    }
    .summary-title {
        font-size: 14px;
    }
    .summary-title small {
        font-size: 10px;
    }
    .accordion-body {
        padding: 23px 18px;
    }
    .field-grid {
        gap: 0 12px;
    }
    .field > span:first-child {
        font-size: 11px;
    }
    .field {
        margin-bottom: 21px;
    }
    .input-unit {
        gap: 5px;
    }
    .input-unit > span {
        font-size: 10px;
    }
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea {
        padding: 11px 9px;
    }
    .range-value input {
        font-size: 30px !important;
        width: 95px !important;
    }
    .range-field > label {
        font-size: 12px;
    }
    .range-value span {
        font-size: 10px;
    }
    .range-value {
        margin-top: -28px;
    }
    .primary-button {
        padding: 17px 18px;
        font-size: 12px;
    }
    .primary-button span {
        margin-left: 0;
    }
    .rate-row {
        gap: 8px;
        padding: 13px;
        grid-template-columns: 1fr 1fr;
    }
    .rate-row > button {
        grid-column: 2;
        justify-self: end;
    }
    .final-trial {
        padding: 28px 22px;
        margin-top: 45px;
    }
    .final-trial .section-heading h2 {
        font-size: 23px;
    }
    .section-index {
        font-size: 38px !important;
    }
    .final-trial > p {
        font-size: 12px;
    }
    .handoff-panel {
        padding: 18px;
    }
    .code-row code {
        font-size: 13px;
    }
    .life-intro {
        padding-block: 28px 20px;
    }
    .life-intro h1 {
        font-size: 25px;
    }
    .life-intro > p:last-child {
        font-size: 11px;
    }
    .code-gate {
        padding: 26px 20px;
    }
    .code-gate h2 {
        font-size: 20px;
    }
    .chart-dock {
        top: 64px;
        padding-top: 10px;
    }
    .chart-dock > .wrap {
        width: calc(100% - 24px);
    }
    .chart-heading {
        gap: 8px;
    }
    .chart-heading h2 {
        font-size: 14px;
        letter-spacing: 0.02em;
    }
    .chart-heading .eyebrow {
        font-size: 8px;
    }
    .chart-last > span {
        font-size: 8px;
    }
    .chart-last strong {
        font-size: 23px;
    }
    .chart-last small {
        font-size: 9px;
    }
    .chart-box {
        height: 117px;
    }
    .chart-status {
        font-size: 9px;
        margin-top: 0;
        line-height: 1.55;
    }
    .chart-tooltip {
        font-size: 9px;
        left: 6%;
        width: 94%;
        padding: 9px;
        bottom: 16px;
    }
    .chart-tooltip p {
        margin: 2px 0;
    }
    .life-input-wrap {
        margin-top: 28px;
    }
    body[data-page="lifeplan"] .accordion {
        scroll-margin-top: 280px;
    }
    body[data-page="lifeplan"] .life-results {
        scroll-margin-top: 280px;
    }
    .mini-result {
        padding: 12px;
        font-size: 10px;
        line-height: 1.8;
    }
    .child-card,
    .event-card,
    .income-change-card {
        padding: 16px;
    }
    .life-results {
        padding-top: 25px;
        margin-top: 40px;
    }
    .life-results h2 {
        font-size: 24px;
    }
    .budget-stats {
        gap: 16px;
        grid-template-columns: 1fr 1fr;
        margin-block: 25px;
    }
    .budget-stats > div {
        padding-right: 8px;
    }
    .budget-stats > div:nth-child(2) {
        border: 0;
    }
    .budget-stats > div:last-child {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line);
        padding-top: 14px;
    }
    .budget-stats span {
        font-size: 10px;
        min-height: 34px;
    }
    .budget-stats > div:last-child span {
        display: inline;
        margin-right: 16px;
    }
    .budget-stats strong {
        font-size: 31px;
    }
    .budget-stats small {
        font-size: 10px;
        margin-left: 5px;
    }
    .budget-message {
        font-size: 12px;
    }
    .consult-section {
        padding: 28px 20px;
        margin-top: 44px;
    }
    .consult-section h2 {
        font-size: 22px;
    }
    #consult-form {
        padding: 22px 16px;
        margin-top: 22px;
    }
    #consult-form .field-grid {
        grid-template-columns: 1fr;
    }
    .check-label {
        font-size: 11px;
        gap: 9px;
    }
    .thanks-page {
        padding: 50px 0;
    }
    .thanks-page h1 {
        font-size: 24px;
    }
    .thanks-page p {
        font-size: 12px;
    }
    .prose h1 {
        font-size: 25px;
    }
    .prose h2 {
        font-size: 19px;
    }
    .site-footer {
        padding: 35px 20px;
    }
    .footer-message {
        font-size: 19px;
    }
}
@media (max-width: 360px) {
    .field-grid {
        grid-template-columns: 1fr;
    }
    .chart-heading h2 {
        font-size: 12px;
    }
    .chart-last > span {
        max-width: 110px;
    }
    .hero-tags {
        gap: 9px;
    }
    .budget-stats {
        gap: 12px;
    }
    .budget-stats strong {
        font-size: 28px;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* Keep numeric amounts and their currency units together on small screens. */
.budget-stats > div {
    white-space: nowrap;
}
.budget-stats > div > span {
    white-space: normal;
}
.life-results h2 {
    text-wrap: balance;
}
@media (max-width: 360px) {
    .budget-stats strong {
        font-size: 26px;
    }
}

/* Input first, results below. */
.calculator-layout {
    display: block;
    max-width: 850px;
}
.result-card {
    position: static;
    margin-top: 32px;
    order: initial;
    background: #ffffff;
}
.result-card > button {
    margin-top: 20px;
    width: 100%;
}
.brand img {
    display: block;
    width: 210px;
    height: auto;
}
.chart-dock {
    background: #ffffff;
    border-block: 1px solid #d6dcd2;
    box-shadow: 0 5px 16px #25322014;
}
.fixed-total > span {
    display: block;
    font-size: 13px;
}
.fixed-total > strong {
    display: block;
    font:
        normal 42px Georgia,
        serif;
    color: var(--green);
}
.fixed-total small {
    font: normal 13px sans-serif;
    margin-left: 8px;
}
.net-income {
    margin: 0;
    padding: 12px 15px;
    background: #eef0e5;
    align-self: end;
    font-size: 12px;
}
.net-income strong {
    font-size: 20px;
    font-weight: normal;
    color: var(--green);
}
@media (max-width: 680px) {
    .brand img {
        width: 165px;
    }
    .result-card {
        order: initial;
        margin-top: 24px;
    }
    .chart-dock {
        padding: 10px 0 6px;
    }
    .chart-heading h2 {
        font-size: 13px;
    }
    .chart-box {
        height: 108px;
    }
    .chart-status {
        margin: 2px 0 0;
        font-size: 10px;
    }
}
#show-result {
    width: 100%;
    margin-top: 24px;
}
.net-income {
    display: block;
    margin-top: 8px;
}

.line-button {
    margin-top: 24px;
}
.line-instruction {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.9;
}
.line-help {
    margin-top: 24px;
}
.line-help p {
    font-size: 12px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
#handoff-code {
    user-select: all;
}

/* Household revision: stable input baselines and readable results. */
body[data-page="lifeplan"] .field-grid {
    align-items: start;
}
body[data-page="lifeplan"] .field-grid > .field > span:first-child {
    min-height: 42px;
    display: flex;
    align-items: end;
}
body[data-page="lifeplan"] .field > input[type="range"] {
    width: 100%;
    margin: 3px 0 0;
}
body[data-page="lifeplan"] .input-unit select {
    flex: 1;
    width: 0;
}
body[data-page="lifeplan"] input[readonly] {
    background: #eef0e5;
}
body[data-page="lifeplan"] .chart-dock {
    position: static;
}
.milestones strong {
    font-size: 30px;
}
.table-scroll {
    overflow-x: auto;
    margin: 20px 0;
}
#cashflow-table {
    border-collapse: collapse;
    font-size: 12px;
    min-width: 920px;
    width: 100%;
}
#cashflow-table th,
#cashflow-table td {
    border-bottom: 1px solid #d9dccf;
    padding: 10px 7px;
    text-align: right;
    white-space: nowrap;
}
#cashflow-table th {
    background: #eef0e5;
    font-weight: normal;
}
.income-change-card {
    margin-top: 20px;
}
@media (max-width: 680px) {
    body[data-page="lifeplan"] .field-grid {
        grid-template-columns: 1fr;
    }
    body[data-page="lifeplan"] .field-grid > .field > span:first-child {
        min-height: 0;
    }
    body[data-page="lifeplan"] .chart-dock .axis-label {
        font-size: 8px;
    }
    body[data-page="lifeplan"] .chart-tooltip {
        position: static;
        width: 100%;
    }
    body[data-page="lifeplan"] .chart-box:has(.chart-tooltip:not([hidden])) {
        height: auto;
    }
}

/* Consultation date picker: configuration is separate from submission. */
.life-results .chart-dock {
    margin: 30px 0;
    padding: 20px 0 10px;
    box-shadow: none;
}
.life-results .chart-dock > .wrap {
    width: 100%;
    padding: 0 12px;
}
.consult-calendar {
    border: 1px solid #d9dccf;
    padding: 16px;
    margin: 24px 0;
    min-width: 0;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 8px;
}
.calendar-header button {
    padding: 8px;
    border: 1px solid #d9dccf;
    background: #fff;
    font-size: 13px;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}
.calendar-grid button {
    min-height: 55px;
    white-space: pre-line;
    border: 1px solid #d9dccf;
    background: #fff;
    color: #465d3f;
    padding: 5px 2px;
    line-height: 1.5;
}
.calendar-grid button[aria-pressed="true"] {
    background: #4e6247;
    color: #fff;
}
.calendar-grid button:disabled {
    color: #92968c;
    background: #eeeee8;
    cursor: not-allowed;
}
.calendar-weekday {
    text-align: center;
    font-size: 12px;
}
.calendar-selected {
    font-size: 13px;
    margin: 16px 0 0;
}
.consult-details > summary {
    white-space: normal;
    line-height: 1.7;
}
@media (max-width: 680px) {
    .consult-section {
        padding-inline: 12px;
    }
    #consult-form {
        padding-inline: 10px;
    }
    .consult-calendar {
        padding-inline: 0;
        border-inline: 0;
    }
    .calendar-grid {
        gap: 3px;
    }
}
