/* ==========================================================================
   Calculadora Bitcoin FIRE — styles.css
   Dark theme, glassmorphism, responsive, 2026 premium aesthetic
   ========================================================================== */

/* Fonts loaded via <link> in HTML head for performance (no render-blocking @import) */

/* ==========================================================================
   1. Custom Properties
   ========================================================================== */
:root {
    /* Backgrounds */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.14);

    /* Accent */
    --accent-primary: #f7931a;
    --accent-secondary: #ffb347;
    --accent-glow: rgba(247, 147, 26, 0.3);
    --accent-glow-strong: rgba(247, 147, 26, 0.5);
    --accent-dark: #c47415;

    /* Text */
    --text-primary: #e8e8ed;
    --text-secondary: #8888a0;
    --text-muted: #555570;

    /* Semantic */
    --success: #00d4aa;
    --conservative: #3b82f6;
    --neutral: #f7931a;
    --optimistic: #10b981;
    --conservative-glow: rgba(59, 130, 246, 0.25);
    --neutral-glow: rgba(247, 147, 26, 0.25);
    --optimistic-glow: rgba(16, 185, 129, 0.25);

    /* Spacing */
    --section-gap: clamp(2rem, 4vw, 3.5rem);
    --card-padding: clamp(1.25rem, 3vw, 2rem);
    --card-radius: 16px;
    --btn-radius: 12px;
    --input-radius: 10px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: clamp(0.9375rem, 0.85rem + 0.25vw, 1.0625rem);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle radial gradient behind main content */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 140%;
    height: 80%;
    background: radial-gradient(
        ellipse at 50% 30%,
        rgba(59, 40, 120, 0.12) 0%,
        rgba(30, 30, 80, 0.06) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* Secondary glow: warm accent halo */
body::after {
    content: '';
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 40%;
    background: radial-gradient(
        ellipse at center,
        rgba(247, 147, 26, 0.04) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   3. Scrollbar (WebKit)
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) var(--bg-primary);
}

/* ==========================================================================
   4. Typography
   ========================================================================== */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
}

h3 {
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.25rem);
}

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

.mono, .number {
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   5. Layout Container
   ========================================================================== */
.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

main {
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
    padding-bottom: var(--section-gap);
}

/* ==========================================================================
   6. Glass Card (reusable)
   ========================================================================== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    transition:
        background var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
}

/* ==========================================================================
   7. Header
   ========================================================================== */
.site-header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.5rem);
    max-width: 800px;
    margin: 0 auto;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--accent-primary) 50%,
        transparent 100%
    );
    opacity: 0.4;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(3rem, 5vw, 4rem);
    height: clamp(3rem, 5vw, 4rem);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(247, 147, 26, 0.1);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1;
    animation: glow 4s ease-in-out infinite;
}

.site-header h1 {
    margin-bottom: 0.5rem;
}

.site-header .subtitle {
    color: var(--text-muted);
    font-size: clamp(0.85rem, 0.8rem + 0.2vw, 1rem);
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
}

.header-powerlaw-link {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color var(--transition-fast);
    margin-top: 0.25rem;
}

.header-powerlaw-link:hover {
    color: var(--accent-primary);
}

.input-help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.site-header .intro-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
    max-width: 560px;
    margin: 0.75rem auto 0;
    text-align: center;
}

.disclaimer-text {
    font-size: 0.8rem;
    text-align: center;
}

/* ==========================================================================
   8. Input Section
   ========================================================================== */
.input-section,
#calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.input-group label .label-icon {
    font-size: 1rem;
    opacity: 0.7;
}

/* Text & number inputs */
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--input-radius);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base);
    appearance: none;
    -webkit-appearance: none;
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px rgba(247, 147, 26, 0.08);
}

/* Number inputs with mono font */
input[type="number"].input-field {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

/* Remove number spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Select / dropdown */
.input-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--input-radius);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%238888a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base);
}

.input-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ==========================================================================
   9. Range Slider
   ========================================================================== */
.slider-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.95rem;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-secondary);
    outline: none;
    cursor: pointer;
    border: 1px solid var(--border-glass);
    transition: background var(--transition-base);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 10px var(--accent-glow);
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 16px var(--accent-glow-strong);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 10px var(--accent-glow);
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 16px var(--accent-glow-strong);
}

input[type="range"]::-moz-range-track {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 3px;
    height: 6px;
}

