/* ════════════════════════════════════════════════════════════════════════════
   Brownington Works All Season Financial Planner — Public Stylesheet
   Colors: Navy #1A3557 | Teal #1A7A6E | Gold #B8860B | Orange #C15B00
   ════════════════════════════════════════════════════════════════════════════ */

:root {
    --bwfp-navy:   #1A3557;
    --bwfp-teal:   #1A7A6E;
    --bwfp-gold:   #B8860B;
    --bwfp-orange: #C15B00;
    --bwfp-light:  #F4F8FC;
    --bwfp-border: #D1DDE8;
    --bwfp-text:   #1C2B3A;
    --bwfp-muted:  #5A6F82;
    --bwfp-white:  #FFFFFF;
    --bwfp-red:    #C0392B;
    --bwfp-green:  #1A7A6E;
    --bwfp-radius: 8px;
    --bwfp-shadow: 0 2px 12px rgba(26,53,87,0.10);
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */

.bwfp-page {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--bwfp-text);
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

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

/* ── Page Header ──────────────────────────────────────────────────────────── */

.bwfp-page-header {
    background: linear-gradient(135deg, var(--bwfp-navy) 0%, #1E4A7C 100%);
    color: var(--bwfp-white);
    padding: 36px 32px;
    border-radius: var(--bwfp-radius);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.bwfp-page-header::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.bwfp-page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--bwfp-white);
}

.bwfp-page-header p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.85;
}

.bwfp-page-header .bwfp-badge {
    display: inline-block;
    background: var(--bwfp-teal);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* ── Access Status Bar ────────────────────────────────────────────────────── */

.bwfp-access-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bwfp-light);
    border: 1px solid var(--bwfp-border);
    border-radius: var(--bwfp-radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

.bwfp-access-bar .bwfp-access-level {
    font-weight: 700;
    color: var(--bwfp-navy);
}

.bwfp-access-bar.is-paid {
    border-color: var(--bwfp-teal);
    background: #EAF5F3;
}

.bwfp-access-bar.is-subscription {
    border-color: var(--bwfp-gold);
    background: #FDF8ED;
}

/* ── Calculator Card ──────────────────────────────────────────────────────── */

.bwfp-calc-card {
    background: var(--bwfp-white);
    border: 1px solid var(--bwfp-border);
    border-radius: var(--bwfp-radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--bwfp-shadow);
}

.bwfp-calc-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bwfp-navy);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bwfp-light);
}

/* ── Form Elements ────────────────────────────────────────────────────────── */

.bwfp-field {
    margin-bottom: 18px;
}

.bwfp-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--bwfp-navy);
    margin-bottom: 6px;
}

.bwfp-field .bwfp-hint {
    display: block;
    font-size: 12px;
    color: var(--bwfp-muted);
    margin-bottom: 6px;
}

.bwfp-field input[type="number"],
.bwfp-field input[type="text"],
.bwfp-field input[type="email"],
.bwfp-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--bwfp-border);
    border-radius: var(--bwfp-radius);
    font-size: 15px;
    color: var(--bwfp-text);
    background: #fff;
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}

.bwfp-field input[type="number"]::-webkit-outer-spin-button,
.bwfp-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bwfp-field input:focus,
.bwfp-field select:focus {
    outline: none;
    border-color: var(--bwfp-navy);
    box-shadow: 0 0 0 3px rgba(26,53,87,0.1);
}

.bwfp-field .bwfp-input-prefix {
    position: relative;
}

.bwfp-field .bwfp-input-prefix::before {
    content: attr(data-prefix);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bwfp-muted);
    font-size: 15px;
    pointer-events: none;
}

.bwfp-field .bwfp-input-prefix input {
    padding-left: 28px;
}

.bwfp-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .bwfp-field-row {
        grid-template-columns: 1fr;
    }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.bwfp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--bwfp-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
    text-decoration: none;
}

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

.bwfp-btn-primary {
    background: var(--bwfp-navy);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,53,87,0.25);
}

