/* ============================================================
   My 530A Account, design system
   Echoes the official portal's warmth (Rule 2: never impersonates)
   ============================================================ */
:root {
    --color-primary: #0f2a4a;
    --color-primary-soft: #1d4d80;
    --color-gold: #c9a24b;
    --color-gold-text: #765914;
    --color-gold-soft: #f3e9d2;
    --color-sand: #beb29c;
    --color-sand-soft: #f1f0eb;
    --color-bg: #fdfbf7;
    --color-surface: #ffffff;
    --color-border: #e5dfd2;
    --color-text: #1c2430;
    --color-muted: #5a6675;
    --color-positive: #2e7d4f;
    --color-positive-soft: #f0f7f2;
    --color-error: #c0392b;
    --color-error-soft: #faf0ee;
    --color-info-soft: #eef3f9;
    --color-chart-invested: #0f5fa8;
    --color-chart-invested-muted: #6f96b7;
    --color-chart-earned-muted: #d5ba78;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 4px rgba(15, 42, 74, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 42, 74, 0.14);
    --shadow-lg: 0 16px 40px rgba(15, 42, 74, 0.16);
    --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: var(--font);
    --font-heading: "Instrument Serif", Georgia, "Times New Roman", serif;
    --font-display: var(--font);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    /* 17px, rem so a11y root scaling applies */
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

button,
input,
select,
textarea {
    font-family: var(--font);
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

h1,
h2,
h3 {
    color: var(--color-primary);
    line-height: 1.2;
    font-family: var(--font-heading);
    font-weight: 400;
}

h1 {
    font-size: 2.4rem;
    margin: 0.6em 0 0.4em;
    color: var(--color-text);
}

h2 {
    font-size: 1.75rem;
    margin-top: 2em;
}

h3 {
    font-size: 1.2rem;
}

a {
    color: var(--color-primary-soft);
}

a:hover {
    color: var(--color-primary);
}

/*p, li { max-width: 68ch; }*/
small,
.muted {
    color: var(--color-muted);
}

.content-provenance {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    align-items: center;
    margin: -2px 0 26px;
    padding: 11px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.content-provenance span:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 0.9em;
    margin-left: 18px;
    background: var(--color-border);
    vertical-align: -0.08em;
}

.content-provenance a {
    font-weight: 650;
}

@media (max-width: 640px) {
    .content-provenance {
        display: grid;
        gap: 4px;
        margin-bottom: 22px;
    }

    .content-provenance span::after {
        display: none !important;
    }
}

/* ---------- Header ---------- */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

/*body.home .site-header{
  border-bottom: none;
  background: none;
}*/
.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    flex: 0 0 auto;
    color: var(--color-primary);
    text-decoration: none;
    margin-right: 0;
}

.brand svg {
    display: none;
}

.brand::before {
    content: "";
    display: block;
    flex: 0 0 66px;
    width: 66px;
    height: 51px;
    background: url('/assets/img/logo-full.svg') center / contain no-repeat;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    white-space: nowrap;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--color-primary);
}

.brand-tagline {
    font-family: var(--font);
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--color-muted);
    letter-spacing: 0.01em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 18px;
}

.site-nav a {
    color: var(--color-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"]:not(.btn) {
    color: var(--color-primary);
}

.site-nav>a:not(.btn) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-top-icon {
    color: var(--color-primary);
    font-size: 0.92em;
}

.family-nav {
    position: relative;
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: none;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 1rem;
    text-decoration: none;
    margin-right: 8px;
}

.family-nav[hidden] {
    display: none;
}

.family-nav:hover {
    border-color: var(--color-gold);
    background: var(--color-gold-soft);
}

.family-nav-count {
    position: absolute;
    top: -6px;
    right: -7px;
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border: 2px solid var(--color-surface);
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.family-nav-count[hidden] {
    display: none;
}

.money-invested-text { color: var(--color-chart-invested) !important; }
.money-earned-text { color: var(--color-gold) !important; }

/* ---------- Cards & forms ---------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.field .hint {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: 4px;
}

input[type="number"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    font-family: var(--font);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
}

input:focus,
select:focus,
textarea:focus,
button:focus,
.tab:focus {
    outline: 2px solid var(--color-primary-soft);
    outline-offset: 1px;
    border-color: var(--color-gold);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--color-muted);
    cursor: grab;
}

input[type="range"]:active {
    cursor: grabbing;
}

fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 18px;
}

fieldset legend {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
    padding: 0;
    margin-bottom: 6px;
}

.radio-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.radio-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
}

.radio-row label:has(input:checked) {
    border-color: var(--color-gold);
    background: var(--color-gold-soft);
}

.radio-row .return-custom {
    flex-wrap: nowrap;
}

.return-custom input[type="number"] {
    width: 58px;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: right;
}

.field-label-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
    margin-bottom: 6px;
}

.field-label-row>label,
.info-tip-label {
    margin: 0;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}

/*.field-label-row > .info-tip {
    margin-left: auto;
}*/

.info-tip {
    position: relative;
    flex: none;
    display: inline-flex;
}

.info-tip-button {
    display: inline-grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 1rem;
}

.info-tip-button:hover {
    background: var(--color-sand-soft);
}

.info-tip-button:focus-visible {
    outline: 2px solid var(--color-sand-soft);
    outline-offset: 1px;
}

.info-tip-content {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    width: min(290px, calc(100vw - 48px));
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    box-shadow: var(--shadow-md);
    color: #fff;
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.45;
    text-align: left;
}

.info-tip-content .badge {
    color: #fff;
}

.return-fieldset {
    position: relative;
}

.return-fieldset>.info-tip {
    position: absolute;
    top: -7px;
    right: 0;
}

.calculator-inflation-settings {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fbfaf7;
}

.calculator-inflation-settings[hidden] {
    display: none !important;
}

.calculator-inflation-rate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--color-primary);
    font-weight: 650;
}

.calculator-inflation-rate > span,
.calculator-inflation-rate strong,
.calculator-inflation-rate small {
    display: block;
}

.calculator-inflation-rate > span:last-child,
.fam-inflation-rate > span:last-child {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    white-space: nowrap;
}

.calculator-inflation-rate small {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 450;
}

.calculator-inflation-rate input {
    width: 68px;
    margin-right: 4px;
    padding: 6px;
    text-align: right;
}

.calculator-dollar-mode {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.calculator-dollar-mode legend {
    width: 100%;
    margin-bottom: 7px;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.calculator-dollar-mode-options,
.fam-dollar-mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.calculator-dollar-mode-options label,
.fam-dollar-mode-options label {
    position: relative;
    cursor: pointer;
}

.calculator-dollar-mode-options input,
.fam-dollar-mode-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.calculator-dollar-mode-options span,
.fam-dollar-mode-options span {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 9px;
    border: 1px solid #9ab3cf;
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.calculator-dollar-mode-options input:checked + span,
.fam-dollar-mode-options input:checked + span {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.calculator-dollar-mode-options input:focus-visible + span,
.fam-dollar-mode-options input:focus-visible + span {
    outline: 3px solid color-mix(in srgb, var(--color-primary-soft) 35%, transparent);
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .info-tip-button {
        width: 44px;
        height: 44px;
    }

    .info-tip-content {
        width: min(310px, calc(100vw - 40px));
    }
}

.btn {
    display: inline-block;
    border: 0;
    cursor: pointer;
    background: var(--color-primary-soft);
    color: #fff;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
}

a.btn,
a.btn:hover,
a.btn:focus,
.btn,
.btn:hover {
    color: #fff;
    text-decoration: none;
}

.btn:hover {
    background: var(--color-primary);
}

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    background: var(--color-gold-soft);
    color: var(--color-primary);
    border: 1px solid var(--color-gold);
    border-radius: 999px;
    padding: 2px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}
td .badge{
    white-space: nowrap;
}

/* ---------- Results ---------- */
.results {
    margin-top: 8px;
}

.result-hero {
    text-align: center;
    padding: 10px 0 4px;
}

.result-hero .num {
    font-family: var(--mono);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
    line-height: 1.1;
}

.result-hero .label {
    color: var(--color-muted);
    font-size: 0.95rem;
}

.result-hero .accent {
    border-bottom: 4px solid var(--color-gold);
    padding-bottom: 2px;
}

.tabs {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 14px 0;
}

.tab {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 7px 16px;
    border-radius: 999px;
    cursor: pointer;
}

.tab[aria-selected="true"] {
    background: var(--color-gold-soft);
    border-color: var(--color-gold);
    color: var(--color-primary);
}

.scenario-strip {
    display: flex;
    gap: 10px;
    margin: 18px 0;
}

.scenario {
    flex: 1;
    text-align: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 6px;
}

.scenario .num {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-primary);
    display: block;
}

.scenario .label {
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* ---------- Tables ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
}

th,
td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid var(--color-border);
}

th {
    color: var(--color-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

td.num,
th.num {
    text-align: right;
    font-family: var(--mono);
}

tr:nth-child(even) td {
    background: rgba(243, 233, 210, 0.25);
}

.table-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 14px 0 22px;
}

.table-scroll table {
    margin: 0;
    min-width: 640px;
}

.compact-table {
    font-size: 0.86rem;
}

.compact-table th,
.compact-table td {
    padding: 5px 10px;
}

.compact-table th {
    font-size: 0.72rem;
    line-height: 1.15;
    vertical-align: bottom;
    white-space: normal;
}

.compact-table th .th-label {
    display: inline-block;
}

.compact-table .breakdown-toggle-row td {
    background: var(--color-surface);
    padding: 0;
    text-align: left;
}

.compact-table .breakdown-toggle-row button {
    appearance: none;
    background: none;
    border: 0;
    color: var(--color-primary);
    cursor: pointer;
    font: 600 0.8rem var(--font);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: normal;
    text-decoration: none;
}

.compact-table .breakdown-toggle-row button:hover {
    color: var(--color-gold);
}

/* ---------- Chart ---------- */
.chart-wrap {
    margin: 18px 0;
}

.chart-wrap svg {
    width: 100%;
    height: auto;
    display: block;
}

.chart-tooltip-target {
    cursor: help;
    outline: none;
}

.chart-tooltip-target:hover,
.chart-tooltip-target.is-tooltip-active {
    filter: brightness(1.12) drop-shadow(0 1px 1px rgba(15, 42, 74, 0.28));
}

.chart-tooltip-target:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.chart-tooltip {
    position: fixed;
    z-index: 1000;
    width: max-content;
    max-width: min(320px, calc(100vw - 16px));
    padding: 9px 11px;
    border: 1px solid rgba(240, 213, 139, 0.7);
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    box-shadow: var(--shadow-md);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.4;
    pointer-events: none;
}

.chart-tooltip[hidden] {
    display: none;
}

@media print {
    .chart-tooltip {
        display: none !important;
    }
}

.account-stage-key {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 0;
}

.account-stage {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: #fff;
    line-height: 1.15;
}

.account-stage > i {
    width: 11px;
    height: 25px;
    flex: 0 0 11px;
    border-radius: 2px;
    background: linear-gradient(to top, var(--color-chart-invested) 0 58%, var(--color-gold) 58% 100%);
}

.account-stage--ira {
    background: #faf9f5;
}

.account-stage--ira > i {
    background: linear-gradient(to top, var(--color-chart-invested-muted) 0 58%, var(--color-chart-earned-muted) 58% 100%);
}

.account-stage span,
.account-stage strong,
.account-stage small {
    display: block;
    min-width: 0;
}

.account-stage strong {
    color: var(--color-primary);
    font-size: 0.76rem;
}

.account-stage small {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 0.7rem;
}

.account-stage-note {
    margin: 6px 2px 0;
    color: var(--color-muted);
    font-size: 0.7rem;
    line-height: 1.35;
    text-align: center;
}

.summary-state-short {
    display: none;
}

.growth-breakdown-key {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px 28px;
    margin: 14px 0 10px;
    color: var(--color-text);
    font-size: 0.92rem;
}

.breakdown-equivalent {
    display: block;
    grid-column: 1;
    max-width: 44ch;
    color: var(--color-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.breakdown-total {
    font-family: var(--mono);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.05;
}

.breakdown-parts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.growth-breakdown-key .breakdown-parts span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Main projection breakdown: total on the left, invested/earned on the right */
#milestone-section.growth-breakdown-key,
#seccion-hitos.growth-breakdown-key {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
    align-items: center;
    gap: 12px 28px;
    border-top: 0;
    border-bottom: 0;
    padding: 9px 10px;
    background: transparent;
    font-size: 0.78rem;
}

.growth-value-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.growth-value-card {
    min-width: 0;
    padding-right: 20px;
}

.growth-value-card + .growth-value-card {
    padding-right: 0;
    padding-left: 20px;
    border-left: 1px solid var(--color-border);
}

.growth-value-card > span,
.growth-value-card > small {
    display: block;
}

.growth-value-card > span {
    color: var(--color-text);
    font-size: 0.8rem;
    font-weight: 700;
}

.growth-value-card > small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.growth-value-card--buying-power .breakdown-total {
    color: var(--color-primary-soft);
}

#milestone-section .breakdown-total,
#seccion-hitos .breakdown-total {
    font-size: clamp(2.25rem, 5vw, 3.4rem);
    text-decoration: none;
    border: 0;
}

#milestone-section .breakdown-parts,
#seccion-hitos .breakdown-parts {
    gap: 4px;
    padding-left: 14px;
    border-left: 1px solid var(--color-border);
}

#milestone-section .breakdown-parts strong,
#seccion-hitos .breakdown-parts strong {
    font-family: var(--mono);
    font-size: 0.98rem;
    line-height: 1.05;
}

.growth-key-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex: 0 0 11px;
}

.growth-key-dot--invested { background: var(--color-chart-invested); }
.growth-key-dot--earned { background: var(--color-gold); }

/* Color-code breakdown labels to the chart bars */
.growth-key-line--invested { color: var(--color-chart-invested); font-weight: 600; }
.growth-key-line--earned { color: var(--color-gold); font-weight: 600; }
.growth-breakdown-key > .growth-key-line { display: inline-flex; align-items: center; gap: 5px; }
.growth-breakdown-key .growth-key-line--invested strong,
.growth-breakdown-key .growth-key-line--earned strong { color: inherit; }

/* ---------- Result states ---------- */
.state {
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 16px 0;
    border: 1px solid;
}

.state-ok {
    border-color: var(--color-positive);
    background: var(--color-positive-soft);
}

.state-money {
    border-color: var(--color-gold);
    background: var(--color-gold-soft);
}

.state-info {
    border-color: var(--color-primary-soft);
    background: var(--color-info-soft);
}

.state-no {
    border-color: var(--color-error);
    background: var(--color-error-soft);
}

.state h3 {
    margin: 0 0 6px;
}

.state p {
    margin: 0 0 8px;
}

/* ---------- FAQ ---------- */
details {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 10px 0;
}

details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-primary);
}

details[open] summary {
    margin-bottom: 8px;
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 10px 0;
}

.faq-question {
    margin: 0 0 8px;
    color: var(--color-primary);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.faq-item > :last-child {
    margin-bottom: 0;
}

.faq-jump-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 18px 0 24px;
    padding: 12px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.faq-jump-links span {
    margin-right: 2px;
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.faq-jump-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--color-sand-soft);
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}

.faq-jump-links a:hover,
.faq-jump-links a:focus-visible {
    background: var(--color-gold-soft);
}

.faq-section-title {
    scroll-margin-top: 24px;
}

/* ---------- Disclaimer & footer ---------- */
.disclaimer-block {
    padding: 0;
    margin: 36px 0 0;
    font-size: 0.88rem;
    color: var(--color-muted);
}

.site-footer {
    margin-top: 56px;
    padding: 28px 0 40px;
    border-top: 3px solid var(--color-gold);
    background: var(--color-primary);
    color: #a9b6c6;
    font-size: 0.85rem;
}

.site-footer p {
    margin: 0 0 10px;
    color: #a9b6c6;
}

