* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    /* ── Mint palette ── */
    --mint-50:  #F0FBF6;
    --mint-100: #E3F8EE;
    --mint-200: #BCEFD8;
    --mint-300: #5BDDB1;
    --mint-500: #1FCB8E;
    --mint-600: #0FA876;

    /* ── Ink (neutral) palette ── */
    --ink-50:  #F8FAF9;
    --ink-100: #F2F5F4;
    --ink-200: #D8E0DC;
    --ink-300: #C4CCC8;
    --ink-400: #8E9A94;
    --ink-500: #6E7A74;
    --ink-600: #545F59;
    --ink-700: #3A4640;
    --ink-800: #243028;
    --ink-900: #0E1A14;

    /* ── Semantic aliases ── */
    --paper:    #FFFFFF;
    --bg-page:  #FFFFFF;
    --bg-results: #F5F5F5;
    --leaf-green: #1FCB8E;
    --leaf-gray:  #E0E0E0;
    --foliyo-mint:       #1FCB8E;
    --foliyo-mint-hover: #0FA876;
    --foliyo-mint-light: #E3F8EE;
    --foliyo-mint-dark:  #0FA876;
    --coral-500: #FF6A4D;
    --coral-300: #FF9A87;
    --coral-100: #FFE8E0;

    /* ── Intent palette (generative UI icon tinting) ── */
    --intent-warning-bg:  #fef3c7;
    --intent-warning-fg:  #b45309;
    --intent-info-bg:     #e0f2fe;
    --intent-info-fg:     #0369a1;
    --intent-negative-bg: #fee2e2;
    --intent-negative-fg: #b91c1c;
    --intent-time-bg:     #f3e8ff;
    --intent-time-fg:     #6d28d9;
    --intent-success-bg:  var(--mint-100);
    --intent-success-fg:  var(--mint-600);
    --intent-up-bg:       var(--mint-100);
    --intent-up-fg:       var(--mint-600);
    --intent-down-bg:     #fee2e2;
    --intent-down-fg:     #b91c1c;
    --intent-neutral-bg:  var(--ink-100);
    --intent-neutral-fg:  var(--ink-700);

    /* ── Radius scale (Lemonade-inspired) ── */
    --radius-sm:   12px;
    --radius-md:   18px;
    --radius-lg:   24px;
    --radius-pill: 999px;

    /* ── Typography ── */
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body:    'Inter', sans-serif;

    /* ── Shadows (soft, large-blur, low-opacity) ── */
    --shadow-sm: 0 2px 8px rgba(14, 26, 20, 0.06);
    --shadow-md: 0 8px 24px rgba(14, 26, 20, 0.08);
    --shadow-lg: 0 20px 48px rgba(14, 26, 20, 0.10);

    /* ── 4-px spacing scale ── */
    --space-1:  4px;
    --space-2:  8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;

    /* Foliyo type v5 — calibrated to Lemonade's actual published scale.
       Lemonade ratios (Lato): 40/32/24/20/16/14/12 on a 1.47 body line-height,
       hero price 40px/regular in custom Lemonhand. We mimic the structure
       in Inter, keeping numerals tabular and tracking neutral. */
    --fs-display-xxl: 40px;
    --fs-display-xl: 32px;
    --fs-display-lg: 24px;
    --fs-heading-lg: 24px;
    --fs-heading-md: 20px;
    --fs-heading-sm: 16px;
    --fs-body-lg: 16px;
    --fs-body-md: 14px;
    --fs-body-sm: 12px;
    --fs-label-md: 14px;

    --lh-display-xxl: 1.0;
    --lh-display-xl: 1.25;
    --lh-display-lg: 1.55;
    --lh-heading-lg: 1.55;
    --lh-heading-md: 1.55;
    --lh-heading-sm: 1.47;

    --ls-display-xxl: 0;
    --ls-display-xl: 0;
    --ls-display-lg: 0;
    --ls-heading-lg: 0;
    --ls-heading-md: 0;
    --ls-label-md: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; }
body {
    background-color: var(--bg-page);
    color: var(--ink-900);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01", "cv11", "tnum";
}

body.landing-active {
    overflow: hidden;
}

/* Loader Screen */
.loader-screen {
    position: fixed;
    inset: 0;
    background: #FFFFFF;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.loader-logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-icon-large {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--mint-500) 0%, var(--mint-300) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: iconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.logo-icon-large i {
    width: 32px;
    height: 32px;
}

.logo-text-large {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 56px;
    font-weight: 800;
    color: var(--ink-900);
    letter-spacing: -0.05em;
    line-height: 1.2;
    padding-bottom: 10px; /* Space for descenders like 'y' */
    text-transform: lowercase;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    animation: typeFoliyo 1.4s steps(6, end) forwards 0.5s;
}

@keyframes typeFoliyo {
    from { width: 0; }
    to { width: 170px; } /* Measured roughly for "foliyo" at 56px */
}

@keyframes iconPop {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.loader-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Explainer Screen */
.explainer-screen {
    display: none; position: fixed; inset: 0; background: var(--paper); z-index: 1100;
    align-items: center; justify-content: center; padding: 120px 24px 60px;
    overflow-y: auto;
    background-image: 
        radial-gradient(at 0% 100%, rgba(31, 203, 142, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(31, 203, 142, 0.08) 0px, transparent 50%);
}
.explainer-screen.visible { display: flex; }
.explainer-inner { max-width: 960px; width: 100%; text-align: center; }
.explainer-header { margin-bottom: 60px; }
.explainer-eyebrow { 
    color: var(--mint-600); font-weight: 700; text-transform: uppercase; 
    letter-spacing: 0.1em; font-size: 13px; margin-bottom: 16px;
}
.explainer-title { font-size: 48px; font-weight: 800; color: var(--ink-900); line-height: 1.1; letter-spacing: -0.02em; }
.explainer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 80px; text-align: left; }
.explainer-item { padding: 32px; background: white; border-radius: 24px; border: 1px solid var(--ink-100); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.explainer-item:hover { transform: translateY(-8px); box-shadow: 0 12px 32px rgba(0,0,0,0.05); }
.explainer-icon { font-size: 32px; margin-bottom: 24px; background: var(--mint-50); width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 16px; }
.explainer-item h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--ink-900); }
.explainer-item p { font-size: 15px; color: var(--ink-500); line-height: 1.6; }
.explainer-cta { min-width: 240px; }
.explainer-note { margin-top: 24px; font-size: 14px; color: var(--ink-300); }

@media (max-width: 768px) {
    .explainer-grid { grid-template-columns: 1fr; gap: 20px; }
    .explainer-title { font-size: 32px; }
}

/* Single canonical header definition */
header {
    height: 72px;
    padding: 0 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink-100);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 3000;
}
.header-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.header-title { font-size: 14px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.01em; }
.header-progress { display: flex; gap: 4px; }
.header-progress .dot { width: 6px; height: 6px; background: var(--ink-200); border-radius: 50%; }
.header-progress .dot.active { background: var(--foliyo-mint); }
.header-right { display: flex; justify-content: flex-end; align-items: center; justify-self: end; color: var(--ink-400); }
.header-right i { width: 20px; height: 20px; }

.logo-icon { width: 32px; height: 32px; min-width: 32px; min-height: 32px; }
.logo-icon i { width: 18px; height: 18px; }
.logo-text { display: block; font-size: 20px; }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px; /* Squircle for a cooler look */
    background: linear-gradient(135deg, var(--mint-500) 0%, var(--mint-300) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(31, 203, 142, 0.2);
}

.logo-icon i {
    width: 20px;
    height: 20px;
}

.logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--ink-900);
    letter-spacing: -0.04em;
    line-height: 1;
    text-transform: lowercase;
}

/* Landing screen — Lemonade-leaning intro */
.landing-screen {
    display: none; position: fixed; inset: 0; background: var(--paper); z-index: 1000;
    flex-direction: column; align-items: center; justify-content: flex-start; padding: 120px 24px 0;
    overflow-y: auto;
}

