/* ==========================================================================
   VivreFR France Tax Estimator - V1.03.010 (Frosted Capsule Card Version)
   Aesthetic: Premium Warm Minimalist Glassmorphism (VivreFR Design System)
   Fixes: padding/space/margin consistency across all components
   ========================================================================== */

/* Design Tokens Definitions (Matching VivreFR Global Variables) */
:root {
    --vf-bg: #f6f2ec;
    /* Warm beige */
    --vf-brand-beige: #dcd6cc;
    --vf-gold: #c5a059;
    /* Focus outline or highlight */
    --vf-surface: #ffffff;
    /* Card background */
    --vf-surface-soft: #ece6de;
    --vf-navy: #1c3281;
    /* Primary brand color */
    --vf-navy-dark: #14245c;
    --vf-navy-deep: #0c1a40;
    --vf-red-ui: #c8321a;
    /* Negative adjustments / warning */
    --vf-red-flag: #e1000f;
    --vf-green-ui: #16a34a;
    /* High Comfort / positive savings */
    --vf-orange-ui: #ea580c;
    /* Moderate Comfort */
    --vf-ink: #080f1e;
    /* Body text */
    --vf-muted: #64748b;
    /* Subtext */
    --vf-espresso: #6b5e4e;
    --vf-line: rgba(0, 0, 0, 0.08);
    --vf-line-strong: rgba(0, 0, 0, 0.12);
    --vf-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    --vf-shadow-hover: 0 18px 50px rgba(28, 50, 129, 0.10);
    --vf-hero-panel-start: rgba(28, 50, 129, 0.96);
    --vf-hero-panel-end: rgba(20, 36, 92, 0.98);
    --vf-r-sm: 10px;
    --vf-r-md: 18px;
    --vf-r-lg: 26px;
    --vf-r-xl: 36px;
    --vf-display: "Plus Jakarta Sans", sans-serif;
    --vf-body: "Plus Jakarta Sans", sans-serif;

    /* ---- FIXED SPACING TOKENS ---- */
    --vf-card-pad: 32px;
    --vf-card-pad-sm: 24px;
    --vf-card-pad-xs: 16px;
    --vf-section-gap: 24px;
    --vf-field-gap: 16px;
    --vf-grid-gap: 16px;
    --vf-stack-gap: 24px;
}

/* Base resets & fonts */
body {
    margin: 0;
    padding: 0;
    font-family: var(--vf-body);
    color: var(--vf-ink);
    background-color: var(--vf-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Box sizing namespace reset */
.pp-page-wrapper,
.pp-page-wrapper *,
.pp-page-wrapper *::before,
.pp-page-wrapper *::after {
    box-sizing: border-box !important;
}

.pp-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Hero Section */
.pp-hero {
    text-align: center;
    margin-bottom: 40px;
}

.pp-main-title {
    font-family: var(--vf-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 500;
    margin: 0 0 15px;
    color: var(--vf-navy);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.pp-meta {
    color: var(--vf-muted);
    font-size: 1rem;
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    font-weight: 500;
}

.pp-brand {
    color: var(--vf-red-ui);
    font-weight: 700;
}

.pp-divider {
    opacity: 0.5;
}

/* Flex Layout: Single Column Stack */
.vf-tax-estimator-grid {
    display: flex;
    flex-direction: column;
    gap: var(--vf-stack-gap);
    max-width: 850px;
    margin: 0 auto;
    width: 100%;
}

/* ---- CARD STYLING (FIXED: consistent padding) ---- */
.pp-card {
    background: var(--vf-surface);
    border: 1px solid var(--vf-line);
    border-radius: var(--vf-r-lg);
    padding: var(--vf-card-pad);
    box-shadow: var(--vf-shadow);
}

.pp-intro {
    font-size: 1.05rem;
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--vf-ink);
    line-height: 1.6;
}

/* ---- SECTIONS inside cards (FIXED: reduced gap) ---- */
.vf-section {
    margin-top: var(--vf-section-gap);
    padding-top: var(--vf-section-gap);
    border-top: 1px solid var(--vf-line);
}

/* First section sits right under the progress bar — no divider needed.
   Target by ID since :first-of-type is unreliable with sibling <select> nodes. */
.vf-section:first-of-type,
#residency-section {
    margin-top: 8px;
    padding-top: 0;
    border-top: none;
}

.vf-section h2 {
    font-family: var(--vf-display);
    color: var(--vf-navy-deep);
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px;
    letter-spacing: -0.01em;
}

/* ---- FIELDS & FORM ELEMENTS (FIXED: consistent field gap) ---- */
.vf-field {
    margin-bottom: var(--vf-field-gap);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

.vf-field label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vf-navy-deep);
    margin-bottom: 6px;
}

.vf-field-desc {
    font-size: 0.8rem;
    color: var(--vf-muted);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.vf-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: var(--vf-r-sm);
    border: 1px solid var(--vf-brand-beige);
    background-color: #faf9f6;
    font-family: var(--vf-body);
    font-size: 1rem;
    color: var(--vf-ink);
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.vf-input:focus {
    border-color: var(--vf-navy);
    background-color: #ffffff;
}

select.vf-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c3281' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 40px;
    cursor: pointer;
}

select.vf-input:disabled {
    background-color: var(--vf-surface-soft);
    color: var(--vf-muted);
    cursor: not-allowed;
}

/* ---- GRIDS (FIXED: consistent gap) ---- */
.vf-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--vf-grid-gap);
    align-items: end;
}