/* ==========================================================================
   9b. Slider Extremes
   ========================================================================== */
.slider-with-extremes {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slider-min, .slider-max {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

.slider-with-extremes input[type="range"] {
    flex: 1;
}

/* ==========================================================================
   10. Advanced Options (Collapsible)
   ========================================================================== */
.advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
}

.advanced-toggle:hover {
    color: var(--accent-primary);
}

.advanced-toggle .chevron {
    display: inline-block;
    width: 16px;
    height: 16px;
    transition: transform var(--transition-base);
}

.advanced-toggle .chevron svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.advanced-toggle.active .chevron {
    transform: rotate(180deg);
}

.advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease,
                opacity var(--transition-slow) ease;
    opacity: 0;
}

.advanced-content.open {
    max-height: 500px;
    opacity: 1;
}

.advanced-content-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
}

/* ==========================================================================
   11. Privacy Banner
   ========================================================================== */
.privacy-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding-top: 0.75rem;
}

.privacy-banner .shield-icon {
    font-size: 0.9rem;
    line-height: 1;
}

/* ==========================================================================
   12. Calculate Button
   ========================================================================== */
.btn-calculate {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--accent-primary);
    border-radius: var(--btn-radius);
    color: var(--accent-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition:
        background var(--transition-base),
        color var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-fast);
}

.btn-calculate:hover {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-calculate:active {
    transform: scale(0.98);
}

/* ==========================================================================
   13. Results Section
   ========================================================================== */
.results-section {
    display: none;
}

.results-section.visible {
    display: block;
    animation: fadeInUp 0.6s ease forwards;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2vw, 1.25rem);
}

/* Result Card — equal height via flex stretch */
.result-card {
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease backwards;
    display: flex;
    flex-direction: column;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.25s; }
.result-card:nth-child(3) { animation-delay: 0.4s; }

/* Top colored border */
.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.result-card.conservative::before {
    background: linear-gradient(90deg, var(--conservative), rgba(59, 130, 246, 0.3));
}

.result-card.neutral::before {
    background: linear-gradient(90deg, var(--neutral), rgba(247, 147, 26, 0.3));
}

.result-card.optimistic::before {
    background: linear-gradient(90deg, var(--optimistic), rgba(16, 185, 129, 0.3));
}

/* Hover glow per scenario */
.result-card.conservative:hover {
    box-shadow: 0 8px 32px var(--conservative-glow);
    transform: translateY(-2px);
}

.result-card.neutral:hover {
    box-shadow: 0 8px 32px var(--neutral-glow);
    transform: translateY(-2px);
}

.result-card.optimistic:hover {
    box-shadow: 0 8px 32px var(--optimistic-glow);
    transform: translateY(-2px);
}

/* Scenario badge / pill — small, inline */
.scenario-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
    width: auto;
}

.conservative .scenario-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--conservative);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.neutral .scenario-badge {
    background: rgba(247, 147, 26, 0.15);
    color: var(--neutral);
    border: 1px solid rgba(247, 147, 26, 0.25);
}

.optimistic .scenario-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--optimistic);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Main value (portfolio — big number) */
.result-main-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.result-main-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Scenario tag (below badge) */
.scenario-tag {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    white-space: nowrap;
}

/* Push metrics to card bottom */
.result-card .result-metrics {
    margin-top: auto;
}

/* Secondary metrics */
.result-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.metric-value.fire-yes {
    color: var(--success);
}

.metric-value.fire-no {
    color: var(--text-muted);
}

/* ==========================================================================
   14. Chart Section
   ========================================================================== */
.chart-section {
    display: none;
}

.chart-section.visible {
    display: block;
    animation: fadeInUp 0.6s ease 0.3s backwards;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-top: 0.5rem;
}


/* ==========================================================================
   15. Share Button
   ========================================================================== */
.share-section {
    display: none;
    text-align: center;
}