.bwfp-btn-primary:hover {
    background: #1E4A7C;
    box-shadow: 0 4px 12px rgba(26,53,87,0.30);
}

.bwfp-btn-teal {
    background: var(--bwfp-teal);
    color: #fff;
}

.bwfp-btn-teal:hover {
    background: #158575;
}

.bwfp-btn-outline {
    background: transparent;
    color: var(--bwfp-navy);
    border: 2px solid var(--bwfp-navy);
}

.bwfp-btn-outline:hover {
    background: var(--bwfp-light);
}

.bwfp-btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

.bwfp-btn-full {
    width: 100%;
}

.bwfp-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ── Results Panel ────────────────────────────────────────────────────────── */

.bwfp-results {
    display: none;
    background: var(--bwfp-light);
    border: 1.5px solid var(--bwfp-teal);
    border-radius: var(--bwfp-radius);
    padding: 24px;
    margin-top: 20px;
}

.bwfp-results.visible {
    display: block;
    animation: bwfp-fadein 0.3s ease;
}

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

.bwfp-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.bwfp-results-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bwfp-teal);
    margin: 0;
}

.bwfp-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.bwfp-stat {
    background: #fff;
    border: 1px solid var(--bwfp-border);
    border-radius: var(--bwfp-radius);
    padding: 14px 16px;
    text-align: center;
}

.bwfp-stat .bwfp-stat-label {
    font-size: 12px;
    color: var(--bwfp-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.bwfp-stat .bwfp-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bwfp-navy);
    line-height: 1.2;
}

.bwfp-stat.highlight .bwfp-stat-value {
    color: var(--bwfp-teal);
}

.bwfp-stat.alert .bwfp-stat-value {
    color: var(--bwfp-red);
}

/* ── Summary Box ──────────────────────────────────────────────────────────── */

.bwfp-summary {
    background: #fff;
    border-left: 4px solid var(--bwfp-teal);
    border-radius: 0 var(--bwfp-radius) var(--bwfp-radius) 0;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--bwfp-text);
    line-height: 1.6;
}

/* ── Action Steps ─────────────────────────────────────────────────────────── */

.bwfp-action-steps {
    margin-top: 16px;
}

.bwfp-action-steps h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--bwfp-navy);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bwfp-action-steps ol {
    margin: 0;
    padding-left: 20px;
}

.bwfp-action-steps li {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--bwfp-text);
}

/* ── Paywall / Email Gate ─────────────────────────────────────────────────── */

.bwfp-gate {
    background: var(--bwfp-white);
    border: 2px solid var(--bwfp-navy);
    border-radius: var(--bwfp-radius);
    padding: 28px;
    text-align: center;
    margin-top: 20px;
}

.bwfp-gate h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bwfp-navy);
    margin: 0 0 10px;
}

.bwfp-gate p {
    color: var(--bwfp-muted);
    font-size: 14px;
    margin: 0 0 18px;
}

.bwfp-gate .bwfp-gate-form {
    display: flex;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto;
}

.bwfp-gate .bwfp-gate-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--bwfp-border);
    border-radius: var(--bwfp-radius);
    font-size: 14px;
}

.bwfp-gate .bwfp-gate-privacy {
    font-size: 11px;
    color: var(--bwfp-muted);
    margin-top: 10px;
}

/* ── Report / Upgrade CTA ─────────────────────────────────────────────────── */

.bwfp-upgrade-cta {
    background: linear-gradient(135deg, var(--bwfp-navy) 0%, #1E4A7C 100%);
    color: #fff;
    border-radius: var(--bwfp-radius);
    padding: 24px 28px;
    margin-top: 20px;
    text-align: center;
}

.bwfp-upgrade-cta h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.bwfp-upgrade-cta p {
    font-size: 14px;
    opacity: 0.85;
    margin: 0 0 18px;
}

.bwfp-upgrade-cta .bwfp-price-tag {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFD700;
    margin-bottom: 4px;
}

.bwfp-upgrade-cta .bwfp-reports-note {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 16px;
}

/* ── Stripe Payment Modal ─────────────────────────────────────────────────── */

.bwfp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.bwfp-modal-overlay.open {
    display: flex;
}

.bwfp-modal {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    margin: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    animation: bwfp-modal-in 0.25s ease;
}

@keyframes bwfp-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.bwfp-modal-close {
    position: absolute;
    top: 14px; right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--bwfp-muted);
    line-height: 1;
}

