/* Bitcoin Retirement Calculator — design tokens */
:root {
    --bg: #f7f6f2;
    --surface: #ffffff;
    --surface-2: #f2f0ea;
    --border: #e6e3da;
    --text: #17161c;
    --text-secondary: #5e5c66;
    --text-tertiary: #8b8893;
    --accent: #f7931a;
    --accent-strong: #c46d00;
    --accent-soft: rgba(247, 147, 26, 0.12);
    --success: #15803d;
    --success-soft: rgba(21, 128, 61, 0.1);
    --danger: #c2410c;
    --danger-soft: rgba(194, 65, 12, 0.1);
    --retire: #7c6fd6;
    --shadow: 0 1px 2px rgba(23, 22, 28, 0.04), 0 8px 24px rgba(23, 22, 28, 0.06);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0c0c10;
    --surface: #16161c;
    --surface-2: #1e1e26;
    --border: #2a2a34;
    --text: #f3f3f5;
    --text-secondary: #a8a7b2;
    --text-tertiary: #75747f;
    --accent: #f7931a;
    --accent-strong: #ffad4d;
    --accent-soft: rgba(247, 147, 26, 0.14);
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.12);
    --danger: #fb923c;
    --danger-soft: rgba(251, 146, 60, 0.12);
    --retire: #a49af0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'tnum' 1, 'cv11' 1;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 100;
    background: var(--surface);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Top bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand-mark {
    display: block;
    width: 32px;
    height: 32px;
}

.brand-mark svg {
    display: block;
    width: 100%;
    height: 100%;
}

.topnav {
    display: flex;
    gap: 20px;
    margin-left: 8px;
}

.topnav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.topnav a:hover {
    color: var(--text);
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 14px;
}

.price-pill-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.price-pill-value {
    font-weight: 700;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-soft);
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* Hero */
.hero {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 32px;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 16px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 600;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
}

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

.hero-sub {
    margin: 16px auto 0;
    max-width: 600px;
    color: var(--text-secondary);
    font-size: 1.075rem;
}

/* Layout */
.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.results-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* Form */
.form-card {
    padding: 8px 24px 24px;
}

fieldset {
    border: 0;
    margin: 0;
    padding: 18px 0 4px;
    border-bottom: 1px solid var(--border);
}

fieldset:last-of-type {
    border-bottom: 0;
}

legend {
    float: left;
    width: 100%;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    clear: both;
}

.input-group {
    margin-bottom: 14px;
    clear: both;
}