.share-section.visible {
    display: block;
    animation: fadeInUp 0.5s ease 0.5s backwards;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: transparent;
    border: 1px solid var(--accent-primary);
    border-radius: var(--btn-radius);
    color: var(--accent-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background var(--transition-base),
        color var(--transition-base),
        box-shadow var(--transition-base);
}

.btn-share:hover {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-share svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: fill var(--transition-base);
}

.share-follow {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.share-follow a {
    color: var(--text-secondary);
    font-weight: 500;
}

.share-follow a:hover {
    color: var(--accent-primary);
}

/* ==========================================================================
   15a. Download Button & Screenshot Card
   ========================================================================== */
.btn-download {
    margin-left: 0.5rem;
    transition:
        background var(--transition-base),
        color var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base);
}

.btn-download.download-success {
    border-color: var(--success);
    color: var(--success);
}

.share-section .btn-share + .btn-share {
    margin-left: 0.5rem;
}

.screenshot-card {
    position: absolute;
    left: -9999px;
    width: 1200px;
    height: 675px;
    background: #0a0a0f;
    padding: 48px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    border-radius: 24px;
    overflow: hidden;
}

.screenshot-card .sc-header {
    text-align: center;
    margin-bottom: 32px;
}

.screenshot-card .sc-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.screenshot-card .sc-title .text-accent {
    color: var(--accent-primary);
}

.screenshot-card .sc-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.screenshot-card .sc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.screenshot-card .sc-scenario {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.screenshot-card .sc-scenario-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.screenshot-card .sc-scenario.conservative .sc-scenario-label { color: var(--conservative); }
.screenshot-card .sc-scenario.neutral .sc-scenario-label { color: var(--neutral); }
.screenshot-card .sc-scenario.optimistic .sc-scenario-label { color: var(--optimistic); }

.screenshot-card .sc-portfolio {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.screenshot-card .sc-highlight {
    text-align: center;
    margin-bottom: 24px;
}

.screenshot-card .sc-highlight-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.screenshot-card .sc-highlight-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 36px;
    font-weight: 700;
    color: var(--accent-primary);
}

.screenshot-card .sc-meta {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.screenshot-card .sc-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    color: var(--text-muted);
}

.screenshot-card .sc-footer strong {
    color: var(--accent-primary);
}

@media (max-width: 639px) {
    .share-section .btn-share + .btn-share {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .btn-download {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* ==========================================================================
   15b. Share Modal
   ========================================================================== */
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    visibility: hidden;
    pointer-events: none;
    transition:
        background 300ms ease,
        backdrop-filter 300ms ease,
        -webkit-backdrop-filter 300ms ease,
        visibility 0ms 300ms;
}

.share-modal[hidden] {
    display: none;
}

.share-modal.modal-open {
    visibility: visible;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition:
        background 300ms ease,
        backdrop-filter 300ms ease,
        -webkit-backdrop-filter 300ms ease,
        visibility 0ms 0ms;
}

.share-modal-content {
    max-width: 480px;
    width: 90%;
    padding: var(--card-padding);
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition:
        transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 300ms ease;
}

.share-modal.modal-open .share-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.share-modal-content h3 {
    margin-bottom: 0.5rem;
}

.share-preview {
    background: var(--bg-secondary);
    border-radius: var(--input-radius);
    padding: 1rem;
    font-size: 0.85rem;
    white-space: pre-wrap;
    color: var(--text-primary);
    margin: 1rem 0;
    line-height: 1.6;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.share-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.share-options input[type="checkbox"] {
    accent-color: var(--accent-primary);
}

.share-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.share-modal-actions .btn-calculate {
    width: auto;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.share-modal-actions .btn-share {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.footer-cta {
    margin-top: 0.25rem;
}

.footer-cta a {
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 0.82rem;
}

/* ==========================================================================
   16. Model Explanation Accordion
   ========================================================================== */
.accordion {
    overflow: hidden;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: color var(--transition-fast);
}

.accordion-header:hover {
    color: var(--accent-secondary);
}

.accordion-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.accordion-chevron svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--text-secondary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.accordion.open .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease,
                opacity var(--transition-slow) ease;
    opacity: 0;
}

.accordion.open .accordion-body {
    max-height: 1200px;
    opacity: 1;
}

.accordion-content {
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-content p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.accordion-content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-color: rgba(247, 147, 26, 0.3);
    text-underline-offset: 3px;
    transition:
        color var(--transition-fast),
        text-decoration-color var(--transition-fast);
}

.accordion-content a:hover {
    color: var(--accent-secondary);
    text-decoration-color: var(--accent-secondary);
}

/* Formula block */
.formula-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--input-radius);
    padding: 1rem 1.25rem;
    color: var(--accent-secondary);
    overflow-x: auto;
    line-height: 1.6;
}

/* Scenario table inside accordion */
.scenario-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.scenario-table th,
.scenario-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-glass);
}

.scenario-table th {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.scenario-table td {
    color: var(--text-secondary);
}

/* ==========================================================================
   17. Footer
   ========================================================================== */
.site-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem) 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.8;
}

.site-footer::before {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--border-glass);
    margin: 0 auto 1.5rem;
}