.bwfp-modal h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bwfp-navy);
    margin: 0 0 6px;
}

.bwfp-modal .bwfp-modal-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bwfp-teal);
    margin-bottom: 20px;
}

#bwfp-card-element {
    border: 1.5px solid var(--bwfp-border);
    border-radius: var(--bwfp-radius);
    padding: 12px 14px;
    margin-bottom: 16px;
}

.bwfp-stripe-badge {
    text-align: center;
    font-size: 11px;
    color: var(--bwfp-muted);
    margin-top: 12px;
}

/* ── Hub Landing Page ─────────────────────────────────────────────────────── */

.bwfp-hub-hero {
    text-align: center;
    padding: 48px 24px 32px;
}

.bwfp-hub-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bwfp-navy);
    margin: 0 0 12px;
    line-height: 1.2;
}

.bwfp-hub-hero p {
    font-size: 1.05rem;
    color: var(--bwfp-muted);
    max-width: 540px;
    margin: 0 auto 28px;
}

.bwfp-journey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.bwfp-journey-card {
    background: var(--bwfp-white);
    border: 2px solid var(--bwfp-border);
    border-radius: 10px;
    padding: 24px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
    color: var(--bwfp-text);
}

.bwfp-journey-card:hover {
    border-color: var(--bwfp-teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,122,110,0.15);
    text-decoration: none;
    color: var(--bwfp-text);
}

.bwfp-journey-card .bwfp-journey-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.bwfp-journey-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bwfp-navy);
    margin: 0 0 6px;
}

.bwfp-journey-card p {
    font-size: 13px;
    color: var(--bwfp-muted);
    margin: 0;
    line-height: 1.5;
}

.bwfp-calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.bwfp-calc-tile {
    background: var(--bwfp-white);
    border: 1px solid var(--bwfp-border);
    border-radius: var(--bwfp-radius);
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: border-color 0.2s, transform 0.1s;
    color: var(--bwfp-text);
}

.bwfp-calc-tile:hover {
    border-color: var(--bwfp-navy);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--bwfp-text);
}

.bwfp-calc-tile .bwfp-tile-icon {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.bwfp-calc-tile h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--bwfp-navy);
    margin: 0 0 4px;
}

.bwfp-calc-tile .bwfp-tile-access {
    font-size: 11px;
    color: var(--bwfp-muted);
}

/* ── Pricing Page ─────────────────────────────────────────────────────────── */

.bwfp-pricing-header {
    text-align: center;
    margin-bottom: 36px;
}

.bwfp-pricing-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--bwfp-navy);
    margin: 0 0 10px;
}

.bwfp-pricing-section {
    margin-bottom: 40px;
}

.bwfp-pricing-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bwfp-navy);
    margin: 0 0 4px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bwfp-border);
}

.bwfp-pricing-section .bwfp-section-desc {
    font-size: 14px;
    color: var(--bwfp-muted);
    margin: 0 0 20px;
}

.bwfp-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.bwfp-pricing-card {
    background: var(--bwfp-white);
    border: 1.5px solid var(--bwfp-border);
    border-radius: 10px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
}

.bwfp-pricing-card.featured {
    border-color: var(--bwfp-teal);
    box-shadow: 0 4px 16px rgba(26,122,110,0.15);
}

.bwfp-pricing-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bwfp-navy);
    margin: 0 0 6px;
}

.bwfp-pricing-card .bwfp-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--bwfp-teal);
    margin-bottom: 4px;
}

.bwfp-pricing-card .bwfp-price-note {
    font-size: 12px;
    color: var(--bwfp-muted);
    margin-bottom: 14px;
}

.bwfp-pricing-card ul {
    margin: 0 0 16px;
    padding-left: 18px;
    font-size: 13px;
    color: var(--bwfp-text);
    flex: 1;
}