@media (max-width: 600px) {
    .vf-grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.vf-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--vf-grid-gap);
    align-items: end;
}

@media (max-width: 760px) {
    .vf-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .vf-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ---- RESIDENCY GATE ---- */
.vf-options-gate {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--vf-grid-gap);
    margin-top: 8px;
}

@media (max-width: 500px) {
    .vf-options-gate {
        grid-template-columns: 1fr;
    }
}

.vf-gate-label {
    cursor: pointer;
    display: block;
}

.vf-gate-label input[type="radio"] {
    display: none;
}

.vf-gate-card {
    border: 2px solid var(--vf-brand-beige);
    border-radius: var(--vf-r-md);
    padding: 16px;
    background-color: #faf9f6;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.vf-gate-icon {
    font-size: 24px;
}

.vf-gate-card strong {
    font-size: 0.95rem;
    color: var(--vf-navy-deep);
}

.vf-gate-card span {
    font-size: 0.75rem;
    color: var(--vf-muted);
}

.vf-gate-label input[type="radio"]:checked+.vf-gate-card {
    border-color: var(--vf-navy);
    background-color: rgba(28, 50, 129, 0.04);
    box-shadow: 0 4px 15px rgba(28, 50, 129, 0.08);
}

/* ---- STEPPER (FIXED: tighter padding) ---- */
.vf-stepper-field {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: #faf9f6;
    border: 1px solid var(--vf-brand-beige);
    border-radius: var(--vf-r-md);
    padding: 14px 18px;
    margin-bottom: 12px;
}

.vf-stepper-field:last-child {
    margin-bottom: 0;
}

@media (max-width: 500px) {
    .vf-stepper-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

.vf-stepper-label-wrap {
    display: flex;
    flex-direction: column;
}

.vf-stepper-label-wrap label {
    margin-bottom: 2px;
}

.vf-stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--vf-navy);
    border-radius: var(--vf-r-sm);
    background-color: #ffffff;
    overflow: hidden;
    height: 44px;
}

.vf-stepper-btn {
    background: none;
    border: none;
    width: 44px;
    height: 100%;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--vf-navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background-color 0.15s;
}

.vf-stepper-btn:hover {
    background-color: rgba(28, 50, 129, 0.08);
}

.vf-stepper-input {
    width: 44px;
    border: none;
    text-align: center;
    font-family: var(--vf-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--vf-navy-deep);
    outline: none;
    -moz-appearance: textfield;
}

.vf-stepper-input::-webkit-outer-spin-button,
.vf-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---- CHECKBOX ---- */
.vf-checkbox-field {
    justify-content: center;
    margin-bottom: var(--vf-field-gap);
}

.vf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vf-navy-deep);
}

.vf-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--vf-navy);
    cursor: pointer;
}

/* ---- INPUT PREFIX ---- */
.vf-input-prefix-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.vf-input-prefix {
    position: absolute;
    left: 16px;
    font-weight: 600;
    color: var(--vf-muted);
}