.landing-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.bg-scene {
    position: absolute;
    bottom: 0;
    height: 60vh;
    width: 50vw;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bg-scene.revealed {
    opacity: 0.9;
    transform: scale(1);
}

.bg-left {
    left: 0;
    background-image: url('foliyo-park-left.webp');
    background-position: bottom left;
}

.bg-right {
    right: 0;
    background-image: url('foliyo-park-right.webp');
    background-position: bottom right;
}

.landing-bg::after {
    display: none; /* No more gradients needed */
}

.leaf {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('foliyo-leaves.webp');
    background-size: 300px 200px; /* Assuming 3x2 grid on ~600x400 source */
    background-repeat: no-repeat;
    z-index: 3;
    opacity: 0.6;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.leaf-1 { top: 15%; left: -10%; background-position: 0 0; animation: windBlow 40s infinite linear; }
.leaf-2 { top: 45%; left: -10%; background-position: -100px 0; animation: windBlow 50s infinite linear 5s; width: 40px; height: 40px; }
.leaf-3 { top: 25%; left: -10%; background-position: -200px 0; animation: windBlow 35s infinite linear 2s; }
.leaf-4 { top: 75%; left: -10%; background-position: 0 -100px; animation: windBlow 60s infinite linear 10s; width: 30px; height: 30px; }
.leaf-5 { top: 60%; left: -10%; background-position: -100px -100px; animation: windBlow 45s infinite linear 8s; }

.toy-ball {
    position: absolute;
    bottom: 80px;
    left: 5%; 
    width: 30px;
    height: 30px;
    background-image: url('foliyo-ball.webp');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 3;
    animation: slowBall 25s infinite ease-in-out;
    opacity: 0.4;
    mix-blend-mode: multiply;
}

@keyframes windBlow {
    0% { transform: translateX(0) translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateX(120vw) translateY(100px) rotate(720deg); opacity: 0; }
}

@keyframes slowBall {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
    50% { transform: translateX(100px) translateY(-20px) rotate(180deg); }
}

.landing-screen.visible { display: flex; }
body.landing-active .theme-intro-container,
body.landing-active .app-layout,
body.landing-active .human-escape { 
    display: none !important; 
}

.landing-inner { 
    max-width: 840px; 
    text-align: center; 
    position: relative; 
    z-index: 10; 
    margin-bottom: 5vh;
    padding: 60px 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-inner.revealed {
    opacity: 1;
    transform: translateY(0);
}
.landing-eyebrow { 
    display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: 0.1em; 
    text-transform: uppercase; color: var(--mint-600); background: var(--mint-50); 
    padding: 8px 18px; border-radius: 999px; margin-bottom: 40px; 
    box-shadow: 0 4px 12px rgba(31, 203, 142, 0.1);
}
.landing-hero { 
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(48px, 9vw, 84px); line-height: 1.0; font-weight: 800; 
    color: var(--ink-900); letter-spacing: -0.05em; margin: 0 auto 32px; max-width: 900px; 
}
.landing-mint { 
    color: var(--mint-500); 
    background: linear-gradient(120deg, var(--mint-500) 0%, var(--mint-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.landing-sub { 
    font-size: 20px; line-height: 1.6; font-weight: 400; color: var(--ink-500); 
    max-width: 580px; margin: 0 auto 56px; 
}
.landing-cta { 
    width: auto; min-width: 280px; padding: 0 48px; height: 64px; 
    border-radius: 999px; font-size: 18px; font-weight: 700;
    box-shadow: 0 20px 40px rgba(31, 203, 142, 0.2);
}
.landing-cta:hover { transform: translateY(-2px); box-shadow: 0 25px 50px rgba(31, 203, 142, 0.3); }

.landing-foot { margin-top: 40px; font-size: 14px; color: var(--ink-400); display: flex; align-items: center; justify-content: center; gap: 24px; }
.landing-trust { display: flex; align-items: center; gap: 8px; opacity: 0.7; }
.landing-trust i { width: 16px; height: 16px; color: var(--mint-500); }

@media (max-width: 600px) {
    .landing-hero { font-size: 42px; }
    .landing-sub { font-size: 17px; }
    .landing-cta { min-width: 100%; }
}
/* Logo styles handled in header section */

.app-layout { display: flex; height: calc(100dvh - 72px); width: 100%; position: relative; }

/* INTRO */
.theme-intro-container {
    padding: 24px 60px;
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--ink-100);
}
@media (max-width: 768px) {
    .theme-intro-container {
        top: 64px !important; /* Pin precisely below fixed header */
        padding: 20px 24px;
        z-index: 2000;
    }
}
.theme-intro-title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    letter-spacing: -0.012em;
    color: var(--ink-900);
    margin-bottom: 6px;
}
.theme-intro-subtitle {
    font-size: 16px;
    line-height: 24px;
    color: var(--ink-500);
}

/* SIDEBAR */
.theme-sidebar { width: 220px; padding: 40px 0 40px 24px; display: flex; flex-direction: column; border-right: 1px solid var(--ink-100); background: var(--paper); --nav-center: 16px; height: 100%; overflow-y: auto; }

.theme-list { display: flex; flex-direction: column; gap: 40px; position: relative; padding-left: 0; }
.theme-progress-line { 
    position: absolute; left: 16px; top: 0; bottom: 0; width: 4px; 
    background: var(--leaf-gray); border-radius: 2px; transform: translateX(-50%); z-index: 0;
}
.theme-progress-active {
    position: absolute; left: 16px; top: 0; width: 4px; 
    background: var(--leaf-green); border-radius: 2px;
    height: var(--progress-height, 0%);
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1; transform: translateX(-50%);
}

.theme-item { display: flex; align-items: center; gap: 20px; z-index: 2; position: relative; }
.theme-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--paper); border: 3px solid var(--leaf-gray); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.theme-dot i { width: 14px; height: 14px; color: white !important; opacity: 0; transform: scale(0.5); transition: 0.3s; }

.active > .theme-dot { background: var(--paper); border-color: var(--leaf-green); }
.completed > .theme-dot { background: var(--leaf-green); border-color: var(--leaf-green); }
.completed > .theme-dot i { opacity: 1; transform: scale(1); }

.theme-label { font-size: 14px; font-weight: 600; color: var(--ink-300); transition: 0.3s; letter-spacing: -0.01em; }
.active > .theme-label { color: var(--ink-900); font-weight: 700; }
.completed > .theme-label { color: var(--ink-900); font-weight: 600; }

.sub-theme-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; position: relative; z-index: 2; }
.sub-theme-item { display: flex; align-items: center; gap: 30px; animation: slideIn 0.3s ease-out; min-height: 24px; }
.sub-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--leaf-green); flex-shrink: 0; margin-left: 11px; border: 2px solid white; transition: 0.3s; opacity: 0.3; }
.sub-theme-item.active .sub-dot { opacity: 1; transform: scale(1.4); box-shadow: 0 0 0 3px rgba(31, 203, 142, 0.1); }
.sub-theme-item.completed .sub-dot { opacity: 1; }

.sub-label { font-size: 15px; color: var(--ink-400); font-weight: 500; transition: 0.3s; line-height: 1.4; }
.sub-theme-item.active .sub-label { color: var(--ink-900); font-weight: 600; }
.sub-theme-item.completed .sub-label { color: var(--ink-700); }

/* MAIN STAGE */
.main-stage { flex: 1; height: 100%; overflow-y: auto; padding: 0 32px; scroll-behavior: smooth; position: relative; background: var(--bg-page); }
.stage-container { display: flex; width: 100%; max-width: 1200px; gap: 40px; margin: 0 auto; position: relative; align-items: flex-start; }
.chat-container { width: 100%; max-width: 580px; padding: 60px 0 60px 0; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.chat-container.wide { max-width: 100%; }

.side-panel {
    width: 320px;
    padding: 60px 0;
    position: sticky;
    top: 0;
    height: auto;
    max-height: 100vh;
    display: none; /* Shown on desktop results/wizard */
}

@media (min-width: 1024px) {
    .side-panel { display: block; }
}

/* Slider Styles */
.slider-container {
    background: var(--paper);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--ink-100);
    margin-bottom: 16px;
    width: 100%;
    box-shadow: var(--shadow-sm);
}
.slider-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.slider-label { font-size: 14px; font-weight: 600; color: var(--ink-500); }
.slider-value { font-size: 24px; font-weight: 800; color: var(--ink-900); }
.lemon-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--ink-100);
    border-radius: 3px;
    outline: none;
    margin: 20px 0;
}
.lemon-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--foliyo-mint);
    border: 4px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(31, 203, 142, 0.3);
}

.slider-marks { display: flex; justify-content: space-between; padding: 0 2px; }
.slider-mark { font-size: 12px; font-weight: 600; color: var(--ink-400); }
.chat-container.wide { max-width: 1200px; padding: 40px 0 120px 0; }

.message-row { width: 100%; display: flex; flex-direction: column; margin-bottom: 28px; animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.message-row.user { align-items: flex-end; }

/* Avatar: fixed 40px square, aligned to start, small gap below */
.avatar {
    width: 40px; height: 40px; min-width: 40px; min-height: 40px;
    border-radius: 50%;
    background: var(--mint-100);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
    border: 1px solid rgba(31, 203, 142, 0.2);
    flex-shrink: 0;
}
.avatar i { color: var(--mint-500) !important; width: 20px; height: 20px; }

/* AI bubble: soft card with generous padding, readable line-height */
.msg-bubble { max-width: 88%; font-size: 15px; line-height: 1.6; letter-spacing: -0.01em; }
.ai .msg-bubble {
    background: var(--mint-50);
    color: var(--ink-800);
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-sm);
    font-weight: 500;
    border: 1px solid var(--mint-200);
}
.user .msg-bubble {
    background: var(--ink-900);
    color: var(--paper);
    border-radius: var(--radius-pill);
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
}

/* Typing indicator */
.typing-row { width: 100%; display: flex; flex-direction: column; margin-bottom: 24px; animation: fadeUp 0.3s ease-out forwards; }
.typing-bubble { background: var(--mint-100); border-radius: 20px; border-bottom-left-radius: 4px; padding: 14px 18px; display: inline-flex; gap: 4px; align-self: flex-start; max-width: 85%; }
.typing-bubble span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-500); opacity: 0.4; animation: typingDot 900ms infinite ease-in-out; }
.typing-bubble span:nth-child(2) { animation-delay: 150ms; }
.typing-bubble span:nth-child(3) { animation-delay: 300ms; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Typing cursor for AI message animation */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--mint-500);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.msg-bubble .ch { transition: opacity 80ms linear; }

/* Calculating Stage */
.loading-header { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink-900); margin-bottom: 40px; }
.loading-list { display: flex; flex-direction: column; gap: 24px; margin-bottom: 40px; }
.loading-step { display: flex; align-items: center; justify-content: space-between; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--ink-700); opacity: 0; transform: translateY(10px); transition: 0.4s; }
.loading-step.visible { opacity: 1; transform: translateY(0); }
.loading-step .check-icon { color: var(--mint-500); opacity: 0; transform: scale(0.5); transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.loading-step.checked .check-icon { opacity: 1; transform: scale(1); }

/* Inputs */
.input-area { width: 100%; margin-top: 32px; margin-bottom: 80px; display: flex; flex-direction: column; gap: 16px; }
.input-row { display: flex; gap: 12px; width: 100%; }

@media (max-width: 768px) {
    /* Input areas are now inline (not fixed) — bottom bar is the fixed element */
    .chat-container { padding-bottom: var(--drawer-height, 100px) !important; }
    .input-area {
        position: static;
        margin-top: 24px;
        margin-bottom: 16px;
        padding: 0;
        background: transparent;
        border-top: none;
        box-shadow: none;
        animation: none;
    }
    .input-row { flex-direction: column; }
}

@keyframes slideUpDrawer {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.with-icon { position: relative; width: 100%; display: flex; align-items: center; }
.with-icon i { position: absolute; left: 20px; width: 20px; height: 20px; color: var(--ink-500); pointer-events: none; z-index: 5; }
.with-icon .lemon-input { padding-left: 56px !important; }

.lemon-input { width: 100%; height: 56px; padding: 0 20px; border: 1.5px solid var(--ink-200); border-radius: var(--radius-md); font-size: 15px; font-weight: 500; background: var(--paper); outline: none; transition: all 0.2s; line-height: normal; min-height: 48px; }
.lemon-input:focus { border-color: var(--mint-500); box-shadow: 0 0 0 4px rgba(31, 203, 142, 0.15); animation: none; }
.name-input { border: 2px solid var(--mint-400); animation: heartbeat 1.4s ease-in-out infinite; }
.name-input:focus { animation: none; }
@keyframes heartbeat {
    0%   { box-shadow: 0 0 0 0 rgba(31, 203, 142, 0.4); border-color: var(--mint-400); }
    30%  { box-shadow: 0 0 0 6px rgba(31, 203, 142, 0.15); border-color: var(--mint-500); }
    50%  { box-shadow: 0 0 0 3px rgba(31, 203, 142, 0.25); border-color: var(--mint-400); }
    70%  { box-shadow: 0 0 0 7px rgba(31, 203, 142, 0.1); border-color: var(--mint-500); }
    100% { box-shadow: 0 0 0 0 rgba(31, 203, 142, 0); border-color: var(--mint-400); }
}

.btn-primary { width: 100%; min-height: 52px; height: 58px; background: var(--mint-500); color: white; border: none; border-radius: var(--radius-pill); font-weight: 700; font-size: 15px; line-height: 20px; letter-spacing: -0.01em; cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow-sm); padding: 0 28px; }
.btn-primary:hover { background: var(--mint-600); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(31, 203, 142, 0.35); }
.btn-primary:active { transform: scale(0.98) translateY(0); box-shadow: var(--shadow-sm); }
.btn-primary:disabled { background: var(--mint-200); color: var(--mint-600); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary.loading { color: transparent; pointer-events: none; position: relative; }
.btn-primary.loading::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: btnSpin 700ms linear infinite; }
@keyframes btnSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.checkbox-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; cursor: pointer; }
.checkbox-row input { width: 18px; height: 18px; margin-top: 2px; cursor: pointer; accent-color: var(--mint-500); }
.checkbox-row label { font-size: 14px; color: var(--ink-500); line-height: 1.4; cursor: pointer; }


