/* ═══════════════════════════════════════════════════════════
   TRIDENT EMBER DEFENSE — SYSTEM CONFIGURATOR v3
   Brutalist / Matte / Opaque
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg-deep: #ffffff;
    /* Clean White */
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --border: #dae1e7;
    --border-heavy: #bcccdc;
    --text-primary: #0a192f;
    /* Deep Navy */
    --text-secondary: #334e68;
    /* Slate Blue */
    --text-dim: #829ab1;
    --accent: #002855;
    /* TRIDENT NAVY */
    --accent-muted: #102a43;
    --accent-bg: #e3f2fd;
    /* Light Blue tint */
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --radius: 12px;
    --radius-sm: 6px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.15s ease;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}



/* ── Header ──────────────────────────────────────────────── */
#app-header {
    position: sticky;
    top: 0;
    z-index: 20000;
    background: #ffffff;
    /* Clean white header */
    border-top: 6px solid var(--accent);
    /* Brand Top Bar */
    border-bottom: 2px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    height: 80px;
    /* Larger Logo */
    width: auto;
}

/* Badge icon hidden on desktop by default */
.header-logo-icon {
    display: none;
}

/* Responsive: swap to badge on tablet/mobile */
@media (max-width: 1024px) {
    .header-logo-full {
        display: none;
    }

    .header-logo-icon {
        display: block;
        height: 48px;
        width: auto;
    }
}

/* ── Header Nav Strip (Steps 3-6) ────────────────────────── */
.header-nav-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.header-nav-strip.hidden {
    display: none;
}

.nav-strip-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-strip-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.nav-strip-chevron {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.65rem;
    color: var(--text-dim);
    padding: 4px 8px;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.nav-strip-chevron:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

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


.nav-strip-stepper {
    display: flex;
    align-items: center;
    background: #f5f5f7;
    border-radius: 20px;
    padding: 2px;
    margin-left: 4px;
}

.nav-stepper-btn {
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding: 0;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s;
}

.nav-stepper-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.nav-stepper-value {
    min-width: 24px;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 700;
    line-height: 28px;
}

@media (max-width: 640px) {
    .header-nav-strip {
        margin-left: 12px;
        padding-left: 12px;
        gap: 6px;
    }

    .nav-strip-icon {
        width: 36px;
        height: 36px;
    }

    .nav-strip-name {
        font-size: 0.85rem;
    }
}

/* ── BOM Row Styling ─────────────────────────────────────── */
.bom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bom-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.bom-cost {
    font-weight: 600;
    text-align: right;
    min-width: 60px;
}

/* ── Header Dropdown Panel ───────────────────────────────── */
#header-dropdown-scrim {
    position: fixed;
    top: 84px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 25, 47, 0.08);
    z-index: 20500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#header-dropdown-scrim.open {
    opacity: 1;
    pointer-events: auto;
}

#header-dropdown-panel {
    position: fixed;
    top: 84px;
    /* below header */
    left: 0;
    right: 0;
    background: var(--bg-card);
    z-index: 21000;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px;
    pointer-events: none;
}

#header-dropdown-panel.open {
    max-height: 60vh;
    padding: 20px 24px;
    overflow-y: auto;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.header-dropdown-content {
    max-width: 1200px;
    margin: 0 auto;
}

#header-dropdown-panel .product-controls,
#header-dropdown-panel .phase-body {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
}

@media (max-width: 1024px) {
    #header-dropdown-scrim {
        top: 70px;
    }

    #header-dropdown-panel {
        top: 70px;
    }
}


.header-title {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.brand-sub {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* ── Main Layout ─────────────────────────────────────────── */
#configurator {
    width: 100%;
    max-width: 1600px;
    /* Use more screen real estate */
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: calc(100vh - 84px);
    /* Full height minus header */
    justify-content: flex-start;
}

/* ── Phase Cards ─────────────────────────────────────────── */
.phase {
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}

.phase:hover {
    border-color: var(--border-heavy);
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px 0;
}

.phase-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dim);
    line-height: 1;
    min-width: 42px;
    font-variant-numeric: tabular-nums;
}

.phase-header h2 {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent);
    /* Structured Heading Line */
    padding-bottom: 4px;
    display: inline-block;
}

.phase-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 400;
}

.phase-body {
    padding: 20px 28px 28px;
}










/* ── System Note ─────────────────────────────────────────── */
.system-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--accent-bg);
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.system-note .note-marker {
    flex-shrink: 0;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    min-width: 36px;
    padding-top: 1px;
}

.hidden {
    display: none !important;
}

/* ── Coverage Inline Card ────────────────────────────────── */
.coverage-card-inline {
    display: flex;
    align-items: center;
    gap: 28px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 20px;
}

/* ── Stories Selector ────────────────────────────────────── */
.stories-selector {
    display: flex;
    gap: 12px;
    width: 100%;
}

.stories-selector .radio-card {
    flex: 1;
    text-align: center;
    border-radius: 12px;
}

.stories-selector .radio-card-inner {
    padding: 12px;
    justify-content: center;
}

.stories-selector input {
    display: none;
    /* Force hide dots */
}

.coverage-left {
    text-align: center;
    min-width: 120px;
}