.vf-input-prefix-wrap .vf-input {
    padding-left: 32px;
}

/* ---- ERRORS ---- */
.vf-error-msg {
    color: var(--vf-red-ui);
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 500;
    display: none;
}

.vf-input.vf-input-error {
    border-color: var(--vf-red-ui);
    background-color: rgba(200, 50, 26, 0.02);
}

/* ---- ACCORDION (FIXED: consistent spacing) ---- */
.vf-accordion-section {
    border-bottom: 1px solid var(--vf-line);
    padding-bottom: 14px;
}

.vf-accordion-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--vf-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--vf-navy-deep);
    cursor: pointer;
    outline: none;
}

.vf-accordion-arrow {
    font-size: 12px;
    color: var(--vf-navy);
    transition: transform 0.3s ease;
}

.vf-accordion-toggle[aria-expanded="true"] .vf-accordion-arrow {
    transform: rotate(180deg);
}

.vf-accordion-content {
    margin-top: 12px;
}

.vf-accordion-inner {
    background-color: #faf9f6;
    border: 1px solid var(--vf-brand-beige);
    border-radius: var(--vf-r-md);
    padding: 20px;
}

.vf-accordion-intro {
    font-size: 0.85rem;
    color: var(--vf-muted);
    margin-top: 0;
    margin-bottom: 16px;
}

.vf-accordion-inner h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--vf-espresso);
    margin: 14px 0 8px 0;
    border-bottom: 1px dashed var(--vf-brand-beige);
    padding-bottom: 4px;
}

.vf-accordion-inner h3:first-of-type {
    margin-top: 0;
}

.vf-credits-header {
    margin-top: 20px !important;
}

/* ---- DISCLAIMER ---- */
.vf-disclaimer-card {
    margin-top: var(--vf-section-gap);
    background-color: rgba(107, 94, 78, 0.05);
    border-radius: var(--vf-r-md);
    padding: 16px;
    display: flex;
    gap: 12px;
}

.vf-disclaimer-icon {
    font-size: 18px;
    line-height: 1;
}

.vf-disclaimer-card p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--vf-espresso);
    line-height: 1.4;
}

/* ---- RESULTS PANEL (FIXED: consistent card padding) ---- */
.vf-results-panel,
#results-resident-wrapper,
#results-nonresident-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---- UNIFIED BODY CARD ---- */
/* One large transparent container containing all result sections */
.vf-unified-body {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Each section inside the unified body (styled as premium capsule card) */
.vf-unified-section {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 26px !important;
    padding: 28px !important;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

/* Divider line (hidden in capsule card layout) */
.vf-unified-divider {
    display: none;
}

/* Section title inside unified body */
.vf-unified-section-title {
    font-family: var(--vf-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--vf-navy);
    text-transform: uppercase;
    margin: 0 0 18px 0;
}

/* Metric cell inside rates grid */
.vf-unified-metric {
    background: #faf9f6;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 20px;
}

/* ---- RATES ROW: side-by-side capsule cards ---- */
.vf-rates-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: stretch;
}

.vf-rate-card {
    flex: 1;
    min-width: 0;
}

/* Rates row stays side by side on all screen sizes */



.vf-breakdown-section .vf-breakdown-toggle {
    padding: 0;
    margin-bottom: 0;
}

.vf-breakdown-section .vf-breakdown-content {
    margin-top: 16px;
}


.vf-result-card {
    background: var(--vf-surface) !important;
    border: 1px solid var(--vf-line) !important;
    border-radius: var(--vf-r-md) !important;
    padding: var(--vf-card-pad) !important;
    box-shadow: var(--vf-shadow) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

/* Compact variants: summary / confidence / rates grid */
.vf-results-rates-grid>.vf-result-card,
.vf-summary-card,
.vf-confidence-card {
    padding: var(--vf-card-pad-sm);
}

/* ---- PRIMARY TAX CARD ---- */
.vf-result-card-primary {
    background: linear-gradient(135deg, var(--vf-navy-dark) 0%, var(--vf-navy-deep) 100%) !important;
    color: #ffffff !important;
    padding: var(--vf-card-pad) !important;
    position: relative !important;
    overflow: hidden !important;
    border: none !important;
    border-radius: 28px !important;
    box-shadow:
        0 20px 60px rgba(20, 36, 92, 0.22),
        0 8px 30px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.vf-result-card-primary::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.vf-result-card-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
    backdrop-filter: blur(4px);
}

.vf-result-tax-amount {
    font-family: var(--vf-display);
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.vf-result-monthly {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.85;
    margin-bottom: 20px;
}

.vf-tax-disclaimer {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ---- CORE METRICS ---- */
.vf-results-core-metrics {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Tighter than card-to-card gap so this feels like one unit */
}

/* ---- RATES GRID (FIXED: consistent gap) ---- */
.vf-results-rates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 500px) {
    .vf-results-rates-grid {
        grid-template-columns: 1fr;
    }
}

.vf-rate-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--vf-muted);
    display: block;
    margin-bottom: 6px;
}

.vf-rate-value {
    font-family: var(--vf-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--vf-navy);
    margin-bottom: 4px;
}

.vf-rate-desc {
    font-size: 0.7rem;
    color: var(--vf-muted);
}

/* ---- SUMMARY CARD ---- */
.vf-summary-card {
    background: #faf9f6 !important;
    border-radius: 18px !important;
}

.vf-summary-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    background: #ffffff;
}