/* Stylish Selects */
.select-wrapper {
    position: relative;
    width: fit-content;
    min-width: 200px;
}

.select-wrapper i {
    position: absolute !important;
    right: 16px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%);
    color: var(--ink-500);
    pointer-events: none;
    width: 18px;
    height: 18px;
    z-index: 10;
}

.lemon-select {
    width: 100%;
    height: 52px;
    min-height: 48px;
    padding: 0 44px 0 20px;
    border: 1.5px solid var(--ink-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-900);
    background: var(--paper);
    appearance: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-variant-numeric: tabular-nums;
}

.lemon-select:hover {
    border-color: var(--mint-300);
    background: var(--bg-page);
}

.lemon-select:focus {
    outline: none;
    border-color: var(--mint-500);
    box-shadow: 0 0 0 4px rgba(31, 203, 142, 0.15);
}

/* Quick reply chips — guide §8.4 (pill-shaped) */
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.icon-chip { background: var(--paper); border: 1.5px solid var(--ink-300); border-radius: 999px; padding: 12px 18px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); font-family: inherit; }
.icon-chip:hover { border-color: var(--mint-500); background: var(--mint-50); }
.icon-chip:active { transform: scale(0.97); }
.icon-chip.selected { background: var(--mint-500); border-color: var(--mint-500); color: white; }
.icon-chip.selected i, .icon-chip.selected span { color: white; }
.icon-chip i { width: 18px; height: 18px; color: var(--ink-700); stroke-width: 1.75; }
.icon-chip span { font-size: var(--fs-label-md); font-weight: 600; line-height: 20px; letter-spacing: var(--ls-label-md); color: var(--ink-900); }

.inline-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.action-chip { padding: 12px 18px; background: var(--paper); border: 1.5px solid var(--ink-300); border-radius: 999px; font-size: var(--fs-label-md); font-weight: 600; line-height: 20px; letter-spacing: var(--ls-label-md); color: var(--ink-900); text-align: center; cursor: pointer; transition: 0.2s; font-family: inherit; }
.action-chip:hover { border-color: var(--mint-500); background: var(--mint-50); }

/* ── Rider slider input ───────────────────────────────────────────────── */
.rider-rec-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--mint-100);
    border: 1px solid var(--mint-200);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mint-600);
    margin-bottom: 16px;
}
.rider-benefit-note {
    background: var(--mint-50);
    border: 1.5px solid var(--mint-200);
    border-radius: 14px;
    padding: 13px 16px;
    margin: 14px 0;
    font-size: 13px;
    color: var(--ink-700);
    line-height: 1.5;
    min-height: 44px;
}
.rider-benefit-note strong { color: var(--mint-600); }
.rider-btn-row { display: flex; gap: 10px; align-items: center; }
.rider-btn-row .btn-primary { flex: 1; height: 52px; }
.btn-skip {
    flex-shrink: 0;
    background: transparent;
    border: 1.5px solid var(--ink-200);
    border-radius: var(--radius-pill);
    padding: 0 20px;
    height: 52px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}
.btn-skip:hover { border-color: var(--ink-400); color: var(--ink-700); }
.rider-explain-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-400);
    cursor: pointer;
    text-align: center;
    padding: 10px 0 2px;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--ink-200);
}
.rider-explain-btn:hover { color: var(--mint-600); text-decoration-color: var(--mint-300); }
.action-chip:active { transform: scale(0.97); }
.action-chip.selected { background: var(--mint-500); border-color: var(--mint-500); color: white; }

/* Human escape link — guide §9.5 */
.human-escape { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 50; background: var(--paper); border: 1px solid var(--ink-200); border-radius: 999px; padding: 8px 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-700); cursor: pointer; box-shadow: 0 4px 12px rgba(14,26,20,0.06); transition: 0.2s; text-decoration: none; }
.human-escape:hover { color: var(--ink-900); border-color: var(--ink-300); }
.human-escape i { width: 14px; height: 14px; }

/* Results Layout */
.results-layout { 
    display: flex; 
    flex-direction: column; 
    gap: 32px; 
    width: 100%; 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 40px 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lemon-card {
    background: var(--paper);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--ink-100);
}

.price-display { 
    font-size: 48px; 
    font-weight: 800; 
    color: var(--ink-900); 
    letter-spacing: -0.02em; 
    display: flex; 
    align-items: baseline; 
    gap: 4px; 
}
.price-display .mo { font-size: 18px; font-weight: 500; color: var(--ink-500); }

.checkout-btn {
    width: 100%;
    height: 60px;
    min-height: 52px;
    background: var(--foliyo-mint);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 18px;
    margin-top: 24px;
    box-shadow: 0 8px 24px rgba(31, 203, 142, 0.25);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.checkout-btn:hover { background: var(--foliyo-mint-hover); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(31, 203, 142, 0.35); }
.checkout-btn:active { transform: scale(0.98); box-shadow: var(--shadow-sm); }

.detailed-view { display: flex; flex-direction: column; gap: 48px; }
.section-title { font-size: 28px; line-height: 36px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; color: var(--ink-900); }
.section-subtitle { font-size: 15px; color: var(--ink-500); margin-bottom: 24px; line-height: 1.5; }

/* Sticky Bottom Bar */
.results-sticky-bar {
    position: fixed; bottom: 0; left: 0; right: 0; 
    background: var(--paper); padding: 16px 24px; 
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1); 
    border-top: 1px solid var(--ink-100); z-index: 1000;
    transform: translateY(100%); opacity: 0; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.results-sticky-bar.visible { transform: translateY(0); opacity: 1; }
.results-sticky-bar .price-info { display: flex; align-items: baseline; gap: 4px; }
.results-sticky-bar .price { font-size: 26px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.02em; }
.results-sticky-bar .period { font-size: 14px; color: var(--ink-500); font-weight: 500; }
.results-sticky-bar .checkout-btn-small {
    height: 52px; padding: 0 32px; background: var(--foliyo-mint); color: white;
    border: none; border-radius: var(--radius-pill); font-weight: 700; font-size: 16px;
    box-shadow: var(--shadow-sm); cursor: pointer; transition: background 0.2s;
}
.results-sticky-bar .checkout-btn-small:hover { background: var(--foliyo-mint-hover); }

@media (min-width: 769px) {
    .results-sticky-bar {
        max-width: 600px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        border-radius: 24px 24px 0 0;
        border: 1px solid var(--ink-100);
        border-bottom: none;
        padding: 20px 32px;
    }
    .results-sticky-bar.visible { transform: translateX(-50%) translateY(0); }
}

.coverage-card { background: var(--paper); border-radius: var(--radius-lg); border: 1px solid var(--ink-100); overflow: hidden; box-shadow: var(--shadow-sm); }
.coverage-row { padding: 32px; border-bottom: 1px solid var(--ink-100); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.coverage-row:last-child { border-bottom: none; }
.coverage-info { display: flex; gap: 16px; align-items: flex-start; flex: 1; }
.coverage-info i { width: 24px; height: 24px; color: var(--mint-500); flex-shrink: 0; margin-top: 2px; }
.coverage-text h4 { font-size: 15px; line-height: var(--lh-heading-sm); font-weight: 700; letter-spacing: -0.005em; margin-bottom: 4px; color: var(--ink-900); }
.coverage-text p { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--ink-500); line-height: 1.5; }

.summary-card { position: sticky; top: 40px; background: var(--paper); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-lg); border: 1px solid var(--ink-100); display: flex; flex-direction: column; gap: 24px; height: fit-content; }
.summary-card > div:first-child:not([class]) { font-size: var(--fs-label-md) !important; font-weight: 600 !important; color: var(--ink-500) !important; letter-spacing: 0.04em !important; text-transform: uppercase !important; margin-bottom: -16px !important; }
.summary-price { font-size: 28px; line-height: 1.05; font-weight: 700; letter-spacing: -0.012em; color: var(--ink-900); font-variant-numeric: tabular-nums; word-break: break-word; }
.summary-price .per { font-size: 0.4em; font-weight: 500; color: var(--ink-500); letter-spacing: 0; margin-left: 4px; }
.summary-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.summary-item { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-700); font-variant-numeric: tabular-nums; }
.summary-item i { color: var(--mint-500); width: 18px; height: 18px; }

/* Toggle Switch */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid var(--ink-100); }
.toggle-row:last-child { border-bottom: none; }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--ink-100); transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 22px; width: 22px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
input:checked + .slider { background-color: var(--mint-500); }
input:checked + .slider:before { transform: translateX(20px); }