.footer-signup {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-signup-copy h2 {
    margin: 2px 0 8px;
    color: #fff;
    font-size: clamp(1.55rem, 4vw, 2rem);
}

.footer-signup-copy > p:last-child {
    max-width: 42ch;
    margin: 0;
    color: #c5cfdb;
    line-height: 1.5;
}

.footer-signup-kicker {
    margin: 0 !important;
    color: #e4c878 !important;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.footer-signup-row {
    display: flex;
    gap: 9px;
}

.footer-signup-row input[type="email"] {
    min-width: 0;
    flex: 1 1 auto;
    padding: 12px 14px;
    border: 1px solid #7f91a5;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-text);
    font: inherit;
    line-height: 1.35;
}

.footer-signup-row input[type="email"]::placeholder {
    color: #687587;
    opacity: 1;
}

.footer-signup-row input[type="email"]:focus {
    outline-color: #f0d58b;
    border-color: #f0d58b;
}

.footer-signup-row button {
    flex: 0 0 auto;
    padding: 12px 18px;
    border: 1px solid var(--color-gold);
    border-radius: var(--radius-sm);
    background: var(--color-gold);
    color: #192537;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
    line-height: 1.35;
}

.footer-signup-row button:hover {
    background: #dfbd6b;
    border-color: #dfbd6b;
}

.footer-signup-row button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.footer-signup-row button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.footer-signup-note {
    margin: 9px 0 0 !important;
    color: #a9b6c6 !important;
    font-size: 0.74rem;
    line-height: 1.45;
}

.footer-signup-status {
    margin: 10px 0 0 !important;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.4;
}

.footer-signup-status.is-success {
    border-left: 3px solid #7fd3a2;
}

.footer-signup-status.is-error {
    border-left: 3px solid #ff9b8f;
}

.footer-signup-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.footer-links-row,
.footer-links,
.footer-link-columns {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.footer-links-row {
    flex-wrap: wrap;
    gap: 28px clamp(28px, 4vw, 54px);
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-brand-column {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
    text-decoration: none;
}

.footer-brand img {
    display: block;
    width: 58px;
    max-width: none;
    height: auto;
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.08;
}

.footer-brand-text strong {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
}

.footer-brand-text small {
    margin-top: 3px;
    color: #c5cfdb;
    font-size: 1rem;
    font-weight: 300;
}
.official-links{
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1rem;
}
.official-links .footer-brand{
    border-top: 1px solid #3c506b;
    padding: 12px;
    /* border-radius: 10px; */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.official-links .footer-brand > div{
    display: flex;
    gap: 12px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}
.official-links .footer-brand .footer-brand-text strong {
    color: #fff;
    font-size: 1.1rem;
}
.official-links .footer-brand .footer-brand-text small{
    font-weight: 300;
    font-size: 0.78rem;
    /*color: var(--color-);*/
}
.official-links .footer-brand img {
    width: 28px;
    aspect-ratio: 1/1;
    object-fit: contain;
    border: 1px solid #ffffff22;
    border-radius: 8px;
    box-shadow: 0 4px 12px #00000044;
}
.official-links a i[class*="fa"]{
    opacity: 0.2;
}
.official-links a:hover i[class*="fa"]{
    opacity: 0.8;
}

.footer-links {
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 28px clamp(28px, 4vw, 54px);
}

.footer-link-group {
    flex: 0 1 auto;
    width: auto;
}

.footer-link-group h2 {
    margin: 0 0 16px;
    color: #fff;
    /* font-size: 0.82rem; */
    /* font-weight: 800; */
    /* text-transform: uppercase; */
    border-bottom: 1px solid #ffffff44;
    padding: 16px 0px;
}

.footer-link-group ul {
    width: auto;
    margin: 0;
    padding: 0 0 0 24px;
    /* list-style: none; */
}

.footer-link-group li + li {
    margin-top: 8px;
}

.footer-link-group a {
    display: inline-block;
    line-height: 1.35;
    text-decoration: none;
}

.footer-link-group a:hover,
.footer-link-group a:focus-visible {
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-link-columns {
    gap: clamp(24px, 3vw, 42px);
}

.footer-inner {
    padding-top: 24px;
}

.footer-home-qr,
.print-page-qr {
    display: none;
}

.footer-copy p:first-child { margin-top: 0; }

.site-footer a {
    color: #d3dce6 !important;
}

@media (max-width: 680px) {
    .footer-signup {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .footer-signup-row {
        align-items: stretch;
        flex-direction: column;
    }

    .footer-signup-row button {
        width: 100%;
    }

    .footer-links-row,
    .footer-links {
        flex-direction: column;
        gap: 24px;
    }

    .footer-links {
        width: 100%;
    }

    .footer-link-group,
    .footer-link-group--guides {
        width: 100%;
    }

    .footer-link-columns {
        width: 100%;
        gap: 18px;
    }

    .footer-link-columns > ul {
        min-width: 0;
        flex: 0 1 auto;
    }
}

/* ---------- Ad slots (invisible until ads enabled) ---------- */
.ad-slot {
    display: none;
}

body.ads-on .ad-slot {
    display: block;
    background: var(--color-sand-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

body.ads-on .ad-slot--leaderboard {
    min-height: 100px;
    margin: 24px 0;
}

/* 320x100 mobile / 728x90 desktop */
body.ads-on .ad-slot--incontent {
    min-height: 250px;
    margin: 24px 0;
}

.ad-label {
    display: block;
    padding: 5px 8px 0;
    color: var(--color-muted);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

/* ---------- Analytics consent ---------- */
.analytics-consent {
    position: fixed;
    z-index: 10000;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 820px;
    margin: 0 auto;
    padding: 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(6, 41, 68, 0.2);
}

.analytics-consent p { margin: 4px 0 0; }

.analytics-consent-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    margin-left: 24px;
}

.analytics-consent-actions button {
    min-height: 42px;
    padding: 9px 16px;
}

.privacy-settings-button { margin-top: 8px; }

@media (max-width: 680px) {
    .analytics-consent {
        align-items: stretch;
        flex-direction: column;
    }

    .analytics-consent-actions { margin: 14px 0 0; }
    .analytics-consent-actions button { flex: 1; }
}

/* 300x250 */

body.ads-on .ad-slot--multiplex {
    min-height: 280px;
    margin: 24px 0;
}

/* Multiplex (autorelaxed): renders as a grid of content-style cards */

/* ---------- Homepage guide shelf (book-cover cards) ---------- */
.home-guide-shelf {
    margin: 56px 0 24px;
}

.guide-shelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 26px;
}

.guide-book {
    position: relative;
    display: flex;
    text-decoration: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px 10px 10px 4px;
    box-shadow: 0 10px 22px rgba(15, 42, 74, 0.08);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.guide-book:hover,
.guide-book:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(15, 42, 74, 0.15);
}

.guide-book-spine {
    flex: 0 0 13px;
    background: linear-gradient(90deg, var(--color-primary-soft), var(--color-primary) 60%);
    box-shadow: inset -2px 0 3px rgba(0, 0, 0, 0.25);
    corner-shape: bevel;
    display: none;
}

.guide-book-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 14px 16px 0;
}

.guide-book-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 12px;
    border-top: 2px solid var(--color-gold);
    transform: scale(0.5);
    transform-origin: 0 0;
}

.guide-book-brand img {
    width: 30px;
    height: 23px;
    flex: none;
}

.guide-book-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.guide-book-brand-text b {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--color-primary);
    white-space: nowrap;
}

.guide-book-brand-text small {
    font-size: 0.56rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.guide-book-kicker {
    margin: 28px 0 8px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-gold-text);
}

.guide-book-title {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.72rem;
    line-height: 1.05;
    color: var(--color-primary);
}

.guide-book-desc {
    flex: 1;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--color-muted);
    margin-bottom: 40px;
}

.guide-book-icon {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    margin: 0 4px 12px auto;
    border-radius: 50%;
    background: var(--color-gold-soft);
    color: var(--color-gold);
    font-size: 4rem;

    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0.2;
}


.guide-book-foot {
    position: relative;
    margin: 0 -16px;
    color: var(--color-primary);
}

.guide-book-wave {
    display: block;
    width: 100%;
    height: 16px;
}

.guide-book-foot::after {
    content: "";
    position: absolute;
    top: 22px;
    right: 8%;
    width: 9px;
    height: 9px;
    background: var(--color-gold);
    transform: rotate(45deg);
}

.guide-book-tagline {
    display: block;
    background: var(--color-primary);
    color: #eee7d7;
    font-size: 0.68rem;
    padding: 0 16px 13px;
    margin-top: -1px;
}

@media (max-width: 560px) {
    .guide-shelf-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .guide-book-body {
        padding: 10px 12px 0;
    }

    .guide-book-title {
        font-size: 1.3rem;
    }

    .guide-book-brand-text b {
        font-size: 0.74rem;
    }

    .guide-book-brand-text small {
        display: none;
    }

    .guide-book-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .guide-book-foot {
        margin: 0 -12px;
    }
}

/* ---------- Icons ---------- */
.icon-gold {
    color: var(--color-gold);
}

.icon {
    width: 20px;
    height: 20px;
    vertical-align: -4px;
    flex: none;
}

.btn .icon {
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    margin-right: 8px;
}

.btn .icon--after {
    margin-right: 0;
    margin-left: 8px;
}

.h1-icon {
    width: 32px;
    height: 32px;
    color: var(--color-gold);
    vertical-align: -5px;
    margin-right: 10px;
}

.tool-icon {
    display: block;
    width: 30px;
    height: 30px;
    color: var(--color-gold);
    margin-bottom: 4px;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 24px 0;
}

.tool-card {
    display: block;
    text-decoration: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px;
}

.tool-card:hover {
    border-color: var(--color-gold);
}

.tool-card h3 {
    margin: 8px 0 4px;
}

.tool-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-muted);
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 36px 0 10px;
}

.hero-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 18px !important;
    padding: 7px 12px;
    border: 1px solid color-mix(in srgb, var(--color-positive) 35%, var(--color-border));
    border-radius: 999px;
    background: var(--color-positive-soft);
    color: var(--color-positive);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.25;
}

.hero-live-badge span {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(46, 125, 79, 0.12);
}

.hero .hero-eyebrow {
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.2rem;
    margin: 0;
    font-size: 0.96rem;
    color: var(--color-muted);

}

.hero p {
    margin-left: auto;
    margin-right: auto;
}

.hero h1 {
    margin: 0 auto;
    font-size: clamp(2.9rem, 6.4vw, 5.35rem);
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 1040px;
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.hero h1 b {
    color: var(--color-text);
    font-weight: 400;
}

.hero h1 small {
    color: var(--color-muted);
}

.hero .lede,
.hero .lead {
    font-size: 1.15rem;
    color: var(--color-text);
    max-width: 72ch;
    margin: 0 auto;
}

.hero-intro {
    max-width: 760px;
    margin: 22px auto 0;
    color: var(--color-muted);
    font-size: clamp(1.05rem, 1.7vw, 1.25rem);
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    margin: 20px auto 0;
}

.hero-actions .btn {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 0.92rem;
}

.hero-text-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 4px;
    color: var(--color-primary);
    font-size: 0.86rem;
    font-weight: 750;
    text-decoration: none;
}

.hero-text-link:hover {
    text-decoration: underline;
}

.hero-points {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: min(100%, 1180px);
    margin: 30px auto 0;
    text-align: left;
}

.hero-point {
    padding: 3px 22px;
    border-left: 1px solid var(--color-border);
    text-align: center;
}
.hero-point-icon{
    display: block;
    font-size: 4rem;
    color: var(--color-sand);
}
.hero-point img {
    max-width: 100%;
    mix-blend-mode: multiply;
    object-fit: contain;
    aspect-ratio: 2 / 1;
    filter: brightness(1.08);
}

@media(min-width: 900px) {
    .hero-point:first-child {
        border-left: none !important;
    }
}

.hero-point dt {
    /*color: var(--color-text);*/
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.25;
}

.mobile-title-break {
    display: none;
}

.hero-point dd {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 0.86rem;
    line-height: 1.3;
}

@media (min-width: 561px) and (max-width: 900px) {
    .hero-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 0;
    }

    .hero-point:nth-child(odd) {
        border-left: 0;
    }
}

.hero-quick-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: min(100%, 1180px);
    margin: 36px auto 0;
    padding: 18px 20px;
    background: var(--color-sand-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.hero-quick-label {
    flex: 0 0 auto;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.15;
}

.hero-quick-field {
    min-width: 0;
    height: 56px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
    font-weight: 600;
}

.hero-quick-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.1;
}