.vf-summary-card h3 {
    font-family: var(--vf-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--vf-navy-deep);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vf-summary-flex {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.vf-summary-item {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vf-summary-label {
    font-size: 0.75rem;
    color: var(--vf-muted);
    margin-bottom: 4px;
}

.vf-summary-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--vf-navy-deep);
}

/* ---- BREAKDOWN CARD (FIXED: padding) ---- */


.vf-breakdown-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--vf-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--vf-navy-deep);
    cursor: pointer;
    outline: none;
}

.vf-breakdown-arrow {
    font-size: 11px;
    color: var(--vf-navy);
    transition: transform 0.3s;
}

.vf-breakdown-toggle[aria-expanded="true"] .vf-breakdown-arrow {
    transform: rotate(180deg);
}

.vf-breakdown-content {
    border-top: 1px solid var(--vf-line);
    padding: 18px 24px;
    background: #faf9f6;
    border-radius: 16px;
}

.vf-breakdown-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vf-breakdown-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    font-size: 0.85rem !important;
    color: var(--vf-ink) !important;
    padding: 5px 0 !important;
}

.vf-breakdown-row span,
.vf-breakdown-row strong {
    display: block !important;
    float: none !important;
    margin: 0 !important;
}

.vf-breakdown-row span {
    color: var(--vf-muted) !important;
}

.vf-breakdown-row strong {
    color: var(--vf-navy-deep);
}

.vf-neg {
    color: var(--vf-red-ui);
    font-weight: 600;
}

.vf-pos {
    color: var(--vf-orange-ui);
    font-weight: 600;
}

.vf-row-divider {
    border-top: 1px dashed var(--vf-brand-beige);
    padding-top: 10px;
    margin-top: 4px;
}

.vf-row-divider-strong {
    border-top: 1px solid var(--vf-line-strong);
    padding-top: 12px;
    margin-top: 8px;
}

.vf-row-divider-strong strong {
    font-size: 1.05rem;
}

.vf-primary-color {
    color: var(--vf-navy) !important;
}

/* ---- RECOMMENDATIONS ---- */

.vf-recs-group {
    background: #faf9f6;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 16px;
}

.vf-recommendations-card h3 {
    font-family: var(--vf-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--vf-navy-deep);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vf-recs-list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style-type: none !important;
}

.vf-recs-list li {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--vf-ink);
    list-style: none !important;
    list-style-type: none !important;
}