.coverage-label {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.coverage-count {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.coverage-unit {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

.coverage-why {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Sub Heading ─────────────────────────────────────────── */
.sub-heading {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-transform: uppercase;
}



/* ── System Toggle Switch ────────────────────────────────── */
.system-toggle {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.system-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-track {
    display: block;
    width: 44px;
    height: 24px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    position: relative;
    transition: background var(--transition), border-color var(--transition);
}

.toggle-thumb {
    display: block;
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: var(--text-dim);
    transition: left var(--transition), background var(--transition);
}

.system-toggle input:checked~.toggle-track {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.system-toggle input:checked~.toggle-track .toggle-thumb {
    left: 23px;
    background: var(--accent);
}

.phase.phase-disabled .phase-body {
    opacity: 0.25;
    pointer-events: none;
    user-select: none;
}

/* ── Itemized Box ────────────────────────────────────────── */
.itemized-box {
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 14px 18px;
    margin-bottom: 12px;
    border-radius: 12px;
}

.item-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    font-size: 0.8rem;
}

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

.item-cost {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 80px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.item-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ── Phase Total ─────────────────────────────────────────── */
.phase-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 14px;
    border-top: 2px solid var(--border);
}

.phase-total>span:first-child {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.phase-total>span:last-child {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ── Stepper ─────────────────────────────────────────────── */
.stepper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.stepper-row label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stepper-price {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.stepper {
    display: flex;
    align-items: center;
    align-items: center;
    gap: 12px;
    /* Add gap for floating buttons */
    border: none;
    /* Remove container border */
    overflow: visible;
}



/* ── Alert Banner ────────────────────────────────────────── */
.alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--danger-bg);
    border-left: 3px solid var(--danger);
    padding: 14px 18px;
    margin-bottom: 16px;
    border-radius: 8px;
}

.alert-marker {
    flex-shrink: 0;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--danger);
    text-transform: uppercase;
    padding-top: 2px;
    min-width: 24px;
}

.alert-banner strong {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: var(--danger);
    text-transform: uppercase;
}

.alert-banner p {
    font-size: 0.73rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.5;
}

.alert-banner.warning {
    border-left-color: #ff9d00;
}

.alert-banner.warning .alert-marker {
    color: #ff9d00;
    border-color: #ff9d00;
}

/* ── Pump Status ─────────────────────────────────────────── */
.pump-status {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 18px 20px;
    margin-top: 16px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.pump-marker {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    background: var(--text-dim);
}

.pump-marker.upgraded {
    background: var(--accent);
}

.pump-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.pump-detail {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.pump-cost {
    margin-left: auto;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.gpm-bar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 10px 0 0;
}

.gpm-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
}

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

/* ── Quote Summary (Window Sticker Style) ────────────────── */
.quote-summary {
    background: #fff;
    border: 4px solid var(--text-primary);
    padding: 0;
    margin-top: 20px;
    border-radius: 20px;
    overflow: hidden;
    color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace;
    /* Monospaced for that sticker feel */
}

.summary-header {
    background: var(--text-primary);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--text-primary);
}

.summary-header h3 {
    margin: 0;
    font-family: var(--font);
    /* Keep brand font for header */
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.summary-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .summary-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.summary-section h4 {
    border-bottom: 2px solid var(--border);
}

/* ── Global Layout & Typography ───────────────────────────── */
body {
    background-color: #ffffff;
    /* Clean White */
    color: var(--text-primary);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ── Global Layout Resets for Mobile ───────────────────── */
html,
body {
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    width: 100%;
    position: relative;
}

#configurator {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
    /* Space for fixed footer */
}

/* Ensure all inputs stay within container */
input,
select,
textarea {
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Mobile Container Spacing ──────────────────────────── */
.hero-section {
    padding: 20px 20px;
    /* Safe margin */
    width: 100%;
}

.hero-content {
    width: 100%;
    max-width: 100%;
}

.hero-form {
    width: 100%;
}

/* ── Step 1: Fix Input Truncation ──────────────────────── */
.hero-split {
    flex-direction: column;
    /* Stack inputs on mobile */
    gap: 16px;
}

.stories-selector {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
}

.stories-selector .radio-card {
    flex: 1;
    min-width: 80px;
    /* Minimum touch target */
}

/* ── Step 2: Fix Card Spacing ──────────────────────────── */
.selection-grid {
    display: flex;
    flex-direction: column;
    /* Stack cards */
    gap: 16px;
    width: 100%;
}

.choice-card {
    width: 100%;
    margin: 0;
    /* Remove negative margins if any */
}

/* ── Hero Section Refactor ───────────────────────────────── */
.hero-section {
    display: flex;
    justify-content: center;
    padding: 0;
    background: transparent;
    width: 100%;
    align-items: center;
    flex: 1;
}

.hero-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Form & Input Polish ─────────────────────────────────── */
.hero-form {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Subtle border */
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 32px;
    /* Increased from 20px */
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 10px;
    display: block;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"] {
    background: #f9fafb;
    border: 1px solid var(--border-heavy);
    /* Crisper border */
    border-radius: 16px;
    padding: 16px;
    font-size: 1.125rem;
    color: #111827;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(228, 48, 48, 0.15);
}

input.field-invalid {
    border-color: var(--danger) !important;
    background: #fff6f6;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* ── Grid Layouts ────────────────────────────────────────── */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hero-split.metrics-row {
    margin-top: 8px;
    gap: 12px;
}

@media (max-width: 640px) {
    .hero-split {
        grid-template-columns: 1fr;
    }
}

.hero-split .radio-card input {
    display: none;
}

/* ── Conveyance Grid ─────────────────────────────────────── */
.conveyance-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
}

.conveyance-grid .radio-card input,
.conveyance-grid .radio-dot {
    display: none;
    /* Hide native radio and custom dot for button-only look */
}

/* ── Card Styling (Radio/Checkbox) ───────────────────────── */
.radio-card {
    background: #fff;
    border: 1px solid var(--border-heavy);
    /* Crisper border */
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.radio-card:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.1);
}

.radio-card.active {
    border-color: var(--accent);
    background: #fff;
    /* Keep white background for cleanliness */
    box-shadow: 0 0 0 2px var(--accent);
}

/* Inner content spacing */
.radio-card-inner {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.large-card .radio-card-inner {
    padding: 40px;
    align-items: center;
    text-align: center;
}

.radio-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #111827;
    margin-bottom: 4px;
    display: block;
}

.radio-price {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

.radio-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 8px;
    line-height: 1.5;
}


/* ── Wizard Controls (Fixed Footer) ──────────────────────── */
#wizard-controls {
    background: rgba(255, 255, 255, 0.9);
    /* Glassmorphism */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px 40px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.03);
}

#step-indicator {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    /* Tech feel */
    font-size: 0.85rem;
    color: #9ca3af;
    letter-spacing: 0.1em;
}

/* ── Product Card Refinements ────────────────────────────── */
.product-card {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-heavy);
    /* Crisp Border */
    border-radius: 16px;
    display: flex;
    flex-direction: row;
    /* Horizontal layout by default on large screens */
    overflow: hidden;
    width: 100%;
}

@media (max-width: 1024px) {
    .product-card {
        flex-direction: column;
        height: auto;
    }

    #configurator {
        height: auto;
        min-height: auto;
        justify-content: flex-start;
        padding-bottom: 80px;
    }
}

.product-info {
    background: #111827;
    color: #fff;
    padding: 60px;
    border: none;
    flex: 1;
    /* Take up space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-info h2 {
    color: #fff;
}

.product-info .hero-subtitle {
    color: #9ca3af;
    /* Light grey text */
    margin-right: 0;
    margin-left: 0;
    text-align: left;
}

.feature-list li {
    color: #d1d5db;
    margin-bottom: 12px;
}

.product-price-tag {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff;
    border-radius: 50px;
}

.product-price-tag span {
    color: #fff !important;
}

.product-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #fff;
    padding: 40px 48px;
}

/* Adjust button placement */
.stepper-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #111827;
    font-weight: bold;
}

.stepper-value {
    font-weight: 700;
    font-size: 1.2rem;
    min-width: 40px;
    text-align: center;
}



.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
    border-bottom: 1px dotted var(--border);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row span:last-child {
    font-weight: 700;
}

.summary-footer {
    background: var(--bg-deep);
    padding: 20px;
    border-top: 4px solid var(--text-primary);
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 12px;
}

.total-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.total-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.summary-note {
    font-size: 0.7rem;
    text-align: center;
    padding: 10px;
    color: var(--text-dim);
    font-family: var(--font);
}

/* ── Wizard Layout ───────────────────────────────────────── */
.wizard-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Wizard Controls ─────────────────────────────────────── */
#wizard-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-top: 2px solid var(--border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

#step-indicator {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-dim);
    text-transform: uppercase;
}

#current-step-num {
    color: var(--accent);
}