.hero-quick-kicker {
    color: var(--color-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.hero-quick-field>i {
    flex: none;
    color: var(--color-muted);
    font-size: 1.4rem;
}

.hero-quick-field[for="hero-birth-year"] {
    cursor: pointer;
}

.hero-quick-field[for="hero-birth-year"] .hero-quick-copy {
    flex: 1;
    width: 100%;
}

.hero-quick-field[for="hero-birth-year"] select {
    width: 100%;
    cursor: pointer;
}

.hero-quick-field[for="hero-zip"] {
    cursor: pointer;
}

.hero-quick-field[for="hero-zip"] input {
    cursor: text;
}

@media(min-width: 760px) {
    .hero-quick-field[for="hero-birth-year"],
    .hero-quick-field[for="hero-zip"] {
        width: 150px;
    }
}

.hero-quick-field input[type="number"],
.hero-quick-field input[type="text"],
.hero-quick-field select {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--color-text);
    font: inherit;
    line-height: 1.2;
}

.hero-quick-field input:focus,
.hero-quick-field select:focus {
    outline: 0;
}

.hero-quick-field:focus-within {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px var(--color-gold-soft);
}

.hero-quick-field input[type="number"] {
    appearance: textfield;
}

.hero-quick-field input[type="number"]::-webkit-inner-spin-button,
.hero-quick-field input[type="number"]::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

/*.hero-quick-field:has(#hero-birth-year) { flex: 0 1 165px; }
.hero-quick-field:has(#hero-zip) { flex: 0 1 165px; }*/
.hero-quick-check {
    position: relative;
    flex: 0 1 300px;
    cursor: pointer;
    white-space: nowrap;
}

.hero-quick-check input {
    position: absolute;
    left: 18px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.hero-quick-check .hero-check-off {
    display: none;
}

.hero-quick-check input:not(:checked)~.hero-check-off {
    display: inline-block;
    color: var(--color-muted);
    opacity: 0.85;
}

.hero-quick-check input:not(:checked)~.hero-check-on {
    display: none;
}

.hero-quick-check span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-quick-contribution {
    flex: 0 1 285px;
}

.hero-quick-contribution .hero-quick-copy {
    flex: 1;
}

.hero-contribution-summary {
    display: flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
    font-size: 0.98rem;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    justify-content: flex-end;
    line-height: 1;
    align-items: flex-end;
    width: 88px;
}

.hero-contribution-summary b {
    display: inline-flex;
    align-items: baseline;
}

.hero-contribution-summary>span {
    color: var(--color-muted);
    font-weight: 400;
}

.hero-quick-contribution input[type="range"] {
    width: 100%;
    height: 6px;
    margin: 8px 0 0px;
    cursor: grab;
}

.hero-quick-contribution input[type="range"]:active {
    cursor: grabbing;
}

.calculator-contribution-summary {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 2px 0 8px;
}

.calculator-contribution-summary>span {
    color: var(--color-muted);
    font-weight: 400;
}

.contribution-monthly-value {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

input.contribution-monthly-input {
    width: 3.25ch;
    min-width: 3.25ch;
    box-sizing: content-box;
    padding: 1px 2px 0;
    border: 0;
    border-bottom: 1px dashed currentColor;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-align: right;
    cursor: text;
    appearance: textfield;
    -moz-appearance: textfield;
}

input.contribution-monthly-input::-webkit-inner-spin-button,
input.contribution-monthly-input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

input.contribution-monthly-input:focus {
    border-color: var(--color-gold);
    outline: 2px solid var(--color-primary-soft);
    outline-offset: 1px;
}

.contribution-slider-label {
    justify-content: flex-start;
}

.calculator-contribution input[type="range"] {
    width: 100%;
    height: 8px;
    cursor: grab;
}

.calculator-contribution input[type="range"]:active {
    cursor: grabbing;
}

.eligibility-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 760px;
    margin: 16px auto 0 !important;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-gold);
    /*border-radius: var(--radius-sm);*/
    background: var(--color-text);
    /*color: var(--color-gold-soft);*/
    color: #fff;
    font-size: 0.88rem;
    line-height: 1.4;
}

.eligibility-alert strong {
    font-weight: 400;
}

.eligibility-alert i {
    flex: none;
    color: var(--color-gold);
}

.eligibility-alert .flag-icon {
    display: inline-flex;
    flex: none;
    overflow: hidden;
    border-radius: 2px;
    line-height: 0;
}

.eligibility-alert--top {
    max-width: none;
    margin: 0 !important;
    padding: 4px 14px;
    border-width: 0 0 1px;
    border-radius: 0;
    border-color: var(--color-gold);
    background: var(--color-primary);
    color: #fff;
    font-size: 0.72rem;
    line-height: 1.25;
    text-align: center;
}

.eligibility-alert--top .flag-icon svg {
    width: 16px;
    height: 11px;
}

.eligibility-copy--mobile {
    display: none;
}

@media (max-width: 560px) {
    .eligibility-copy--desktop {
        display: none;
    }

    .eligibility-copy--mobile {
        display: inline;
    }
}

.hero-quick-submit {
    flex: 0 0 auto;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding-inline: 32px;
}

/* ---------- Utilities ---------- */
.center {
    text-align: center;
}

.positive {
    color: var(--color-positive);
}

.error-text {
    color: var(--color-error);
    font-size: 0.9rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}

@media (max-width: 560px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .scenario-strip {
        flex-direction: column;
    }

    h1 {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .result-hero .num {
        font-size: 2.1rem;
    }

    .hero-points {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 26px;
    }

    .hero-point,
    .hero-point:first-child {
        padding: 0 0 0 16px;
        border-left: 3px solid var(--color-gold);
    }

    .hero-quick-form {
        align-items: stretch;
        margin-top: 24px;
        padding: 14px;
        border-radius: var(--radius-lg);
        flex-direction: column;
    }

    .hero-quick-label {
        text-align: left;
        padding: 0 4px;
    }

    .hero-quick-field,
    .hero-quick-submit {
        width: 100%;
        flex-basis: auto;
    }

    .hero-quick-check {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: no-preference) {

    .tab,
    .btn,
    .tool-card {
        transition: all 0.15s ease;
    }
}

/* ---------- Nav dropdowns ---------- */
.nav-item {
    position: relative;
}

.nav-btn {
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px 0;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover,
.nav-item.open .nav-btn {
    color: var(--color-primary);
}

.nav-btn .chev {
    transition: transform 0.15s ease;
}

.nav-item.open .chev {
    transform: rotate(180deg);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 8px;
    min-width: 240px;
    display: none;
    z-index: 50;
}

.dropdown a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.92rem;
    white-space: nowrap;
}

.dropdown a:hover,
.dropdown a[aria-current="page"] {
    background: var(--color-gold-soft);
    color: var(--color-primary);
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown,
.nav-item.open .dropdown {
    display: block;
}

.dropdown--guides {
    grid-template-rows: repeat(7, auto);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    column-gap: 8px;
}

.nav-item:hover .dropdown--guides,
.nav-item:focus-within .dropdown--guides,
.nav-item.open .dropdown--guides {
    display: grid;
}

@media (max-width: 560px) {
    .dropdown {
        left: auto;
        right: 0;
        transform: none;
    }

    .nav-item:hover .dropdown {
        display: none;
    }

    /* touch: rely on tap-to-open only */
    .nav-item.open .dropdown,
    .nav-item:focus-within .dropdown {
        display: block;
    }
}

/* ---------- Pros / cons ---------- */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 16px 0 8px;
}

.pc-col {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.pc-col h3 {
    font-family: var(--font);
    font-weight: 700;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.pc-pros h3 {
    color: var(--color-positive);
}

.pc-cons h3 {
    color: var(--color-error);
}

.pc-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pc-col li {
    display: flex;
    gap: 9px;
    margin: 0 0 18px;
    font-size: 0.9rem;
    line-height: 1.55;
}

.pc-col li:last-child {
    margin-bottom: 0;
}

.pc-col li .icon {
    flex: none;
    width: 24px;
    height: 24px;
}

.pc-pros li .icon,
.pc-pros h3 .icon {
    color: var(--color-positive);
}

.pc-cons li .icon,
.pc-cons h3 .icon {
    color: var(--color-error);
}

@media (max-width: 560px) {
    .pros-cons {
        grid-template-columns: 1fr;
    }
}

/* ---------- Tighter vertical rhythm on desktop ---------- */
@media (min-width: 561px) {
    h2 {
        margin-top: 1.4em;
        margin-bottom: 0.5em;
    }

    .card {
        margin: 18px 0;
        padding: 20px 22px;
    }

    .tool-grid {
        margin: 16px 0;
        gap: 12px;
    }

    .tool-card {
        padding: 14px 16px;
    }

    .tool-card h3 {
        margin: 6px 0 3px;
    }

    .hero {
        padding: 26px 0 6px;
    }

    .hero .lede {
        margin-top: 8px;
    }

    .disclaimer-block {
        margin: 22px 0;
    }

    .site-footer {
        margin-top: 40px;
    }
}

@media(min-width: 340px) {
    .nowrap {
        white-space: nowrap !important;
    }
}

/* ---------- Skip link (ADA) ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 300;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 0 0 var(--radius-sm) 0;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

/* ---------- Wider desktop + multi-column grids ---------- */
@media (min-width: 900px) {
    .container {
        max-width: 1400px;
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 1180px) {
    .hero-quick-form {
        flex-wrap: wrap;
        border-radius: var(--radius-lg);
    }
}

/* Grid ladder: 1 col <=560, 2 cols 561-1279, 3 cols >=1280, 4 cols >=1500 (full-width grids only) */
@media (min-width: 1280px) {
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1500px) {
    .tool-grid:not(.section-split .tool-grid) {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ---------- Sidebar layout (tool & guide pages) ---------- */
@media (min-width: 1000px) {
    .layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 36px;
        align-items: start;
    }

    .layout>.page-main {
        min-width: 0;
    }

    .sidebar {
        position: sticky;
        top: 0px;
        padding-top: 24px;
    }
}

.side-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 0 0 14px;
}

.side-title {
    font-family: var(--font);
    margin: 0 0 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primary);
}

.side-card nav a {
    display: block;
    padding: 7px 8px;
    margin: 0 -8px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    text-decoration: none;
    color: var(--color-text);
}

.side-card nav a:hover {
    background: var(--color-gold-soft);
    color: var(--color-primary);
}

.sidebar a[aria-current="page"] {
    display: none;
}

body.ads-on .ad-slot--sidebar {
    min-height: 600px;
    margin-bottom: 14px;
}

/* Below the sidebar breakpoint the sidebar stacks under the article, so this
   unit would land at the very bottom of the page; hide it there. ads.js skips
   hidden slots, so no request is made for it on mobile. */
@media (max-width: 999px) {
    body.ads-on .ad-slot--sidebar {
        display: none;
    }
}

/* ---------- Accessibility widget ---------- */
.a11y-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    z-index: 200;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.a11y-btn:hover {
    background: var(--color-primary-soft);
}

.a11y-panel {
    position: fixed;
    right: 18px;
    bottom: 76px;
    z-index: 200;
    width: 232px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 14px 16px;
}

.a11y-title {
    font-family: var(--font);
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--color-primary);
}

.a11y-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 0.95rem;
}

.a11y-opt input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    flex: none;
}

.a11y-reset {
    margin-top: 8px;
    width: 100%;
    background: none;
    cursor: pointer;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--color-muted);
}

.a11y-reset:hover {
    color: var(--color-primary);
    border-color: var(--color-primary-soft);
}

/* ---------- Accessibility preference effects ---------- */
html.a11y-text-lg {
    font-size: 20px;
}

/* root scale: ALL rem text grows */
html.a11y-spacing {
    letter-spacing: 0.04em;
    word-spacing: 0.12em;
}

html.a11y-spacing p,
html.a11y-spacing li {
    line-height: 1.9;
}

html.a11y-links a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px;
}

html.a11y-links a:not(.btn):not(.tool-card):not(.brand) {
    background: var(--color-gold-soft);
}

html.a11y-links a.btn {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

html.a11y-links a.tool-card {
    text-decoration: none !important;
}

html.a11y-links a.tool-card h3 {
    background: var(--color-gold-soft);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    align-self: flex-start;
}

html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
}

html.a11y-contrast {
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-border: #445;
    --color-text: #000000;
    --color-muted: #222933;
    --color-primary: #001f4d;
    --color-primary-soft: #003080;
    --color-gold: #7a5c00;
    --color-gold-soft: #fff2c0;
    --color-positive: #00561f;
    --color-error: #a10000;
}

/* ---------- Homepage breathing room ---------- */
.home .hero {
    padding: 48px 0 22px;
}

.home .hero .lede {
    margin-top: 10px;
}

@media (min-width: 561px) {
    .home main>h2 {
        margin-top: 72px;
        margin-bottom: 0.6em;
    }

    .home .card {
        margin: 22px 0 8px;
    }

    .home .pros-cons {
        margin: 22px 0 8px;
    }

    .home .tool-grid {
        margin: 22px 0 8px;
        gap: 14px;
    }

    .home .ad-slot--leaderboard {
        margin-top: 40px;
    }
}

/* ---------- Header CTA + responsive header ---------- */
.btn--nav {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 9px 20px;
}

.header-growth-cta {
    flex: none;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .brand-name {
        font-size: 1.3rem;
    }

    .btn--nav {
        font-size: 0.85rem;
        padding: 7px 14px;
    }
}

/* ---------- Icons in dropdowns + sidebar links ---------- */
.dropdown a,
.side-card nav a {
    display: flex;
    align-items: center;
    gap: 9px;
}

.dropdown a .icon,
.side-card nav a .icon {
    width: 15px;
    height: 15px;
    flex: none;
    color: var(--color-gold);
}

.pc-col li strong {
    display: block;
    margin-bottom: 3px;
}

/* ---------- Split sections (homepage tools/guides) ---------- */

h2 {
    margin-top: 2rem;
    line-height: 1;
}

h2 b {
    display: block;
    font-size: 220%;
    color: var(--color-text);
    font-weight: normal;
}

h2 b span {
    margin-top: 8px;
    font-family: var(--font);
}

.section-split {
    padding: 80px 0;
    margin: 0 auto;
    border-top: 1px solid var(--color-border);
}

.section-split:first-of-type {
    border-top: none;
}

/*.section-intro h2 { margin-top: 2rem; line-height: 1;}
.section-intro h2 b{ display: block; font-size: 220%; color: var(--color-text);font-weight: normal;}
.section-intro h2 b span{ margin-top: 8px; font-family: var(--font);}*/
.section-intro p {
    color: var(--color-text);
}

@media (min-width: 900px) {
    .section-split {
        display: grid;
        grid-template-columns: 36ch 1fr;
        gap: 48px;
        align-items: center;
    }

    .section-split .section-intro {
        position: sticky;
        top: 24px;
    }

    .section-split .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        margin: 0;
    }
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
}

.tool-icon {
    width: 32px;
    height: 32px;
    margin: 0;
}

.tool-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-card h3 {
    margin: 0;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.3;
    color: var(--color-primary);
}

.tool-card p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.3;
}

/* Pros/cons inside split layout */
@media (min-width: 900px) {
    .section-split--pc .pros-cons {
        margin: 0;
    }
}

/* ---------- Pros/cons: per-item cards, green/red ---------- */
.pc-col {
    background: none;
    border: 0;
    padding: 0;
}

.pc-col li {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 0 0 12px;
    background: #ffffff;

}

/*.pc-pros li { background: var(--color-positive-soft); border-color: rgba(46, 125, 79, 0.35); }
.pc-cons li { background: var(--color-error-soft); border-color: rgba(192, 57, 43, 0.30); }*/
.pc-pros li strong {
    color: var(--color-positive);
}

.pc-cons li strong {
    color: var(--color-error);
}

/* Fact cards (non-clickable tool-card variant) */
.fact-grid .tool-card {
    cursor: default;
}

.fact-grid .tool-card:hover {
    border-color: var(--color-border);
}

/* Pros/cons: icon inline with title, description below */
.pc-col li {
    display: block;
}

.pc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.pc-head .icon {
    width: 17px;
    height: 17px;
    margin: 0;
    flex: none;
}

.pc-col li strong {
    display: inline;
    margin: 0;
    font-size: 0.95rem;
    /* ~16px */
}

.pc-desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--color-text);
}

/* ---------- Font Awesome icon sizing (replaces svg sprite dimensions) ---------- */
i.icon,
i.h1-icon,
i.tool-icon,
i.chev {
    width: auto;
    height: auto;
    line-height: 1;
}

i.icon {
    font-size: 14px;
}

i.h1-icon {
    font-size: 0.8em;
    color: var(--color-gold);
}

i.tool-icon {
    font-size: 26px;
    color: var(--color-gold);
}

i.chev {
    font-size: 10px;
    transition: transform 0.15s ease;
}

.dropdown a i.icon,
.side-card nav a i.icon,
.offcanvas nav a i.icon {
    font-size: 13px;
    width: 18px;
    text-align: center;
    color: var(--color-gold);
    flex: none;
}

.pc-head i.icon {
    font-size: 15px;
}

.btn i.icon {
    font-size: 13px;
}

/* ---------- Mobile off-canvas menu ---------- */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--color-border, #e4ddd0);
    border-radius: 999px;
    background: transparent;
    color: var(--color-primary);
    font-size: 17px;
    cursor: pointer;
}

.nav-toggle:hover {
    background: rgba(15, 42, 74, 0.06);
}

.offcanvas-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 42, 74, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 400;
}

.offcanvas-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    background: var(--color-surface, #fff);
    box-shadow: -12px 0 32px rgba(15, 42, 74, 0.18);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 401;
    overflow-y: auto;
    padding: 18px 20px 32px;
    display: none;
    flex-direction: column;
    gap: 4px;
}

.offcanvas.open {
    transform: none;
}

.offcanvas-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--color-border, #e4ddd0);
}

.offcanvas-head .brand-name {
    font-size: 1.15rem;
}

.offcanvas-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--color-primary);
    font-size: 18px;
    cursor: pointer;
}

.offcanvas-close:hover {
    background: rgba(15, 42, 74, 0.07);
}

.offcanvas-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 14px;
    text-decoration: none;
}

.offcanvas-cta i.icon {
    color: currentColor;
}

.offcanvas nav {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.offcanvas .side-title {
    margin: 10px 0 4px;
}

.offcanvas nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
}

.offcanvas nav a:hover {
    background: rgba(201, 162, 75, 0.12);
    color: var(--color-primary);
}

.offcanvas nav a[aria-current="page"] {
    color: var(--color-primary);
    font-weight: 600;
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 899px) {
    .header-inner {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .site-nav {
        display: none;
    }

    .header-growth-cta {
        display: none;
    }

    .header-inner .lang-switch--header {
        margin-right: 0;
    }

    .family-nav {
        margin-left: auto;
    }

    .family-nav[hidden] + .nav-toggle {
        margin-left: auto;
    }

    .nav-toggle {
        display: flex;
        margin-left: 8px;
    }

    .offcanvas {
        display: flex;
    }
}

/* FA <i> overrides for rules that sized the old svg sprite */
.pc-head i.icon,
.pc-col li i.icon,
.btn i.icon {
    width: auto;
    height: auto;
    line-height: 1;
}

.pc-col li i.icon {
    font-size: 16px;
}

.btn i.icon {
    vertical-align: -1px;
}

.pc-head {
    align-items: center;
}

/* Accessibility panel header with close button */
.a11y-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.a11y-head .a11y-title {
    margin: 0;
}

.a11y-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--color-primary);
    font-size: 15px;
    cursor: pointer;
}

.a11y-close:hover {
    background: rgba(15, 42, 74, 0.08);
}

@media (min-width: 1280px) {
    .section-split .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Family feature ---------- */
.family-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    background: var(--color-info-soft);
    padding: 8px;
    border-radius: var(--radius);
}

.family-chips-label {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.family-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.family-chip:hover {
    border-color: var(--color-gold);
}

.family-chip.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.family-chip--add {
    color: var(--color-muted);
    font-weight: 500;
    margin-left: auto;
}

.family-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-gold-soft);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.offcanvas nav a .family-initial {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
}

.family-nudge {
    background: var(--color-primary);
    color: #fff;
    font-size: 0.9rem;
}

.family-nudge .container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.family-nudge a {
    color: var(--color-gold);
    font-weight: 600;
}

.family-nudge-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
}

.fam-views {
    display: flex;
    gap: 6px;
    margin: 0 0 18px;
}

.fam-view {
    padding: 7px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
}

.fam-view.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.fam-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}

.fam-strip>div {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 16px;
}

.fam-strip span {
    display: block;
    font-size: 0.78rem;
    color: var(--color-muted);
    margin-bottom: 2px;
}

.fam-strip strong {
    font-size: 1.35rem;
    color: var(--color-primary);
}

.fam-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0 0 18px;
}

.fam-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 26px 30px;
    min-width: 0;
}

.fam-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.fam-card-head>div {
    flex: 1;
}

.fam-card-btns {
    display: flex;
    gap: 4px;
    padding-left: 4px;
}

.fam-edit,
.fam-clone,
.fam-del {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-muted);
    padding: 6px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

.fam-edit:hover,
.fam-clone:hover {
    color: var(--color-primary);
    background: rgba(15, 42, 74, 0.06);
}

.fam-del:hover {
    color: var(--color-error);
    background: rgba(192, 57, 43, 0.08);
}

.fam-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.fam-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
}

.fam-badge--yes {
    background: var(--color-positive-soft);
    border-color: rgba(46, 125, 79, 0.35);
    color: var(--color-positive);
    font-weight: 600;
}