.field-row .input-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.slider-readout {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

input[type="number"],
select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.4s;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

input[type="number"]::-webkit-inner-spin-button {
    opacity: 0.4;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-unit input {
    padding-right: 52px;
}

.input-with-unit .unit {
    position: absolute;
    right: 12px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}

.input-with-unit .unit-prefix {
    left: 12px;
    right: auto;
}

.input-with-unit .unit-prefix + input {
    padding-left: 26px;
    padding-right: 12px;
}

input[type="range"] {
    width: 100%;
    margin: 4px 0 10px;
    accent-color: var(--accent);
}

.text-btn {
    border: 0;
    background: none;
    color: var(--accent-strong);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.text-btn:disabled {
    color: var(--text-tertiary);
    cursor: progress;
}

.validation-message {
    font-size: 13px;
    min-height: 0;
}

.validation-message.error {
    margin-top: 6px;
    color: var(--danger);
}

.validation-message.success {
    display: none;
}

/* Toggle switch */
.strategy-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 14px;
    clear: both;
}

.strategy-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.strategy-help {
    display: block;
    font-size: 13px;
    color: var(--text-tertiary);
}

.switch {
    position: relative;
    flex: none;
    width: 44px;
    height: 26px;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.slider-round::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.switch input:checked + .slider-round {
    background: var(--accent);
}

.switch input:checked + .slider-round::before {
    transform: translateX(18px);
}

.switch input:focus-visible + .slider-round {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.primary-btn {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #1a1000;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s, transform 0.05s;
}

.primary-btn:hover {
    filter: brightness(1.06);
}

.primary-btn:active {
    transform: translateY(1px);
}

.form-note {
    margin: 10px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Verdict */
.verdict {
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.verdict::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--text-tertiary);
}

.verdict-success::before { background: var(--success); }
.verdict-danger::before { background: var(--danger); }

.verdict-kicker {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.verdict-title {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.verdict-success .verdict-title strong { color: var(--success); }
.verdict-danger .verdict-title strong { color: var(--danger); }

.verdict-text {
    margin: 10px 0 0;
    color: var(--text-secondary);
    max-width: 640px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.stat {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    min-width: 0;
}

.stat-label {
    display: block;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.stat-value small {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.result-details {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.result-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
}

.result-details ul {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.result-details li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}

.result-details li:last-child {
    border-bottom: 0;
}

.result-details .label {
    color: var(--text-secondary);
}

.result-details .value {
    font-weight: 600;
    text-align: right;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.share-btn:hover,
.share-btn:focus-visible {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

.tips {
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    font-size: 14px;
    color: var(--text);
}

.tips strong {
    color: var(--accent-strong);
}

/* Chart */
.chart-card {
    padding: 24px;
}

.chart-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-head h2 {
    font-size: 1.15rem;
}

.chart-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.key {
    display: inline-block;
    width: 14px;
    height: 3px;
    border-radius: 2px;
    margin-left: 4px;
}

.key:first-child { margin-left: 0; }
.key-accumulate { background: var(--accent); }
.key-retire { background: var(--retire); margin-left: 10px; }

.view-options {
    display: flex;
    padding: 3px;
    border-radius: 999px;
    background: var(--surface-2);
    flex: none;
}

.view-tab {
    border: 0;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.view-tab.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.chart-container {
    position: relative;
    height: 360px;
}

.table-wrapper {
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.projection-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.projection-table th {
    position: sticky;
    top: 0;
    background: var(--surface-2);
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 10px 14px;
}

.projection-table td {
    padding: 9px 14px;
    border-top: 1px solid var(--border);
}

.phase-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.phase-badge.accumulation { background: var(--accent-soft); color: var(--accent-strong); }
.phase-badge.peak { background: var(--success-soft); color: var(--success); }
.phase-badge.retirement { background: color-mix(in srgb, var(--retire) 15%, transparent); color: var(--retire); }

/* Content sections */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    border-top: 1px solid var(--border);
}

.section > h2 {
    font-size: 1.6rem;
    margin-bottom: 24px;
}

.steps,
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.step,
.info-card {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.step-num {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 700;
    margin-bottom: 14px;
}

.step h3,
.info-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.step p,
.info-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.faq-list {
    max-width: 820px;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 32px 18px 0;
    font-weight: 600;
    position: relative;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 400;
    color: var(--text-tertiary);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    margin: 0 0 18px;
    color: var(--text-secondary);
}

.footer {
    padding: 32px 24px 48px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
    border-top: 1px solid var(--border);
}

.footer p {
    margin: 4px 0;
}

/* Next steps (partner links) */
.next-steps {
    margin-top: 24px;
    padding: 24px 28px;
}

.next-steps-title {
    font-size: 1.15rem;
    margin: 0 0 4px;
}

.next-step {
    padding: 16px 0;
    border-bottom: 1px dashed var(--border);
}

.next-step h3 {
    font-size: 15px;
    margin: 0 0 4px;
}

.next-step p {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.partner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.partner-link {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.partner-link:hover,
.partner-link:focus-visible {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.disclosure {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Tip jar */
.tip-jar {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 520px;
    margin: 0 auto 20px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    text-align: left;
}

/* The QR keeps its own white background so it scans in dark mode too */
.tip-qr {
    flex: none;
    width: 128px;
    height: 128px;
    border-radius: 8px;
}

.tip-body {
    min-width: 0;
}

.footer .tip-hint {
    margin: 0 0 10px;
    font-size: 13px;
}

.tip-jar[hidden] {
    display: none;
}

.footer .tip-title {
    margin: 0 0 8px;
    color: var(--text);
    font-weight: 600;
}

.tip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

@media (max-width: 640px) {
    .tip-jar {
        flex-direction: column;
        text-align: center;
    }

    .tip-qr {
        width: 112px;
        height: 112px;
    }

    .tip-row {
        justify-content: center;
    }

    /* On a phone the wallet is on the same device, so opening it is the main action */
    .tip-open {
        flex-basis: 100%;
        padding: 12px;
        border-radius: 999px;
        background: var(--accent);
        color: #17161c;
    }

    /* Bigger touch area for small text buttons without changing the layout */
    .text-btn:not(.tip-open) {
        padding: 12px 8px;
        margin: -12px -8px;
    }
}

@media (max-width: 380px) {
    /* Longer translated names ("BTC Aposentadoria") must still fit beside the price */
    .topbar-inner {
        gap: 12px;
    }

    .topbar-actions {
        gap: 6px;
    }

    .price-pill {
        padding-left: 8px;
        padding-right: 8px;
    }

    .brand {
        gap: 6px;
        min-width: 0;
        font-size: 14px;
    }

    .brand-name {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-mark {
        width: 24px;
        height: 24px;
    }
}

.tip-address {
    font-size: 13px;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.tip-open {
    text-decoration: none;
}

/* Language switcher */
.lang-switch {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}

.lang-switch a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
    color: var(--accent-strong);
}

.lang-switch a[aria-current="page"] {
    background: var(--surface-2);
    color: var(--text);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: opacity 0.3s;
}

.toast.warning,
.toast.error {
    background: var(--danger);
    color: #fff;
}

/* Modal */
.material-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.material-modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.modal-icon {
    width: 36px;
    height: 36px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--danger-soft);
    color: var(--danger);
}

.modal-icon.success {
    background: var(--success-soft);
    color: var(--success);
}

.modal-icon svg {
    width: 20px;
    height: 20px;
}

.modal-title {
    font-size: 1.1rem;
}

.modal-content p {
    margin: 0;
    color: var(--text-secondary);
    white-space: pre-line;
}

.modal-actions {
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 960px) {
    .app {
        grid-template-columns: 1fr;
    }

    /* On one column show the answer first, then the inputs, then the chart */
    .results-column {
        display: contents;
    }

    #results { order: 1; }
    .form-card { order: 2; }
    .chart-card { order: 3; }

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

    .steps,
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topnav,
    .price-pill-label {
        display: none;
    }

    .topbar-inner,
    .app,
    .section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero {
        padding: 40px 16px 24px;
    }

    .form-card,
    .chart-card,
    .verdict {
        padding-left: 18px;
        padding-right: 18px;
    }

    .chart-head {
        flex-direction: column;
    }

    .chart-container {
        height: 300px;
    }
}

/* Guides */
.article {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 32px;
}

.article .eyebrow a {
    color: inherit;
    text-decoration: none;
}

.article h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

.article .lede {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin: 0 0 8px;
}

.article .byline {
    font-size: 14px;
    color: var(--text-tertiary);
    margin: 0 0 32px;
}

.article h2 {
    font-size: 1.45rem;
    margin: 40px 0 12px;
}

.article h3 {
    font-size: 1.1rem;
    margin: 24px 0 8px;
}

.article p,
.article li {
    line-height: 1.7;
}

.article ul,
.article ol {
    padding-left: 22px;
}

.answer-box {
    margin: 24px 0;
    padding: 20px 22px;
    border-radius: var(--radius);
    background: var(--accent-soft);
    border: 1px solid var(--border);
}

.answer-box p {
    margin: 0;
}

.answer-box p + p {
    margin-top: 10px;
}

.table-wrap {
    overflow-x: auto;
    margin: 16px 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.article table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.article th,
.article td {
    padding: 10px 14px;
    text-align: right;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.article th:first-child,
.article td:first-child {
    text-align: left;
}

.article tr:last-child td {
    border-bottom: 0;
}

.article thead th {
    color: var(--text-secondary);
    font-weight: 600;
    white-space: normal;
    vertical-align: bottom;
}

.table-note {
    font-size: 14px;
    color: var(--text-tertiary);
}

.example {
    margin: 16px 0;
    padding: 20px 22px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.example h3 {
    margin-top: 0;
}

.example p {
    margin: 0 0 10px;
}

.example a {
    font-weight: 600;
}

.cta-link {
    display: inline-block;
    margin: 8px 0;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #1a1000;
    font-weight: 700;
    text-decoration: none;
}

.cta-link:hover {
    filter: brightness(1.05);
}

.article .faq-list {
    max-width: none;
}

.guide-link {
    margin-top: 24px;
    font-weight: 600;
}

@media (max-width: 640px) {
    .article {
        padding: 32px 16px 24px;
    }

    .article table {
        font-size: 14px;
    }

    .article th,
    .article td {
        padding: 9px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}