.control-btn {
    padding: 16px 32px;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-deep);
    color: var(--text-dim);
    box-shadow: none;
}

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

.control-btn.primary:hover:not(:disabled) {
    background: #d42020;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(228, 48, 48, 0.3);
}

.control-btn.primary-glow {
    box-shadow: 0 0 20px rgba(228, 48, 48, 0.5);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 20px rgba(228, 48, 48, 0.5);
    }

    50% {
        box-shadow: 0 0 30px rgba(228, 48, 48, 0.8);
    }

    100% {
        box-shadow: 0 0 20px rgba(228, 48, 48, 0.5);
    }
}

.control-btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    box-shadow: none;
}

.control-btn.secondary:hover:not(:disabled) {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--bg-body);
}

/* Adjust main padding to account for fixed footer */
#configurator {
    padding-bottom: 100px;
}



/* ── Footer ──────────────────────────────────────────────── */
#app-footer {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 24px 40px;
    text-align: center;
}

#app-footer p {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {

    /* Global Container Tweaks */
    .header-inner {
        padding: 12px 16px;
    }

    #configurator {
        padding: 20px 16px 120px;
        /* Extra bottom padding for floating nav */
    }

    /* Hero & Form Adjustments */
    .hero-content h1 {
        font-size: 2rem;
        /* Smaller heading */
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .hero-form {
        padding: 24px;
        /* Reduced padding */
        border-radius: 16px;
    }

    .input-group {
        margin-bottom: 24px;
    }

    /* Stacked Layouts */
    .hero-split {
        grid-template-columns: 1fr;
    }

    .coverage-card-inline {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 20px;
    }

    .coverage-left {
        min-width: 0;
        border-bottom: 1px solid var(--border);
        padding-bottom: 16px;
        width: 100%;
    }

    .stepper-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Complex Components */
    .pump-status {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .pump-cost {
        margin-left: 0;
    }

    .quote-summary {
        padding: 16px;
        border-width: 2px;
    }
}

/* ── Toggle Switch ────────────────────────────────────────── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.title-row {
    display: flex;
    align-items: center;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-heavy);
    transition: .2s;
    border-radius: 50px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: var(--bg-card);
    transition: .2s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.phase-body.disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(1);
    transition: 0.3s ease;
}

.phase-body.disabled .control-header {
    pointer-events: auto;
    opacity: 1;
    filter: none;
}

/* ── Satellite Preview ────────────────────────────────── */
.satellite-preview {
    margin-top: 24px;
    margin-bottom: 32px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-heavy);
    background: var(--bg-card);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.satellite-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.satellite-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.satellite-scale {
    position: absolute;
    bottom: 62px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    padding: 5px 10px;
    border-radius: 6px;
}

.scale-bar {
    width: 40px;
    height: 3px;
    background: #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #fff;
    position: relative;
}

.scale-bar::before,
.scale-bar::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 8px;
    background: #fff;
    top: -3px;
}

.scale-bar::before {
    left: -2px;
}

.scale-bar::after {
    right: -2px;
}

.scale-label {
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.satellite-info {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--border);
    background: var(--bg-body);
}

.satellite-badge {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
    background: var(--accent);
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.satellite-addr {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Planner Map ──────────────────────────────────────── */
.planner-map-wrap {
    margin: 20px auto;
    max-width: 900px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-heavy);
    background: var(--bg-card);
}

.planner-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.planner-tool {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-body);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.planner-tool:hover {
    border-color: var(--text-dim);
    color: var(--text-primary);
}

.planner-tool.active {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

.tool-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.tool-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 4px;
}

#planner-map {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 400px;
    cursor: crosshair;
    background: #1a1a2e;
}

#planner-map.mode-select {
    cursor: grab;
}

#planner-map.mode-delete {
    cursor: not-allowed;
}

.planner-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: var(--bg-body);
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}


/* ── Map Mode Layout (Bottom Sheet / Overlay) ─────────── */

body.map-mode {
    overflow: hidden;
    /* Prevent body scroll, handle in pane */
}

/* 1. Map becomes global background */
body.map-mode #app-map-container {
    position: fixed;
    top: 80px;
    /* Below header */
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    z-index: 1;
    display: block !important;
}

body.map-mode #planner-map {
    width: 100%;
    height: 100%;
}

/* 2. Content becomes Bottom Sheet */
body.map-mode #wizard-content-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45vh;
    /* Occupy bottom 45% of screen */
    z-index: 10;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    padding-bottom: 90px;
    /* Space for fixed controls */
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    transition: height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Sidebar styling tweaks */
body.map-mode .wizard-step {
    max-width: none;
    margin: 0;
    padding: 0;
    /* Remove padding to let header flush */
    box-shadow: none;
    border: none;
    background: transparent;
    position: absolute;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
}

body.map-mode .hero-section {
    align-items: flex-start;
}

body.map-mode .product-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: none;
    box-shadow: none;
    background: #ffffff;
    width: 100%;
}

/* ── COMPACT HEADER FOR MAP MODE ── */
/* Show Title and Icon, hide description */
body.map-mode .product-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
    background: #ffffff !important;
    /* Solid White Force */
    position: sticky;
    top: 0;
    z-index: 5;
}

body.map-mode .product-icon-box {
    display: block;
    width: 80px !important;
    /* Bigger Icon Force */
    height: 80px !important;
    flex-shrink: 0;
    background: transparent !important;
    /* Seamless Force */
    border: none !important;
    /* No Border Force */
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    /* No Shadow Force */
}

body.map-mode .product-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.map-mode .product-info h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
}

/* Hide bulky info in map mode to save space */
body.map-mode .hero-subtitle,
body.map-mode .feature-list,
body.map-mode .product-price-tag {
    display: none;
}

/* Show minimal header in controls */
body.map-mode .product-controls {
    padding: 24px;
    padding-bottom: 120px !important;
    /* Extra padding for fixed footer overlap */
    /* Restore padding for controls */
    border: none;
    background: transparent;
    max-height: 40vh;
    /* Limit height to keep map visible */
    overflow-y: auto;
}

body.map-mode .control-header {
    margin-bottom: 16px;
    padding-bottom: 16px;
    display: none !important;
    /* Hide "System Status" since we have Title now */
}

/* 3. Map Tools Overlay (FABs at Bottom Right) */
body.map-mode .planner-toolbar {
    position: fixed !important;
    /* Fixed to viewport */
    bottom: 90px !important;
    /* Above Footer (80px + 10px margin) */
    right: 20px !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: none;
    pointer-events: none;
    z-index: 9999 !important;
    /* Above Everything */
}

body.map-mode .planner-tool {
    pointer-events: auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    /* Hide text labels */
    padding: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.map-mode .planner-tool .tool-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin: 0;
}

/* Restore font size for icon-only tools */
body.map-mode .planner-tool[data-mode="select"],
body.map-mode .planner-tool[data-mode="delete"] {
    font-size: 1.5rem;
}

body.map-mode .planner-tool:active {
    transform: scale(0.9);
}

