:root {
    --primary-blue: #0052cc;
    --hero-gradient: linear-gradient(135deg, #0061ff 0%, #0033aa 100%);
    --bg-light: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --warning-bg: #fff7ed;
    --warning-text: #c2410c;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: var(--white);
    line-height: 1.65;
}

main {
    overflow: hidden;
}

.section-padding {
    padding: 72px 0;
}

.bg-light {
    background: var(--bg-light);
}

.left-align {
    text-align: left;
}

.section-header {
    margin-bottom: 32px;
    max-width: 860px;
}

.section-header h2 {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--text-main);
}

.section-header p {
    color: var(--text-muted);
    margin: 0;
}

.hero {
    background: var(--hero-gradient);
    color: var(--white);
    padding: 40px 0 40px;
}

.hero-content {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.95rem;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.88);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.hero-text {
    max-width: 860px;
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.7rem);
    line-height: 1.08;
    margin: 0 0 18px;
    color: var(--white);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-light {
    background: var(--white);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-light:hover {
    background: #f8fafc;
}

.calculator-shell {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 26px;
    align-items: start;
}

.calculator-panel {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 26px;
    box-shadow: var(--shadow-sm);
}

.panel-heading {
    margin-bottom: 22px;
}

.panel-heading h3 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    line-height: 1.2;
}

.panel-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.98rem;
}

.form-grid {
    display: grid;
    gap: 18px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    font: inherit;
    color: var(--text-main);
    background: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
}

.toggle-strip {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fbfdff;
    display: grid;
    gap: 12px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.toggle-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
    flex-shrink: 0;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}

.form-message {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.error-message {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid #fecaca;
}

.hidden {
    display: none !important;
}

.results-placeholder {
    min-height: 360px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 30px 18px;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    border-radius: 14px;
    background: #fbfdff;
}

.results-placeholder i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.status-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
}

.status-banner.general {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.status-banner.success {
    background: var(--success-bg);
    border-color: #bbf7d0;
}

.status-banner.warning {
    background: var(--warning-bg);
    border-color: #fed7aa;
}

.status-banner.danger {
    background: var(--danger-bg);
    border-color: #fecaca;
}

.status-badge {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.7);
}

.results-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.summary-item {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    background: var(--white);
}

.summary-item.accent {
    background: #f8fbff;
    border-color: #cfe0ff;
}

.summary-item .label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.summary-item strong {
    display: block;
    font-size: 1.28rem;
    line-height: 1.2;
    color: var(--text-main);
}

.milestone-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.milestone-card,
.insight-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    background: var(--white);
}

.milestone-card h4,
.insight-card h4,
.chart-header h4 {
    margin: 0 0 12px;
    font-size: 1.02rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
    font-size: 0.96rem;
}

.metric-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.metric-row strong {
    color: var(--text-main);
    text-align: right;
}

.insight-stack {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.insight-card p {
    margin: 0;
    color: var(--text-muted);
}

.chart-wrap {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    background: #fbfdff;
}

.chart-header {
    margin-bottom: 12px;
}

.chart-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}

#fireProjectionChart {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    background: var(--white);
}

.prose p,
.prose ul,
.prose ol {
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 16px;
}

.prose a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.prose a:hover {
    text-decoration: underline;
}

.editorial-grid,
.split-prose,
.story-layout,
.formula-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.callout-card,
.formula-card,
.trust-card,
.cta-card {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--white);
    padding: 22px;
}

.callout-card h3,
.formula-card h3,
.trust-card h2,
.cta-card h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.callout-card p,
.callout-card li,
.trust-card p,
.cta-card p {
    color: var(--text-muted);
}

.formula-card {
    background: #f8fbff;
    border-color: #cfe0ff;
}

.formula-large {
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid #dbe8ff;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.45;
    color: var(--text-main);
}

.benefit-grid,
.tips-grid,
.scenario-list {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.benefit-card,
.tip-card,
.scenario-card,
.related-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    background: var(--white);
    transition: var(--transition);
}

.benefit-card:hover,
.tip-card:hover,
.scenario-card:hover,
.related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.benefit-card i {
    font-size: 1.25rem;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.benefit-card h3,
.tip-card h3,
.scenario-card h3,
.related-card h3 {
    font-size: 1.05rem;
    margin: 0 0 10px;
    line-height: 1.3;
}

.benefit-card p,
.tip-card p,
.scenario-card p,
.related-card p,
.impact-item p {
    color: var(--text-muted);
    margin: 0;
}

.scenario-tag {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    background: #eef4ff;
    color: var(--primary-blue);
}

.impact-list {
    display: grid;
    gap: 14px;
}

.impact-item {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    background: var(--white);
}

.impact-item h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.steps-list {
    display: grid;
    gap: 18px;
    max-width: 900px;
}

.step-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    align-items: start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 18px;
}

.step-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eef4ff;
    color: var(--primary-blue);
    font-weight: 800;
}

.step-item h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.step-item p {
    margin: 0;
    color: var(--text-muted);
}

.faq-list {
    display: grid;
    gap: 14px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
    padding: 0 18px;
}

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

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

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 16px;
    font-size: 1.25rem;
    color: var(--primary-blue);
}

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

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

.related-grid {
    display: grid;
    gap: 18px;
}

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

.related-card {
    text-decoration: none;
    color: inherit;
}

.cta-section {
    padding-top: 32px;
    padding-bottom: 84px;
}

.cta-card {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-color: #d8e7ff;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 38px 28px;
}

.cta-card p {
    max-width: 700px;
    margin: 0 auto 22px;
}

@media (max-width: 1100px) {
    .calculator-shell,
    .editorial-grid,
    .split-prose,
    .story-layout,
    .formula-layout {
        grid-template-columns: 1fr;
    }

    .related-grid-4,
    .benefit-grid,
    .tips-grid,
    .scenario-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 58px 0;
    }

    .hero {
        padding: 20px 0 20px;
    }

    .form-grid.two-col,
    .results-summary-grid,
    .milestone-summary,
    .related-grid-4,
    .benefit-grid,
    .tips-grid,
    .scenario-list {
        grid-template-columns: 1fr;
    }

    .calculator-panel {
        padding: 20px;
        border-radius: 16px;
    }

    .button-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .toggle-row {
        align-items: flex-start;
    }

    .metric-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}