.vf-recs-list li a {
    color: var(--vf-navy);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.vf-recs-list li a:hover {
    text-decoration: underline;
}

/* ---- CTA CARD ---- */
.vf-cta-card {
    text-align: center;
}

.vf-cta-card h3 {
    font-family: var(--vf-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--vf-navy-deep);
    margin: 0 0 8px 0;
}

.vf-cta-card p {
    font-size: 0.8rem;
    color: var(--vf-muted);
    line-height: 1.4;
    margin: 0 0 18px 0;
}

.vf-cta-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.vf-cta-btn {
    flex: 1;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--vf-r-sm);
    background-color: var(--vf-surface-soft);
    color: var(--vf-navy-deep);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.vf-cta-btn:hover {
    background-color: var(--vf-navy);
    color: #ffffff;
}

/* ---- NON-RESIDENT ---- */
.vf-nonres-breakdown-card {
    border-radius: 24px;
}

.vf-nonres-info-card {
    border-radius: 24px;
    margin-top: 24px;
}

.vf-nonres-info-card h3 {
    font-family: var(--vf-display);
    font-size: 15px;
    color: var(--vf-navy-deep);
    margin: 0 0 10px 0;
}

.vf-nonres-info-card p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--vf-ink);
    margin: 0 0 15px 0;
}

.vf-nonres-info-card ul {
    padding-left: 20px;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vf-nonres-info-card li {
    font-size: 0.8rem;
    color: var(--vf-ink);
    line-height: 1.4;
}

.vf-button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    background-color: var(--vf-navy);
    color: #ffffff;
    border-radius: var(--vf-r-sm);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    width: 100%;
    transition: background-color 0.2s;
}

.vf-button-link:hover {
    background-color: var(--vf-navy-dark);
}

/* ---- TAX HEALTH ---- */
.vf-health-card h3 {
    font-family: var(--vf-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--vf-navy-deep);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vf-health-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vf-health-item {
    font-size: 0.82rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--vf-r-sm);
    font-weight: 500;
}

.vf-health-item-success {
    background-color: rgba(22, 163, 74, 0.08);
    color: #15803d;
}

.vf-health-item-warning {
    background-color: rgba(234, 88, 12, 0.08);
    color: #c2410c;
}

.vf-health-item-info {
    background-color: rgba(28, 50, 129, 0.06);
    color: var(--vf-navy);
}

/* ---- ASSUMPTIONS ---- */
.vf-assumptions-card h3 {
    font-family: var(--vf-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--vf-navy-deep);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vf-assumptions-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vf-assumptions-list li {
    font-size: 0.8rem;
    color: var(--vf-espresso);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---- CTA GRID PANEL (FIXED: spacing) ---- */
.vf-cta-card {
    text-align: left;
}

.vf-cta-card h3 {
    font-family: var(--vf-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--vf-navy-deep);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1.5px solid var(--vf-brand-beige);
    padding-bottom: 6px;
}

.vf-cta-intro {
    font-size: 0.8rem;
    color: var(--vf-muted);
    line-height: 1.4;
    margin: 0 0 14px 0;
}

.vf-cta-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vf-cta-item {
    display: flex;
    gap: 12px;
    background-color: var(--vf-surface-soft);
    border: 1px solid var(--vf-line);
    border-radius: var(--vf-r-sm);
    padding: 12px 14px;
    transition: border-color 0.25s, background-color 0.25s;
}

.vf-cta-item:hover {
    border-color: var(--vf-brand-beige);
    background-color: rgba(107, 94, 78, 0.04);
}

.vf-cta-icon {
    font-size: 20px;
    line-height: 1.2;
}

.vf-cta-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vf-cta-info h4 {
    margin: 0 0 2px 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--vf-navy-deep);
}

.vf-cta-info p {
    margin: 0 0 6px 0;
    font-size: 0.75rem;
    color: var(--vf-espresso);
    line-height: 1.3;
}

.vf-cta-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--vf-navy);
    text-decoration: none;
    display: inline-block;
    transition: color 0.15s;
}

.vf-cta-link:hover {
    color: var(--vf-navy-dark);
    text-decoration: underline;
}

/* ==========================================================================
   SIMULATOR & ONBOARDING EXTENSIONS (FIXED: spacing)
   ========================================================================== */

.pp-subtitle {
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--vf-espresso);
    max-width: 650px;
    margin: 0 auto 16px auto;
}

.vf-supports-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 auto;
}

.vf-supports-bar span {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--vf-navy);
    background-color: rgba(28, 50, 129, 0.05);
    padding: 4px 10px;
    border-radius: 20px;
}

/* ---- PROGRESS BAR ---- */
.vf-progress-indicator {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 14px;
}