body.map-mode .planner-tool.active {
    background: var(--accent);
    color: #ffffff;
}

/* Invert dot/text color when active if needed, but for dots it's fine */
body.map-mode .planner-tool.active .tool-dot {
    border: 2px solid #fff;
}

body.map-mode .tool-divider {
    display: none;
}

/* 4. Legend Overlay (Bottom Left, above wizard controls) */
body.map-mode .planner-legend {
    position: fixed;
    bottom: 70px;
    left: 16px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-direction: row;
    align-items: center;
    gap: 8px;
    border: none;
    z-index: 1002;
    font-size: 0.7rem;
}

/* 5. Fixed Wizard Footer stays on top */
body.map-mode #wizard-controls {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1001 !important;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    pointer-events: auto !important;
    display: flex !important;
    justify-content: space-between !important;
    flex-direction: row !important;
}

body.map-mode .control-btn {
    padding: 10px 22px;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 6. Ensure Stories Selector Wraps */
.stories-selector {
    flex-wrap: wrap !important;
}

/* 7. Adjust Map Container Z-Index */
body.map-mode #app-map-container {
    z-index: 1;
    /* Below UI */
}

body.map-mode.header-panel-open #app-map-container,
body.map-mode.header-panel-open .planner-toolbar,
body.map-mode.header-panel-open #wizard-controls {
    pointer-events: none !important;
}

body.map-mode.header-panel-open .planner-toolbar,
body.map-mode.header-panel-open #wizard-controls,
body.map-mode.header-panel-open #instruction-toast {
    display: none !important;
}

body.map-mode.header-panel-open #planner-map,
body.map-mode.header-panel-open #planner-map * {
    pointer-events: none !important;
}

body.map-mode #header-dropdown-panel.open {
    top: 70px;
    min-height: 55dvh;
    height: auto;
    max-height: calc(100dvh - 70px);
    overflow: hidden;
    touch-action: none;
}

body.map-mode #wizard-content-container {
    z-index: 999;
    /* Above Map (1) but below Tools (60) */
    position: fixed !important;
    top: 120px !important;
    /* Fixed below header */
    bottom: auto !important;
    /* Reset bottom */
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    margin: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    /* Let clicks pass through container area */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Align to top */
    background: transparent !important;
    backdrop-filter: none !important;
    /* REMOVE OPAQUE BOX */
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}



/* ── COMPACT HEADER FOR MAP MODE: HIDDEN (Replaced by Header Nav Strip) ── */
body.map-mode #wizard-container .product-card {
    display: none !important;
}

/* Collapse toggle chevron — HIDDEN (replaced by header dropdown) */
.card-collapse-toggle {
    display: none !important;
}

body.map-mode .card-collapse-toggle {
    display: none !important;
}

body.map-mode .card-collapse-toggle:hover {
    opacity: 1;
}

/* Collapsed state: hide options, keep title + stepper */
body.map-mode .product-card.card-collapsed .sub-heading,
body.map-mode .product-card.card-collapsed .conveyance-grid {
    display: none !important;
}

/* ... existing styles ... */

body.map-mode .input-group {
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    width: auto !important;
    min-width: 100px;
    height: 100%;
}

body.map-mode .stepper {
    margin: 0 !important;
    background: #f5f5f7;
    border-radius: 20px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 2px;
    width: auto !important;
    height: 36px !important;
}

body.map-mode .stepper-btn {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--primary);
}

body.map-mode .stepper-value {
    min-width: 24px;
    font-size: 1rem;
    text-align: center;
    display: block !important;
    line-height: 32px;
    font-weight: 600;
}

body.map-mode .product-info {
    display: flex;
    /* Override previous flex/none */
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
    background: transparent !important;
    position: static;
    /* Let it flow in flex */
    width: auto !important;
    flex: 0 0 auto !important;
}