/* Extra Grid */
.extra-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.extra-card { background: var(--paper); border-radius: 20px; border: 1px solid var(--ink-100); padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; transition: 0.3s; }
.extra-card:hover { border-color: var(--mint-500); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.05); }
.extra-img { width: 100%; height: 80px; background: var(--mint-100); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.extra-img i { width: 32px; height: 32px; color: var(--mint-500); }

/* Insurer Selector */
.insurer-list {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.insurer-list::-webkit-scrollbar { display: none; }

.insurer-option {
    flex: 0 0 180px;
    height: 120px;
    padding: 20px;
    border: 2px solid var(--ink-200);
    border-radius: 20px;
    cursor: pointer;
    background: var(--paper);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.insurer-option:hover {
    border-color: var(--mint-300);
    transform: translateY(-2px);
}

.insurer-option.active {
    border-color: var(--mint-500);
    background: var(--mint-50);
    box-shadow: 0 4px 12px rgba(0, 184, 156, 0.1);
}

.insurer-logo-sm {
    width: 110px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
}

.insurer-badge {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-variant-numeric: tabular-nums;
}

.insurer-name-sm {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 20px;
    letter-spacing: 0;
}

/* Provider Selection Page */
/* Inline provider cards (chat flow) */
.inline-provider-list { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }
.inline-provider-card {
    border: 1.5px solid var(--ink-200);
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.inline-provider-card:hover { border-color: var(--mint-300); }
.inline-provider-card.selected { border-color: var(--mint-500); box-shadow: 0 0 0 3px var(--mint-100); }
.inline-provider-recommended {
    font-size: 11px; font-weight: 700; color: var(--mint-600);
    margin-bottom: 8px; letter-spacing: 0.04em;
}
.ipc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ipc-logo { height: 32px; width: 80px; object-fit: contain; flex-shrink: 0; }
.ipc-name-wrap { flex: 1; min-width: 0; }
.ipc-name { font-size: 14px; font-weight: 700; color: var(--ink-900); }
.ipc-tagline { font-size: 11px; color: var(--ink-500); margin-top: 2px; line-height: 1.3; }
.ipc-price { font-size: 20px; font-weight: 800; color: var(--ink-900); white-space: nowrap; }
.ipc-price span { font-size: 11px; font-weight: 500; color: var(--ink-400); }
.ipc-metrics { display: flex; gap: 8px; }
.ipc-metric { flex: 1; background: var(--ink-50); border-radius: 8px; padding: 6px 8px; }
.ipc-mlabel { display: block; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-400); margin-bottom: 2px; }
.ipc-mval { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.ipc-check { display: none; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--mint-600); margin-top: 10px; }
.ipc-check.visible { display: flex; }
.ipc-check i { width: 14px; height: 14px; }
.ipc-cta-row { padding: 4px 0 0; }
.ipc-cta-row .btn-primary { width: 100%; }

.provider-hero { padding: 0 0 40px; max-width: 1150px; }
.provider-hero h2 { font-size: 30px; line-height: 38px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink-900); margin-bottom: 8px; }
.provider-hero p  { font-size: 16px; line-height: 24px; color: var(--ink-500); margin-top: 4px; }

/* Desktop: 3 cards side-by-side, fluid 1fr columns to prevent overflow */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 120px;
    align-items: stretch;
    min-width: 0;
}

/* Lemonade-style card: large radius, soft shadow, breathing room */
.provider-card {
    position: relative;
    background: var(--paper);
    border: 2px solid var(--ink-200);
    border-radius: 28px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.05);
}
.provider-card:hover {
    border-color: var(--mint-300);
    transform: translateY(-3px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.05);
}
.provider-card.selected {
    border-color: transparent;
    outline: 2px solid var(--mint-500);
    outline-offset: 0;
    box-shadow: 0 1px 3px rgba(31, 203, 142, 0.04), 0 8px 24px rgba(31, 203, 142, 0.08);
}

/* Recommended pill: floating top-left, doesn't push content */
.provider-card .recommended-pill {
    position: absolute;
    top: -14px;
    left: 24px;
    background: var(--coral-500);
    color: white;
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(255, 106, 77, 0.35);
}

/* Logo area */
.provider-card-logo {
    height: 52px;
    display: flex;
    align-items: center;
}

/* Name / plan / tagline */
.provider-card .name {
    font-size: 20px;
    line-height: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink-900);
    margin-bottom: 4px;
}
.provider-card .plan {
    font-size: 13px;
    line-height: 18px;
    color: var(--ink-400);
    margin-bottom: 8px;
}
.provider-card .tagline {
    font-size: 13px;
    line-height: 21px;
    color: var(--ink-600);
    font-style: italic;
}

/* Big price display */
.provider-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 4px 0;
}
.provider-price-big {
    font-size: 28px;
    font-weight: 800;
    color: var(--ink-900);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-display);
}
.provider-price-period {
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-500);
}

/* Single-column metrics with dividers */
.provider-metrics {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--ink-100);
    border-bottom: 1px solid var(--ink-100);
    padding: 6px 0;
}
.provider-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--ink-100);
}
.provider-metric-row:last-child { border-bottom: none; }
.provider-metric-row .label {
    font-size: 11px;
    color: var(--ink-500);
    font-weight: 500;
}
.provider-metric-row .value {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-900);
    font-variant-numeric: tabular-nums;
}

/* "Why pick" — below metrics, lighter color */
.provider-why {
    font-size: 14px;
    line-height: 21px;
    color: var(--ink-500);
}

/* Feature checklist */
.provider-features {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}
.provider-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    color: var(--ink-700);
}
.provider-features li i {
    width: 15px;
    height: 15px;
    color: var(--mint-500);
    flex-shrink: 0;
}

/* provider-sticky-cta: see canonical definition below */
.provider-sticky-cta .summary { display: flex; align-items: center; gap: 12px; flex: 1; }
.provider-sticky-cta .btn-primary { width: auto; padding: 0 32px; }

/* Tablet: 2-col wrap */
@media (min-width: 768px) and (max-width: 1099px) {
    .provider-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile: 1-col */
@media (max-width: 767px) {
    .provider-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .provider-sticky-cta { left: 0; padding: 16px 24px; }
}

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes coverPop { 0% { opacity: 0; transform: scale(0.82); color: var(--ink-200); } 60% { opacity: 1; transform: scale(1.04); } 100% { opacity: 1; transform: scale(1); color: var(--ink-900); } }
.stage-reset-anim { animation: fadeOut 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-30px); } }

::-webkit-scrollbar { width: 0px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    .typing-bubble span { animation: none !important; }
}
@media (max-width: 768px) {
    body { background-color: var(--bg-results); }
    header { display: grid !important; visibility: visible !important; z-index: 9999 !important; height: 72px !important; padding: 0 24px !important; position: sticky !important; top: 0 !important; }
    .theme-sidebar { display: none; }
    .theme-intro-container { display: none !important; } /* Hide pinned title in Results view */
    
    .app-layout { height: calc(100dvh - 72px); flex-direction: column; padding-top: 0; background: var(--bg-results); margin-top: 0 !important; position: relative; }
    .main-stage { 
        height: 100%;
        padding: 0 !important; 
        overflow-y: auto !important; 
        width: 100% !important; 
        background: var(--bg-results); 
        scroll-behavior: smooth; 
        position: relative;
    }
    .stage-container { flex-direction: column; gap: 0; align-items: center; width: 100%; }
    .chat-container { padding: 40px 0 var(--drawer-height, 280px) 0 !important; width: calc(100% - 48px) !important; max-width: 100% !important; margin: 0 auto; }
    .side-panel-container { width: calc(100% - 48px) !important; position: static !important; padding: 0 0 60px 0 !important; margin: 0 auto; }
    .chat-container.wide { padding-bottom: 40px !important; }
    
    /* Results Overrides */
    .results-layout { gap: 16px !important; padding: 24px !important; }
    .lemon-card { padding: 24px; border-radius: var(--radius-lg); }
    
    .price-display { font-size: 40px; }
    .price-display .mo { font-size: 16px; }
    
    .checkout-btn { height: 56px; font-size: 16px; border-radius: var(--radius-pill); }

    .coverage-row { padding: 28px 0; border-bottom: 1px solid var(--ink-100); display: flex; flex-direction: column; gap: 16px; }
    .coverage-row:last-child { border-bottom: none; }
    .select-wrapper { width: 100% !important; min-width: 0 !important; }
    .lemon-select { height: 56px; border: 1.5px solid var(--ink-200); border-radius: var(--radius-md); padding: 0 44px 0 16px; background: var(--paper); font-size: 16px; color: var(--ink-900); appearance: none; }

    .section-title { font-size: 22px; font-weight: 800; text-align: left !important; margin-bottom: 16px; color: var(--ink-900); letter-spacing: -0.01em; }
    .section-subtitle { font-size: 14px; text-align: left !important; color: var(--ink-500); margin-bottom: 24px; }

    .results-sticky-bar { display: flex; }

    /* Mobile insurer tabs: horizontally scrollable */
    .insurer-tab-row {
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
    }
    .insurer-tab-row::-webkit-scrollbar { display: none; }
    .insurer-mini-tab {
        flex-shrink: 0 !important;
        min-width: 120px;
        scroll-snap-align: start;
        padding: 8px 12px !important;
        gap: 8px !important;
    }
    .insurer-mini-tab img {
        height: 16px !important;
        width: 48px !important;
    }
    .insurer-mini-tab span {
        font-size: 12px !important;
    }

    /* Mobile quote card: logo + price row fixes */
    .results-layout .lemon-card > div:first-child {
        align-items: center !important;
    }
    .results-layout .lemon-card > div:first-child img {
        height: 36px !important;
        width: 80px !important;
        padding: 4px !important;
    }
    .results-layout .price-display {
        font-size: 32px !important;
    }

    /* Mobile quote action row: stack vertically */
    .quote-action-row {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }
    .quote-action-row .btn-primary {
        width: 100% !important;
        white-space: nowrap !important;
        font-size: 14px !important;
        padding: 12px 16px !important;
    }
    .quote-action-links {
        justify-content: center !important;
        gap: 24px !important;
    }

    /* Mobile progress bar — replaces hidden sidebar */
    .mobile-progress-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 24px;
        background: var(--paper);
        border-bottom: 1px solid var(--ink-100);
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .mobile-progress-bar::-webkit-scrollbar { display: none; }
    .mobile-progress-step {
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        font-size: 12px;
        font-weight: 600;
        color: var(--ink-300);
        padding: 6px 12px;
        border-radius: var(--radius-pill);
        transition: all 0.3s;
    }
    .mobile-progress-step.active {
        background: var(--mint-50);
        color: var(--mint-600);
        border: 1px solid var(--mint-200);
    }
    .mobile-progress-step.completed {
        color: var(--ink-500);
    }
    .mobile-progress-step .step-dot {
        width: 7px; height: 7px;
        border-radius: 50%;
        background: currentColor;
        flex-shrink: 0;
    }
}

