/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); }

.hero-head {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 24px 56px;
    align-items: end;
    margin-bottom: clamp(32px, 4vw, 48px);
}
.hero-head h1 { font-size: clamp(2.375rem, 5.6vw, 4.5rem); max-width: 11em; }
.hero-side { display: grid; gap: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The payoff instrument */
.instrument {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.readout { padding: clamp(24px, 3.5vw, 40px) clamp(20px, 3.5vw, 40px) 8px; }
.readout-kicker { font-weight: 600; color: var(--ink-2); font-stretch: 108%; }

.free-date {
    font-size: clamp(2.5rem, 9vw, 9rem);
    font-stretch: 125%;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 0.92;
    margin: 6px 0 18px;
    font-variant-numeric: tabular-nums lining-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}
.free-date.is-stalled { color: var(--rose); }
.free-date.tick { animation: tick 0.32s cubic-bezier(.2,.7,.2,1); }

@keyframes tick {
    from { transform: translateY(0.12em); opacity: 0.35; }
    to { transform: translateY(0); opacity: 1; }
}

.readout-facts { font-size: clamp(1.0625rem, 1.6vw, 1.3125rem); color: var(--ink-2); max-width: 40em; }
.readout-facts strong { color: var(--ink); font-weight: 650; }
.readout-facts .gain { color: var(--teal); }

.chart-wrap { position: relative; padding: 20px clamp(12px, 2.5vw, 28px) 4px; }
.chart { width: 100%; height: 300px; overflow: visible; }
.chart text { font-family: inherit; font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .baseline { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .marker { stroke: var(--teal); stroke-width: 1.5; }
.chart .marker-dot { fill: var(--teal); }
.chart .marker-label { fill: var(--teal); font-weight: 650; font-size: 13px; }
.chart .base-label { fill: var(--ink-2); font-size: 12px; }
.chart .base-marker { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 4; }
.layer-1 { fill: var(--d1); } .layer-2 { fill: var(--d2); } .layer-3 { fill: var(--d3); }
.layer-4 { fill: var(--d4); } .layer-5 { fill: var(--d5); } .layer-6 { fill: var(--d6); }

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding: 8px clamp(20px, 3.5vw, 40px) 24px;
    list-style: none;
    font-size: 0.875rem;
    color: var(--ink-2);
}
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.chart-note { padding: 0 clamp(20px, 3.5vw, 40px) 24px; margin-top: -12px; font-size: 0.8125rem; color: var(--ink-3); max-width: 60rem; }
.swatch-dash { width: 18px; height: 0; border-top: 2px dashed var(--ink-3); border-radius: 0; }

.controls {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    border-top: 1px solid var(--line);
}
.controls > * { padding: clamp(20px, 3vw, 32px) clamp(20px, 3.5vw, 40px); }
.controls-side { border-left: 1px solid var(--line); background: var(--sunken); display: grid; gap: 28px; align-content: start; }

.ctl-title { font-weight: 650; font-stretch: 108%; margin-bottom: 12px; }

.debts { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.debts th {
    text-align: left;
    font-weight: 500;
    color: var(--ink-3);
    font-size: 0.8125rem;
    padding: 0 8px 8px 0;
}
.debts td { padding: 4px 8px 4px 0; vertical-align: middle; }
.debts td:last-child, .debts th:last-child { padding-right: 0; width: 36px; }

.cell {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 0 10px;
}
.cell:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 20%, transparent); }
.cell span { color: var(--ink-3); flex: none; }
.cell input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    min-width: 0;
    font-variant-numeric: tabular-nums;
}
.cell-name { gap: 10px; }
.cell-name .swatch { width: 10px; height: 10px; }

.remove {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--ink-3);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.remove:hover { background: var(--sunken); color: var(--ink); }
.remove svg { width: 16px; height: 16px; }

.add-debt {
    margin-top: 12px;
    background: none;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    height: 42px;
    width: 100%;
    color: var(--ink-2);
    font-weight: 550;
    cursor: pointer;
}
.add-debt:hover { border-color: var(--ink-3); color: var(--ink); }
.add-debt[hidden] { display: none; }

.slider-value {
    font-size: 2rem;
    font-weight: 750;
    font-stretch: 120%;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 12px;
}
.slider-value small { font-size: 1rem; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--ink-2); }

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 28px;
    background: transparent;
    cursor: pointer;
    --fill: 17%;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--indigo) var(--fill), var(--line) var(--fill));
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--indigo); }
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin-top: -8px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--indigo);
    box-shadow: 0 1px 3px rgba(18, 36, 58, 0.25);
}
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--indigo);
}
.range-ends { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--ink-3); }