body.map-mode .product-icon-box {
    display: block !important;
    width: 40px !important;
    /* Slightly bigger icon */
    height: 40px !important;
    flex-shrink: 0;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

body.map-mode .product-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.map-mode .product-info h2 {
    font-size: 1rem !important;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Hide bulky info */
body.map-mode .hero-subtitle,
body.map-mode .feature-list,
body.map-mode .product-price-tag {
    display: none !important;
}

/* Show minimal controls (Stepper + Piping) */
body.map-mode .product-controls {
    padding: 0 !important;
    border: none;
    background: transparent;
    max-height: none !important;
    overflow: visible !important;
    width: 100% !important;
    height: auto !important;
    min-height: unset;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

/* Hide control-header toggle in map mode */
body.map-mode .product-controls>.control-header {
    display: none !important;
}

/* Compact sub-headings as tiny labels */
body.map-mode .sub-heading {
    font-size: 0.55rem !important;
    letter-spacing: 1.5px;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    color: var(--text-dim);
    font-weight: 700;
}

/* Compact conveyance grid: horizontal inline pills */
body.map-mode .conveyance-grid {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px;
    margin: 0 !important;
}

body.map-mode .conveyance-grid .radio-card {
    flex: 1;
    padding: 4px 6px !important;
    border-radius: 8px !important;
    border: 1.5px solid var(--border) !important;
    min-height: unset !important;
    cursor: pointer;
}

body.map-mode .conveyance-grid .radio-card.active {
    border-color: var(--navy) !important;
    background: rgba(30, 58, 95, 0.06) !important;
}

body.map-mode .conveyance-grid .radio-card-inner {
    padding: 0 !important;
}

body.map-mode .conveyance-grid .radio-card-header {
    gap: 2px;
}

body.map-mode .conveyance-grid .radio-dot {
    display: none !important;
}

body.map-mode .conveyance-grid .radio-title {
    font-size: 0.55rem !important;
    font-weight: 700;
    letter-spacing: 0.5px;
}

body.map-mode .conveyance-grid .radio-price {
    font-size: 0.5rem !important;
    color: var(--text-dim);
}

body.map-mode .conveyance-grid .radio-desc {
    display: none !important;
}

body.map-mode .input-group,
body.map-mode .coverage-card-inline {
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    width: auto !important;
    min-width: 100px;
    height: 100%;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

body.map-mode .coverage-card-inline .coverage-left {
    display: none !important;
}

body.map-mode .coverage-card-inline>div {
    display: flex !important;
    align-items: center;
    width: auto !important;
}

body.map-mode .input-group label,
body.map-mode .coverage-card-inline label {
    display: none !important;
    /* Hide "UNIT QUANTITY" / "ACTUAL QUANTITY" label */
}

body.map-mode .stepper {
    margin: 0 !important;
    background: #f5f5f7;
    border-radius: 20px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

body.map-mode .stepper-btn {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
    flex-shrink: 0;
    border: none;
    background: transparent;
}

body.map-mode .stepper-value {
    min-width: 30px;
    font-size: 1rem;
    text-align: center;
    display: block !important;
    line-height: 32px;
}

body.map-mode #app-footer {
    display: none;
}

/* ── Product Icons (General) ───────────────────────────── */
.product-icon-box {
    width: 64px;
    height: 64px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.product-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    position: relative;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.legend-item strong {
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* ── Autocomplete Dropdown ─────────────────────────────── */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-top: none;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 10px 14px;
    font-size: 0.8rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    background: var(--bg-card);
    transition: background var(--transition);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--accent-bg);
    color: var(--accent);
}

.autocomplete-item strong {
    font-weight: 700;
}

/* ── Tax Input Styling ──────────────────────────────────── */
#input-tax {
    width: 60px;
    border: none;
    border-bottom: 2px solid var(--border);
    text-align: center;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    padding: 4px;
    margin: 0 4px;
    border-radius: 0;
}

#input-tax:focus {
    box-shadow: none;
    border-color: var(--accent);
    background: rgba(228, 48, 48, 0.05);
}

/* ── Desktop Layout ──────────────────────────────────────── */
@media (min-width: 1024px) {

    body,
    html {
        overflow: hidden;
        height: 100vh;
    }

    #app-header {
        height: 112px;
    }

    #configurator {
        height: calc(100vh - 112px);
        padding: 10px 0 0 0;
        justify-content: flex-start;
        align-items: center;
        max-width: 1600px;
    }

    .hero-section {
        height: auto;
        width: 100%;
        align-items: flex-start;
        padding: 0 40px;
    }

    .product-card {
        height: auto;
        margin: 0;
        border: 2px solid var(--border);
    }

    /* ── Controls Panel ───────────────────────────────────── */
    .product-info {
        padding: 3vh 3vw;
        border-right: 1px solid var(--border-heavy);
        flex: 0 0 38%;
    }

    .product-controls {
        padding: 3vh 3vw;
        justify-content: flex-start;
        overflow-y: auto;
        flex: 0 0 62%;
    }

    /* Control Header (System Status) */
    .product-controls .control-header {
        margin-bottom: 1.5vh !important;
        padding-bottom: 1vh !important;
    }

    /* Coverage Card Inline */
    .coverage-card-inline {
        padding: 14px 20px;
        margin-bottom: 14px;
        gap: 20px;
    }

    .coverage-count {
        font-size: 2rem;
    }

    .coverage-unit {
        font-size: 0.55rem;
    }

    /* Sub Headings */
    .product-controls .sub-heading {
        margin-bottom: 8px;
        font-size: 0.65rem;
    }

    /* ── Conveyance Grids: HORIZONTAL ────────────────────── */
    .product-controls .conveyance-grid {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 14px;
    }

    .product-controls .conveyance-grid .radio-card {
        flex: 1;
    }

    /* ── Radio Cards ──────────────────────────────────────── */
    .product-controls .radio-card-inner {
        padding: 12px 16px;
    }

    .product-controls .radio-card-header {
        margin-bottom: 0;
    }

    .product-controls .radio-title {
        font-size: 0.8rem;
    }

    .product-controls .radio-price {
        font-size: 0.75rem;
    }

    .product-controls .radio-desc {
        font-size: 0.7rem;
        margin-top: 4px;
    }

    /* ── Product Info: Compact ────────────────────────────── */
    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1vh;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 3vh;
    }

    .product-info h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5vh;
    }

    .product-info .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .feature-list {
        margin-bottom: 12px;
        line-height: 1.3;
        font-size: 0.8rem;
    }

    .feature-list li {
        margin-bottom: 4px;
    }

    .product-price-tag {
        padding: 10px !important;
        font-size: 0.85rem;
    }

    /* ── Stepper: Compact ────────────────────────────────── */
    .stepper-value {
        font-size: 1.2rem;
        min-width: 36px;
    }

    .stepper-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    /* Control header inline fixes */
    .status-text {
        font-size: 0.7rem;
    }

    .input-group {
        margin-bottom: 1.5vh;
    }
}

/* Hide manual place buttons, keep Select/Delete */
.planner-tool[data-mode="roof"],
.planner-tool[data-mode="eave"],
.planner-tool[data-mode="tripod"],
.tool-divider {
    display: none !important;
}

/* Instruction Toast */
#instruction-toast {
    position: fixed;
    top: 180px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    backdrop-filter: blur(4px);
}

#instruction-toast.visible {
    opacity: 1;
}

/* ── Price Spectrum Component ────────────────────────────── */
.price-spectrum-wrapper {
    margin: 28px 0 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}

.spectrum-labels {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.spec-label {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

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

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

.spec-title {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 2px;
    text-transform: uppercase;
}

.spec-val {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.spectrum-bar-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    width: 100%;
    background: #e2e8f0;
    margin-bottom: 40px;
}

.spectrum-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #94a3b8 0%, var(--accent) 100%);
    border-radius: inherit;
    transition: width 0.45s ease;
}

.spectrum-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 2;
    transition: left 0.45s ease;
}

.spectrum-marker-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--accent);
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Review Install Selector (Tool Style) ────────────────── */
.install-selector-group {
    display: flex;
    gap: 12px;
}