/* ── Mobile plan toggle (header pill) ─────────────────────────────────── */
.mobile-plan-toggle {
    display: none; /* desktop: hidden; mobile media query enables it */
    align-items: center;
    gap: 5px;
    background: var(--mint-50);
    border: 1.5px solid var(--mint-200);
    border-radius: var(--radius-pill);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mint-600);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    font-family: var(--font-body);
}
.mobile-plan-toggle i { width: 13px; height: 13px; transition: transform 0.3s ease; }
.mobile-plan-toggle.open i { transform: rotate(180deg); }

@keyframes planPulse {
    0%   { background: var(--mint-50);  color: var(--mint-600); transform: scale(1);    border-color: var(--mint-200); }
    28%  { background: var(--mint-600); color: #fff;            transform: scale(1.12); border-color: var(--mint-600); box-shadow: 0 4px 16px rgba(15,168,118,0.45); }
    60%  { background: var(--mint-100); color: var(--mint-600); transform: scale(1.04); border-color: var(--mint-300); box-shadow: none; }
    100% { background: var(--mint-50);  color: var(--mint-600); transform: scale(1);    border-color: var(--mint-200); }
}
.mobile-plan-toggle.pulsing {
    animation: planPulse 0.75s cubic-bezier(.34,1.56,.64,1) both;
}

/* ── Mobile plan panel (dropdown from header) ──────────────────────────── */
.mobile-plan-panel {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 2999;
    background: var(--paper);
    border-bottom: 2px solid var(--mint-200);
    padding: 16px 24px 20px;
    box-shadow: 0 8px 24px rgba(14, 26, 20, 0.12);
    animation: mobilePanelSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes mobilePanelSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mobile-plan-panel-title {
    font-size: 13px; font-weight: 800; color: var(--ink-900); margin-bottom: 12px;
}
.mobile-plan-coverage-row {
    display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px;
}
.mobile-plan-coverage-label {
    font-size: 11px; font-weight: 600; color: var(--ink-500); margin-bottom: 2px;
}
.mobile-plan-coverage-val {
    font-size: 20px; font-weight: 800; color: var(--ink-900);
}
.mobile-plan-coverage-val.calculating { color: var(--ink-200); font-size: 15px; }
.mobile-plan-badges {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.mobile-plan-badge {
    display: flex; align-items: center; gap: 4px;
    background: var(--mint-50); border: 1px solid var(--mint-200);
    border-radius: var(--radius-pill); padding: 4px 10px;
    font-size: 11px; font-weight: 600; color: var(--mint-600);
}
.mobile-plan-badge i { width: 11px; height: 11px; }

@media (max-width: 768px) {
    .mobile-plan-toggle { display: flex; }
}

/* Inline error message for contact form */
.contact-err {
    color: var(--coral-500);
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--coral-100);
    border-radius: var(--radius-sm);
}

.insurer-mini-tab {
    padding: 10px 16px;
    background: var(--paper);
    border: 1.5px solid var(--ink-100);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.7;
}

.insurer-mini-tab:hover {
    border-color: var(--mint-300);
    opacity: 1;
}

.insurer-mini-tab.active {
    border-color: var(--mint-500);
    background: var(--mint-50);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(31, 203, 142, 0.1);
}

.insurer-mini-tab span {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-900);
}

.badge {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
}

.restart-link {
    background: none;
    border: none;
    color: var(--ink-400);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    padding: 10px 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.restart-link:hover {
    color: var(--ink-900);
    background: var(--bg-page);
}

.provider-sticky-cta {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 960px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
    z-index: 5000;
    animation: ctaFadeIn 0.4s ease-out;
}
@keyframes ctaFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (max-width: 768px) {
    .provider-sticky-cta {
        bottom: 12px;
        width: calc(100% - 24px);
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        border-radius: var(--radius-lg);
    }
    .provider-sticky-cta .summary { width: 100%; justify-content: center; }
    .provider-sticky-cta .btn-primary { width: 100% !important; }
}

/* Provider grid breakpoints are defined above with the provider-grid rules */

/* ── Visual explainers (viz cards) ── */
.message-row.viz {
    margin-bottom: 16px;
}
.viz-bubble {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    max-width: min(100%, 480px) !important;
}
.viz-card {
    background: var(--paper);
    border: 1px solid var(--ink-100);
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    max-width: min(100%, 480px);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.viz-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mint-700, var(--mint-600));
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--mint-100);
    line-height: 1;
}

/* Smoker comparison */
.viz-smoker-row {
    display: flex;
    gap: 12px;
}
.viz-smoker-col {
    flex: 1;
    background: var(--paper);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--ink-100);
}
.viz-smoker-selectable {
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.viz-smoker-selectable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--mint-400);
}
.viz-smoker-selectable:active { transform: translateY(0); }
.viz-smoker-col.highlight {
    background: var(--mint-100);
    border-color: var(--mint-300);
}
.viz-shield-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mint-200);
}
.viz-shield-icon.dimmed {
    background: var(--ink-100);
}
.viz-shield-icon i {
    width: 20px;
    height: 20px;
    color: var(--mint-600);
}
.viz-shield-icon.dimmed i {
    color: var(--ink-400);
}
.viz-shield-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-800);
    text-align: center;
}
.viz-shield-sub {
    font-size: 11px;
    color: var(--ink-500);
    text-align: center;
    line-height: 1.4;
}
.viz-badge {
    background: var(--coral-100);
    color: var(--coral-500);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
}
.viz-badge.good {
    background: var(--mint-100);
    color: var(--mint-600);
}

/* Formula / equation */
.viz-formula {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.viz-formula-row {
    display: flex;
    align-items: baseline;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px dashed var(--ink-100);
    font-size: 13px;
}
.viz-formula-row:last-child {
    border-bottom: none;
}
.viz-formula-row-label {
    font-weight: 600;
    color: var(--ink-700);
    flex: 1;
    min-width: 0;
    padding-right: 8px;
}
.viz-formula-row-leader {
    flex: 1;
    border-bottom: 1px dotted var(--ink-200);
    margin: 0 6px;
    align-self: center;
    min-width: 20px;
}
.viz-formula-row-value {
    font-weight: 700;
    color: var(--ink-900);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
}
.viz-formula-row .viz-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 6px;
    margin-top: 1px;
    align-self: center;
}
.viz-formula-result {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--mint-100);
    border: 1.5px solid var(--mint-200);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-900);
    font-variant-numeric: tabular-nums;
}
.viz-formula-result-label {
    color: var(--mint-600);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.viz-formula-eq {
    background: var(--ink-50);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--ink-100);
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.viz-formula-eq .viz-op {
    color: var(--mint-600);
    font-size: 15px;
    font-weight: 700;
}
.viz-stacked-bar {
    display: flex;
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 4px;
}
.viz-stacked-bar .viz-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    transition: flex 0.4s ease;
    white-space: nowrap;
    overflow: hidden;
    padding: 0 6px;
}

/* ── HLV Breakdown Visualization (step 9) ─────────────────────────── */
@keyframes hlvBarScale {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

.hlv-breakdown {}

.hlv-bar-wrap {
    height: 12px;
    border-radius: 99px;
    overflow: hidden;
    background: var(--mint-100);
    margin-bottom: 12px;
}
.hlv-bar-inner {
    display: flex;
    height: 100%;
    transform-origin: left center;
    animation: hlvBarScale 0.9s cubic-bezier(.4,0,.2,1) 0.3s both;
}
.hlv-seg { height: 100%; }
.hlv-seg-a { background: var(--mint-600); }
.hlv-seg-b { background: var(--mint-300); }
.hlv-seg-c { background: var(--mint-200); }

.hlv-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.hlv-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--ink-500);
    font-weight: 500;
}
.hlv-ldot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.hlv-detail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.hlv-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 4px;
    border-radius: 0;
    background: none;
    border: none;
    border-bottom: 1px solid var(--ink-100);
    opacity: 0;
    animation: fadeUp 0.4s ease both;
}
.hlv-d-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.hlv-d-body { flex: 1; min-width: 0; }
.hlv-d-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--mint-600);
    margin-bottom: 2px;
}
.hlv-d-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 2px;
    line-height: 1.3;
}
.hlv-d-desc { font-size: 11px; color: var(--ink-500); line-height: 1.45; }
.hlv-d-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-900);
    white-space: nowrap;
    padding-left: 8px;
    align-self: center;
    flex-shrink: 0;
}

.hlv-footer-pill {
    padding: 14px 16px;
    background: var(--mint-600);
    border-radius: 14px;
    text-align: center;
    opacity: 0;
    animation: fadeUp 0.4s ease both;
}
.hlv-fp-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.hlv-fp-sub { font-size: 11px; color: rgba(255,255,255,0.85); }


/* ADB rider stacked bar */
.viz-payout-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.viz-payout-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.viz-payout-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-600);
    display: flex;
    align-items: center;
    gap: 6px;
}
.viz-payout-bar-wrap {
    display: flex;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--ink-100);
}
.viz-payout-bar-base {
    background: var(--mint-300);
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 8px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}
.viz-payout-bar-adb {
    background: var(--mint-500);
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 6px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}
.viz-payout-total {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink-900);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* WOP timeline */
.viz-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}
.viz-timeline-track {
    position: absolute;
    left: 15px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: var(--ink-100);
    z-index: 0;
}
.viz-timeline-track-fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 40%;
    background: var(--mint-300);
    border-radius: 2px;
}
.viz-tl-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 8px 0;
    position: relative;
    z-index: 1;
}
.viz-tl-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--ink-200);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.viz-tl-dot.active {
    background: var(--mint-100);
    border-color: var(--mint-500);
}
.viz-tl-dot.accent {
    background: var(--coral-100);
    border-color: var(--coral-500);
}
.viz-tl-dot i {
    width: 14px;
    height: 14px;
    color: var(--ink-400);
}
.viz-tl-dot.active i {
    color: var(--mint-600);
}
.viz-tl-dot.accent i {
    color: var(--coral-500);
}
.viz-tl-body {
    padding-top: 4px;
    flex: 1;
}
.viz-tl-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.3;
}
.viz-tl-desc {
    font-size: 12px;
    color: var(--ink-500);
    margin-top: 2px;
    line-height: 1.4;
}
.viz-tl-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--mint-100);
    color: var(--mint-600);
    margin-top: 4px;
}
.viz-tl-chip.coral {
    background: var(--coral-100);
    color: var(--coral-500);
}