.fam-badge--maybe a {
    color: var(--color-primary);
}

.fam-table {
    width: 100%;
    font-size: 0.88rem;
    margin: 8px 0;
    border-collapse: collapse;
}

.fam-table td {
    padding: 4px 0;
    border: none;
}

.fam-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.fam-meter {
    height: 7px;
    border-radius: 999px;
    background: var(--color-bg);
    overflow: hidden;
}

.fam-meter>div {
    height: 100%;
    border-radius: 999px;
}

.fam-meter--ok>div {
    background: var(--color-positive);
}

.fam-meter--near>div {
    background: var(--color-gold);
}

.fam-meter--over>div {
    background: var(--color-error);
}

.fam-meter-note {
    font-size: 0.8rem;
    margin: 5px 0 0;
    color: var(--color-muted);
}

.fam-meter-note--near {
    color: #854f0b;
}

.fam-meter-note--over {
    color: var(--color-error);
    font-weight: 600;
}

.fam-tax-summary {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}

.fam-tax-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
    color: var(--color-primary);
    font-size: 0.84rem;
}

.fam-tax-head a { font-size: 0.72rem; }
.fam-tax-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.fam-tax-stats span { min-width: 0; }
.fam-tax-stats b,
.fam-tax-stats small { display: block; }
.fam-tax-stats b { color: var(--color-primary); font-size: 0.84rem; }
.fam-tax-stats small { color: var(--color-muted); font-size: 0.7rem; line-height: 1.25; }
.fam-tax-summary p { margin: 9px 0 0; color: var(--color-muted); font-size: 0.7rem; line-height: 1.35; }
.fam-tax-summary p strong { color: var(--color-text); }

@media (max-width: 560px) {
    .fam-card .growth-breakdown-key:not(#milestone-section):not(#seccion-hitos) {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .fam-card .growth-breakdown-key > .growth-key-line {
        width: 100%;
    }

    .fam-overall-stats .fam-stat--wide {
        grid-column: 1 / -1;
        flex-direction: column;
        gap: 2px;
    }
}

.fam-proj {
    font-size: 0.9rem;
    margin: 10px 0 0;
}

.fam-proj a {
    font-size: 0.8rem;
}

.fam-overall-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 12px;
}

.fam-stat {
    grid-column: span 2;
    min-width: 0;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 9px 10px;
}

.fam-stat--wide {
    grid-column: span 3;
    min-height: 42px;
    flex-direction: row;
    gap: 10px;
}

.fam-stat strong {
    flex: 0 0 auto;
    max-width: 100%;
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 0.98rem;
    line-height: 1.05;
    color: var(--color-primary);
}

.fam-stat span {
    min-width: 0;
    color: var(--color-muted);
    font-size: 0.78rem;
    line-height: 1.2;
}

.fam-stat--wide span {
    text-align: left;
}

.fam-stat--btn {
    cursor: pointer;
    font: inherit;
    appearance: none;
}

.fam-stat--btn:not(.active) {
    border-style: dashed;
}

.fam-stat--btn:not(.active) strong {
    color: var(--color-muted);
}

.fam-stat--btn:not(.active):hover {
    border-color: var(--color-primary);
}

.fam-stat--btn:not(.active):hover strong {
    color: var(--color-primary);
}

.fam-stat--btn.active {
    border-color: var(--color-primary);
    background: var(--color-surface);
}

.fam-form-card {
    margin: 18px 0 30px;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.fam-dashboard-form-card {
    padding: 32px;
}

.fam-dashboard-form-card .fam-form-card-head {
    gap: 16px;
}

.fam-dashboard-form-card .fam-form-card-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 1.12rem;
}

.fam-dashboard-form-card .fam-form-card-title {
    font-size: 1.55rem;
    font-weight: 500;
}

.fam-dashboard-form-card .fam-form {
    margin-top: 24px;
    padding-top: 28px;
}

.fam-dashboard-form-card .fam-grid {
    gap: 16px;
    margin-bottom: 26px;
}

.fam-dashboard-form-card .fam-grid label {
    gap: 8px;
    font-size: 0.88rem;
}

.fam-dashboard-form-card .fam-grid input {
    padding: 13px 14px;
}

.fam-contributions-editor {
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fbfaf7;
}

.fam-contributions-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 20px;
}

.fam-contributions-editor-head .fam-contributions-title {
    flex: none;
    margin: 0;
    font-size: 1.15rem;
}

.fam-form-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fam-form-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-surface);
}

.fam-form-card-title {
    margin: 0;
    font-family: var(--font);
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--color-primary);
}

.fam-form-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    font-size: 1.1rem;
}

.fam-form-close:hover,
.fam-form-close:focus-visible {
    background: var(--color-bg);
    color: var(--color-primary);
}

.fam-form {
    margin-top: 18px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border);
}

.fam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.fam-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
}

.fam-sub {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin: 4px 0 8px;
}

.fam-contributions-confirm-title {
    margin: 0 0 4px;
    color: var(--color-primary);
    font-family: var(--font);
    font-size: 0.88rem;
    line-height: 1.3;
}

.fam-crow {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 100px 140px 28px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.fam-crow>* {
    min-width: 0;
}

.fam-card .fam-crow {
    grid-template-columns: minmax(0, 1fr) 84px 108px 28px;
}

.fam-card .fam-crow [data-f="name"] {
    grid-column: 1 / -1;
}

@media (max-width: 700px) {
    .fam-crow {
        grid-template-columns: minmax(0, 1fr) 84px 108px 28px;
    }

    .fam-crow [data-f="name"] {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .fam-manual-save .fam-crow {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 28px;
    }

    .fam-manual-save .fam-crow [data-f="name"] {
        grid-column: 1 / -1;
    }

    .fam-manual-save .fam-crow [data-f="amt"] {
        grid-column: 1;
    }

    .fam-manual-save .fam-crow [data-f="per"] {
        grid-column: 2;
    }

    .fam-manual-save .fam-crow-del {
        grid-column: 3;
        grid-row: 2;
    }
}

.fam-crow-del {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-muted);
    font-size: 13px;
}

.fam-crow-del:hover {
    color: var(--color-error);
}

.fam-form-limit {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fbfaf7;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.fam-form-limit-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 650;
}

.fam-form-limit-head strong {
    font-family: var(--mono);
    font-size: 0.88rem;
    text-align: right;
}

.fam-form-limit-track {
    height: 10px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5dfd2;
}

.fam-form-limit-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color-positive);
    transition: width 180ms ease, background-color 160ms ease;
}

.fam-form-limit p {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: right;
}

.fam-form-limit.is-over {
    border-color: color-mix(in srgb, var(--color-error) 55%, var(--color-border));
    background: color-mix(in srgb, var(--color-error) 7%, #fff);
}

.fam-form-limit.is-over .fam-form-limit-head,
.fam-form-limit.is-over p {
    color: var(--color-error);
}

.fam-form-limit.is-over .fam-form-limit-track span {
    background: var(--color-error);
}

.fam-form-limit--inline {
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: min(100%, 560px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text);
}

.fam-form-limit--inline .fam-form-limit-track {
    margin: 0;
}

.fam-form-limit--inline .fam-form-limit-min,
.fam-form-limit--inline .fam-form-limit-current {
    color: var(--color-text);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.fam-form-limit-values {
    display: flex;
    min-width: 96px;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}

.fam-form-limit--inline .fam-form-limit-current {
    font-weight: 700;
}

.fam-form-limit--inline .fam-form-limit-cap {
    margin-top: 3px;
    color: var(--color-muted);
    font-size: 0.68rem;
    font-weight: 550;
    white-space: nowrap;
}

.fam-form-limit--inline p {
    grid-column: 1 / -1;
    margin-top: 0;
}

.fam-form-limit--inline.is-over {
    border: 0;
    background: transparent;
}

.fam-form-limit--inline.is-over .fam-form-limit-min,
.fam-form-limit--inline.is-over .fam-form-limit-current,
.fam-form-limit--inline.is-over .fam-form-limit-cap {
    color: var(--color-error);
}

.fam-form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 10px;
}

.fam-crow-add {
    flex: 1 1 320px;
    text-align: left;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-muted);
}

.fam-contributions-editor .fam-crow-add {
    width: auto;
    margin-top: 4px;
    padding: 10px 16px;
    border-color: transparent;
    background: #e5dfd2;
    color: var(--color-muted);
    font-weight: 650;
}

.fam-contributions-editor .fam-crow-add:hover {
    border-color: var(--color-gold);
    background: var(--color-surface);
}

.fam-crow-add:hover {
    border-color: var(--color-gold);
    color: var(--color-primary);
}

.fam-form-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: auto;
}

.fam-form-foot--actions {
    justify-content: flex-end;
    margin-top: 18px;
}

.fam-form-foot--actions .fam-form-actions {
    margin-left: 0;
}

.fam-cancel {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 600;
}

.fam-cancel:hover {
    color: var(--color-gold);
}

.fam-names-toggle {
    font-size: 0.82rem;
    color: var(--color-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fam-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 14px;
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    background: var(--color-surface);
    text-decoration: none;
}

.fam-social:hover {
    border-color: var(--color-gold);
}

.fam-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.fam-toolbar-actions .btn {

}

.fam-toolbar-actions .btn.fam-danger {
    color: var(--color-error);
    border-color: currentColor;
}

.fam-toolbar-actions .btn.fam-danger:hover {
    border-color: var(--color-error);
    background: var(--color-error);
    color: #fff;
}

@media (max-width: 760px) {
    .fam-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
}

.print-footer {
    display: none;
}

@media print {

    .site-nav,
    .family-nav,
    .header-growth-cta,
    .nav-toggle,
    .offcanvas,
    .offcanvas-backdrop,
    .family-nudge,
    .sidebar,
    .ad-slot,
    .a11y-btn,
    .a11y-panel,
    .eligibility-alert,
    .fam-share-card,
    .fam-views,
    .site-footer nav,
    .skip-link,
    .family-chips,
    .fam-card-btns,
    .fam-form-card,
    #fam-add {
        display: none !important;
    }

    /* Keep a clean, printable topbar: white background, black text, logo + brand */
    .site-header {
        background: #fff !important;
        border-bottom: 1px solid #ccc !important;
        box-shadow: none !important;
    }

    .header-inner {
        padding: 8px 16px !important;
    }

    .site-header .brand,
    .site-header .brand-name,
    .site-header .brand-tagline {
        color: #000 !important;
    }

    .site-header .brand::before {
        display: none !important;
    }

    .site-header .brand svg {
        display: block !important;
        width: 48px;
        height: auto;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .layout {
        display: block;
    }

    body {
        background: #fff;
    }

    .print-footer {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-top: 24px;
        padding-top: 14px;
        border-top: 1px solid #ccc;
    }

    .print-footer img {
        width: 90px;
        height: 90px;
    }

    .print-footer p {
        font-size: 0.85rem;
        color: #333;
        margin: 0;
    }
}

.fam-crow input,
.fam-crow select,
.fam-grid input,
.fam-grid select {
    padding: 11px 13px;
    border-radius: var(--radius-sm);
}

@media (max-width: 620px) {
    .fam-form-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

/* ---------- Global button variants ---------- */
.btn--sm {
    padding: 8px 18px;
    font-size: 0.88rem;
}

.btn--lg {
    padding: 15px 34px;
    font-size: 1.15rem;
}

.btn.btn--outline,
a.btn.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.btn.btn--outline:hover,
.btn.btn--outline:focus-visible,
a.btn.btn--outline:hover,
a.btn.btn--outline:focus-visible {
    background: var(--color-primary);
    color: #fff;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary-soft);
    outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

.btn--ghost {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-border);
}

.btn--ghost:hover {
    border-color: var(--color-gold);
}

/* ---------- Pros / cons balance sheet ---------- */
.section-split--pc .pros-cons {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, rgba(46, 125, 79, 0.055) 0 50%, rgba(192, 57, 43, 0.045) 50% 100%);
    box-shadow: var(--shadow-sm);
}

.section-split--pc .pc-col {
    min-width: 0;
    padding: 24px 26px 10px;
}

.section-split--pc .pc-cons { border-left: 1px solid var(--color-border); }

.section-split--pc .pc-col h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 6px;
    color: var(--color-primary);
    font-size: 1.05rem;
}

.section-split--pc .pc-col h3 > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-split--pc .pc-col h3 small {
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.pc-section-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: none;
    place-items: center;
    border-radius: var(--radius);
}

.pc-pros .pc-section-icon { background: rgba(46, 125, 79, 0.12); color: var(--color-positive); }
.pc-cons .pc-section-icon { background: rgba(192, 57, 43, 0.1); color: var(--color-error); }

.section-split--pc .pc-col li {
    margin: 0;
    padding: 17px 0;
    border: 0;
    border-top: 1px solid rgba(15, 42, 74, 0.1);
    border-radius: 0;
    background: transparent;
}

.section-split--pc .pc-head { gap: 10px; margin-bottom: 6px; }
.section-split--pc .pc-head i.icon { font-size: 15px; }
.section-split--pc .pc-col li strong { color: var(--color-primary); font-size: 0.94rem; }
.section-split--pc .pc-desc { padding-left: 25px; color: var(--color-muted); font-size: 0.86rem; line-height: 1.5; }

@media (max-width: 760px) {
    .section-split--pc .pros-cons {
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        gap: 14px;
    }
    .section-split--pc .pc-col {
        padding: 20px 20px 6px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
    }
    .section-split--pc .pc-pros { background: rgba(46, 125, 79, 0.055); }
    .section-split--pc .pc-cons { background: rgba(192, 57, 43, 0.045); }
}

