html, body { overflow-x: hidden; }

.coast-shell {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

/* ── Sections ── */
.section { margin-bottom: 3rem; }

.page-title {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
    font-family: 'Fraunces', Georgia, serif;
}

.page-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.65;
    margin: 0 0 1.5rem;
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    font-family: 'Fraunces', Georgia, serif;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

/* ── Card ── */
.card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.card-head {
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.card-head h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--text-primary);
}

/* ── Input Grid ── */
.input-grid {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.field { display: grid; gap: 0.4rem; }

.field-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.field-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.field-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    background: rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.field-control input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}

.field-control:focus-within {
    border-color: #18a683;
    box-shadow: 0 0 0 3px rgba(24, 166, 131, 0.2), inset 0 2px 4px rgba(0,0,0,0.1);
}

.field-prefix, .field-suffix { color: var(--text-muted); font-weight: 700; flex: none; }

/* ── WR Slider ── */
.wr-section {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.25rem;
    padding-top: 1.25rem;
}

.wr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.wr-value-display {
    font-size: 1.4rem;
    font-weight: 900;
    color: #18a683;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.wr-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, #18a683 0%, #18a683 60%, rgba(148,163,184,0.25) 60%, rgba(148,163,184,0.25) 100%);
    outline: none;
    cursor: pointer;
}

.wr-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #18a683;
    box-shadow: 0 2px 8px rgba(24,166,131,0.5);
    cursor: pointer;
    border: 3px solid white;
    transition: box-shadow 0.2s;
}

.wr-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ── Primary Button ── */
.primary-btn {
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, #18a683 0%, #0d7a5e 100%);
    box-shadow: var(--shadow-md);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.primary-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.primary-btn:active { transform: translateY(0); }

/* ── Coast Hero ── */
.coast-hero {
    border-radius: 16px;
    padding: 2rem;
}

.coast-hero.coasting {
    background: linear-gradient(135deg, rgba(24, 166, 131, 0.1) 0%, rgba(13, 122, 94, 0.1) 100%);
    border: 1px solid rgba(24, 166, 131, 0.3);
    border-left: 5px solid #18a683;
}

.coast-hero.not-coasting {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-left: 5px solid #667eea;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.hero-main { display: flex; flex-direction: column; gap: 0.35rem; }

.hero-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-value {
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.hero-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-top: 0.75rem;
    width: fit-content;
}

.hero-badge.green { background: rgba(24,166,131,0.15); color: #18a683; border: 1px solid rgba(24,166,131,0.3); }
.hero-badge.purple { background: rgba(102,126,234,0.15); color: #667eea; border: 1px solid rgba(102,126,234,0.3); }

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-content: start;
}

.hero-stat { display: flex; flex-direction: column; gap: 0.2rem; }

.hero-stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ── Progress ── */
.progress-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.progress-pct {
    font-size: 1.8rem;
    font-weight: 900;
    color: #18a683;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.progress-rem {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-track {
    width: 100%;
    height: 14px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #667eea 0%, #18a683 100%);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 4px;
}

.progress-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ── Chart ── */
.chart-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    background: var(--card-background);
    box-shadow: var(--shadow-sm);
}

.chart-legend {
    display: flex;
    gap: 1.25rem;
    padding: 0.25rem 0 0.75rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
}

.chart-shell {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--card-background);
}

.chart-canvas { width: 100%; height: 100%; display: block; }

/* ── Compare Grid ── */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.compare-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.compare-card.highlight {
    border-color: #18a683;
    background: rgba(24, 166, 131, 0.06);
}

.compare-type {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.compare-number {
    font-size: 1.5rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.compare-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    border-top: 1px solid var(--border-color);
    padding-top: 0.6rem;
    margin-top: 0.2rem;
}

/* ── Title Row / Modal ── */
.title-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.title-row .page-title { margin-bottom: 0; }

.info-link {
    background: rgba(24, 166, 131, 0.1);
    color: #18a683;
    border: 1px solid rgba(24, 166, 131, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.info-link:hover { background: rgba(24, 166, 131, 0.2); }

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none;
    font-size: 1.5rem; color: var(--text-muted);
    cursor: pointer; padding: 0.5rem; line-height: 1;
    font-family: inherit;
}
.modal-close:hover { color: var(--text-primary); }

.prose { padding: 1rem 0 0; display: grid; gap: 0.75rem; color: var(--text-secondary); }
.prose p { margin: 0; line-height: 1.65; }

/* ── Newsletter CTA ── */
.newsletter-cta-card {
    background: linear-gradient(135deg, rgba(24, 166, 131, 0.08) 0%, rgba(13, 122, 94, 0.08) 100%);
    border: 1px solid rgba(24, 166, 131, 0.25);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.newsletter-cta-title { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin: 0 0 0.4rem; font-family: 'Fraunces', Georgia, serif; }
.newsletter-cta-desc { font-size: 0.95rem; color: var(--text-secondary); margin: 0; line-height: 1.6; }
.newsletter-cta-form { display: flex; flex-direction: column; gap: 0.5rem; }
.newsletter-cta-input-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.newsletter-cta-input {
    flex: 1;
    min-width: 200px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    background: var(--card-background);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.newsletter-cta-input:focus {
    border-color: #18a683;
    box-shadow: 0 0 0 3px rgba(24, 166, 131, 0.18);
}

.newsletter-cta-btn { flex: none; white-space: nowrap; }
.newsletter-cta-msg { font-size: 0.88rem; font-weight: 600; margin: 0; }
.newsletter-cta-msg.success { color: #18A683; }
.newsletter-cta-msg.error { color: #EF4444; }

/* ── FAQ ── */
.faq-section { border-top: 1px solid var(--border-color); padding-top: 2.5rem; }
.faq-list { display: grid; gap: 0.75rem; }

.faq-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.faq-q {
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--text-muted); flex: none; transition: transform 0.2s; }
.faq-item[open] .faq-q::after { transform: rotate(45deg); }

.faq-a { padding: 0 1.25rem 1rem; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; margin: 0; }

.fine-print { color: var(--text-muted); font-size: 0.82rem; margin: 0 0 2rem; line-height: 1.55; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .page-title { font-size: 1.9rem; }
    .input-grid { grid-template-columns: 1fr; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-value { font-size: 2.1rem; }
    .compare-grid { grid-template-columns: 1fr; }
    .chart-shell { height: 260px; }
    .wr-labels span:nth-child(2) { display: none; }
    .newsletter-cta-input-row { flex-direction: column; }
    .newsletter-cta-btn { width: 100%; }
}