/* Term duration lifecycle */
.viz-term-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.viz-term-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.viz-term-label {
    width: 64px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-700);
    flex-shrink: 0;
}
.viz-term-bar-wrap {
    flex: 1;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--ink-100);
}
.viz-term-bar-fill {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    transition: width 0.5s ease;
}
.viz-term-note {
    font-size: 11px;
    color: var(--ink-500);
    width: 80px;
    flex-shrink: 0;
    line-height: 1.3;
}

@media (max-width: 480px) {
    .viz-card { padding: 16px; }
    .viz-smoker-row { flex-direction: row; }
    .viz-term-note { display: none; }
}

/* Prevent horizontal overflow on very small screens */
@media (max-width: 360px) {
    .msg-bubble { max-width: 95%; font-size: 16px; }
    .chip-grid { gap: 8px; }
    .action-chip { padding: 10px 14px; font-size: 13px; }
    .icon-chip { padding: 10px 14px; }
    .icon-chip span { font-size: 13px; }
}

/* ── What's Covered Grid ── */
.whats-covered { padding: 32px 0; max-width: 720px; margin: 0 auto; }
.whats-covered-title { text-align: center; font-size: 22px; font-weight: 700; color: var(--ink-900); margin-bottom: 8px; }
.whats-covered-sub { text-align: center; font-size: 14px; color: var(--ink-500); margin-bottom: 32px; }
.whats-covered-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
@media (max-width: 640px) { .whats-covered-grid { grid-template-columns: 1fr; gap: 24px; } }
.wc-item { text-align: center; padding: 8px; }
.wc-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--mint-50); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: var(--mint-600); border: 1px solid var(--mint-200); }
.wc-icon i { width: 32px; height: 32px; }
.wc-title { font-size: 16px; font-weight: 700; color: var(--ink-900); margin-bottom: 8px; }
.wc-desc { font-size: 14px; line-height: 1.5; color: var(--ink-700); max-width: 280px; margin: 0 auto; }

/* ── Plan Summary "+N More" expand ── */
.plan-summary-more { background: none; border: none; font-size: 13px; color: var(--ink-700); cursor: pointer; padding: 8px 0; display: flex; align-items: center; gap: 6px; font-family: inherit; font-weight: 600; }
.plan-summary-more i { width: 14px; height: 14px; transition: transform 0.2s; }
.plan-summary-more.expanded i { transform: rotate(180deg); }
.plan-summary-extra { display: none; }
.plan-summary-extra.show { display: block; }

/* ══════════════════════════════════════════════════════════
   AI ADVISOR SIDEBAR / BOTTOM SHEET / INLINE / RESUME
   ══════════════════════════════════════════════════════════ */

.resume-session { text-align: center; }
.resume-btn { transition: opacity 0.2s; }
.resume-btn:hover { opacity: 0.7; }

.advisor-fab {
    position: fixed; bottom: 24px; right: 24px; z-index: 4000;
    display: flex; align-items: center; gap: 8px;
    padding: 14px 22px; background: var(--foliyo-mint); color: white;
    border: none; border-radius: var(--radius-pill);
    font-size: 14px; font-weight: 700; cursor: pointer;
    box-shadow: 0 8px 24px rgba(31, 203, 142, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.advisor-fab.hidden { display: none !important; }
.advisor-fab:hover { background: var(--foliyo-mint-hover); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(31, 203, 142, 0.45); }
.advisor-fab:active { transform: scale(0.97); }
.advisor-fab i { width: 18px; height: 18px; }

.advisor-panel {
    position: fixed; inset: 0; z-index: 5001;
    pointer-events: none; visibility: hidden; opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.advisor-panel.open { pointer-events: auto; visibility: visible; opacity: 1; }
.advisor-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); }
.advisor-sheet {
    position: absolute; right: 0; top: 0; bottom: 0;
    width: 380px; max-width: 100%; background: var(--paper);
    box-shadow: -8px 0 40px rgba(14, 26, 20, 0.12);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.advisor-panel.open .advisor-sheet { transform: translateX(0); }

.advisor-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--ink-100); flex-shrink: 0;
}
.advisor-header-left { display: flex; align-items: center; gap: 12px; }
.advisor-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--mint-100);
    display: flex; align-items: center; justify-content: center; color: var(--mint-600);
}
.advisor-avatar i { width: 18px; height: 18px; }
.advisor-title { font-size: 15px; font-weight: 700; color: var(--ink-900); line-height: 1.2; }
.advisor-subtitle { font-size: 12px; color: var(--ink-500); line-height: 1.3; }
.advisor-memory-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; color: var(--foliyo-mint-dark);
    background: var(--foliyo-mint-light);
    border: 1px solid var(--foliyo-mint);
    padding: 2px 8px; border-radius: 12px; margin-left: 8px;
}
.advisor-memory-badge i { width: 12px; height: 12px; }
.advisor-close {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: var(--ink-100); color: var(--ink-600);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
}
.advisor-close:hover { background: var(--ink-200); color: var(--ink-900); }
.advisor-close i { width: 18px; height: 18px; }

.advisor-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; }
.advisor-messages { display: flex; flex-direction: column; gap: 16px; }

.advisor-msg {
    display: flex; flex-direction: column; max-width: 85%;
    animation: fadeUp 0.3s ease-out forwards;
}
.advisor-msg.user { align-self: flex-end; align-items: flex-end; }
.advisor-msg.ai { align-self: flex-start; align-items: flex-start; }
.advisor-msg-label { font-size: 11px; font-weight: 600; color: var(--ink-400); margin-bottom: 4px; margin-left: 2px; }
.advisor-msg-bubble { padding: 12px 16px; font-size: 14px; line-height: 1.55; font-weight: 500; }
.advisor-msg.user .advisor-msg-bubble { background: var(--ink-100); color: var(--ink-900); border-radius: 18px; border-bottom-right-radius: 4px; }
.advisor-msg.ai .advisor-msg-bubble { background: white; color: var(--ink-800); border-radius: 18px; border-bottom-left-radius: 4px; border: 1px solid var(--ink-100); box-shadow: var(--shadow-sm); }

.advisor-typing {
    display: flex; gap: 4px; padding: 14px 16px;
    background: white; border-radius: 18px; border-bottom-left-radius: 4px;
    border: 1px solid var(--ink-100); box-shadow: var(--shadow-sm);
    align-self: flex-start; margin-bottom: 8px;
    animation: fadeUp 0.3s ease-out forwards;
}
.advisor-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-500); opacity: 0.35; animation: typingDot 900ms infinite ease-in-out; }
.advisor-typing span:nth-child(2) { animation-delay: 150ms; }
.advisor-typing span:nth-child(3) { animation-delay: 300ms; }

.advisor-footer { padding: 16px 24px 24px; border-top: 1px solid var(--ink-100); background: var(--paper); flex-shrink: 0; }
.advisor-quick-questions { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 4px; -ms-overflow-style: none; scrollbar-width: none; }
.advisor-quick-questions::-webkit-scrollbar { display: none; }
.advisor-chip { flex-shrink: 0; padding: 8px 14px; background: var(--mint-50); color: var(--ink-800); border: 1px solid var(--mint-200); border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.2s; font-family: inherit; }
.advisor-chip:hover { background: var(--mint-100); border-color: var(--mint-500); color: var(--ink-900); }

.advisor-input-row { display: flex; gap: 10px; align-items: center; }
.advisor-input { flex: 1; height: 48px; padding: 0 16px; border: 1.5px solid var(--ink-200); border-radius: var(--radius-pill); font-size: 14px; font-weight: 500; background: var(--paper); outline: none; transition: all 0.2s; }
.advisor-input:focus { border-color: var(--mint-500); box-shadow: 0 0 0 4px rgba(31, 203, 142, 0.12); }
.advisor-send { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--foliyo-mint); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all 0.2s; box-shadow: 0 4px 12px rgba(31, 203, 142, 0.25); }
.advisor-send:hover { background: var(--foliyo-mint-hover); transform: scale(1.05); }
.advisor-send:active { transform: scale(0.95); }
.advisor-send i { width: 18px; height: 18px; }

.advisor-bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); z-index: 3000; display: none; border-top: 1px solid var(--ink-100); box-shadow: 0 -4px 24px rgba(14,26,20,0.07); }
.advisor-bottom-bar-inner { max-width: 640px; margin: 0 auto; }
.advisor-bottom-input-row { display: flex; align-items: center; gap: 10px; background: white; border: 1.5px solid var(--ink-200); border-radius: var(--radius-pill); padding: 6px 6px 6px 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); transition: border-color 0.2s; }
.advisor-bottom-input-row:focus-within { border-color: var(--mint-500); }
.advisor-bottom-input-row input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; font-weight: 500; color: var(--ink-900); min-width: 0; }
.advisor-bottom-input-row input::placeholder { color: var(--ink-400); }
.advisor-bottom-send { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--foliyo-mint); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all 0.2s; }
.advisor-bottom-send:hover { background: var(--foliyo-mint-hover); transform: scale(1.05); }
.advisor-bottom-send:active { transform: scale(0.95); }
.advisor-bottom-send i { width: 16px; height: 16px; }
.advisor-input-icon { width: 17px; height: 17px; color: var(--mint-500); flex-shrink: 0; }

/* Bottom bar chips row: pencil + horizontal advisor suggestion chips */
.bottom-chips-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Pencil button — bare icon, no border or background */
.bottom-pencil-btn {
    display: flex;
    align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: none;
    background: transparent;
    color: var(--ink-400);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: color 0.18s;
    font-family: inherit;
}
.bottom-pencil-btn:hover { color: var(--mint-600); }
.bottom-pencil-btn i { width: 17px; height: 17px; }

/* Advisor suggestion chips row */
.advisor-quick-chips { display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 0; -ms-overflow-style: none; scrollbar-width: none; }
.advisor-quick-chips::-webkit-scrollbar { display: none; }