/* ---------- Homepage guide feed ---------- */
.section-kicker {
    margin: 0 0 8px !important;
    color: var(--color-gold-text) !important;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.what-is-editorial .section-intro,
.what-is-editorial .section--intro {
    padding-left: 20px;
    border-left: 3px solid var(--color-gold);
}

.what-is-editorial {
    display: block;
}

.what-is-overview {
    display: grid;
    gap: 28px;
}

.what-is-tradeoff {
    margin: 36px 0 14px;
    padding: 12px 16px;
    border-left: 3px solid var(--color-gold);
    background: var(--color-sand-soft);
    color: var(--color-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.what-is-tradeoff strong {
    color: var(--color-primary);
}

.what-is-tradeoff-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 36px 0 14px;
}

.what-is-tradeoff-actions .what-is-tradeoff {
    flex: 1 1 auto;
    margin: 0;
}

.home-pros-trigger {
    flex: 0 0 auto;
    justify-content: center;
    white-space: nowrap;
}

body.modal-open {
    overflow: hidden;
}

.pros-cons-dialog {
    width: min(1080px, calc(100% - 32px));
    max-width: none;
    max-height: min(88vh, 900px);
    padding: 0;
    overflow: hidden;
    color: var(--color-text);
    background: var(--color-surface);
    border: 0;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.pros-cons-dialog::backdrop {
    background: rgba(8, 24, 42, 0.72);
    backdrop-filter: blur(3px);
}

.pros-cons-dialog-shell {
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 900px);
}

.pros-cons-dialog-head {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px 20px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.pros-cons-dialog-head h2 {
    margin: 0;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.15;
}

.pros-cons-dialog-head .section-kicker {
    margin-bottom: 6px !important;
}

.pros-cons-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
    cursor: pointer;
    color: var(--color-primary);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    font-size: 1.1rem;
}

.pros-cons-dialog-close:hover,
.pros-cons-dialog-close:focus-visible {
    color: var(--color-surface);
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.pros-cons-dialog-body {
    padding: 24px 28px 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.pros-cons-dialog-intro {
    max-width: 82ch;
    margin: 0 0 20px;
    color: var(--color-muted);
    line-height: 1.65;
}

.pros-cons-dialog .pros-cons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.pros-cons-dialog .pc-col {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.pros-cons-dialog .pc-pros {
    background: rgba(46, 125, 79, 0.055);
}

.pros-cons-dialog .pc-cons {
    background: rgba(192, 57, 43, 0.045);
}

.pros-cons-dialog .pc-col h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 6px;
    color: var(--color-primary);
    font-size: 1.05rem;
}

.pros-cons-dialog .pc-col h3 > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pros-cons-dialog .pc-col h3 small {
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.pros-cons-dialog .pc-col li {
    margin: 0;
    padding: 15px 0;
    border: 0;
    border-top: 1px solid rgba(15, 42, 74, 0.1);
    border-radius: 0;
    background: transparent;
}

.pros-cons-dialog .pc-head {
    gap: 10px;
    margin-bottom: 6px;
}

.pros-cons-dialog .pc-col li strong {
    color: var(--color-primary);
    font-size: 0.94rem;
}

.pros-cons-dialog .pc-desc {
    padding-left: 25px;
    color: var(--color-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .what-is-tradeoff-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .home-pros-trigger {
        width: 100%;
        white-space: normal;
    }

    .pros-cons-dialog {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 16px;
    }

    .pros-cons-dialog-shell {
        max-height: calc(100vh - 20px);
    }

    .pros-cons-dialog-head {
        padding: 18px 18px 16px;
    }

    .pros-cons-dialog-body {
        padding: 18px;
    }

    .pros-cons-dialog .pros-cons {
        grid-template-columns: 1fr;
    }

    .pros-cons-dialog .pc-col {
        padding: 18px;
    }
}

.what-is-editorial .editorial-lede {
    color: var(--color-primary);
    font-family: var(--font);
    font-size: 1.22rem;
    line-height: 1.35;
}

@media (min-width: 900px) {
    .what-is-editorial {
        display: block;
    }

    .what-is-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 56px;
        align-items: start;
    }

    .what-is-editorial .section-intro,
    .what-is-editorial .section--intro {
        position: static;
    }
}

.home-rules-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.home-rules-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-sand-soft);
}

.home-rules-head span {
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.home-rules-head a {
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.home-rules-head a:hover { text-decoration: underline; }
.home-rules-card .table-scroll { margin: 0; border: 0; }
.home-rules-table {
    width: 100%;
    min-width: 0 !important;
    margin: 0;
    table-layout: fixed;
    font-size: 0.82rem;
}
.home-rules-table tr:nth-child(even) td,
.home-rules-table tr:nth-child(even) th { background: rgba(241, 240, 235, 0.58); }
.home-rules-table th,
.home-rules-table td {
    padding: 11px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
    line-height: 1.35;
    vertical-align: top;
}
.home-rules-table tr:last-child th,
.home-rules-table tr:last-child td { border-bottom: 0; }
.home-rules-table th {
    width: 37%;
    color: var(--color-primary);
    font-weight: 700;
    text-align: left;
}
.home-rules-table td { color: var(--color-muted); }

/* Give the balance sheet the full content width: one vertical list per side. */
@media (min-width: 900px) {
    .section-split--pc {
        display: block;
    }

    .section-split--pc .section-intro {
        position: static;
        max-width: 780px;
        margin-bottom: 30px;
    }

    .section-split--pc .pros-cons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.editorial-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.editorial-sources span,
.editorial-sources a {
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 650;
    text-decoration: none;
}

.editorial-sources span { border-color: transparent; padding-left: 0; color: var(--color-muted); text-transform: uppercase; }
.what-is-editorial .fact-grid { counter-reset: fact; }
.what-is-editorial .fact-grid .tool-card { position: relative; padding-right: 42px; counter-increment: fact; }
.what-is-editorial .fact-grid .tool-card::after {
    content: counter(fact, decimal-leading-zero);
    position: absolute;
    top: 12px;
    right: 14px;
    color: var(--color-border);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
}

/* Flat, modern homepage tool directory */
.tools-section .tool-grid { gap: 10px; }
.tools-section .tool-card {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    gap: 12px;
    align-items: center;
    min-height: 104px;
    padding: 15px 16px;
    border-color: color-mix(in srgb, var(--color-border) 78%, var(--color-primary));
    border-radius: var(--radius);
    box-shadow: none;
}

.tools-section .tool-card::after {
    content: "→";
    grid-column: 3;
    grid-row: 1;
    color: var(--color-muted);
    font-size: 1rem;
    transition: transform 0.15s ease, color 0.15s ease;
}

.tools-section .tool-card:hover { border-color: var(--color-primary-soft); background: var(--color-sand-soft); transform: none; }
.tools-section .tool-card:hover::after { color: var(--color-primary); transform: translateX(2px); }
.tools-section .tool-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin: 0;
    place-items: center;
    border-radius: 10px;
    background: var(--color-gold-soft);
    font-size: 1rem;
}
.tools-section .tool-copy { grid-column: 2; grid-row: 1; gap: 2px; }
.tools-section .tool-card h3 { margin: 0; font-size: 0.98rem; }
.tools-section .tool-card p { margin: 2px 0 0; font-size: 0.8rem; line-height: 1.35; }


.home-guide-shelf .section-intro{
    text-align: center;
}
.home-guide-shelf .section-kicker{
    color: var(--color-primary) !important;
}

.guides-section {
    display: block;
    padding-top: 56px;
    padding-bottom: 56px;
}

.guides-section .section-intro { position: static; top: auto; max-width: 760px; }
.guides-section .section-intro h2 { margin-bottom: 0.28em; }
.guides-section .section-intro > p { margin-top: 0; }
.guide-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 16px 0 14px;
}
.guide-filter {
    padding: 7px 13px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-muted);
    cursor: pointer;
    font: 600 0.82rem/1 var(--font);
}
.guide-filter:hover { border-color: var(--color-gold); color: var(--color-primary); }
.guide-filter.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}
.guide-filter:focus-visible { outline: 2px solid var(--color-primary-soft); outline-offset: 2px; }

.guides-section .guide-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}
.guide-card {
    position: relative;
    display: grid;
    grid-template-rows: 92px auto auto 1fr auto;
    min-height: 265px;
    padding: 0 17px 16px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: none;
}
.guide-card::before {
    content: attr(data-guide-label);
    grid-row: 2;
    margin: 13px 0 8px;
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.guide-card::after {
    content: "Read guide  →";
    grid-row: 5;
    margin-top: 8px;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
}
html[lang="es"] .guide-card::after { content: "Leer guía  →"; }
.guide-card .tool-icon {
    position: absolute;
    top: 29px;
    right: 17px;
    display: grid;
    width: 38px;
    height: 38px;
    margin: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: var(--color-primary);
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}
.guide-card-media {
    position: relative;
    grid-row: 1;
    width: calc(100% + 34px);
    height: 92px;
    margin-left: -17px;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 24%, rgba(255,255,255,0.75) 0 10px, transparent 11px),
        linear-gradient(145deg, transparent 0 48%, rgba(15,42,74,0.12) 49% 67%, transparent 68%),
        linear-gradient(35deg, rgba(201,162,75,0.35), rgba(238,243,249,0.92));
}
.guide-card-media::before,
.guide-card-media::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(15, 42, 74, 0.1);
}
.guide-card-media::before { width: 105px; height: 12px; left: 18px; bottom: 19px; }
.guide-card-media::after { width: 68px; height: 8px; left: 18px; bottom: 36px; }
.guide-card[data-guide-category="rules"] .guide-card-media {
    background: linear-gradient(145deg, transparent 0 48%, rgba(201,162,75,0.22) 49% 67%, transparent 68%), linear-gradient(35deg, #e9dfc7, #f7f3e9);
}
.guide-card[data-guide-category="family"] .guide-card-media {
    background: linear-gradient(145deg, transparent 0 48%, rgba(46,125,79,0.13) 49% 67%, transparent 68%), linear-gradient(35deg, #dbe9df, #f2f7f3);
}
.guide-card[data-guide-category="updates"] .guide-card-media {
    background: linear-gradient(145deg, transparent 0 48%, rgba(29,77,128,0.14) 49% 67%, transparent 68%), linear-gradient(35deg, #dce7f1, #f2f6fa);
}
.guide-card .tool-copy { display: contents; }
.guide-card h3 {
    grid-row: 3;
    margin: 0 0 3px;
    font-family: var(--font-heading);
    font-size: 1.22rem;
    font-weight: 500;
    line-height: 1.1;
}
.guide-card p {
    grid-row: 4;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

/* Homepage mission statement */
.why-site {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 18px;
    margin: 54px 0 0;
    padding: 26px 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-sand-soft);
}

.why-site-mark {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-gold);
    font-size: 1.25rem;
}

.why-site h2 { margin: 0 0 10px; }
.why-site p:not(.section-kicker) { margin: 0; }
.why-site .disclaimer-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.guide-card:hover {
    border-color: var(--color-gold);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.guide-card[hidden] { display: none; }

@media (min-width: 1200px) {
    .guides-section .guide-feed { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .guides-section .guide-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .guide-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; }
    .guide-filter { flex: none; }
    .guides-section .guide-feed { grid-template-columns: 1fr; }
    .guide-card { min-height: 245px; }
}

/* ---------- Family dashboard: heading and toolbar ---------- */
.family-page-hero {
    margin: 6px 0 30px;
}

.family-page-hero h1 {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 18px;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: clamp(2.75rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1;
}

.family-page-hero h1 .h1-icon {
    flex: none;
    margin: 0;
    color: var(--color-gold);
    font-size: 0.72em;
}

.family-page-hero p {
    max-width: 84ch;
    margin: 0;
    color: var(--color-muted);
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    line-height: 1.6;
}

.fam-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0 0 30px;
}

.fam-toolbar-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.family-dashboard-page .fam-toolbar .btn {
    min-height: 50px;
    justify-content: center;
    padding: 12px 22px;
    border-width: 2px;
    border-radius: 9px;
    font-size: 1rem;
    font-weight: 750;
}

.family-dashboard-page #fam-add {
    min-width: 184px;
}

.family-dashboard-page #fam-import {
    min-width: 184px;
    color: var(--color-primary);
    background: var(--color-surface);
    border-color: var(--color-primary);
}

.family-dashboard-page #fam-import:hover,
.family-dashboard-page #fam-import:focus-visible {
    color: #fff;
    background: var(--color-primary);
}

.family-dashboard-page .fam-toolbar-actions {
    flex-wrap: nowrap;
}

.fam-toolbar .fam-views {
    margin: 0;
}

@media (max-width: 900px) {
    .family-page-hero {
        margin-bottom: 24px;
    }

    .family-dashboard-page .fam-toolbar {
        align-items: stretch;
    }

    .family-dashboard-page .fam-toolbar-primary,
    .family-dashboard-page .fam-toolbar-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .family-page-hero h1 {
        gap: 12px;
        font-size: 2.45rem;
    }

    .family-page-hero p {
        font-size: 0.98rem;
    }

    .family-dashboard-page .fam-toolbar-primary .btn {
        width: 100%;
    }

    .family-dashboard-page .fam-toolbar-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        padding-inline: 14px;
    }
}

/* ---------- 404 pages ---------- */
.error-page {
    min-height: 58vh;
    display: grid;
    place-items: center;
    padding-top: clamp(56px, 9vw, 110px);
    padding-bottom: clamp(64px, 10vw, 120px);
    text-align: center;
}

.error-page-card {
    width: min(100%, 760px);
}

.error-code {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: clamp(6.5rem, 18vw, 12rem);
    font-weight: 400;
    line-height: 0.8;
    letter-spacing: -0.05em;
    color: var(--color-gold);
}

.error-page h1 {
    margin: 24px 0 12px;
}

.error-page-copy {
    max-width: 620px;
    margin: 0 auto;
    color: var(--color-muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.error-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.error-page-links {
    margin: 24px 0 0;
    font-size: 0.9rem;
}

.error-page-links a {
    white-space: nowrap;
}

/* ---------- Family: chart cards ---------- */
.fam-chart-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 0 0 16px;
    min-width: 0;
}

.fam-chart-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.fam-chart-title .muted {
    font-weight: 400;
}

.fam-chart-box {
    position: relative;
    width: 100%;
    aspect-ratio: 7 / 3;
    min-width: 0;
    overflow: hidden;
}

.fam-chart-box svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fam-chart-box--tall {
    aspect-ratio: 7 / 3;
}

.fam-chart-switch {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.fam-chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.fam-ctl-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- Family: checkbox chips ---------- */
.family-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
}

.family-check:hover {
    border-color: var(--color-gold);
}

.family-check input {
    accent-color: var(--color-primary);
    margin: 0;
}

.family-check--all {
    border-color: var(--color-primary);
}

.family-check--off {
    opacity: 0.45;
    cursor: not-allowed;
}

.fam-growth-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.fam-growth-manual {
    margin: 1em 0 0.5em;
}

.fam-settings-link {
    margin-left: auto;
    line-height: normal;
}

.fam-growth {
    margin-bottom: 20px;
}

/* ---------- Family: share & export card ---------- */
.fam-share-card {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 22px 0 6px;
}

.fam-share-title {
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.fam-share-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.fam-share-group+.fam-share-group {
    border-top: 1px solid var(--color-border);
}

.fam-share-label {
    flex: 0 0 72px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

.fam-share-group {
    min-height: 44px;
}

/* ---------- Print: readable footer, charts on white ---------- */
@media print {
    .site-footer {
        background: #fff !important;
        color: #111 !important;
    }

    .footer-signup {
        display: none !important;
    }

    .site-footer a {
        color: #111 !important;
        text-decoration: underline !important;
    }

    .site-footer p,
    .site-footer span,
    .site-footer small {
        color: #111 !important;
    }

    .fam-share-card,
    .fam-growth-head,
    .fam-growth-manual,
    .fam-chart-controls,
    .fam-chart-switch,
    .fam-toolbar {
        display: none !important;
    }

    .fam-chart-card {
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .fam-card {
        break-inside: avoid;
    }
}

.fam-chart-box--mini {
    margin: 18px 0 12px;
    aspect-ratio: 7 / 3;
}

/* Shared child projection card */
.fam-projection-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--color-border);
}

.fam-projection-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 auto;
}

.fam-child-avatar {
    display: grid;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
}

.fam-projection-person {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.08;
}

.fam-projection-name-row {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 3px;
}

.fam-projection-person strong {
    font-size: 1.4rem;
    color: var(--color-primary);
}

.fam-projection-person span {
    margin-top: 3px;
    color: var(--color-muted);
    font-size: 1rem;
}

.fam-projection-person .fam-location-short {
    display: none;
}

.fam-report-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.25;
}

.fam-report-meta-field {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: inherit;
    font: inherit;
}

.fam-projection-person .fam-report-meta span {
    margin-top: 0;
    color: inherit;
    font-size: inherit;
}

.fam-report-meta input,
.fam-contribution-input-metric input {
    min-height: 32px;
    padding: 3px 5px;
    border: 1px solid #9ab3cf;
    border-radius: 7px;
    background: #fff;
    color: var(--color-primary);
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

.fam-report-meta-field--year input {
    width: 77px;
    font-weight: 400;
    text-align: right;
    padding-left: 6px;
}

.fam-report-meta-field--zip input {
    width: 82px;
    font-weight: 400;
    text-align: center;
}

.fam-report-meta input:focus,
.fam-contribution-input-metric input:focus {
    border-color: var(--color-primary-soft);
    outline: 3px solid color-mix(in srgb, var(--color-primary-soft) 30%, transparent);
    outline-offset: 1px;
}

.fam-report-meta input[aria-invalid="true"],
.fam-contribution-input-metric input[aria-invalid="true"] {
    border-color: var(--color-error);
    outline-color: color-mix(in srgb, var(--color-error) 25%, transparent);
}

.fam-report-control-error {
    flex-basis: 100%;
    margin-top: 2px;
    color: var(--color-error);
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.3;
}

.fam-report-control-error[hidden] {
    display: none;
}

.fam-card .account-stage-key,
.fam-card .account-stage-note {
    margin-left: 14px;
    margin-right: 14px;
}

.fam-card .account-stage-key {
    margin-top: 0;
}

.fam-mini-badges {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
}

.fam-projection-assumptions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.fam-projection-assumptions .fam-contribution-metric + .fam-mini-metric {
    padding-left: 20px;
    border-left: 1px solid var(--color-border);
}

.fam-contribution-metric {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fam-contribution-input-metric strong {
    display: flex;
    align-items: center;
    gap: 2px;
}

.fam-contribution-input-metric strong > span {
    margin-top: 0;
    color: var(--color-primary);
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 800;
}

.fam-contribution-input-metric input {
    width: 58px;
    text-align: right;
}

.fam-contribution-input-metric .fam-report-control-error {
    max-width: 180px;
    text-align: right;
}

.fam-header-limit-ring {
    display: block;
    width: 30px;
    height: 30px;
    flex: none;
    overflow: visible;
}

.fam-mini-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    line-height: 1.1;
}

.fam-mini-metric strong {
    font-family: var(--mono);
    font-size: 1.18rem;
    color: var(--color-primary);
}

.fam-mini-metric span {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.fam-return-metric {
    cursor: text;
}

.fam-return-metric strong {
    display: flex;
    align-items: center;
    gap: 2px;
}

.fam-return-metric input {
    width: 58px;
    min-height: 34px;
    padding: 4px 5px;
    border: 1px solid #9ab3cf;
    border-radius: 7px;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1;
    text-align: right;
}

.fam-return-metric input:focus {
    border-color: var(--color-primary);
    outline: 2px solid color-mix(in srgb, var(--color-primary) 22%, transparent);
    outline-offset: 1px;
}

.fam-projection-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    min-height: 96px;
    padding: 25px 14px 4px;
}

.fam-projection-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 45px;
    margin-top: 3px;
    padding: 7px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.fam-projection-controls .fam-mini-badges {
    flex: 1 1 auto;
}

.fam-projection-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

.fam-projection-total {
    color: #182232;
    font-family: var(--mono);
    font-size: clamp(2.45rem, 7vw, 3.35rem);
    line-height: 1;
    letter-spacing: -0.045em;
    font-variant-numeric: lining-nums tabular-nums;
}

.fam-projection-breakdown {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    color: var(--color-muted);
    font-size: 1.08rem;
    line-height: 1.1;
}

.fam-projection-breakdown strong {
    color: var(--color-muted);
    font-family: var(--mono);
    font-size: 1.25rem;
    font-variant-numeric: lining-nums tabular-nums;
}

.fam-projection-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 4px;
}