.seg { display: grid; gap: 8px; border: 0; padding: 0; }
.seg legend { padding: 0; }
.seg label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    align-items: start;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    cursor: pointer;
}
.seg label:has(input:checked) { border-color: var(--indigo); box-shadow: inset 0 0 0 1px var(--indigo); }
.seg input { accent-color: var(--indigo); margin-top: 5px; }
.seg strong { font-weight: 600; }
.seg small { grid-column: 2; color: var(--ink-2); font-size: 0.875rem; line-height: 1.4; }
.seg-hint { display: none; color: var(--ink-3); font-size: 0.875rem; line-height: 1.4; margin-top: -4px; }
.seg.is-idle .seg-hint { display: block; }
.seg.is-idle label { opacity: 0.6; }
.seg.is-idle label:has(input:checked) { border-color: var(--line); box-shadow: none; }

.proof {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    font-size: 0.875rem;
    color: var(--ink-2);
    line-height: 1.5;
    margin-top: 28px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: var(--teal-soft);
    max-width: 34rem;
}
.proof-count {
    font-size: 1.75rem;
    font-weight: 800;
    font-stretch: 125%;
    line-height: 1;
    color: var(--teal);
    min-width: 1.2ch;
    font-variant-numeric: tabular-nums;
}
.proof strong { color: var(--ink); font-weight: 600; display: block; }

/* Import sequence */
.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    list-style: none;
    padding: 0;
    counter-reset: step;
    border-top: 2px solid var(--ink);
}
.steps > li { padding: 28px 32px 0 0; counter-increment: step; display: grid; gap: 10px; align-content: start; }
.steps > li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.steps > li::before {
    content: counter(step);
    font-size: 3.5rem;
    font-weight: 800;
    font-stretch: 125%;
    line-height: 1;
    color: var(--indigo);
    margin-bottom: 12px;
}
.steps p { color: var(--ink-2); }

.formats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; list-style: none; padding: 0; }
.formats li {
    font-size: 0.8125rem;
    font-weight: 650;
    font-stretch: 110%;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--sunken);
    border: 1px solid var(--line);
}

.file-drop {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 14px 16px;
    display: grid;
    gap: 6px;
    font-size: 0.875rem;
}
.file-drop-row { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.file-drop-row b { color: var(--ink); font-weight: 600; }
.file-drop-row .ok { color: var(--teal); font-weight: 600; }

/* Features */
.features { background: var(--surface); border-block: 1px solid var(--line); }

.feature {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(32px, 6vw, 96px);
    align-items: center;
    padding: clamp(40px, 5vw, 64px) 0;
}
.feature + .feature { border-top: 1px solid var(--line-soft); }
.feature:nth-child(odd) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.feature:nth-child(odd) .feature-copy { order: 2; }
.feature-copy { display: grid; gap: 14px; max-width: 30rem; }
.feature-copy h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-stretch: 115%; font-weight: 700; letter-spacing: -0.015em; }
.feature-copy p { color: var(--ink-2); }
.feature-copy ul { padding-left: 1.1em; color: var(--ink-2); display: grid; gap: 4px; }

.vignette {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 3vw, 32px);
}
.vignette-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.vignette-title b { font-weight: 650; font-stretch: 108%; }
.vignette-title span { color: var(--ink-3); font-size: 0.875rem; }