.advisor-inline-block { margin: 20px 0; padding: 16px 20px; background: white; border-radius: 16px; border-left: 3px solid var(--foliyo-mint); box-shadow: 0 1px 4px rgba(0,0,0,0.04); animation: fadeUp 0.3s ease-out forwards; }
.advisor-inline-label { font-size: 11px; font-weight: 700; color: var(--foliyo-mint-dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.advisor-inline-question { font-size: 13px; font-weight: 600; color: var(--ink-600); margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--ink-100); }
.advisor-inline-answer { font-size: 14px; line-height: 1.6; color: var(--ink-800); font-weight: 500; }
.advisor-inline-answer ul { margin: 8px 0; padding-left: 20px; }
.advisor-inline-answer li { margin-bottom: 6px; }
.advisor-inline-answer br + br { display: none; }
.advisor-inline-typing { display: flex; gap: 4px; padding: 8px 0; }
.advisor-inline-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-500); opacity: 0.4; animation: typingDot 900ms infinite ease-in-out; }
.advisor-inline-typing span:nth-child(2) { animation-delay: 150ms; }
.advisor-inline-typing span:nth-child(3) { animation-delay: 300ms; }

.input-area.advisor-dimmed { opacity: 0.35; pointer-events: none; filter: grayscale(0.6); transition: opacity 0.3s ease, filter 0.3s ease; }

.advisor-resume-btn { margin: 12px 0 20px; padding: 10px 20px; background: var(--foliyo-mint); color: white; border: none; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s; font-family: inherit; }
.advisor-resume-btn:hover { background: var(--foliyo-mint-hover); transform: translateY(-1px); }
.advisor-resume-btn:active { transform: scale(0.97); }
.advisor-resume-btn i { width: 16px; height: 16px; }

@media (min-width: 769px) {
    .advisor-bottom-bar { display: block; }
    .advisor-fab { display: none !important; }
    .advisor-panel { display: none !important; }
    .chat-container { padding-bottom: 120px; }
    .chat-container.wide { padding-bottom: 120px; }
    /* On desktop, always show the input row, hide the mobile chips row */
    .bottom-chips-row { display: none !important; }
    #bottom-input-row { display: flex !important; }
}

@media (max-width: 768px) {
    /* Show the bottom bar on mobile (it replaces FAB + panel) */
    .advisor-bottom-bar { display: block !important; }
    .advisor-fab { display: none !important; }
    .advisor-panel { display: none !important; }
    .advisor-sheet { top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 70vh; max-height: 80vh; border-radius: 24px 24px 0 0; transform: translateY(100%); }
    .advisor-panel.open .advisor-sheet { transform: translateY(0); }
    .advisor-body { padding: 16px 20px; }
    .advisor-footer { padding: 12px 20px 20px; }
    .advisor-msg { max-width: 90%; }
}

.agent-chat-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.agent-quick-chips {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.agent-completion-cta {
    margin: 16px 0;
    padding: 16px;
    background: var(--foliyo-mint-light, #e6f9f0);
    border-radius: 12px;
    border: 1px solid var(--foliyo-mint, #1FCB8E);
}

.confirm-delta-card {
    background: var(--mint-50);
    border: 1px solid var(--mint-200);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 12px 0;
}
.confirm-delta-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}
.confirm-delta-row + .confirm-delta-row {
    border-top: 1px solid var(--mint-200);
}
.confirm-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.confirm-btn-yes {
    flex: 1;
    background: var(--foliyo-mint);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
}
.confirm-btn-no {
    flex: 1;
    background: white;
    color: var(--ink-700);
    border: 1px solid var(--ink-200);
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
}

/* ---- Hamburger + Side Menu ---- */
.header-left-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink-500);
    flex-shrink: 0;
    transition: background 0.15s;
}
.hamburger-btn:hover { background: var(--ink-100, #f0f0f0); color: var(--ink-700); }
.hamburger-btn i { width: 20px; height: 20px; }

.side-menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9000;
    opacity: 0;
    transition: opacity 0.25s;
}
.side-menu-backdrop.open { display: block; opacity: 1; }

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100dvh;
    background: var(--paper, #fff);
    z-index: 9100;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.side-menu.open { transform: translateX(0); }

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ink-200);
    height: 72px;
    flex-shrink: 0;
}
.side-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink-400);
}
.side-menu-close:hover { background: var(--ink-100, #f0f0f0); }
.side-menu-close i { width: 18px; height: 18px; }

.side-menu-nav {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}
.side-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--ink-700);
    transition: background 0.15s;
}
.side-menu-item:hover { background: var(--foliyo-mint-light, #e3f8ee); }
.side-menu-item i { width: 20px; height: 20px; color: var(--foliyo-mint-dark); flex-shrink: 0; }
.side-menu-item-title { font-size: 14px; font-weight: 600; color: var(--ink-700); }
.side-menu-item-sub { font-size: 12px; color: var(--ink-400); margin-top: 2px; }

/* ---- Insurance Footer ---- */
.ins-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    background: #f8faf9;
    border-top: 1px solid var(--ink-200);
    padding: 48px 32px 24px;
    font-family: var(--font-body);
    margin-top: 60px;
}
.ins-footer-top {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto 32px;
}
.ins-footer-brand {}
.ins-footer-tagline {
    font-size: 13px;
    color: var(--ink-400);
    margin: 0;
    max-width: 240px;
    line-height: 1.5;
}
.ins-footer-email {
    font-size: 13px;
    color: var(--foliyo-mint-dark);
    text-decoration: none;
    font-weight: 500;
}
.ins-footer-links {
    display: flex;
    gap: 48px;
}
.ins-footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ins-footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 4px;
}
.ins-footer-col a {
    font-size: 13px;
    color: var(--ink-400);
    text-decoration: none;
}
.ins-footer-col a:hover { color: var(--ink-700); }
.ins-footer-bottom {
    border-top: 1px solid var(--ink-200);
    padding-top: 20px;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ins-company-details { display: flex; flex-direction: column; gap: 4px; }
.ins-company-name { font-size: 12px; font-weight: 600; color: var(--ink-500); margin: 0; }
.ins-company-address { font-size: 11px; color: var(--ink-400); margin: 0; line-height: 1.5; }
.ins-company-reg { font-size: 11px; color: var(--ink-400); margin: 0; line-height: 1.6; }
.ins-copyright { font-size: 11px; color: var(--ink-300); margin: 0; }
.ins-disclosure { font-size: 12px; color: var(--ink-300); margin: 8px 0 0; line-height: 1.5; max-width: 600px; }
.landing-disclosure { font-size: 12px; color: var(--ink-400); margin: 16px auto 0; line-height: 1.6; max-width: 480px; text-align: center; }
.side-menu-disclosure { font-size: 12px; color: var(--ink-300); line-height: 1.5; padding: 16px 20px; margin-top: auto; border-top: 1px solid var(--ink-100); }

@media (max-width: 600px) {
    .ins-footer { padding: 36px 20px 20px; }
    .ins-footer-top { flex-direction: column; gap: 28px; }
    .ins-footer-links { gap: 32px; }
}

/* ══════════════════════════════════════════════════════════
   ADVISOR RICH UI PARTS (Generative UI for info queries)
   ══════════════════════════════════════════════════════════ */

.advisor-parts {
    margin: 0 0 16px 0;
    animation: fadeUp 0.4s ease-out forwards;
}

.advisor-parts .viz-card {
    max-width: 100%;
    margin-bottom: 8px;
}

.advisor-parts .viz-smoker-row {
    gap: 8px;
}

.advisor-parts .viz-smoker-col {
    padding: 12px 8px;
}

.advisor-parts .viz-title {
    font-size: 11px;
    margin-bottom: 10px;
}

.advisor-parts .viz-payout-bar-wrap {
    height: 20px;
}

.advisor-parts .viz-payout-bar-base,
.advisor-parts .viz-payout-bar-adb {
    font-size: 10px;
    padding-left: 6px;
}

.advisor-parts .viz-tl-row {
    padding: 6px 0;
}

.advisor-parts .viz-tl-title {
    font-size: 12px;
}

.advisor-parts .viz-tl-desc {
    font-size: 11px;
}

.advisor-parts .viz-term-label {
    width: 48px;
    font-size: 11px;
}

.advisor-parts .viz-term-bar-fill {
    font-size: 9px;
    padding-left: 6px;
}

.advisor-parts .viz-term-note {
    font-size: 10px;
    width: 70px;
}

/* Inline advisor parts */
.advisor-inline-parts {
    margin-top: 10px;
    animation: fadeUp 0.4s ease-out forwards;
}

.advisor-inline-parts .viz-card {
    max-width: 100%;
    margin-bottom: 8px;
}

.advisor-inline-parts .viz-smoker-row {
    gap: 8px;
}

.advisor-inline-parts .viz-smoker-col {
    padding: 12px 8px;
}

.advisor-inline-parts .viz-title {
    font-size: 11px;
    margin-bottom: 10px;
}

.advisor-inline-parts .viz-payout-bar-wrap {
    height: 20px;
}

.advisor-inline-parts .viz-payout-bar-base,
.advisor-inline-parts .viz-payout-bar-adb {
    font-size: 10px;
    padding-left: 6px;
}

.advisor-inline-parts .viz-tl-row {
    padding: 6px 0;
}

.advisor-inline-parts .viz-tl-title {
    font-size: 12px;
}

.advisor-inline-parts .viz-tl-desc {
    font-size: 11px;
}

.advisor-inline-parts .viz-term-label {
    width: 48px;
    font-size: 11px;
}

.advisor-inline-parts .viz-term-bar-fill {
    font-size: 9px;
    padding-left: 6px;
}

.advisor-inline-parts .viz-term-note {
    font-size: 10px;
    width: 70px;
}

/* ── Generic Rich Visual Layouts ─────────────────────────────────── */

/* Stat cards grid */
.viz-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}
.viz-stat-card {
    background: var(--paper);
    border: 1px solid var(--ink-100);
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(14, 26, 20, 0.04);
}
.viz-stat-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-500);
    margin-bottom: 6px;
}
.viz-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.viz-stat-sub {
    font-size: 11px;
    color: var(--ink-400);
    margin-top: 4px;
    line-height: 1.3;
}

/* Flow steps */
.viz-flow-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}
/* vertical connector line between steps */
.viz-flow-wrap::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 28px;
    width: 2px;
    background: var(--ink-100);
    z-index: 0;
}
.viz-flow-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    z-index: 1;
    padding-bottom: 12px;
}
.viz-flow-step:last-child {
    padding-bottom: 0;
}
.viz-flow-num {
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--mint-100);
    color: var(--mint-600);
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--mint-200);
}
.viz-flow-body {
    flex: 1;
    padding: 4px 0 0;
}
.viz-flow-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 2px;
    line-height: 1.35;
}
.viz-flow-desc {
    font-size: 12px;
    color: var(--ink-500);
    line-height: 1.5;
}