.fam-age-picker {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    margin: 0;
}

.fam-age-picker > span {
    margin-right: 3px;
    color: #1f2937;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.fam-age-picker .fam-age-button {
    width: 36px;
    height: 28px;
    border-width: 1px;
    border-radius: 8px;
    font-size: 0.82rem;
}

.fam-age-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.fam-age-custom-label {
    color: var(--color-muted);
    font-size: 0.68rem;
    font-weight: 650;
    text-transform: none;
}

.fam-age-custom input {
    width: 70px;
    height: 28px;
    min-height: 28px;
    padding: 3px 4px;
    border: 1px dotted #9ab3cf;
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-primary);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.fam-age-custom input::placeholder {
    color: var(--color-muted);
    font-family: var(--font);
    font-size: 0.68rem;
    font-weight: 600;
}

.fam-age-custom input:focus {
    border-style: solid;
    border-color: var(--color-primary-soft);
    outline: 3px solid color-mix(in srgb, var(--color-primary-soft) 30%, transparent);
    outline-offset: 1px;
}

.fam-age-custom input[data-custom-active="true"] {
    border-style: solid;
    border-color: #182232;
    background: #182232;
    color: #fff;
}

.fam-age-custom input[aria-invalid="true"] {
    border-style: solid;
    border-color: var(--color-error);
    background: var(--color-error-soft);
    color: var(--color-error);
}

.fam-age-error {
    position: absolute;
    z-index: 2;
    top: calc(100% + 5px);
    right: 0;
    width: 170px;
    padding: 4px 6px;
    border: 1px solid color-mix(in srgb, var(--color-error) 30%, var(--color-border));
    border-radius: 6px;
    background: #fff;
    color: var(--color-error);
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.25;
    text-transform: none;
}

.fam-age-error[hidden] {
    display: none;
}

.fam-age-button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px dotted #9ab3cf;
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-muted);
    cursor: pointer;
    font: 600 1rem/1 var(--font);
}

.fam-age-button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.fam-age-button.active {
    border-style: solid;
    border-color: #8494a8;
    background: #182232;
    color: #fff;
    box-shadow: inset 0 0 0 2px #182232, 0 0 0 1px #182232;
}

.fam-mini-view {
    display: inline-flex;
    width: auto;
    min-width: 185px;
    justify-content: center;
    margin: 0;
    padding: 11px 24px;
    border-width: 2px;
    border-radius: 12px;
    font-size: 1rem;
}