.vf-progress-bar-track {
    background: var(--vf-line);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

.vf-progress-bar-fill {
    background: var(--vf-navy);
    height: 100%;
    width: 25%;
    transition: width 0.3s ease;
}

.vf-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--vf-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.vf-progress-label-item.active {
    color: var(--vf-navy-deep);
}

.vf-year-switcher-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--vf-navy);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 4px;
    display: inline-block;
}

/* ---- "WHY IS MY TAX THIS AMOUNT?" ---- */




.vf-why-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vf-why-item {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--vf-espresso);
    display: flex;
    gap: 8px;
}

.vf-why-item-icon {
    color: var(--vf-green-ui);
    font-weight: 700;
}

/* ---- "WHAT IF?" LIVE SIMULATOR (FIXED: spacing) ---- */




#vf-whatif-card {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(250, 249, 246, 0.98) 100%
    );
}

.vf-whatif-desc {
    font-size: 0.74rem;
    color: var(--vf-muted);
    line-height: 1.35;
    margin: 0 0 12px 0;
}

.vf-whatif-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vf-whatif-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vf-whatif-row-label-wrap {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--vf-navy-deep);
}

.vf-whatif-row-val {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--vf-espresso);
}

.vf-whatif-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.vf-whatif-slider {
    flex: 1;
    height: 6px;
    background: var(--vf-line);
    outline: none;
    border-radius: 3px;
    accent-color: var(--vf-navy);
    cursor: pointer;
}

.vf-whatif-stepper-btn {
    background-color: #faf9f6;
    border: 1px solid var(--vf-brand-beige);
    color: var(--vf-navy);
    font-weight: bold;
    cursor: pointer;
    height: 28px;
    width: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.vf-whatif-stepper-btn:hover {
    background-color: var(--vf-surface-soft);
}

.vf-whatif-feedback-wrap {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(107, 94, 78, 0.04);
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px dashed var(--vf-brand-beige);
}

.vf-whatif-feedback-txt {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--vf-espresso);
}

.vf-whatif-feedback-diff {
    font-size: 0.8rem;
    font-weight: 700;
}

.vf-whatif-feedback-diff.pos {
    color: var(--vf-red-ui);
}

.vf-whatif-feedback-diff.neg {
    color: var(--vf-green-ui);
}

/* ---- SAVINGS BADGE ---- */
.vf-savings-badge {
    background-color: var(--vf-green-ui);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ---- GLOSSARY TOOLTIPS ---- */
.vf-glossary-term {
    border-bottom: 1.2px dotted var(--vf-navy);
    cursor: help;
    position: relative;
    display: inline-block;
    font-weight: 600;
}

.vf-glossary-term:hover {
    color: var(--vf-navy);
}

.vf-tooltip {
    position: absolute;
    background-color: #ffffff;
    border: 1.5px solid var(--vf-navy-deep);
    border-radius: var(--vf-r-sm);
    box-shadow: 0 10px 25px rgba(12, 26, 64, 0.15);
    padding: 12px;
    width: 260px;
    z-index: 10000;
    font-family: var(--vf-body);
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
}

.vf-tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent var(--vf-navy-deep) transparent;
}

.vf-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.vf-tooltip-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--vf-navy-deep);
    margin-bottom: 4px;
    display: block;
}

.vf-tooltip-def {
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--vf-espresso);
    display: block;
    margin-bottom: 6px;
}

.vf-tooltip-link {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--vf-navy);
    text-decoration: none;
}

.vf-tooltip-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   TIMELINE & CONFIDENCE (FIXED: spacing)
   ========================================================================== */



.vf-timeline-flow {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 6px;
    margin-top: 10px;
}

.vf-timeline-step {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    background: rgba(250, 249, 246, 0.8);
    padding: 10px;
    border-radius: 12px;
}

.vf-timeline-badge {
    background: var(--vf-brand-beige);
    color: var(--vf-navy-deep);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid var(--vf-line);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vf-timeline-step-total .vf-timeline-badge {
    background: var(--vf-navy-deep);
    color: #ffffff;
    border-color: var(--vf-navy-deep);
}

.vf-timeline-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    border-bottom: 1px dashed var(--vf-line);
    padding: 5px 0;
}

.vf-timeline-step-total .vf-timeline-info {
    border-bottom: none;
}