.install-tool {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid transparent;
    /* Prevent layout shift */
    padding: 8px 16px;
    border-radius: 20px;
    /* Pill shape */
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* Match tool shadow roughly */
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.install-tool:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.install-tool:active {
    transform: scale(0.98);
}

.install-tool.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ── Early Pricing Section (Step 1) ──────────────────────── */
.early-pricing-section {
    margin-top: 32px;
    padding: 32px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    animation: fadeIn 0.4s ease;
}

.early-pricing-header {
    text-align: center;
    margin-bottom: 24px;
}

.early-pricing-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.early-pricing-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.early-rec-counts {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 28px;
}

.early-rec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.early-rec-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.early-rec-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.early-rec-unit {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.early-spectrum {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.early-pricing-note {
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: center;
    font-style: italic;
}

/* ── Step 1 Setup Path Block ─────────────────────────────── */
.setup-path-form {
    margin-top: 20px;
}

.setup-path-title {
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.setup-path-subtitle {
    font-size: 0.95rem;
    margin-bottom: 20px;
    max-width: none;
}

.founder-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.founder-note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    font-weight: 800;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 2px 8px;
    margin-bottom: 6px;
}

.founder-note-title {
    margin: 0 0 4px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.founder-note-copy {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-dim);
}

.labor-estimate-box {
    margin-top: 20px;
    text-align: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.skip-mapping-choice {
    margin-top: 32px;
}

.mapping-choice-title {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.mapping-choice-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.mapping-choice-btn {
    flex: 1;
    max-width: 240px;
}

.mapping-note {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 10px;
    font-style: italic;
}

.mapping-note-alert {
    color: var(--accent);
}

@media (max-width: 640px) {
    .setup-path-title {
        font-size: 1.05rem;
    }

    .mapping-choice-actions {
        flex-direction: column;
    }

    .mapping-choice-btn {
        width: 100%;
        max-width: none;
    }
}

/* ── Review Quantity Badge ───────────────────────────────── */
.review-qty {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    background: #f3f4f6;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: auto;
    margin-right: 12px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ── Review Screen: Mobile First ─────────────────────────── */
.review-hero {
    align-items: flex-start;
}

.order-review-card {
    flex-direction: column;
    border: 1px solid var(--border);
    box-shadow: 0 14px 34px rgba(10, 25, 47, 0.08);
    background: #fff;
}

.review-header {
    padding: 24px 18px 18px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.review-eyebrow {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.review-header h2 {
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 8px;
}

.review-subtitle {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.review-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
}

.review-totals,
.review-details {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}

.review-totals {
    background: #f8fafc;
}

.review-section-head {
    margin-bottom: 12px;
}

.review-details>.review-section-head:not(:first-child) {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e7edf4;
}

.review-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.review-section-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.review-row {
    border-top: 1px solid #edf2f7;
    padding-top: 14px;
    margin-top: 14px;
}

.review-row:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.review-row-install,
.review-system-row {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;
    background: #fff;
}

.review-section-head+.review-row-install,
.review-section-head+.review-system-row {
    margin-top: 16px;
}

.review-row-install:first-of-type,
.review-system-row:first-of-type {
    margin-top: 0;
}

.review-row-contact {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    background: #fff;
}

.review-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.review-contact-span-all {
    grid-column: 1 / -1;
}

.review-row-contact .input-group.compact {
    margin-bottom: 0;
}

.review-row-contact .input-group.compact label {
    font-size: 0.62rem;
    margin-bottom: 6px;
}

.review-row-contact .input-note {
    font-weight: 500;
    color: var(--text-dim);
    font-size: 0.62rem;
}

.review-row-contact input[type="text"],
.review-row-contact input[type="email"],
.review-row-contact input[type="tel"],
.review-row-contact input[type="number"] {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.review-breakdown-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    background: #fff;
}

.review-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.review-breakdown-row:last-child {
    border-bottom: none;
}

.review-breakdown-row span:last-child {
    font-weight: 700;
    color: var(--text-primary);
}

.review-breakdown-total {
    margin-top: 2px;
    padding-top: 9px;
}

.review-breakdown-meta {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.review-breakdown-grand {
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--text-primary);
    border-bottom: none;
    font-size: 0.92rem;
}

.review-breakdown-grand span:last-child {
    color: var(--accent);
    font-weight: 800;
}

.row-control-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.review-system-head {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-box-visual {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-heavy);
    border-radius: 6px;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-label input:checked~.check-box-visual {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input:checked~.check-box-visual::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 42%;
    width: 5px;
    height: 9px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(-50%, -50%) rotate(45deg);
}

.review-system-name {
    line-height: 1.25;
}

.review-system-head .checkbox-label {
    flex: 1;
    min-width: 0;
}

.review-options {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.review-config-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-config-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.review-trim-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-trim-option {
    border: 1px solid var(--border-heavy);
    border-radius: 10px;
    padding: 9px 10px;
    min-height: 40px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1 1 140px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.review-trim-option input[type="radio"],
.review-trim-option input[type="checkbox"] {
    display: none;
}

.review-trim-option.active {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.review-trim-option.disabled {
    display: none;
}

.review-config-note {
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-dim);
}

.bom-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.review-system-head .bom-right {
    margin-top: 0;
    min-width: 128px;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 8px;
}

.review-stepper {
    background: #f1f5f9;
    border-radius: 999px;
    padding: 2px;
}

.review-stepper .stepper-btn {
    background: transparent;
    width: 34px;
    height: 34px;
}

.review-stepper .stepper-value {
    min-width: 28px;
    font-size: 0.98rem;
}

.review-row .bom-cost {
    min-width: 84px;
    font-size: 1rem;
    font-weight: 700;
}

.review-row-equipment {
    padding: 2px 2px 0;
    margin: 8px 0 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sub-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.install-selector-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.install-tool {
    border: 1px solid var(--border-heavy);
    background: #fff;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.16s ease;
}

.install-tool.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

.total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 1rem;
}

.total-value {
    font-weight: 700;
}

.total-row-meta {
    font-size: 0.76rem;
    color: var(--text-dim);
    padding-top: 2px;
    padding-bottom: 10px;
}

.total-row-tax {
    border-top: 1px dashed var(--border);
    padding-top: 12px;
}

.tax-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
}

.tax-input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
}

.review-totals #input-tax {
    width: 62px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-heavy);
    background: #fff;
    font-size: 0.86rem;
    text-align: right;
}

.review-totals #input-tax:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 40, 85, 0.12);
}

.grand-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 2px solid var(--text-primary);
}

.review-totals .price-spectrum-wrapper+.grand-total-row {
    margin-top: 38px;
}

.grand-total-row span:first-child {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.grand-total-row #sum-grand {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    color: var(--accent);
}

.disclaimer {
    margin-top: 12px;
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--text-dim);
}

.submit-feedback {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    line-height: 1.4;
}

.submit-feedback.info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

.submit-feedback.success {
    background: #ecfdf3;
    border-color: #86efac;
    color: #166534;
}

.submit-feedback.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

@media (max-width: 767px) {
    .review-body {
        gap: 14px;
        padding-bottom: 20px;
    }

    .review-contact-grid {
        grid-template-columns: 1fr;
    }

    .review-row-install {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .review-row-install .bom-cost {
        align-self: flex-end;
        font-size: 1.25rem;
    }

    .install-selector-group {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .install-tool {
        width: 100%;
        text-align: center;
        padding: 9px 8px;
        letter-spacing: 0.06em;
    }

    .review-system-row {
        padding: 14px;
    }

    .review-system-head .bom-right {
        min-width: 0;
    }

    .review-system-head .bom-cost {
        font-size: 1.15rem;
    }

    .review-trim-option {
        flex: 1 1 132px;
        min-height: 42px;
    }

    .review-totals .price-spectrum-wrapper+.grand-total-row {
        margin-top: 44px;
    }
}

@media (min-width: 768px) {
    .review-header {
        padding: 30px 28px 22px;
    }

    .review-header h2 {
        font-size: 1.95rem;
    }

    .review-body {
        padding: 22px;
        gap: 18px;
    }

    .review-details,
    .review-totals {
        padding: 20px;
    }

    .review-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grand-total-row #sum-grand {
        font-size: 2.35rem;
    }
}

@media (min-width: 1080px) {
    .review-body {
        grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
        align-items: start;
    }

    .review-details {
        grid-column: 1;
        grid-row: 1;
    }

    .review-totals {
        grid-column: 2;
        grid-row: 1;
        position: sticky;
        top: 92px;
    }

    .row-control-group {
        flex: 1;
        min-width: 0;
    }

    .review-system-head .bom-right {
        min-width: 170px;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .review-body {
        padding: 12px;
        gap: 12px;
    }

    .review-header {
        padding: 20px 14px 16px;
    }

    .review-totals,
    .review-details {
        padding: 14px;
    }

    .spectrum-labels {
        flex-direction: column;
        gap: 6px;
    }

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

/* ── Mobile Map-Mode: constrain content height ───────────── */
@media (max-width: 1024px) {
    body.map-mode #wizard-content-container {
        max-height: 25vh !important;
        overflow-y: auto;
    }
}

/* ── Navigation Footer ───────────────────────────────────── */
#wizard-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

#wizard-controls .control-btn {
    flex: 1;
    max-width: 140px;
    padding: 12px 0;
    font-size: 0.9rem;
    white-space: nowrap;
    border-radius: var(--radius);
}

#step-indicator {
    flex: 0 0 auto;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-secondary);
}

/* Add padding to prevent content overlap */
#configurator {
    padding-bottom: 80px;
}

/* ── Rebuilt Header Config Overlay ───────────────────────── */
#header-dropdown-scrim {
    position: fixed !important;
    top: 84px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(10, 25, 47, 0.12) !important;
    z-index: 49000 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.18s ease !important;
}

#header-dropdown-scrim.open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#header-dropdown-panel {
    position: fixed !important;
    top: 84px !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 50000 !important;
    display: none !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 44px rgba(10, 25, 47, 0.26) !important;
    padding: 16px !important;
    max-height: none !important;
    overflow: hidden !important;
    pointer-events: auto !important;
    transition: none !important;
}