.bwfp-pricing-card ul li {
    margin-bottom: 4px;
}

/* ── Chart Container ──────────────────────────────────────────────────────── */

.bwfp-chart-wrap {
    margin: 20px 0;
    border: 1px solid var(--bwfp-border);
    border-radius: var(--bwfp-radius);
    padding: 16px;
    background: #fff;
}

/* ── Debt List (debt payoff planner) ──────────────────────────────────────── */

.bwfp-debt-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
}

.bwfp-debt-row label {
    font-size: 11px;
    color: var(--bwfp-muted);
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 680px) {
    .bwfp-debt-row {
        grid-template-columns: 1fr 1fr;
    }
    .bwfp-debt-row > *:last-child {
        grid-column: span 2;
    }
}

.bwfp-remove-btn {
    background: none;
    border: 1px solid #ddd;
    color: var(--bwfp-red);
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    align-self: flex-end;
    margin-bottom: 0;
}

/* ── Ad Zones ─────────────────────────────────────────────────────────────── */

.bwfp-ad-zone {
    text-align: center;
    margin: 20px 0;
    min-height: 90px;
}

.bwfp-ad-leaderboard { min-height: 90px; }
.bwfp-ad-inline      { min-height: 250px; }
.bwfp-ad-sidebar     { min-height: 250px; }

/* ── Glossary ─────────────────────────────────────────────────────────────── */

.bwfp-glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.bwfp-glossary-entry {
    background: var(--bwfp-white);
    border: 1px solid var(--bwfp-border);
    border-radius: var(--bwfp-radius);
    padding: 18px;
}

.bwfp-glossary-entry h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--bwfp-navy);
    margin: 0 0 6px;
}

.bwfp-glossary-entry p {
    font-size: 13px;
    color: var(--bwfp-text);
    margin: 0;
    line-height: 1.5;
}

/* ── Factsheet Panel ──────────────────────────────────────────────────────── */

.bwfp-factsheet {
    background: var(--bwfp-white);
    border: 1.5px solid var(--bwfp-gold);
    border-radius: var(--bwfp-radius);
    padding: 24px;
    margin-top: 24px;
}

.bwfp-factsheet h3 {
    color: var(--bwfp-navy);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bwfp-border);
}

.bwfp-factsheet-section {
    margin-bottom: 16px;
}

.bwfp-factsheet-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--bwfp-teal);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bwfp-factsheet-section p,
.bwfp-factsheet-section pre {
    font-size: 13.5px;
    color: var(--bwfp-text);
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.65;
    font-family: inherit;
}

/* ── Notice / Alert ───────────────────────────────────────────────────────── */

.bwfp-notice {
    padding: 12px 16px;
    border-radius: var(--bwfp-radius);
    font-size: 14px;
    margin: 12px 0;
}

.bwfp-notice-success {
    background: #EAF5F3;
    border-left: 4px solid var(--bwfp-teal);
    color: #0D5046;
}

.bwfp-notice-error {
    background: #FDECEA;
    border-left: 4px solid var(--bwfp-red);
    color: #7B1C1C;
}

.bwfp-notice-info {
    background: var(--bwfp-light);
    border-left: 4px solid var(--bwfp-navy);
    color: var(--bwfp-navy);
}

/* ── Spinner ──────────────────────────────────────────────────────────────── */

.bwfp-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bwfp-spin 0.7s linear infinite;
    vertical-align: middle;
}

.bwfp-spinner-dark {
    border-color: rgba(26,53,87,0.3);
    border-top-color: var(--bwfp-navy);
}

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

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .bwfp-page-header {
        padding: 24px 18px;
    }

    .bwfp-page-header h1 {
        font-size: 1.35rem;
    }

    .bwfp-calc-card {
        padding: 18px;
    }

    .bwfp-modal {
        padding: 22px 18px;
    }

    .bwfp-hub-hero h1 {
        font-size: 1.5rem;
    }

    .bwfp-pricing-grid {
        grid-template-columns: 1fr;
    }
}