.vf-timeline-label {
    font-size: 0.76rem;
    color: var(--vf-espresso);
    font-weight: 500;
}

.vf-timeline-val {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--vf-navy-deep);
}

.vf-timeline-step-total .vf-timeline-val {
    color: var(--vf-navy);
    font-size: 0.84rem;
}

.vf-timeline-arrow {
    font-size: 0.72rem;
    color: var(--vf-muted);
    line-height: 1;
    padding: 2px 0;
    position: relative;
    z-index: 1;
    text-align: center;
    margin: 0;
}

/* ---- CONFIDENCE METER ---- */
.vf-confidence-card {
    background-color: #f7f9fc;
    border-radius: 18px !important;
}

.vf-confidence-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 10px;
}

.vf-confidence-badge-val {
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 6px;
    border-radius: 4px;
}

.vf-confidence-badge-val.high {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.vf-confidence-badge-val.medium {
    background-color: #fff9c4;
    color: #f57f17;
}

.vf-confidence-list {
    margin: 8px 0;
    padding-left: 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--vf-espresso);
    list-style-type: none;
}

.vf-confidence-accuracy {
    font-size: 0.74rem;
    color: var(--vf-muted);
    margin-top: 4px;
}

/* ---- KEYBOARD ACCESSIBILITY ---- */
.vf-input:focus-visible,
select:focus-visible,
button:focus-visible,
.vf-gate-label input[type="radio"]:focus-visible+.vf-gate-card {
    outline: 2px solid var(--vf-gold) !important;
    outline-offset: 2px;
}

/* ---- ACCORDION ANIMATION ---- */
.vf-accordion-content,
.vf-breakdown-content {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

/* ---- RESULTS SUBGRID ---- */
.vf-results-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--vf-grid-gap);
}

@media (max-width: 768px) {
    .vf-results-subgrid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .vf-unified-section {
        padding: 22px;
        border-radius: 20px;
    }

    .vf-result-tax-amount {
        font-size: 3rem;
    }

    .vf-summary-flex {
        flex-direction: column;
        gap: 12px;
    }

    .vf-results-rates-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- FULL WIDTH ECOSYSTEM CTA PANEL ---- */
.vf-cta-grid-panel {
    margin-top: var(--vf-section-gap);
    border-top: 1.5px solid var(--vf-line);
    padding-top: var(--vf-section-gap);
}

.vf-cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--vf-grid-gap);
    margin-top: 12px;
}

@media (max-width: 900px) {
    .vf-cta-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ---- MOBILE RESPONSIVE OVERRIDES (FIXED: consistent) ---- */
@media (max-width: 600px) {
    .pp-card,
    .vf-result-card,
    .vf-result-card-primary {
        padding: var(--vf-card-pad-sm) !important;
    }

    .vf-cta-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .vf-cta-btn {
        width: 100%;
        height: 42px;
    }

    .vf-breakdown-content {
        overflow-x: auto;
    }

    .vf-breakdown-table {
        min-width: 280px;
    }
}

@media (max-width: 400px) {
    .pp-card,
    .vf-result-card,
    .vf-result-card-primary {
        padding: var(--vf-card-pad-xs) !important;
    }

    .pp-container {
        padding: 0 12px 20px;
    }

    .vf-stepper-field {
        padding: 12px 14px;
    }
}


/* ---- LIMITATIONS CARD ---- */
.vf-limitations-card {
    background: rgba(250, 249, 246, 0.8);
    margin-top: 24px;
}

.vf-limitations-card .vf-unified-section-title {
    color: var(--vf-espresso);
}

.vf-limitations-intro {
    font-size: 0.76rem;
    color: var(--vf-muted);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.vf-limitations-list {
    margin: 0 0 10px 0;
    padding-left: 16px;
    font-size: 0.74rem;
    color: var(--vf-espresso);
    line-height: 1.5;
    list-style-type: square;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vf-limitations-note {
    font-size: 0.74rem;
    color: var(--vf-muted);
    margin: 0;
    line-height: 1.4;
}



@media (max-width: 500px) {
    .vf-unified-section {
        padding: 18px;
    }

    .vf-result-card-primary {
        border-radius: 20px !important;
    }

    .vf-result-tax-amount {
        font-size: 2.4rem;
    }
}