#header-dropdown-panel.open {
    display: block !important;
}

#header-dropdown-panel .header-config-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

#header-dropdown-panel .header-config-content .control-header {
    display: none !important;
}

#header-dropdown-panel .header-config-content .sub-heading {
    display: block !important;
    margin: 0 !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.12em !important;
    color: var(--text-dim) !important;
}

#header-dropdown-panel .header-config-content .input-group,
#header-dropdown-panel .header-config-content .coverage-card-inline {
    margin: 0 !important;
}

#header-dropdown-panel .header-config-content .conveyance-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin: 0 !important;
}

#header-dropdown-panel .header-config-content .radio-card {
    min-height: 0 !important;
}

#header-dropdown-panel .header-config-content .radio-card-inner {
    padding: 12px !important;
}

#header-dropdown-panel .header-config-content .radio-desc {
    display: block !important;
    font-size: 0.74rem !important;
    line-height: 1.3 !important;
}

body.header-panel-open #app-map-container,
body.header-panel-open #planner-map,
body.header-panel-open #planner-map *,
body.header-panel-open .planner-toolbar,
body.header-panel-open #wizard-controls,
body.header-panel-open #instruction-toast {
    pointer-events: none !important;
}

body.map-mode.header-panel-open .planner-toolbar,
body.map-mode.header-panel-open #wizard-controls,
body.map-mode.header-panel-open #instruction-toast {
    display: none !important;
}

body.map-mode #header-dropdown-scrim {
    top: 70px !important;
}

body.map-mode #header-dropdown-panel {
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-radius: 0 0 14px 14px !important;
    min-height: 55dvh !important;
    max-height: calc(100dvh - 70px - 8px) !important;
    padding: 14px 16px 16px !important;
}

@media (max-width: 640px) {
    #header-dropdown-panel .header-config-content .conveyance-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Mapping Screen Rebuild (Map It Myself Path) ─────────── */
:root {
    --map-mode-header-offset: 84px;
}

@media (max-width: 1024px) {
    :root {
        --map-mode-header-offset: 70px;
    }
}

/* Keep options panel scrollable; avoid clipping controls. */
#header-dropdown-panel {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

#header-dropdown-panel.open {
    max-height: calc(100dvh - 92px) !important;
}

body.map-mode {
    overflow: hidden !important;
}

body.map-mode #configurator {
    min-height: calc(100dvh - var(--map-mode-header-offset)) !important;
    padding-bottom: 0 !important;
}

body.map-mode #app-footer {
    display: none !important;
}

/* Map is the primary canvas; options live in header dropdown. */
body.map-mode #wizard-content-container {
    display: none !important;
}

body.map-mode #app-map-container {
    position: fixed !important;
    top: var(--map-mode-header-offset) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    z-index: 100 !important;
    display: block !important;
}

body.map-mode #planner-map {
    width: 100% !important;
    height: calc(100dvh - var(--map-mode-header-offset)) !important;
}

body.map-mode .planner-toolbar {
    bottom: 88px !important;
    right: 16px !important;
    z-index: 32000 !important;
}

body.map-mode #wizard-controls {
    z-index: 31000 !important;
}

body.map-mode #instruction-toast {
    z-index: 33000 !important;
}

body.map-mode #header-dropdown-scrim {
    top: var(--map-mode-header-offset) !important;
    z-index: 39000 !important;
}

body.map-mode #header-dropdown-panel {
    top: var(--map-mode-header-offset) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 40000 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-radius: 0 0 14px 14px !important;
    max-height: calc(100dvh - var(--map-mode-header-offset)) !important;
    touch-action: pan-y !important;
    overscroll-behavior: contain;
}

body.map-mode.header-panel-open #app-map-container,
body.map-mode.header-panel-open #planner-map,
body.map-mode.header-panel-open #planner-map * {
    pointer-events: none !important;
}

body.map-mode.header-panel-open .planner-toolbar,
body.map-mode.header-panel-open #wizard-controls,
body.map-mode.header-panel-open #instruction-toast {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* UI polish overrides */
:root {
    --bg-body: #f3f7fb;
    --surface: #ffffff;
    --surface-muted: #f8fbff;
    --border-soft: #cdd9e5;
    --accent: #0e2a47;
    --accent-muted: #1f4f83;
    --focus-ring: rgba(14, 42, 71, 0.22);
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --heading-font: 'Sora', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background:
        radial-gradient(circle at 15% -10%, rgba(31, 79, 131, 0.14), transparent 48%),
        radial-gradient(circle at 90% 0%, rgba(14, 42, 71, 0.08), transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
}

h1,
h2,
h3,
.review-section-title,
#step-indicator-label {
    font-family: var(--heading-font);
}

#app-header {
    border-top: 4px solid var(--accent);
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px rgba(10, 25, 47, 0.08);
}

.header-inner {
    max-width: 1080px;
    padding: 12px 22px;
    position: relative;
}

.reset-session-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid #c9d7e4;
    background: rgba(255, 255, 255, 0.88);
    color: #5a6f84;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 14px;
    line-height: 1;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.reset-session-btn:hover {
    border-color: #91aac3;
    color: #2f4c67;
    background: #ffffff;
}

.reset-session-btn.hidden {
    display: none !important;
}

#configurator {
    max-width: 1160px;
    padding-top: 24px;
}

.hero-content {
    max-width: 980px;
}

.hero-content h1 {
    font-size: clamp(2rem, 4.2vw, 3.3rem);
    margin-bottom: 10px;
}

.hero-subtitle {
    color: #425f7d;
    margin-bottom: 34px;
}

.hero-form,
.product-card,
.order-review-card,
.review-details,
.review-totals {
    border: 1px solid var(--border-soft);
    box-shadow: 0 18px 48px rgba(10, 25, 47, 0.08);
}