.site-footer a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: var(--accent-primary);
}

.site-footer .disclaimer {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ==========================================================================
   18. Animations / Keyframes
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px var(--accent-glow), 0 0 50px rgba(247, 147, 26, 0.08);
    }
    50% {
        box-shadow: 0 0 30px var(--accent-glow-strong), 0 0 70px rgba(247, 147, 26, 0.15);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ==========================================================================
   19. Utility Classes
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.text-muted {
    color: var(--text-muted);
}

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

.text-success {
    color: var(--success);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden {
    display: none !important;
}

/* ==========================================================================
   20. Inline Row (for side-by-side inputs)
   ========================================================================== */
.input-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* ==========================================================================
   21. Loading / Calculating State
   ========================================================================== */
.btn-calculate.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-calculate.loading::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   22. Input Suffix / Prefix (e.g. BTC, %, USD)
   ========================================================================== */
.input-with-suffix {
    position: relative;
}

.input-with-suffix .input-field {
    padding-right: 3.5rem;
}

.input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
    font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   23. Section Title
   ========================================================================== */
.section-title {
    font-size: clamp(1.1rem, 1rem + 0.3vw, 1.35rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   24. App Layout (base — mobile)
   ========================================================================== */
.app-layout {
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
}

.results-panel {
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
    min-width: 0;
}

/* Section 25 — removed (results summary eliminated) */

/* ==========================================================================
   26. Scroll Reveal Animation
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   27. Responsive — Tablet (>= 640px)
   ========================================================================== */
@media (min-width: 640px) {

    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .input-row {
        grid-template-columns: 1fr 1fr;
    }

    .chart-container {
        height: 380px;
    }

    .result-main-value {
        font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
    }

    .result-card {
        padding: clamp(1rem, 2vw, 1.5rem);
    }

    .metric-label {
        font-size: 0.72rem;
    }

    .metric-value {
        font-size: 0.72rem;
    }

    .scenario-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }

    .scenario-tag {
        font-size: 0.65rem;
    }
}

/* ==========================================================================
   28. Responsive — Desktop (>= 1024px)
   ========================================================================== */
@media (min-width: 1024px) {

    .chart-container {
        height: 420px;
    }

    .result-card {
        padding: var(--card-padding);
    }

    .result-main-value {
        font-size: clamp(1.4rem, 1.2rem + 0.6vw, 2rem);
    }

    .metric-label {
        font-size: 0.78rem;
    }

    .metric-value {
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   29. Responsive — Wide Desktop (>= 1200px) — 2-Column Layout
   ========================================================================== */
@media (min-width: 1200px) {

    .container {
        max-width: 1280px;
    }

    /* 2-column dashboard layout — only when results are visible */
    .app-layout.has-results {
        display: grid;
        grid-template-columns: minmax(360px, 420px) 1fr;
        gap: 2.5rem;
        align-items: start;
    }

    /* Sticky calculator form — only in 2-col mode, scrollable as safety net */
    .app-layout.has-results .calculator-panel {
        position: sticky;
        top: 2rem;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.08) transparent;
    }

    .app-layout.has-results .calculator-panel::-webkit-scrollbar {
        width: 4px;
    }

    .app-layout.has-results .calculator-panel::-webkit-scrollbar-track {
        background: transparent;
    }

    .app-layout.has-results .calculator-panel::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.08);
        border-radius: 2px;
    }

    /* FAQ 2-column grid */
    .faq-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* ── Compact header on desktop ── */
    .site-header {
        max-width: 1280px;
        padding: 1.5rem 2rem 2.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .site-header::after {
        display: none;
    }

    .header-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .site-header h1 {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }

    .site-header .subtitle {
        font-size: 0.85rem;
    }

    .site-header .intro-text {
        display: none;
    }

    /* ── Centered form before results, constrained width ── */
    .app-layout:not(.has-results) .calculator-panel {
        max-width: 720px;
        margin: 0 auto;
    }

    /* ── Compact form on desktop ── */
    #calculator-form {
        gap: 1rem;
    }

    .privacy-banner {
        font-size: 0.7rem;
        padding-top: 0.25rem;
        opacity: 0.7;
    }

    .model-validation {
        font-size: 0.78rem;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.75rem;
    }

    /* ── Enhanced card hover on desktop ── */
    .result-card.conservative:hover {
        box-shadow: 0 12px 40px var(--conservative-glow);
        transform: translateY(-4px);
    }

    .result-card.neutral:hover {
        box-shadow: 0 12px 40px var(--neutral-glow);
        transform: translateY(-4px);
    }

    .result-card.optimistic:hover {
        box-shadow: 0 12px 40px var(--optimistic-glow);
        transform: translateY(-4px);
    }

    /* ── Less gap between sections in results panel ── */
    .results-panel {
        gap: clamp(1.5rem, 3vw, 2rem);
    }

    /* ── Wider chart on desktop ── */
    .chart-container {
        height: 440px;
    }

    /* ── Compact simulation table on desktop ── */
    .simulation-table {
        font-size: 0.75rem;
    }

    .simulation-table thead th,
    .simulation-table tbody td {
        padding: 0.45rem 0.4rem;
    }

    /* ── Layout transition: 1-col → 2-col ── */
    .app-layout.layout-entered .results-panel {
        animation: slideInFromRight 0.5s ease both;
    }

    /* Suppress all child animations when parent panel already animates */
    .app-layout.layout-entered .results-section.visible,
    .app-layout.layout-entered .chart-section.visible,
    .app-layout.layout-entered .share-section.visible,
    .app-layout.layout-entered .result-card,
    .app-layout.layout-entered .insights-container.visible .insight-item {
        animation: none;
        opacity: 1;
    }
}

/* ==========================================================================
   26. Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   27. Focus Visible (keyboard navigation)
   ========================================================================== */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   28. Tooltip (optional, for chart or info icons)
   ========================================================================== */
.tooltip-trigger {
    position: relative;
    cursor: help;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border-glass);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
}

.tooltip-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: 10;
}