.envelope { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.envelope:first-of-type { border-top: 0; padding-top: 0; }
.envelope-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9375rem; }
.envelope-row span:last-child { color: var(--ink-2); }
.bar { height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.bar.warn i { background: var(--amber); }
.note-warn { font-size: 0.8125rem; color: var(--amber); }

.cycle { position: relative; margin: 8px 0 28px; }
.cycle-track { height: 10px; border-radius: 999px; background: var(--sunken); position: relative; overflow: hidden; }
.cycle-track i { position: absolute; inset: 0 auto 0 0; width: 62%; background: var(--d2); border-radius: inherit; }
.cycle-grace { position: absolute; top: 0; bottom: 0; left: 72%; right: 0; background: repeating-linear-gradient(-45deg, var(--teal-soft) 0 6px, transparent 6px 12px); }
.cycle-marks { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--ink-3); margin-top: 8px; }
.cycle-marks .today { color: var(--ink); font-weight: 600; }
.card-callout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--line);
}
.card-callout b { font-size: 1.5rem; font-stretch: 118%; font-weight: 750; }
.card-callout span { color: var(--ink-2); font-size: 0.9375rem; }
.card-callout em { font-style: normal; grid-column: 1 / -1; font-size: 0.875rem; color: var(--teal); font-weight: 550; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; display: grid; gap: 4px; }
.compare .pick { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.compare dt { font-size: 0.8125rem; color: var(--ink-3); }
.compare dd { font-weight: 650; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.compare h4 { font-size: 1rem; font-weight: 650; font-stretch: 108%; margin-bottom: 6px; }
.reality {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--teal-soft);
    color: var(--ink);
    font-size: 0.9375rem;
}

.passkey {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
    padding: clamp(28px, 4vw, 44px) 20px;
}
.passkey-ring {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 2px solid var(--indigo);
    display: grid;
    place-items: center;
    color: var(--indigo);
}
.passkey-ring svg { width: 40px; height: 40px; }
.passkey b { font-size: 1.125rem; font-stretch: 110%; }
.passkey span { color: var(--ink-2); font-size: 0.9375rem; }
.passkey .fake-field {
    width: min(280px, 100%);
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--line);
    display: grid;
    place-items: center;
    color: var(--ink-3);
    font-size: 0.875rem;
    text-decoration: line-through;
}

/* Privacy band */
.privacy { background: var(--band); color: var(--band-ink); }
.privacy .lead, .privacy .pricing-note { color: var(--band-ink-2); }
.privacy-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(40px, 6vw, 88px);
    align-items: start;
}
.privacy-copy { display: grid; gap: 20px; }
.nevers { list-style: none; padding: 0; display: grid; gap: 0; margin-top: 8px; border-top: 1px solid var(--band-line); }
.nevers li { padding: 14px 0; border-bottom: 1px solid var(--band-line); display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.nevers svg { width: 18px; height: 18px; margin-top: 4px; color: var(--band-ink-2); }
.nevers b { font-weight: 600; }
.nevers span { color: var(--band-ink-2); }

.flow { display: grid; gap: 0; }
.device {
    border: 1.5px solid var(--band-ink-2);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.device-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--band-ink-2); font-size: 0.9375rem; }