.hero-form {
    background: linear-gradient(180deg, #ffffff 0%, var(--surface-muted) 100%);
}

.input-group label {
    color: #425466;
    letter-spacing: 0.08em;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"] {
    background: #fcfdff;
    border-color: #becddb;
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 1rem;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.radio-card {
    border-color: #c5d3e1;
}

.radio-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(14, 42, 71, 0.18);
}

.control-btn {
    min-height: 46px;
    border-radius: 12px;
    letter-spacing: 0.11em;
    box-shadow: none;
}

.control-btn.primary {
    background: linear-gradient(180deg, #19477a 0%, var(--accent) 100%);
    color: #ffffff;
}

.control-btn.primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #23568f 0%, #12365c 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(14, 42, 71, 0.26);
}

.control-btn.secondary {
    background: #f4f8fd;
    border: 1px solid #bfd0e2;
    color: #27435f;
}

.control-btn.secondary:hover:not(:disabled) {
    background: #ebf3fb;
    border-color: #90abc5;
}

.control-btn:focus-visible,
.stepper-btn:focus-visible,
.planner-tool:focus-visible,
.nav-strip-chevron:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-ring);
}

#wizard-controls {
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid var(--border-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 14px;
    gap: 12px;
}

#wizard-controls .control-btn {
    max-width: 170px;
}

.step-indicator-shell {
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

#step-indicator-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    color: #36506b;
    text-transform: uppercase;
    white-space: nowrap;
}

.step-progress-track {
    display: block;
    width: clamp(160px, 28vw, 280px);
    height: 6px;
    border-radius: 999px;
    background: #d7e4f0;
    overflow: hidden;
}

#step-progress-fill {
    display: block;
    height: 100%;
    width: 16.66%;
    background: linear-gradient(90deg, #2a6ba6 0%, var(--accent) 100%);
    border-radius: inherit;
    transition: width 0.25s ease;
}

.mapping-choice-btn.is-unavailable,
.mapping-choice-btn:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    filter: saturate(0.45);
}

.autocomplete-results {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(10, 25, 47, 0.14);
    max-height: 220px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 10px 12px;
    border-bottom: 1px solid #edf3fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f1f6fd;
}

#smart-start {
    margin-top: 42px;
    margin-bottom: 24px;
}

.planning-options-form {
    text-align: center;
}

.early-pricing-section,
.planning-options-form {
    border: 1px solid #c9d9e9;
    border-radius: 16px;
    background: #f8fbff;
    box-shadow: 0 10px 28px rgba(10, 25, 47, 0.06);
}

.early-pricing-section {
    padding: 34px 24px;
}

.early-pricing-header h3,
.setup-path-title {
    font-family: var(--heading-font);
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #0e223a;
    margin-bottom: 10px;
}

.early-pricing-sub,
.setup-path-subtitle {
    font-size: 1.02rem;
    line-height: 1.45;
    color: #486682;
    max-width: 640px;
    margin: 0 auto 24px;
}

.planning-options-form {
    padding: 30px 20px;
}

.planning-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.planning-option-block {
    border: 1px solid #c9d9e9;
    border-radius: 14px;
    background: #ffffff;
    padding: 16px;
    text-align: left;
}

.planning-option-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2f4c67;
    margin-bottom: 6px;
}

.planning-option-copy {
    margin: 0 0 12px;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #526c86;
}

.unified-install-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.install-pill {
    min-height: 66px;
}

.install-pill input {
    display: none;
}

.install-pill-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
}

.install-pill-title {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #243e58;
}

.install-pill-subtitle {
    font-size: 0.75rem;
    color: #607991;
}

.unified-workflow-actions {
    justify-content: stretch;
    gap: 10px;
}

.unified-workflow-actions .mapping-choice-btn {
    max-width: none;
    flex: 1 1 auto;
    min-height: 52px;
}

.completion-checklist {
    border: 1px solid #bfd0e1;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px;
    margin: 0 0 16px;
}

.completion-checklist h4 {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #24415d;
    margin-bottom: 10px;
}

.checklist-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #526a84;
    font-size: 0.82rem;
}

.checklist-dot {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    border: 2px solid #9ab2ca;
    background: transparent;
    flex-shrink: 0;
}

.checklist-item.complete {
    color: #1b5d3f;
    font-weight: 700;
}

.checklist-item.complete .checklist-dot {
    border-color: #1b5d3f;
    background: #1b5d3f;
    box-shadow: 0 0 0 2px rgba(27, 93, 63, 0.18);
}

.completion-checklist-note {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #607991;
}

.completion-checklist.complete .completion-checklist-note {
    color: #1b5d3f;
    font-weight: 700;
}

.completion-checklist.complete {
    border-color: #8dc7aa;
    background: #eefaf2;
}

.review-totals .review-section-title {
    margin-bottom: 10px;
}

.review-totals {
    border: 1px solid #b8cbe0;
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(10, 25, 47, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.review-breakdown-card {
    margin-top: 0;
    background: transparent;
    border: 1px solid #c3d3e4;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.review-breakdown-row {
    background: transparent;
}

.review-row-install.review-row,
.review-system-row.review-row {
    border: 1px solid #c3d3e4;
    margin-top: 12px;
    padding: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.review-section-head + .review-row-install.review-row {
    margin-top: 20px;
}

.review-row-equipment {
    margin: 12px 0 0;
    padding: 4px 2px 0;
}

.review-breakdown-tax-row {
    gap: 12px;
}

.review-breakdown-tax-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.review-breakdown-tax-label .tax-input-wrap {
    font-size: 0.84rem;
}

.review-breakdown-tax-label #input-tax {
    width: 62px;
    text-align: right;
}

.review-breakdown-grand span:first-child {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.review-breakdown-grand span:last-child {
    font-size: clamp(2rem, 4.8vw, 2.8rem);
    font-weight: 900;
    line-height: 1;
}

.price-spectrum-wrapper {
    margin: 20px 0 10px;
}

.spectrum-bar-track {
    margin-bottom: 54px;
}

.spectrum-marker-label {
    bottom: -36px;
}

#price-spectrum-display + .disclaimer {
    margin-top: 16px;
}

.review-details {
    overflow: hidden;
}

.review-details > .review-section-head:not(:first-child) {
    border-top: none;
    margin-top: 24px;
    padding-top: 20px;
    position: relative;
}

.review-details > .review-section-head:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8px;
    right: 8px;
    height: 1px;
    background: #dfe9f3;
}

@media (min-width: 760px) {
    .planning-options-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .unified-install-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1080px) {
    .planning-option-block:last-child {
        grid-column: span 2;
    }
}

#instruction-toast {
    background: rgba(14, 42, 71, 0.92);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .header-inner {
        padding: 10px 14px;
    }

    .reset-session-btn {
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.68rem;
        padding: 7px 12px;
    }

    .hero-form {
        padding: 30px 20px;
    }

    .step-indicator-shell {
        min-width: 0;
    }

    #step-indicator-label {
        font-size: 0.64rem;
    }

    .step-progress-track {
        width: 132px;
    }

    .unified-install-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    #wizard-controls .control-btn {
        max-width: 132px;
    }

    #step-indicator-label {
        letter-spacing: 0.08em;
    }
}