.tooltip-trigger:hover::after {
    opacity: 1;
}

/* ==========================================================================
   29. Selection
   ========================================================================== */
::selection {
    background: rgba(247, 147, 26, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(247, 147, 26, 0.3);
    color: #fff;
}

/* ==========================================================================
   30. Range Value Display
   ========================================================================== */
.range-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.range-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.95rem;
}

/* ==========================================================================
   31. Results section subtitle spacing
   ========================================================================== */
.results-section .section-title {
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   32. Chart Section Title
   ========================================================================== */
.chart-section .section-title {
    margin-bottom: 0.25rem;
}

.chart-section .section-subtitle {
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   33. FAQ Individual Accordions
   ========================================================================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Staggered reveal for FAQ items */
.faq-item.reveal {
    transition-delay: calc(var(--reveal-delay, 0) * 80ms);
}

.faq-item {
    padding: 0 !important;
    overflow: hidden;
}

.faq-item h3 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem);
    font-weight: 600;
    cursor: pointer;
    padding: var(--card-padding);
    text-align: left;
    gap: 1rem;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--accent-secondary);
}

.faq-item .accordion-chevron {
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.faq-item.open .accordion-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease;
}

.faq-item.open .faq-answer {
    max-height: 800px;
}

.faq-answer-inner {
    padding: 0 var(--card-padding) var(--card-padding);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
}

.faq-answer-inner p {
    font-size: 0.88rem;
    line-height: 1.7;
}

.faq-answer-inner ul {
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.faq-answer-inner li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-answer-inner a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-color: rgba(247, 147, 26, 0.3);
    text-underline-offset: 3px;
}

.faq-answer-inner a:hover {
    color: var(--accent-secondary);
    text-decoration-color: var(--accent-secondary);
}

.faq-tax-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin-top: 0.75rem;
}

.faq-tax-table th,
.faq-tax-table td {
    padding: 0.45rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
}