.device-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--band-ink-2); opacity: 0.6; }
.device-head b { color: var(--band-ink); font-weight: 650; font-stretch: 108%; margin-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chips li { padding: 8px 12px; border-radius: 999px; background: var(--band-chip); font-size: 0.9375rem; }
.wire {
    height: 72px;
    margin-left: 40px;
    border-left: 1.5px dashed var(--band-ink-2);
    position: relative;
}
.wire span {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: var(--band-ink-2);
    white-space: nowrap;
}
.server {
    border: 1.5px solid var(--band-line);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    display: grid;
    gap: 10px;
    width: min(100%, 360px);
}
.server-head { color: var(--band-ink-2); font-size: 0.9375rem; }
.server-head b { color: var(--band-ink); font-weight: 650; font-stretch: 108%; }
.server ul { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 0.9375rem; }
.server li span { color: var(--band-ink-2); }

/* Pricing */
.plans {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
}
.plan { padding: clamp(24px, 3vw, 36px); display: grid; gap: 18px; align-content: start; grid-template-rows: auto auto auto 1fr auto; }
.plan + .plan { border-left: 1px solid var(--line); }
.plan.is-featured { box-shadow: inset 0 4px 0 var(--indigo); background: color-mix(in srgb, var(--indigo) 4%, var(--surface)); }
.plan-name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plan-name h3 { font-size: 1.375rem; }
.plan-name span { font-size: 0.8125rem; font-weight: 600; color: var(--indigo); }
.price { font-size: 3rem; font-weight: 800; font-stretch: 122%; letter-spacing: -0.03em; line-height: 1; }
.price small { font-size: 1rem; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--ink-2); }
.plan-for { color: var(--ink-2); }
.plan ul { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 0.9375rem; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.plan li svg { width: 16px; height: 16px; margin-top: 4px; color: var(--teal); }
.plan .btn { width: 100%; }
.pricing-note { margin-top: 20px; color: var(--ink-2); font-size: 0.9375rem; max-width: 46rem; }

.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.faq-grid .section-head { margin-bottom: 0; position: sticky; top: 100px; }
/* Desktop: a tighter instrument so the readout, chart and controls fit closer to one screen.
   Phones and tablets keep the stacked layout below. */
@media (min-width: 961px) {
    .readout { padding: 24px 40px 0; }
    .free-date { margin: 4px 0 10px; }
    .readout-facts { font-size: clamp(1rem, 1.3vw, 1.125rem); max-width: 60em; }

    .chart-wrap { padding-top: 12px; }
    .chart { height: 210px; }

    .chart-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 32px; padding: 4px 40px 16px; }
    .chart-foot .legend { padding: 0; flex: 1 1 auto; }
    .chart-foot .chart-note { padding: 0; margin: 0; flex: 0 1 34rem; }

    .controls { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.7fr); }
    .controls > * { padding: 20px 28px; }
    .controls-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 28px;
        align-items: start;
    }
    .controls-side > :nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }

    .ctl-title { margin-bottom: 8px; }
    .cell { height: 36px; }
    .debts td { padding-block: 3px; }
    .debts th { padding-bottom: 6px; }
    .add-debt { margin-top: 8px; height: 36px; }
    .slider-value { font-size: 1.75rem; margin-bottom: 4px; }
    .seg label { padding: 10px 12px; }
    .proof { margin-top: 16px; padding: 12px 14px; max-width: none; }
    .proof-count { font-size: 1.5rem; }
}

@media (max-width: 960px) {
    .chart-foot .legend { padding-bottom: 12px; }
    .hero-head, .privacy-grid, .faq-grid, .feature { grid-template-columns: minmax(0, 1fr); }
    .feature:nth-child(odd) { grid-template-columns: minmax(0, 1fr); }
    .feature:nth-child(odd) .feature-copy { order: 0; }
    .faq-grid .section-head { position: static; }
    .controls { grid-template-columns: minmax(0, 1fr); }
    .controls-side { border-left: 0; border-top: 1px solid var(--line); }
    .steps { grid-template-columns: minmax(0, 1fr); border-top: 0; }
    .steps > li, .steps > li + li { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
    .steps > li:first-child { border-top: 2px solid var(--ink); }
    .plans { grid-template-columns: minmax(0, 1fr); }
    .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
    .chart { height: 220px; }

    /* Debt table becomes stacked rows on phones */
    .debts thead { display: none; }
    .debts, .debts tbody { display: block; }
    .debts tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.7fr) 36px;
        gap: 8px 6px;
        padding: 12px 0;
        border-bottom: 1px solid var(--line-soft);
    }
    .debts td { padding: 0; display: grid; gap: 4px; }
    .debts td:first-child { grid-column: 1 / -2; }
    .debts td:last-child { grid-column: 4; grid-row: 1; align-self: end; }
    .debts td:nth-child(4) { grid-column: 3 / -1; }
    .debts .cell { padding: 0 10px; }
    .debts td[data-label] .cell span { display: none; }
    .debts td[data-label]::before { content: attr(data-label); font-size: 0.75rem; color: var(--ink-3); }
    .compare { grid-template-columns: minmax(0, 1fr); }
    .wire { margin-left: 24px; }
}