.fam-card-details {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.fam-contributions-title {
    margin: 0 0 10px;
    color: var(--color-primary);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.2;
}

.fam-contributors-label {
    margin: 16px 0 5px;
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.fam-card-details .fam-meter-note {
    margin-bottom: 0;
}

.fam-contributor-chart {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
}

.fam-donut-wrap {
    display: grid;
    place-items: center;
}

.fam-donut {
    display: block;
    width: 140px;
    height: 140px;
    overflow: visible;
}

.fam-donut-total {
    fill: var(--color-primary);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 800;
}

.fam-donut-limit {
    fill: var(--color-muted);
    font-family: var(--font);
    font-size: 7px;
    font-weight: 600;
}

.fam-donut-details {
    min-width: 0;
}

.fam-donut-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fam-donut-legend li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.fam-donut-legend li > i {
    width: 10px;
    height: 10px;
    flex: none;
    margin-top: 4px;
    border-radius: 50%;
}

.fam-donut-legend .fam-donut-remaining > i {
    border: 1px solid #c9c2b5;
    background: #e5dfd2;
}

.fam-donut-legend span,
.fam-donut-legend strong,
.fam-donut-legend small {
    display: block;
    min-width: 0;
}

.fam-donut-legend strong {
    overflow: hidden;
    color: var(--color-primary);
    font-size: 0.8rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fam-donut-legend small {
    margin-top: 1px;
    color: var(--color-muted);
    font-size: 0.7rem;
    line-height: 1.25;
}

.fam-donut-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--color-border);
}

.fam-donut-summary > span,
.fam-donut-summary small,
.fam-donut-summary strong {
    display: block;
}

.fam-donut-summary small {
    color: var(--color-muted);
    font-size: 0.68rem;
    line-height: 1.3;
}

.fam-donut-summary > span > strong {
    margin-top: 3px;
    color: var(--color-primary);
    font-family: var(--mono);
    font-size: 0.9rem;
}

.fam-donut-funding > strong {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 7px;
    color: var(--color-positive) !important;
    font-family: var(--font) !important;
    font-size: 0.75rem !important;
}

.fam-donut-funding > strong span {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
}

@media (max-width: 700px) {
    .fam-card {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .fam-projection-head {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .fam-projection-person {
        min-width: 0;
    }

    .fam-projection-identity {
        gap: 12px;
    }

    .fam-child-avatar {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        font-size: 1.4rem;
    }

    .fam-projection-person strong {
        font-size: 1.2rem;
    }

    .fam-projection-person span {
        font-size: 0.94rem;
    }

    .fam-projection-person .fam-location-full,
    .summary-state-full {
        display: none;
    }

    .fam-projection-person .fam-location-short,
    .summary-state-short {
        display: inline;
    }

    .fam-projection-assumptions {
        width: 100%;
        justify-content: flex-end;
        gap: 14px;
    }

    .fam-projection-assumptions .fam-contribution-metric + .fam-mini-metric {
        padding-left: 14px;
    }

    .fam-contribution-metric {
        gap: 6px;
    }

    .fam-header-limit-ring {
        width: 27px;
        height: 27px;
    }

    .fam-card-btns {
        margin-right: 0;
    }

    .fam-contributor-chart {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }

    .fam-donut-legend,
    .fam-donut-summary {
        grid-template-columns: 1fr;
    }

    .fam-projection-summary {
        min-height: 0;
        padding: 21px 2px 0;
    }

    .fam-projection-controls {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
        padding: 9px 0;
    }

    .fam-projection-controls .fam-mini-badges,
    .fam-projection-controls .fam-age-picker {
        width: 100%;
    }

    .fam-projection-controls .fam-age-picker {
        justify-content: flex-end;
    }

    .fam-projection-total {
        font-size: 2.25rem;
    }

    .fam-projection-breakdown {
        gap: 3px;
        font-size: 0.82rem;
    }

    .fam-projection-breakdown strong {
        font-size: 0.92rem;
    }

    .fam-chart-box--mini {
        margin-top: 12px;
        aspect-ratio: 7 / 3.55;
    }

    .fam-card .account-stage-key,
    .fam-card .account-stage-note {
        margin-left: 2px;
        margin-right: 2px;
    }

    .account-stage {
        padding: 7px 8px;
    }

    .fam-projection-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .fam-age-picker {
        margin-top: 0;
    }

    .fam-mini-view {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .fam-form-card {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .fam-dashboard-form-card .fam-form {
        margin-top: 18px;
        padding-top: 20px;
    }

    .fam-contributions-editor {
        padding: 18px 14px;
    }

    .fam-contributions-editor-head {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .fam-form-limit--inline {
        width: 100%;
    }
}

.fam-share-inline {
    display: block;
    margin: 14px 0 6px;
}

.fam-share-inline .fs-copied {
    margin: 8px 0 0;
}

/* Canonical child report card: growth calculator, family, share, image and print. */
.fam-projection-body {
    display: grid;
    grid-template-columns: minmax(270px, 34%) minmax(0, 66%);
    border-bottom: 1px solid var(--color-border);
}

.fam-projection-person,
.fam-projection-name-row {
    width: 100%;
}

.fam-projection-name-row .fam-card-btns {
    margin-left: auto;
}

.fam-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 0 auto !important;
    color: inherit !important;
    font-size: inherit !important;
}

.fam-card-actions .fam-card-btns {
    margin: 0;
}

.fam-card-actions .fam-header-add,
.fam-card-actions .fam-header-share,
.fam-card-actions .fam-summary-export {
    min-height: 42px;
    padding: 9px 17px;
    white-space: nowrap;
}

.fam-card-actions .fam-header-add {
    background: var(--color-surface);
}

.fam-card-actions .fam-header-share {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.fam-card-actions .fam-header-share:hover,
.fam-card-actions .fam-header-share:focus-visible {
    border-color: var(--color-primary-soft);
    background: var(--color-primary-soft);
    color: #fff;
}

.fam-summary-export-actions {
    gap: 8px;
}

.fam-card-actions .fam-summary-export {
    padding-inline: 14px;
    font-size: 0.86rem;
}

.fam-projection-overview {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 18px 22px 17px 0;
    border-right: 1px solid var(--color-border);
}

.fam-projection-chart {
    min-width: 0;
    padding: 17px 0 10px 22px;
}

.fam-projection-overview .fam-age-picker {
    justify-content: flex-start;
}

.fam-projection-overview .fam-projection-summary {
    display: block;
    min-height: 0;
    padding: 52px 0 34px;
}

.fam-projection-main > span,
.fam-projection-main > small {
    display: block;
}

.fam-projection-main > span {
    margin-top: 5px;
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 650;
}

.fam-projection-main > .fam-projection-value-label {
    margin: 0 0 6px;
    color: var(--color-text);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.3;
}

.fam-projection-main > .fam-projection-value-note {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 0.7rem;
    line-height: 1.35;
}

.fam-projection-buying-power {
    width: 100%;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.fam-projection-buying-power > span,
.fam-projection-buying-power > strong,
.fam-projection-buying-power > small {
    display: block;
}

.fam-projection-buying-power > span {
    color: var(--color-text);
    font-size: 0.78rem;
    font-weight: 750;
}

.fam-projection-buying-power > strong {
    margin-top: 3px;
    color: var(--color-primary-soft);
    font-family: var(--mono);
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.fam-projection-buying-power > small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 0.7rem;
    line-height: 1.35;
}

.fam-projection-main > small {
    max-width: 38ch;
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.fam-inflation-controls {
    margin: 0 0 18px;
    padding: 13px 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fbfaf7;
}

.fam-inflation-rate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 650;
}

.fam-inflation-rate > span {
    display: block;
}

.fam-inflation-rate strong,
.fam-inflation-rate small {
    display: block;
}

.fam-inflation-rate small {
    max-width: 25ch;
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 0.68rem;
    font-weight: 450;
    line-height: 1.3;
}

.fam-inflation-rate input {
    width: 64px;
    margin-right: 3px;
    padding: 5px;
    text-align: right;
}

.fam-dollar-mode {
    margin: 12px 0 0;
    padding-top: 11px;
    border-top: 1px solid var(--color-border);
}

.fam-dollar-mode legend {
    margin-bottom: 6px;
    font-size: 0.76rem;
    font-weight: 700;
}

.fam-inflation-static {
    margin: 0 0 15px;
    color: var(--color-muted);
    font-size: 0.72rem;
    line-height: 1.4;
}

.fam-projection-overview .fam-projection-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 22px;
    margin-top: 30px;
    text-align: left;
}

.fam-projection-overview .fam-projection-breakdown span,
.fam-projection-overview .fam-projection-breakdown strong {
    display: block;
}

.fam-projection-overview .fam-projection-breakdown strong {
    margin-top: 3px;
    color: var(--color-primary);
}

.fam-projection-overview .fam-projection-breakdown .money-earned-text {
    color: #a77f27;
}

.fam-projection-chart .account-stage-key,
.fam-projection-chart .account-stage-note {
    margin-right: 0;
    margin-left: 0;
}

.fam-projection-chart .account-stage-key {
    margin-top: 10px;
}

.fam-projection-chart .fam-projection-assumptions {
    min-height: 55px;
    margin: 0 0 3px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--color-border);
}

.fam-projection-chart .fam-mini-badges {
    justify-content: flex-end;
    margin-left: auto;
}

.fam-projection-chart .fam-chart-box--mini {
    margin: 7px 0 0;
    aspect-ratio: 7 / 4;
}

.fam-card-details {
    margin-top: 0;
    padding-top: 22px;
    border-top: 0;
}

.fam-contribution-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 34px;
    align-items: center;
}

.fam-contribution-copy {
    min-width: 0;
}

.fam-contributions-title--maximize {
    margin-top: 26px;
}

.fam-contribution-maxed {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    color: var(--color-positive);
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.45;
}

.fam-card-details .fam-table {
    table-layout: fixed;
    margin: 0;
}

.fam-card-details .fam-table tr:nth-child(even) {
    background: #faf8f2;
}

.fam-card-details .fam-table td {
    padding: 8px 5px;
    vertical-align: middle;
}

.fam-card-details .fam-table td:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto;
    color: #182232;
}

.fam-card-details .fam-table td:nth-child(2) {
    width: 22%;
    color: #182232;
    text-align: right;
}

.fam-card-details .fam-table td:last-child {
    width: 32%;
    color: #182232;
    text-align: right;
    white-space: nowrap;
}

.fam-card-details .fam-table td small {
    color: var(--color-muted);
    font-size: 0.82em;
    font-weight: 500;
}

.fam-contribution-swatch {
    display: inline-block;
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 2px;
    background: #e5dfd2;
}

.fam-contribution-remaining {
    border-top: 1px solid var(--color-border);
}

.fam-contribution-remaining strong {
    color: var(--color-primary);
}

.fam-contribution-over td {
    color: var(--color-error) !important;
    text-align: left !important;
}

.fam-contribution-layout > .fam-donut-wrap {
    align-self: stretch;
}

.fam-contribution-layout .fam-donut {
    width: 190px;
    height: 190px;
}

.fam-tax-summary {
    margin-top: 22px;
    padding: 16px 18px;
}

#results.has-family-card > :not(#growth-family-card) {
    display: none !important;
}

.split-form-results.has-family-report .calculator-quick-links {
    display: none;
}

#growth-family-card:empty {
    display: none;
}

.growth-report-standalone {
    width: 100%;
    min-width: 0;
}

.growth-report-standalone > .calculator-quick-links,
.growth-report-standalone > .family-chips {
    display: none !important;
}

.growth-report-standalone > .results {
    margin-top: 0;
}

.fam-report-footer-actions {
    width: 100%;
    justify-content: flex-end;
    margin: 22px 0 0 !important;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 700px) {
    .fam-report-footer-actions {
        margin-top: 18px !important;
    }
}

@media (max-width: 820px) {
    .fam-projection-body {
        grid-template-columns: 1fr;
    }

    .fam-projection-overview {
        padding-right: 0;
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .fam-projection-chart {
        padding-left: 0;
    }

    .fam-projection-overview .fam-projection-summary {
        padding: 30px 0 24px;
    }

    .fam-contribution-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .fam-projection-buying-power {
        margin-top: 16px;
        padding-top: 13px;
    }

    .fam-dollar-mode-options {
        grid-template-columns: 1fr;
    }

    .fam-projection-chart .fam-projection-assumptions {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .fam-projection-chart .fam-mini-badges {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .fam-card-details .fam-table,
    .fam-card-details .fam-table tbody,
    .fam-card-details .fam-table tr,
    .fam-card-details .fam-table td {
        display: block;
        width: 100% !important;
    }

    .fam-card-details .fam-table tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 11px 5px;
    }

    .fam-card-details .fam-table td {
        padding: 0;
    }

    .fam-card-details .fam-table td:first-child {
        grid-column: 1;
    }

    .fam-card-details .fam-table td:nth-child(2),
    .fam-card-details .fam-table td:last-child {
        text-align: left;
        white-space: normal;
    }

    .fam-contribution-layout .fam-donut {
        width: 170px;
        height: 170px;
    }

    .fam-tax-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .fam-tax-stats {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .fam-tax-stats span {
        padding: 10px 0;
        border-top: 1px solid var(--color-border);
    }
}

@media print {
    .fam-share-inline {
        display: none !important;
    }
}

/* ---------- Language switcher ---------- */
.lang-switch {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    overflow: hidden;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.lang-switch a {
    padding: 4px 8px;
    color: var(--color-muted);
    text-decoration: none;
    font-weight: 400;
}

.lang-switch>span {
    color: var(--color-border);
}

.lang-switch a:hover {
    color: var(--color-primary);
}

.lang-switch a.active {
    background: var(--color-muted);
    color: #fff;
    pointer-events: none;
}

.header-inner .lang-switch {
    margin-right: auto;
}

.header-inner .brand {
    margin-right: 0;
}

.lang-switch--mobile {
    display: none;
}

@media (max-width: 899px) {
    .lang-switch--header {
        display: none;
    }

    .lang-switch--mobile {
        display: flex;
        align-self: stretch;
        justify-content: center;
        width: 100%;
        margin: 0 0 12px;
        overflow: visible;
    }

    .lang-switch--mobile a {
        flex: 1;
        padding: 9px 12px;
        text-align: center;
    }

    .lang-switch--mobile a:first-child {
        border-radius: 999px 0 0 999px;
    }

    .lang-switch--mobile a:last-child {
        border-radius: 0 999px 999px 0;
    }
}

@media print {
    .lang-switch {
        display: none !important;
    }
}

.lang-switch {
    position: relative;
}

.lang-note {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 500;
    width: max-content;
    max-width: 240px;
    white-space: normal;
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    line-height: 1.4;
}

@media print {
    .fam-chart-box svg {
        max-width: 100% !important;
    }
}


.split-form-results {
    width: 100%;
    min-width: 0;
}

.split-form-results > .results {
    min-width: 0;
}

.calculator-quick-links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 20px;
    padding: 10px 0;
    overflow-x: auto;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.calculator-quick-links span {
    margin-right: 3px;
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.calculator-quick-links a {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--color-sand-soft);
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
}

.calculator-quick-links a:hover { background: var(--color-gold-soft); }

/* ---------- Growth calculator: print ---------- */
@media print {
    /* The summary already restates every input, so hide the form + helpers */
    #calc-form,
    .calculator-quick-links,
    .calc-intro,
    .fam-growth-manual,
    p:has(> #fam-back),
    #fam-back {
        display: none !important;
    }

    /* Condense the overall layout for print */
    .page-main > h1 {
        margin: 6px 0 6px !important;
        font-size: 1.6rem !important;
    }

    .split-form-results {
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .results {
        margin-top: 0 !important;
    }

    .projection-summary {
        gap: 14px !important;
        margin-bottom: 10px !important;
    }

    .growth-breakdown-key {
        margin: 10px 0 !important;
        padding: 12px 16px !important;
        break-inside: avoid;
    }

    .growth-chart-layout {
        gap: 12px !important;
        break-inside: avoid;
    }
}

#starting-benefits,
#resultados-crecimiento,
#growth-chart-section,
#seccion-grafica,
#milestone-section,
#seccion-hitos,
#breakdown-section,
#seccion-desglose,
#scenario-section,
#seccion-escenarios,
#how-it-works,
#como-funciona {
    scroll-margin-top: 18px;
}

@media (min-width: 768px) {
    .split-form-results > form {
        display: grid;
        grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.45fr);
        gap: 24px;
        align-items: start;
        padding-bottom: 18px;
    }

    .calculator-input-column {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .calculator-input-column > .field,
    .calculator-input-column > fieldset {
        margin-bottom: 0;
    }

    .calculator-input-column > .btn {
        align-self: flex-start;
        white-space: nowrap;
    }
}



.home-disclaimer {
    margin: 40px auto 0;
    font-size: 0.74rem;
    color: var(--color-muted);
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.home-disclaimer p {
    max-width: 130ch;
    display: inline-block;
    margin: 0 auto;
    padding: 0;
}

/* ---------- Homepage current-action journey ---------- */
.home-start {
    margin-top: 34px;
    padding: clamp(22px, 3vw, 36px);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-gold);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.home-start-intro {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 24px 48px;
    align-items: end;
    margin-bottom: 24px;
}

.home-start-intro h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}

.home-start-intro > p {
    max-width: 68ch;
    margin: 0;
    color: var(--color-muted);
}

.home-start-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.home-start-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 250px;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.home-start-card:hover {
    border-color: var(--color-gold);
    background: var(--color-sand-soft);
    color: var(--color-text);
    transform: translateY(-2px);
}

.home-start-step {
    margin-bottom: 14px;
    color: var(--color-gold-text);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.home-start-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-gold-soft);
    color: var(--color-primary);
}

.home-start-card strong {
    color: var(--color-primary);
    font-family: var(--font);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.2;
}

.home-start-card > span:not(.home-start-step):not(.home-start-icon) {
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.home-start-card b {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 18px;
    color: var(--color-primary);
    font-size: 0.8rem;
}

.home-start-help {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    background: var(--color-sand-soft);
}

.home-start-help > i {
    color: var(--color-gold-text);
}

.home-start-help p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.home-start-help strong {
    color: var(--color-primary);
}

.home-start-help a {
    white-space: nowrap;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
}

.home-start-help a:hover {
    text-decoration: underline;
}

@media (max-width: 860px) {
    .home-start-intro {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .home-start-grid {
        grid-template-columns: 1fr;
    }

    .home-start-card {
        min-height: 0;
    }

    .home-start-help {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .home-start-help a {
        grid-column: 2;
        white-space: normal;
    }
}

.projection-summary {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-gold);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.projection-benefits-column,
.projection-outcome-column { min-width: 0; }

.projection-outcome-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.projection-outcome-column .result-hero { padding-top: 18px; }
.result-total-label {
    display: block;
    margin-bottom: 3px;
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .projection-summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 24px;
    }

    .projection-outcome-column {
        padding-left: 24px;
        border-left: 1px solid var(--color-border);
    }
}

.growth-breakdown-key {
    margin: 20px 0 12px;
    padding: 16px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-sand-soft);
    font-size: 1rem;
}

.growth-breakdown-key strong { color: var(--color-primary); font-size: 1.08em; }

@media (max-width: 420px) {
    .breakdown-total { font-size: 2rem; }
    .growth-breakdown-key { gap: 8px 18px; padding: 14px 16px; }

    .growth-value-pair {
        grid-template-columns: 1fr;
    }

    .growth-value-card {
        padding-right: 0;
    }

    .growth-value-card + .growth-value-card {
        margin-top: 13px;
        padding: 13px 0 0;
        border-top: 1px solid var(--color-border);
        border-left: 0;
    }
}

.growth-chart-layout {
    display: block;
}

.growth-chart-layout .chart-wrap { min-width: 0; margin-top: 0; }

/* Age milestone buttons: tight horizontal row above the chart */
.growth-milestone-row {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.growth-milestone-row > button,
.growth-milestone-row > .fam-stat {
    flex: 1;
    width: auto;
}

.growth-milestone-row .fam-stat {
    min-height: 0;
    padding: 8px 10px;
}

.scenario-comparison {
    margin: 26px 0 22px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-gold);
    border-radius: var(--radius);
    background: transparent;
}

.scenario-comparison h2 { margin: 3px 0 8px; }
.scenario-comparison > p { margin-top: 0; }
.scenario-comparison .scenario-strip { margin-bottom: 0; }
.scenario .label small { display: block; margin-top: 3px; color: var(--color-muted); }

@media (max-width: 700px) {
    .growth-chart-layout { grid-template-columns: 1fr; }
    .scenario-comparison { padding: 16px; }
}

.projection-eyebrow {
    margin: 0 0 5px;
    color: var(--color-muted);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase
}

.projection-summary h2 {
    margin: 0 0 14px;
    font-size: clamp(1.2rem, 2.2vw, 1.65rem);
    line-height: 1.25
}

.benefit-list {
    display: grid;
    gap: 9px;
    margin-bottom: 20px
}

.benefit-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    align-items: start;
    font-size: .94rem;
    line-height: 1.35
}

.benefit-item > span:last-child {
    min-width: 0;
}

.benefit-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 800
}

.benefit-item--yes .benefit-icon {
    color: #fff;
    background: var(--color-positive)
}

.benefit-item--maybe .benefit-icon {
    color: #7a5410;
    background: #f8df9a
}

.benefit-item--no .benefit-icon {
    color: #fff;
    background: var(--color-error);
}

.benefit-item strong {
    display: block;
    color: var(--color-primary)
}

.benefit-detail {
    display: block;
    overflow-wrap: anywhere;
    color: var(--color-muted);
    font-size: .84rem
}

.projection-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: .25em .4em;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.15rem)
}

.projection-heading strong {
    color: var(--color-primary);
    font-size: clamp(1.5rem, 3.5vw, 2.15rem);
    font-family: var(--font);
    font-weight: 400
}

@media (max-width:600px) {
    .projection-summary {
        padding: 18px
    }

    .projection-heading {
        display: block
    }

    .projection-heading span,
    .projection-heading strong {
        display: block
    }

    .projection-heading strong {
        margin: 3px 0
    }
}

/* ---------- Mobile type scale + vertical rhythm ---------- */
@media (max-width: 560px) {
    .container {
        padding-left: 18px;
        padding-right: 18px;
    }

    h1 {
        margin: 0.45em 0 0.3em;
        font-size: 2.08rem;
        line-height: 1.08;
    }

    .hero h1 {
        font-size: 2.18rem;
        line-height: 1.02;
    }

    h2 {
        margin-top: 1.45em;
        margin-bottom: 0.55em;
    }

    .home .hero,
    .hero {
        padding: 28px 0 12px;
    }

    .home .hero {
        display: flex;
        flex-direction: column;
    }

    .home .hero .hero-live-badge { order: 1; }
    .home .hero h1 { order: 2; }
    .home .hero .hero-intro { order: 3; }
    .home .hero .hero-actions { order: 4; }
    .home .hero .hero-points { order: 5; }
    .home .hero .hero-quick-form { order: 6; }
    .home .hero .home-disclaimer { order: 7; }

    .hero-live-badge {
        margin-bottom: 14px !important;
        font-size: 0.7rem;
    }

    .hero-intro {
        margin-top: 16px;
        font-size: 0.98rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
        margin-top: 16px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-text-link {
        align-self: center;
    }

    .home-start {
        margin-top: 24px;
        padding: 18px;
    }

    .hero .hero-eyebrow {
        margin: 8px 0 0;
        font-size: 0.78rem;
        line-height: 1.2;
    }

    .hero-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin-top: 24px;
    }

    .hero-point,
    .hero-point:first-child {
        padding: 8px 6px;
        border-left: 0;
        text-align: center;
    }

    .hero-point-icon {
        font-size: 2.35rem;
        line-height: 1;
    }

    .hero-point dt {
        margin-top: 7px;
        font-size: 0.9rem;
        line-height: 1.15;
    }

    .mobile-title-break {
        display: inline;
    }

    .hero-point dd {
        margin-top: 3px;
        font-size: 0.76rem;
        line-height: 1.3;
    }

    .hero-quick-form {
        gap: 10px;
        margin-top: 18px;
        padding: 12px;
    }

    .home .hero-quick-label {
        width: 100%;
        padding: 0 4px;
        text-align: center;
    }

    .section-split,
    .guides-section {
        padding-top: 46px;
        padding-bottom: 46px;
    }

    .section-intro p {
        margin: 0.65em 0;
    }

    .card {
        margin: 14px 0;
        padding: 18px;
    }

    .tool-grid {
        gap: 10px;
        margin: 12px 0;
    }

    .tool-card {
        gap: 8px;
        padding: 14px 16px;
    }

    .guide-filters {
        margin-top: 12px;
        margin-bottom: 12px;
    }

    .disclaimer-block {
        margin-top: 28px;
    }

    .site-footer {
        margin-top: 42px;
    }

    .why-site {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 38px;
        padding: 20px;
    }

    .why-site-mark {
        width: 46px;
        height: 46px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .footer-brand img {
        max-width: 145px;
    }
}

/* ---------- Numeric alignment: lining tabular figures for all money ---------- */
table,
output,
.num,
.result-hero .num,
.breakdown-total,
.scenario .num,
.fam-stat strong,
.fam-mini-metric strong,
.fam-table,
.hero-contribution-summary {
    font-variant-numeric: lining-nums tabular-nums;
}

/* ---------- Print layout: compact flow, page QR, branded footer ---------- */
@page {
    size: letter;
    margin: 0.42in 0.5in 0.52in;
}

@media print {
    html,
    body {
        font-size: 10pt !important;
    }

    body {
        margin: 0 !important;
        color: #111 !important;
        widows: 3;
        orphans: 3;
    }

    .container,
    .layout,
    .page-main {
        width: 100% !important;
        max-width: none !important;
    }

    .layout {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-header {
        position: static !important;
        margin: 0 0 10pt !important;
        background: #fff !important;
        border-bottom: 1px solid #c8c8c8 !important;
        box-shadow: none !important;
    }

    .header-inner {
        min-height: 0 !important;
        padding: 0 0 8pt !important;
        align-items: flex-start !important;
    }

    .site-header .brand {
        margin: 0 !important;
        padding-top: 4pt !important;
    }

    .site-header .brand svg {
        width: 42px !important;
    }

    .site-header .brand-name {
        font-size: 16pt !important;
    }

    .site-header .brand-tagline {
        font-size: 8.5pt !important;
    }

    .print-page-qr {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        width: 112px;
        margin: 0 0 0 auto;
        color: #111 !important;
        text-align: center;
        line-height: 1.15;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-page-qr-code {
        display: block !important;
        padding: 7px;
        background: #fff !important;
    }

    .print-page-qr-code canvas {
        display: block !important;
        width: 96px !important;
        height: 96px !important;
    }

    .print-page-qr-code img {
        display: none !important;
    }

    .print-page-qr span {
        margin-top: 3pt;
        color: #333 !important;
        font-size: 7pt;
        font-weight: 700;
    }

    .page-main > h1 {
        margin: 3pt 0 5pt !important;
        font-size: 20pt !important;
        line-height: 1.08 !important;
    }

    .page-main > .muted {
        margin: 0 0 10pt !important;
        line-height: 1.45 !important;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        break-after: avoid-page;
        page-break-after: avoid;
    }

    p,
    li {
        widows: 3;
        orphans: 3;
    }

    tr,
    img,
    svg,
    .scenario,
    .fam-projection-head,
    .fam-projection-summary,
    .fam-projection-controls,
    .fam-chart-box,
    .account-stage-key,
    .fam-contributor-chart,
    .fam-tax-summary,
    .growth-breakdown-key,
    .growth-chart-layout {
        break-inside: avoid-page !important;
        page-break-inside: avoid !important;
    }

    .fam-contributors-label {
        break-after: avoid-page !important;
        page-break-after: avoid !important;
    }

    .fam-table {
        break-inside: avoid-page !important;
        page-break-inside: avoid !important;
    }

    .fam-card,
    .fam-chart-card,
    .fam-card-details,
    .results,
    #family-summary {
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .fam-card {
        overflow: visible !important;
    }

    .fam-card-details,
    .fam-contributions-title {
        margin-top: 10pt !important;
    }

    .print-footer {
        display: none !important;
    }

    .site-footer {
        margin: 18pt 0 0 !important;
        padding: 10pt 0 0 !important;
        border-top: 2px solid #c9a24b !important;
        background: #fff !important;
        color: #111 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .footer-shell {
        display: grid;
        grid-template-columns: 132px minmax(0, 1fr) !important;
        gap: 16pt !important;
        align-items: start !important;
        break-inside: avoid-page;
        page-break-inside: avoid;
    }

    .footer-links-row {
        display: block;
        padding: 0;
        border: 0;
    }

    .footer-inner {
        padding: 0 !important;
    }

    .footer-brand-column {
        align-items: center;
        gap: 6pt;
    }

    .footer-brand {
        width: 100%;
        gap: 6pt;
        padding: 0 !important;
    }

    .footer-brand img {
        width: 38px !important;
        max-width: 38px !important;
    }

    .footer-brand-text strong {
        color: #111 !important;
        font-size: 10pt !important;
    }

    .footer-brand-text small {
        color: #444 !important;
        font-size: 6pt !important;
    }

    .footer-home-qr {
        display: none !important;
    }

    .footer-home-qr img {
        display: block !important;
        width: 54px !important;
        height: 54px !important;
        margin-bottom: 2pt;
    }

    .footer-copy {
        font-size: 8pt;
        line-height: 1.35;
    }

    .footer-copy p {
        margin: 0 0 4pt !important;
    }
}

/* Family export chooser */
.fam-share-dialog {
    width: min(840px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: auto;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: var(--color-surface);
    box-shadow: 0 24px 70px rgba(15, 42, 74, 0.3);
}

.fam-share-dialog::backdrop {
    background: rgba(20, 28, 38, 0.56);
}

.fam-share-dialog form {
    padding: 22px;
}

.fam-share-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.fam-share-dialog-head h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.15rem;
}

.fam-share-dialog-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: none;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-primary);
    cursor: pointer;
}

.fam-share-privacy {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 17px 20px;
    border-radius: 12px;
    background: var(--color-gold-soft);
    cursor: pointer;
}

.fam-share-privacy input {
    width: 18px;
    height: 18px;
    flex: none;
    margin: 4px 0 0;
    accent-color: var(--color-primary);
}

.fam-share-privacy span,
.fam-share-privacy strong,
.fam-share-privacy small {
    display: block;
}

.fam-share-privacy strong {
    color: var(--color-text);
    font-size: 1rem;
}

.fam-share-privacy small {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 0.84rem;
    line-height: 1.4;
}

.fam-share-trust {
    margin: 0;
    padding: 17px 4px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.fam-share-copy-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.fam-share-copy-row .btn {
    min-width: 190px;
}

.fam-share-copy-row input {
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fbfaf7;
    color: var(--color-muted);
    font: italic 0.9rem/1 var(--font);
}

.fam-share-copy-status {
    min-height: 0;
    margin: 0;
    color: var(--color-positive);
    font-size: 0.78rem;
    font-weight: 700;
}

.fam-share-copy-status:not(:empty) {
    padding-top: 7px;
}

.fam-share-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
}

.fam-share-dialog-actions > .btn {
    min-width: 150px;
}

.fam-share-socials {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.fam-share-socials .fam-social {
    width: 42px;
    height: 42px;
    border-color: var(--color-primary);
    font-size: 17px;
}

.fam-share-embed-panel {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fbfaf7;
}

.fam-share-embed-panel[hidden] {
    display: none;
}

.fam-share-embed-panel > p {
    margin: 0 0 12px;
}

.fam-share-embed-panel > p strong,
.fam-share-embed-panel > p span {
    display: block;
}

.fam-share-embed-panel > p span {
    margin-top: 3px;
    color: var(--color-muted);
    font-size: 0.86rem;
}

.fam-share-embed-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.fam-share-embed-row textarea {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    resize: vertical;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-muted);
    font: 0.75rem/1.45 var(--mono);
}

/* Shared-report iframe mode. Legacy ?embed=1 links still hide the normal page shell. */
.is-embedded-report body {
    margin: 0;
    background: var(--color-surface);
}

.is-embedded-report body > .skip-link,
.is-embedded-report body > .eligibility-alert,
.is-embedded-report body > .site-header,
.is-embedded-report body > .offcanvas-backdrop,
.is-embedded-report body > .offcanvas,
.is-embedded-report body > .site-footer,
.is-embedded-report body > .a11y-btn,
.is-embedded-report body > .a11y-panel,
.is-embedded-report .layout > .sidebar,
.is-embedded-report .page-main > :not(#family-summary) {
    display: none !important;
}

.is-embedded-report .layout,
.is-embedded-report .page-main {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
}

.is-embedded-report .layout {
    padding: 12px;
}

.is-embedded-report .page-main {
    padding: 0;
}

.is-embedded-report .fam-summary-export-actions {
    display: none;
}

.is-embedded-report #family-summary {
    container-type: inline-size;
}

.is-embedded-report .fam-cards {
    margin-bottom: 0;
}

.is-embedded-report .fam-card {
    padding: 20px 24px;
}

.is-embedded-report .account-stage-key,
.is-embedded-report .account-stage-note {
    display: none;
}

.is-embedded-report .fam-projection-head {
    padding-bottom: 12px;
}

.is-embedded-report .fam-projection-overview {
    padding-top: 14px;
    padding-bottom: 12px;
}

.is-embedded-report .fam-projection-overview .fam-projection-summary {
    padding-top: 30px;
    padding-bottom: 18px;
}

.is-embedded-report .fam-projection-overview .fam-projection-breakdown {
    margin-top: 18px;
}

.is-embedded-report .fam-projection-chart {
    padding-top: 13px;
    padding-bottom: 6px;
}

.is-embedded-report .fam-projection-chart .fam-projection-assumptions {
    min-height: 0;
    padding-bottom: 9px;
}

.is-embedded-report .fam-card-details {
    padding-top: 16px;
}

.is-embedded-report .fam-contributions-title--maximize {
    margin-top: 20px;
}

.is-embedded-report .fam-tax-summary {
    margin-top: 16px;
}

.fam-embed-logo {
    display: inline-flex;
    min-width: 0;
    margin-left: auto;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    line-height: 1.05;
    text-decoration: none;
}

.fam-embed-logo img {
    display: block;
    width: 44px;
    height: 34px;
    flex: none;
    object-fit: contain;
}

.fam-embed-logo > span,
.fam-embed-logo strong,
.fam-embed-logo small {
    display: block;
}

.fam-embed-logo strong {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
}

.fam-embed-logo small {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.fam-embed-main {
    width: 100%;
    padding: 12px;
}

@container (max-width: 560px) {
    .is-embedded-report .fam-card {
        padding: 18px 14px;
    }

    .is-embedded-report .fam-projection-overview {
        padding-top: 12px;
        padding-bottom: 10px;
    }

    .is-embedded-report .fam-projection-overview .fam-projection-summary {
        padding-top: 18px;
        padding-bottom: 12px;
    }

    .is-embedded-report .fam-projection-overview .fam-projection-breakdown {
        margin-top: 14px;
    }

    .is-embedded-report .fam-projection-chart {
        padding-top: 12px;
        padding-bottom: 4px;
    }

    .is-embedded-report .fam-projection-chart .fam-projection-assumptions {
        justify-content: flex-start;
    }

    .is-embedded-report .fam-projection-chart .fam-mini-badges {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .is-embedded-report .fam-contribution-layout {
        grid-template-columns: 1fr;
    }

    .is-embedded-report .fam-contributions-title--maximize,
    .is-embedded-report .fam-contributions-title--maximize + .fam-table {
        display: none !important;
    }

    .is-embedded-report .fam-card-details .fam-table,
    .is-embedded-report .fam-card-details .fam-table tbody,
    .is-embedded-report .fam-card-details .fam-table tr,
    .is-embedded-report .fam-card-details .fam-table td {
        display: block;
        width: 100% !important;
    }

    .is-embedded-report .fam-card-details .fam-table tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 11px 5px;
    }

    .is-embedded-report .fam-card-details .fam-table td {
        padding: 0;
    }

    .is-embedded-report .fam-card-details .fam-table td:first-child {
        grid-column: 1;
    }

    .is-embedded-report .fam-card-details .fam-table td:nth-child(2),
    .is-embedded-report .fam-card-details .fam-table td:last-child {
        text-align: left;
        white-space: normal;
    }

    .is-embedded-report .fam-tax-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .is-embedded-report .fam-tax-stats {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .is-embedded-report .fam-tax-stats span {
        padding: 10px 0;
        border-top: 1px solid var(--color-border);
    }
}

/* Container queries make the card follow its frame width, even on a wide host page. */
@container (max-width: 480px) {
    .is-embedded-report .fam-card {
        padding: 18px 14px;
    }

    .is-embedded-report .fam-child-avatar {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        font-size: 1.2rem;
    }

    .is-embedded-report .fam-projection-name-row {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 10px;
    }

    .is-embedded-report .fam-projection-name-row > strong {
        order: 2;
    }

    .is-embedded-report .fam-embed-logo {
        order: 1;
        margin-left: 0;
        gap: 6px;
    }

    .is-embedded-report .fam-embed-logo img {
        width: 34px;
        height: 28px;
    }

    .is-embedded-report .fam-embed-logo strong {
        font-size: 0.96rem;
    }

    .is-embedded-report .fam-embed-logo small {
        display: none;
    }

}

@media (max-width: 460px) {
    .fam-embed-main {
        padding: 8px;
    }
}

.fam-export-dialog {
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: auto;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 42, 74, 0.26);
}

.fam-export-dialog::backdrop {
    background: rgba(15, 42, 74, 0.52);
}

.fam-export-dialog form {
    padding: 24px;
}

.fam-export-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.fam-export-head h2 {
    margin: 0;
}

.fam-export-close {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-primary);
    cursor: pointer;
}

.fam-export-private {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fbfaf7;
}

.fam-export-private input {
    margin-top: 4px;
}

.fam-export-private span,
.fam-export-private strong,
.fam-export-private small {
    display: block;
}

.fam-export-private small {
    margin-top: 4px;
    color: var(--color-muted);
    line-height: 1.4;
}

.fam-export-choices {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.fam-export-choices legend {
    margin-bottom: 10px;
    color: var(--color-primary);
    font-weight: 750;
}

.fam-export-choices label {
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.fam-export-child-list {
    display: grid;
    gap: 8px;
}

.fam-export-child-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-primary);
    font-weight: 700;
}

.fam-export-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.fam-save-success,
.fam-manual-add {
    margin: 14px 0;
}

.fam-save-success {
    color: var(--color-positive);
    font-weight: 650;
}

.fam-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.family-print-root {
    display: none;
}

@page family-report {
    size: letter portrait;
    margin: 0.3in;
}

@media print {
    html.family-printing body > *:not(.family-print-root) {
        display: none !important;
    }

    html.family-printing .family-print-root {
        display: block !important;
    }

    .family-print-sheet {
        display: flex;
        page: family-report;
        min-height: 10.4in;
        flex-direction: column;
        break-after: page;
        page-break-after: always;
        color: #182232;
    }

    .family-print-sheet:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .family-print-masthead {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 54px;
        margin-bottom: 7px;
        padding-bottom: 7px;
        border-bottom: 2px solid #c9a24b;
    }

    .family-print-brand {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .family-print-brand img {
        width: 38px;
        height: 38px;
    }

    .family-print-brand span,
    .family-print-brand strong,
    .family-print-brand small {
        display: block;
    }

    .family-print-brand strong {
        font-family: var(--heading);
        font-size: 16pt;
    }

    .family-print-brand small {
        color: #5a6675;
        font-size: 7pt;
    }

    .family-print-qr {
        display: grid;
        grid-template-columns: 48px auto;
        grid-template-rows: auto auto;
        column-gap: 7px;
        align-items: center;
        text-align: left;
    }

    .family-print-qr > div {
        grid-row: 1 / 3;
    }

    .family-print-qr canvas {
        display: block !important;
        width: 48px !important;
        height: 48px !important;
    }

    .family-print-qr img {
        display: none !important;
    }

    .family-print-qr strong {
        align-self: end;
        font-size: 7pt;
    }

    .family-print-qr small {
        align-self: start;
        color: #5a6675;
        font-size: 6pt;
    }

    .family-print-sheet .fam-card {
        display: block;
        flex: 1 1 auto;
        margin: 0;
        padding: 10px 14px;
        overflow: hidden !important;
        border-radius: 11px;
        break-inside: avoid-page !important;
        page-break-inside: avoid !important;
    }

    .family-print-sheet .fam-projection-head {
        padding-bottom: 7px;
    }

    .family-print-sheet .fam-projection-identity {
        gap: 9px;
    }

    .family-print-sheet .fam-child-avatar {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 1rem;
    }

    .family-print-sheet .fam-projection-person strong {
        font-size: 13pt;
    }

    .family-print-sheet .fam-projection-person span {
        font-size: 8pt;
    }

    .family-print-sheet .fam-projection-body {
        grid-template-columns: 31% 69%;
    }

    .family-print-sheet .fam-projection-overview {
        padding: 8px 11px 7px 0;
    }

    .family-print-sheet .fam-projection-chart {
        padding: 7px 0 5px 11px;
    }

    .family-print-sheet .fam-age-picker .fam-age-button {
        width: 28px;
        height: 22px;
        font-size: 7pt;
    }

    .family-print-sheet .fam-projection-overview .fam-projection-summary {
        padding: 14px 0 9px;
    }

    .family-print-sheet .fam-projection-total {
        font-size: 29pt;
    }

    .family-print-sheet .fam-projection-main > .fam-projection-value-label,
    .family-print-sheet .fam-projection-main > .fam-projection-value-note,
    .family-print-sheet .fam-projection-buying-power > span,
    .family-print-sheet .fam-projection-buying-power > small {
        font-size: 6.5pt;
    }

    .family-print-sheet .fam-projection-buying-power {
        margin-top: 8px;
        padding-top: 7px;
    }

    .family-print-sheet .fam-projection-buying-power > strong {
        font-size: 18pt;
    }

    .family-print-sheet .fam-projection-overview .fam-projection-breakdown {
        gap: 8px;
        margin-top: 10px;
        font-size: 8pt;
    }

    .family-print-sheet .fam-projection-breakdown strong {
        font-size: 10pt;
    }

    .family-print-sheet .account-stage-key {
        gap: 4px;
        padding-top: 8px;
    }

    .family-print-sheet .account-stage strong,
    .family-print-sheet .account-stage small,
    .family-print-sheet .account-stage-note {
        font-size: 6pt;
    }

    .family-print-sheet .account-stage > i {
        width: 7px;
        height: 18px;
        flex-basis: 7px;
    }

    .family-print-sheet .fam-projection-chart .fam-projection-assumptions {
        min-height: 34px;
        padding-bottom: 5px;
    }

    .family-print-sheet .fam-header-limit-ring {
        width: 22px;
        height: 22px;
    }

    .family-print-sheet .fam-mini-metric strong {
        font-size: 10pt;
    }

    .family-print-sheet .fam-mini-metric span,
    .family-print-sheet .fam-badge {
        font-size: 6.5pt;
    }

    .family-print-sheet .fam-badge {
        padding: 3px 7px;
    }

    .family-print-sheet .fam-chart-box--mini {
        margin-top: 2px;
        aspect-ratio: 7 / 2.55;
    }

    .family-print-sheet .fam-card-details {
        margin: 0 !important;
        padding-top: 8px;
    }

    .family-print-sheet .fam-contribution-layout {
        grid-template-columns: minmax(0, 1fr) 120px;
        gap: 14px;
    }

    .family-print-sheet .fam-contributions-title {
        margin: 0 0 3px !important;
        font-size: 8.5pt;
    }

    .family-print-sheet .fam-contributions-title--maximize {
        margin-top: 6px !important;
    }

    .family-print-sheet .fam-card-details .fam-table {
        font-size: 7pt;
    }

    .family-print-sheet .fam-card-details .fam-table td {
        padding: 2px 3px;
    }

    .family-print-sheet--dense .fam-chart-box--mini {
        aspect-ratio: 7 / 2.25;
    }

    .family-print-sheet--dense .fam-card-details .fam-table {
        font-size: 6pt;
    }

    .family-print-sheet--dense .fam-card-details .fam-table td {
        padding: 1px 2px;
    }

    .family-print-sheet--dense .fam-contribution-layout .fam-donut {
        width: 90px;
        height: 90px;
    }

    .family-print-sheet .fam-contribution-swatch {
        width: 7px;
        height: 7px;
        flex-basis: 7px;
    }

    .family-print-sheet .fam-contribution-layout .fam-donut {
        width: 106px;
        height: 106px;
    }

    .family-print-sheet .fam-tax-summary {
        margin-top: 7px;
        padding: 6px 8px;
    }

    .family-print-sheet .fam-tax-head {
        margin-bottom: 4px;
        font-size: 7.5pt;
    }

    .family-print-sheet .fam-tax-stats b {
        font-size: 8pt;
    }

    .family-print-sheet .fam-tax-stats small,
    .family-print-sheet .fam-tax-summary p {
        font-size: 6pt;
    }

    .family-print-sheet .fam-tax-summary p {
        margin-top: 4px;
    }

    .family-print-sheet > footer {
        padding-top: 5px;
        color: #5a6675;
        font-size: 6.5pt;
        text-align: center;
    }

    .fam-export-dialog,
    .fam-share-dialog {
        display: none !important;
    }
}

@media (max-width: 700px) {
    .fam-projection-name-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .fam-card-actions {
        width: 100%;
        margin-top: 10px !important;
    }

    .fam-card-actions .fam-header-add,
    .fam-card-actions .fam-header-share,
    .fam-card-actions .fam-summary-export {
        flex: 1 1 auto;
    }

    .fam-share-dialog form {
        padding: 16px;
    }

    .fam-share-copy-row {
        grid-template-columns: 1fr;
    }

    .fam-share-copy-row .btn {
        min-width: 0;
    }

    .fam-share-embed-row {
        grid-template-columns: 1fr;
    }

    .fam-share-dialog-actions {
        flex-wrap: wrap;
    }

    .fam-share-dialog-actions > .btn {
        flex: 1 1 140px;
        min-width: 0;
    }

    .fam-share-socials {
        width: 100%;
        margin: 2px 0 0;
    }
}