/* Bullet highlights */
.viz-bullet-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.viz-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
/* no per-row background, border, or card chrome — just whitespace rhythm */
.viz-bullet-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* default neutral intent; overridden by intent classes below */
    background: var(--intent-neutral-bg);
    color: var(--intent-neutral-fg);
}
.viz-bullet-icon i {
    width: 18px;
    height: 18px;
}
/* Intent-coded icon containers */
.viz-icon-warning  { background: var(--intent-warning-bg);  color: var(--intent-warning-fg); }
.viz-icon-success  { background: var(--intent-success-bg);  color: var(--intent-success-fg); }
.viz-icon-info     { background: var(--intent-info-bg);     color: var(--intent-info-fg); }
.viz-icon-negative { background: var(--intent-negative-bg); color: var(--intent-negative-fg); }
.viz-icon-time     { background: var(--intent-time-bg);     color: var(--intent-time-fg); }
.viz-icon-up       { background: var(--intent-up-bg);       color: var(--intent-up-fg); }
.viz-icon-down     { background: var(--intent-down-bg);     color: var(--intent-down-fg); }
.viz-icon-neutral  { background: var(--intent-neutral-bg);  color: var(--intent-neutral-fg); }
.viz-bullet-body {
    flex: 1;
    min-width: 0;
}
.viz-bullet-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 3px;
    line-height: 1.35;
}
.viz-bullet-desc {
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-500);
    line-height: 1.5;
}

/* Comparison bars */
.viz-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.viz-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.viz-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-900);
}
.viz-bar-track {
    height: 28px;
    background: var(--ink-100);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}
.viz-bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    border-radius: var(--radius-pill);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12);
}
/* green bar (non-smoker / good / lower) */
.viz-bar-fill-green {
    background: linear-gradient(90deg, var(--mint-300), var(--mint-500));
}
/* coral bar (smoker / higher rate / worse) */
.viz-bar-fill-coral {
    background: linear-gradient(90deg, var(--coral-300), var(--coral-500));
}
/* neutral bar fallback */
.viz-bar-fill-neutral {
    background: linear-gradient(90deg, var(--ink-300), var(--ink-400));
}
.viz-bar-footer {
    font-size: 12px;
    color: var(--ink-400);
    font-style: italic;
    margin-top: 6px;
    line-height: 1.4;
}

/* Key-value list */
.viz-kv-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.viz-kv-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--ink-100);
}
.viz-kv-row:last-child {
    border-bottom: none;
}
.viz-kv-key {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-600);
}
.viz-kv-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-900);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Inline advisor compact overrides */
.advisor-inline-parts .viz-card {
    padding: 12px;
}
.advisor-inline-parts .viz-title {
    font-size: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
}
/* stat cards */
.advisor-inline-parts .viz-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.advisor-inline-parts .viz-stat-value {
    font-size: 18px;
}
.advisor-inline-parts .viz-stat-label {
    font-size: 9px;
}
.advisor-inline-parts .viz-stat-sub {
    font-size: 10px;
}
/* flow steps */
.advisor-inline-parts .viz-flow-wrap::before {
    left: 11px;
    top: 22px;
    bottom: 22px;
}
.advisor-inline-parts .viz-flow-step {
    gap: 8px;
    padding-bottom: 10px;
}
.advisor-inline-parts .viz-flow-num {
    min-width: 24px;
    height: 24px;
    font-size: 11px;
}
.advisor-inline-parts .viz-flow-label {
    font-size: 12px;
}
.advisor-inline-parts .viz-flow-desc {
    font-size: 11px;
}
/* bullet highlights */
.advisor-inline-parts .viz-bullet-wrap {
    gap: 12px;
}
.advisor-inline-parts .viz-bullet-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}
.advisor-inline-parts .viz-bullet-icon i {
    width: 15px;
    height: 15px;
}
.advisor-inline-parts .viz-bullet-title {
    font-size: 13px;
}
.advisor-inline-parts .viz-bullet-desc {
    font-size: 12px;
}
/* comparison bars */
.advisor-inline-parts .viz-bar-track {
    height: 24px;
}
.advisor-inline-parts .viz-bar-fill {
    font-size: 11px;
}
.advisor-inline-parts .viz-bar-label {
    font-size: 12px;
}
/* key-value */
.advisor-inline-parts .viz-kv-key {
    font-size: 12px;
}
.advisor-inline-parts .viz-kv-value {
    font-size: 12px;
}
/* formula */
.advisor-inline-parts .viz-formula-row {
    font-size: 12px;
}
.advisor-inline-parts .viz-formula-result {
    font-size: 13px;
    padding: 8px 12px;
}

/* Dev-only badge showing which backend (java/python) served the response */
.backend-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    opacity: 0.75;
}

/* Pre-name screen: hide the bottom Ask-Fia bar AND the mobile plan preview.
   The bottom bar's mobile rule uses `display: block !important` so we match
   the specificity here. Same for the plan preview which can render before
   the user has entered any data. */
body.pre-name .advisor-bottom-bar { display: none !important; }
body.pre-name .mobile-plan-toggle,
body.pre-name #mobile-plan-panel { display: none !important; }

/* Advisor-booking nudge on the results screen.
   Sits inside the main quote card just below the Buy Now action row.
   Visual: light mint card, calendar icon, title + 1-line subtext, arrow-right CTA on the right. */
.advisor-booking-card {
    margin-top: 24px;
    padding: 20px;
    background: var(--mint-50, #f0fdf4);
    border: 1px solid var(--mint-200);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.advisor-booking-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.advisor-booking-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--paper);
    border: 1px solid var(--mint-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mint-700);
}
.advisor-booking-icon i { width: 18px; height: 18px; }
.advisor-booking-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.3;
}
@media (max-width: 480px) {
    .advisor-booking-icon { width: 26px; height: 26px; }
    .advisor-booking-icon i { width: 14px; height: 14px; }
    .advisor-booking-title { font-size: 13px; }
}
.advisor-callouts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.advisor-callouts li {
    font-size: 13.5px;
    color: var(--ink-600);
    line-height: 1.4;
    padding-left: 20px;
    position: relative;
}
.advisor-callouts li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--mint-500);
    font-weight: 700;
    font-size: 12px;
    top: 1px;
}
.advisor-booking-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: var(--mint-600, #059669);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    letter-spacing: 0.01em;
}
.advisor-booking-btn:hover { background: var(--mint-700, #047857); transform: translateY(-1px); }
.advisor-booking-btn:active { transform: translateY(0); }
.advisor-booking-btn i { width: 17px; height: 17px; }
.advisor-booking-disclosure {
    font-size: 11px;
    color: var(--ink-300);
    line-height: 1.4;
    margin-top: -4px;
}

/* ── Premium Estimate Card (step 9 inline) ───────────────────────────── */
.pec-wrapper { margin: 8px 0 4px; }
.pec-card {
    background: var(--paper);
    border: 1.5px solid var(--ink-100);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pec-header { display: flex; flex-direction: column; gap: 6px; }
.pec-header-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-400);
}
.pec-amount-row { display: flex; align-items: baseline; gap: 1px; }
.pec-currency { font-size: 22px; font-weight: 700; color: var(--ink-800); line-height: 1; }
.pec-amount { font-size: 44px; font-weight: 800; color: var(--ink-900); line-height: 1; }
.pec-period { font-size: 16px; font-weight: 500; color: var(--ink-400); margin-left: 3px; }
.pec-slider-section { display: flex; flex-direction: column; gap: 4px; }
.pec-slider-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.pec-slider-lbl { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.pec-slider-val { font-size: 13px; font-weight: 700; color: var(--mint-700); }
.pec-range { margin: 8px 0 4px !important; }
.pec-range-marks {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--ink-400);
    margin-top: -2px;
}
.pec-recommended-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--mint-600);
}
.pec-divider { height: 1px; background: var(--ink-100); }
.pec-breakdown { display: flex; flex-direction: column; gap: 10px; }
.pec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pec-row-label { font-size: 13.5px; color: var(--ink-600); }
.pec-row-val { font-size: 13.5px; font-weight: 600; color: var(--ink-900); }
.pec-row-base .pec-row-label { font-weight: 700; color: var(--ink-800); }
.pec-base-val { color: var(--mint-700) !important; }
.pec-not-selected {
    font-size: 12px;
    font-weight: 400 !important;
    color: var(--ink-300) !important;
    font-style: italic;
}
.pec-disclosure {
    font-size: 11px;
    color: var(--ink-300);
    line-height: 1.5;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid var(--ink-100);
}

/* ── Contact input heartbeat (step 16) ──────────────────────────────── */
.contact-email-input {
    border: 2px solid var(--mint-400);
    animation: heartbeat 1.4s ease-in-out infinite;
}

/* ── Compact coverage rows (results page + inline card) ─────────────── */
.compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.compact-row-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    min-width: 110px;
    flex-shrink: 0;
}
.compact-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-400);
    margin-bottom: 8px;
}

/* ── Coverage slider (compact) ──────────────────────────────────────── */
.cov-sl-wrap { flex: 1; min-width: 160px; }
.cov-sl-header { display: flex; justify-content: flex-end; margin-bottom: 2px; }
.cov-sl-val { font-size: 13px; font-weight: 700; color: var(--mint-700); }
.cov-sl { margin: 4px 0 !important; }
.cov-sl-marks {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--ink-400);
    margin-top: -2px;
}

/* ── Pill selector ──────────────────────────────────────────────────── */
.pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--ink-200);
    border-radius: var(--radius-pill);
    background: var(--paper);
    color: var(--ink-600);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}
.pill-btn:hover { border-color: var(--mint-400); color: var(--mint-700); }
.pill-btn.active {
    background: var(--mint-600);
    border-color: var(--mint-600);
    color: #fff;
}

/* ── Inline change card ─────────────────────────────────────────────── */
.inline-change-card { padding: 20px 20px 24px; }
.icc-premium-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--ink-100);
}
.icc-premium-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-400);
    margin-bottom: 4px;
}
.icc-premium-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--mint-700);
    line-height: 1;
}
.icc-premium-mo {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-400);
    margin-left: 2px;
}
.icc-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-400);
    margin-bottom: 4px;
}
.icc-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 0;
    border-bottom: 1px solid var(--ink-100);
}
.icc-row-last { border-bottom: none; }
.icc-row-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-800);
}
.icc-row .cov-sl-wrap { margin-top: 2px; }
.icc-row .pill-group { margin-top: 4px; }
.icc-row .lemon-slider { margin: 6px 0 2px !important; }