.faq-tax-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.faq-tax-table td:nth-child(2) {
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

/* ==========================================================================
   34. Scenario-colored main values
   ========================================================================== */
.scenario-color-conservative { color: var(--conservative) !important; }
.scenario-color-neutral { color: var(--neutral) !important; }
.scenario-color-optimistic { color: var(--optimistic) !important; }

/* ==========================================================================
   34b. Results CTA
   ========================================================================== */
.results-cta {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 1.25rem 0 0.5rem;
}

.results-cta a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.results-cta a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   35. Insights Container
   ========================================================================== */
.insights-container {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.insights-container.visible {
    display: flex;
}

.insights-container.visible .insight-item {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.insights-container.visible .insight-item:nth-child(1) {
    animation-delay: 0.1s;
}

.insights-container.visible .insight-item:nth-child(2) {
    animation-delay: 0.25s;
}

.insights-container.visible .insight-item:nth-child(3) {
    animation-delay: 0.35s;
}

.insight-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--input-radius);
    padding: 0.65rem 1rem;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.insight-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   36. FIRE Progress Bar
   ========================================================================== */
.fire-progress-wrap {
    margin: 0.75rem 0;
}

.fire-progress-track {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

.fire-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 1s ease-out;
}

.fire-progress-bar.conservative {
    background: linear-gradient(90deg, var(--conservative), rgba(59, 130, 246, 0.5));
}

.fire-progress-bar.neutral {
    background: linear-gradient(90deg, var(--neutral), rgba(247, 147, 26, 0.5));
}

.fire-progress-bar.optimistic {
    background: linear-gradient(90deg, var(--optimistic), rgba(16, 185, 129, 0.5));
}

.fire-progress-bar.fire-complete {
    box-shadow: 0 0 8px var(--success);
    background: var(--success);
}

.fire-progress-label {
    display: block;
    font-size: 0.72rem;
    margin-top: 0.3rem;
    color: var(--text-secondary);
}

.fire-progress-label.fire-yes {
    color: var(--success);
    font-weight: 600;
}

/* ==========================================================================
   37. Model Validation
   ========================================================================== */
.model-validation {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--input-radius);
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.model-validation-label {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

/* Section 38 removed — replaced by KPI Hero */

/* ==========================================================================
   39. Example Buttons
   ========================================================================== */
.example-buttons {
    text-align: center;
    margin-top: 0.5rem;
}

.example-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.example-btn-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.4rem;
}

.btn-example {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.3rem 0.75rem;
    border-radius: var(--btn-radius);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base);
}

.btn-example:hover {
    background: rgba(247, 147, 26, 0.1);
}

/* ==========================================================================
   40. Simulation Table (Year-by-Year)
   ========================================================================== */
.table-section {
    margin-top: 1.5rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-header .section-title {
    margin-bottom: 0;
}

.table-scenario-select {
    width: auto;
    min-width: 140px;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.table-toggle {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--input-radius);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    margin-bottom: 0.75rem;
}

.table-toggle:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.table-toggle.active {
    color: var(--accent-primary);
}

.table-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease;
}

.table-container.open {
    max-height: 2000px;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.simulation-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
}

.simulation-table thead th {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.6rem 0.75rem;
    text-align: right;
    border-bottom: 1px solid var(--border-glass);
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: var(--bg-glass);
}

.simulation-table thead th:first-child {
    text-align: left;
}

.simulation-table tbody td {
    padding: 0.55rem 0.75rem;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    white-space: nowrap;
}

.simulation-table tbody td:first-child {
    text-align: left;
}

.simulation-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Phase labels */
.phase-label {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.phase-label.phase-dca {
    background: rgba(247, 147, 26, 0.15);
    color: var(--neutral);
    border: 1px solid rgba(247, 147, 26, 0.25);
}

.phase-label.phase-fire {
    background: rgba(0, 212, 170, 0.12);
    color: var(--success);
    border: 1px solid rgba(0, 212, 170, 0.25);
}

.phase-label.phase-ret {
    background: rgba(59, 130, 246, 0.12);
    color: var(--conservative);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Retirement row highlight */
.simulation-table tbody tr.phase-retirement {
    background: rgba(0, 212, 170, 0.03);
    border-left: 3px solid var(--success);
}

.simulation-table tbody tr.phase-retirement:hover {
    background: rgba(0, 212, 170, 0.06);
}

/* BTC growing during retirement */
.simulation-table tbody tr.btc-growing td:nth-child(3) {
    color: var(--success);
}

/* Dash for empty cells */
.simulation-table .cell-dash {
    color: var(--text-muted);
    opacity: 0.4;
}

/* Desktop: table always visible, no toggle */
@media (min-width: 1024px) {
    .table-toggle {
        display: none;
    }

    .table-container {
        max-height: none;
        overflow: visible;
    }
}

/* Mobile: scroll hint */
@media (max-width: 639px) {
    .simulation-table {
        font-size: 0.75rem;
    }

    .simulation-table thead th,
    .simulation-table tbody td {
        padding: 0.45rem 0.5rem;
    }
}
