/* Hygiene Treatment Plan Presenter
 *
 * BEM namespace: lxf-htp__*
 * Hydration container: [data-lxf-htp]
 *
 * Heading typography is set globally in global.css.
 * Impact dot grid uses JS-appended lxf-htp__dot / lxf-htp__dot--filled classes.
 * Print mode: html.lxf-print-mode — hides selector, reference, chrome.
 */

/* ── Section wrapper ─────────────────────────────────────────────────── */

.lxf-hygiene-treatment-plan {
    padding-top: var(--lxf-space-lg, 6rem);
    padding-bottom: var(--lxf-space-xl, 8rem);
}

.lxf-htp {
    max-width: 860px;
    margin-inline: auto;
}

/* ── Hero (minimal) ──────────────────────────────────────────────────── */

.lxf-htp__hero {
    margin-bottom: 3rem;
}

.lxf-htp__hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--lxf-font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lxf-navy);
    margin: 0 0 0.75rem;
}

.lxf-htp__hero-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lxf-blue);
    box-shadow: 0 0 0 0 rgba(70, 127, 247, 0.6);
    animation: lxf-htp-pulse 2.4s ease-out infinite;
}

@keyframes lxf-htp-pulse {
    0%  { box-shadow: 0 0 0 0 rgba(70, 127, 247, 0.55); }
    70% { box-shadow: 0 0 0 12px rgba(70, 127, 247, 0); }
    100%{ box-shadow: 0 0 0 0 rgba(70, 127, 247, 0); }
}

@media (prefers-reduced-motion: reduce) { .lxf-htp__hero-pulse { animation: none; } }

.lxf-htp__hero-title {
    color: var(--lxf-navy);
    line-height: 1.08;
    margin: 0 0 1rem;
}

.lxf-htp__hero-lead {
    color: var(--lxf-gray-700, #374151);
    line-height: 1.65;
    margin: 0;
    max-width: 58ch;
}

/* ── Diagnosis selector (Step 1) ─────────────────────────────────────── */

.lxf-htp__step-heading {
    color: var(--lxf-navy);
    margin: 0 0 0.375rem;
}

.lxf-htp__step-lede {
    font-size: 0.9375rem;
    color: var(--lxf-gray-600, #4b5563);
    margin: 0 0 1.75rem;
    line-height: 1.55;
}

.lxf-htp__dx-groups {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.lxf-htp__dx-group-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lxf-gray-500, #9ca3af);
    margin: 0 0 0.625rem;
}

.lxf-htp__dx-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lxf-htp__dx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 2px solid var(--lxf-gray-200, #e9ecef);
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--lxf-gray-700, #374151);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    text-align: left;
    white-space: nowrap;
}

.lxf-htp__dx-chip:hover {
    border-color: var(--lxf-navy);
    color: var(--lxf-navy);
}

.lxf-htp__dx-chip[aria-pressed="true"] {
    border-color: var(--lxf-navy);
    background: var(--lxf-navy);
    color: #fff;
}

/* Severity dot on each chip */
.lxf-htp__dx-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--lxf-gray-300, #dee2e6);
}

[data-severity="none"]     .lxf-htp__dx-dot { background: #22c55e; }
[data-severity="mild"]     .lxf-htp__dx-dot { background: #f59e0b; }
[data-severity="moderate"] .lxf-htp__dx-dot { background: #f97316; }
[data-severity="severe"]   .lxf-htp__dx-dot { background: #ef4444; }
[data-severity="critical"] .lxf-htp__dx-dot { background: #b91c1c; }
[data-severity="appliance"].lxf-htp__dx-dot { background: var(--lxf-blue); }

.lxf-htp__dx-chip[aria-pressed="true"] .lxf-htp__dx-dot {
    background: rgba(255,255,255,0.55);
}

.lxf-htp__dx-actions {
    margin-top: 0.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--lxf-gray-200, #e9ecef);
}

/* ── Plan view (Step 2) ──────────────────────────────────────────────── */

.lxf-htp__step-plan { margin-bottom: 3.5rem; }

.lxf-htp__plan-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.25rem;
}

/* Paper card: remove box-shadow, let content breathe */
.lxf-htp__paper.lxf-paper-card {
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
}

.lxf-htp__plan-title-wrap {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--lxf-gray-200, #e9ecef);
}

.lxf-htp__plan-eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lxf-blue);
    margin: 0 0 0.25rem;
}

.lxf-htp__plan-dx-name {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--lxf-navy);
    margin: 0;
    line-height: 1.2;
}

.lxf-htp__back-btn {
    background: transparent;
    border: 1px solid var(--lxf-gray-300, #dee2e6);
    border-radius: var(--lxf-radius-lg);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lxf-gray-700, #374151);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.lxf-htp__back-btn:hover { border-color: var(--lxf-navy); color: var(--lxf-navy); }

.lxf-htp__print-btn {
    background: var(--lxf-navy);
    color: #fff;
    border: none;
    border-radius: var(--lxf-radius-lg);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.lxf-htp__print-btn:hover { background: #001d47; }

/* ── Recommendation cards ────────────────────────────────────────────── */

.lxf-htp__plan-grid {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.lxf-htp__rec {
    background: #fff;
    border: 1.5px solid var(--lxf-gray-200, #e9ecef);
    border-radius: var(--lxf-radius-lg);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lxf-htp__rec--expanded {
    border-color: var(--lxf-blue);
    box-shadow: inset 3px 0 0 var(--lxf-blue, #2563eb), 0 4px 20px rgba(37, 99, 235, 0.1);
}

.lxf-htp__rec:not(.lxf-htp__rec--expanded):hover {
    border-color: var(--lxf-blue-200, #bfdbfe);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06);
}

.lxf-htp__rec-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.lxf-htp__rec-header-main {
    flex: 1 1 auto;
    min-width: 0;
}

.lxf-htp__rec-top {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.375rem;
}

/* Indication level badges */
.lxf-htp__badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.5625rem;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}

.lxf-htp__badge--primary    { background: transparent; border: 1.5px solid var(--lxf-navy); color: var(--lxf-navy); }
.lxf-htp__badge--indicated  { background: var(--lxf-blue); color: #fff; }
.lxf-htp__badge--adjunctive { background: #0d9488; color: #fff; }
.lxf-htp__badge--preventive { background: var(--lxf-gray-200, #e9ecef); color: var(--lxf-gray-600, #4b5563); }

.lxf-htp__rec-name {
    color: var(--lxf-navy);
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    line-height: 1.25;
}

.lxf-htp__rec-tagline {
    font-size: 0.875rem;
    color: var(--lxf-gray-600, #4b5563);
    line-height: 1.5;
    margin: 0;
    max-width: 60ch;
}

.lxf-htp__rec-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
}

.lxf-htp__rec-price {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--lxf-navy);
    white-space: nowrap;
}

.lxf-htp__rec-cdt {
    font-size: 0.6875rem;
    color: var(--lxf-gray-500, #9ca3af);
    background: var(--lxf-gray-100, #f8f9fa);
    padding: 0.15rem 0.4rem;
    border-radius: var(--lxf-radius-sm, 0.25rem);
}

.lxf-htp__rec-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: none;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--lxf-blue);
    cursor: pointer;
    white-space: nowrap;
}

.lxf-htp__rec-toggle:hover { color: var(--lxf-navy); }

/* The toggle sits below the right-side content on small screens */
@media (max-width: 500px) {
    .lxf-htp__rec-header { flex-direction: column; }
    .lxf-htp__rec-right  { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
}

/* ── Detail panel ────────────────────────────────────────────────────── */

.lxf-htp__rec-detail {
    border-top: 1px solid var(--lxf-gray-200, #e9ecef);
    padding: 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--lxf-gray-100, #f8f9fa);
}

/* ── Impact grid (in expanded detail only) ───────────────────────────── */

.lxf-htp__impact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lxf-htp__impact-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.lxf-htp__impact-icon {
    color: var(--lxf-gray-400, #ced4da);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lxf-htp__impact-label {
    font-size: 0.8125rem;
    color: var(--lxf-gray-600, #4b5563);
    flex: 1;
    white-space: nowrap;
}

.lxf-htp__impact-dots {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.lxf-htp__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lxf-gray-200, #e9ecef);
}

.lxf-htp__dot--filled { background: var(--lxf-blue); }

/* ── Evidence block ──────────────────────────────────────────────────── */

.lxf-htp__rec-evidence {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--lxf-gray-200, #e9ecef);
    border-radius: var(--lxf-radius-lg);
    padding: 1.125rem;
    border-left-width: 4px;
}

.lxf-htp__rec-evidence--high     { border-left-color: #16a34a; }
.lxf-htp__rec-evidence--moderate { border-left-color: #d97706; }
.lxf-htp__rec-evidence--emerging { border-left-color: var(--lxf-gray-400, #ced4da); }

.lxf-htp__evidence-stars {
    display: flex;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.lxf-htp__evidence-star { color: var(--lxf-gray-300, #dee2e6); font-size: 0.9375rem; }
.lxf-htp__evidence-star--filled { color: #d97706; }

.lxf-htp__evidence-inner { min-width: 0; }

.lxf-htp__evidence-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--lxf-navy);
    margin-bottom: 0.25rem;
}

.lxf-htp__evidence-summary {
    font-size: 0.875rem;
    color: var(--lxf-gray-600, #4b5563);
    line-height: 1.6;
    margin: 0;
}

/* ── Explainer blocks ────────────────────────────────────────────────── */

.lxf-htp__rec-explainer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.125rem;
}

@media (min-width: 640px) {
    .lxf-htp__rec-explainer { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

.lxf-htp__explainer-block h5 {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lxf-navy);
    margin: 0 0 0.375rem;
}

.lxf-htp__explainer-block p {
    font-size: 0.875rem;
    color: var(--lxf-gray-600, #4b5563);
    line-height: 1.65;
    margin: 0;
}

/* ── Pricing block ───────────────────────────────────────────────────── */

.lxf-htp__rec-pricing {
    background: var(--lxf-light-blue, #dfeeff);
    border-radius: var(--lxf-radius-lg);
    padding: 0.875rem 1.125rem;
    font-size: 0.9375rem;
    color: var(--lxf-navy);
}

.lxf-htp__rec-cdt-detail {
    font-size: 0.8125rem;
    color: var(--lxf-gray-500, #9ca3af);
    margin-left: 0.5rem;
}

.lxf-htp__rec-price-note {
    font-size: 0.8125rem;
    color: var(--lxf-gray-600, #4b5563);
    margin: 0.375rem 0 0;
    line-height: 1.5;
}

/* ── Summary (at-a-glance checklist) ────────────────────────────────── */

.lxf-htp__summary {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--lxf-gray-200, #e9ecef);
}

.lxf-htp__summary-heading {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lxf-gray-400, #9ca3af);
    margin: 0 0 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.lxf-htp__summary-heading::before,
.lxf-htp__summary-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--lxf-gray-200, #e9ecef);
}

.lxf-htp__sum-list {
    list-style: none;
    margin: 0;
    padding-inline-start: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lxf-htp__sum-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--lxf-gray-100, #f8f9fa);
    flex-wrap: wrap;
    transition: opacity 0.2s;
}

.lxf-htp__sum-item--off {
    opacity: 0.4;
}

.lxf-htp__sum-item--off .lxf-htp__sum-name {
    text-decoration: line-through;
    color: var(--lxf-gray-400, #ced4da);
}

.lxf-htp__check {
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    border: 2px solid var(--lxf-gray-300, #dee2e6);
    background: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--lxf-gray-400, #ced4da);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    line-height: 1;
    padding: 0;
}

.lxf-htp__sum-item--on .lxf-htp__check {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.lxf-htp__sum-item--off .lxf-htp__check {
    border-color: var(--lxf-gray-300, #dee2e6);
    background: #fff;
    color: var(--lxf-gray-400, #ced4da);
}

.lxf-htp__check:hover {
    border-color: var(--lxf-navy);
}

.lxf-htp__sum-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--lxf-navy);
    flex: 1 1 120px;
    min-width: 0;
}

.lxf-htp__sum-price {
    font-size: 0.8125rem;
    color: var(--lxf-gray-600, #4b5563);
    flex-shrink: 0;
    margin-left: auto;
}

/* ── Verbose (detail cards) section ──────────────────────────────────── */

.lxf-htp__verbose-heading {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lxf-gray-400, #9ca3af);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.lxf-htp__verbose-heading::before,
.lxf-htp__verbose-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--lxf-gray-200, #e9ecef);
}

.lxf-htp__verbose-grid {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

/* ── Print letterhead (hidden on-screen, visible in print) ───────────── */

.lxf-htp__print-header {
    display: none;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--lxf-navy);
}

/* ── Reference section (SEO; collapsed via <details>) ────────────────── */

.lxf-htp__reference {
    margin-top: 3rem;
    border-top: 1px solid var(--lxf-gray-200, #e9ecef);
    padding-top: 1.5rem;
}

.lxf-htp__reference-summary {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lxf-gray-500, #9ca3af);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    user-select: none;
}

.lxf-htp__reference-summary::-webkit-details-marker { display: none; }

.lxf-htp__reference-summary::after {
    content: '↓';
    font-size: 0.75rem;
    transition: transform 0.2s;
}

details[open] .lxf-htp__reference-summary::after {
    transform: rotate(180deg);
}

.lxf-htp__reference-inner {
    padding-top: 2rem;
}

.lxf-htp__reference-group {
    margin-bottom: 2.5rem;
}

.lxf-htp__reference-group-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lxf-gray-500, #9ca3af);
    margin: 0 0 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--lxf-gray-200, #e9ecef);
}

.lxf-htp__ref-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lxf-htp__ref-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--lxf-gray-100, #f8f9fa);
}

.lxf-htp__ref-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--lxf-navy);
    flex: 0 0 auto;
    margin: 0;
}

.lxf-htp__ref-tagline {
    font-size: 0.875rem;
    color: var(--lxf-gray-600, #4b5563);
    flex: 1 1 200px;
    margin: 0;
    line-height: 1.5;
}

.lxf-htp__ref-price {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--lxf-navy);
    flex: 0 0 auto;
    white-space: nowrap;
}

.lxf-htp__ref-evidence-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
    border: 1px solid var(--lxf-gray-200, #e9ecef);
    color: var(--lxf-gray-600, #4b5563);
    background: var(--lxf-gray-100, #f8f9fa);
    flex: 0 0 auto;
}

.lxf-htp__ref-evidence-badge--high     { border-color: #16a34a; color: #15803d; background: #f0fdf4; }
.lxf-htp__ref-evidence-badge--moderate { border-color: #d97706; color: #92400e; background: #fffbeb; }

/* ── CTA block ───────────────────────────────────────────────────────── */

.lxf-htp__cta-block {
    text-align: center;
    background: linear-gradient(135deg, var(--lxf-navy) 0%, #1e3a8a 100%);
    color: #fff;
    border-radius: var(--lxf-radius-lg);
    padding: 2.5rem 2rem;
    margin-top: 3.5rem;
    position: relative;
    overflow: hidden;
}
.lxf-htp__cta-block::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, transparent 65%);
    pointer-events: none;
}

.lxf-htp__cta-heading { color: #fff; margin: 0 0 0.875rem; }

.lxf-htp__cta-body {
    color: rgba(255,255,255,0.82);
    max-width: 50ch;
    margin: 0 auto 1.75rem;
    line-height: 1.65;
    font-size: 0.9375rem;
}

.lxf-htp__cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── SVG sprite (hidden scaffold) ────────────────────────────────────── */

.lxf-htp__svg-sprite { display: none; }

/* ── Empty state ─────────────────────────────────────────────────────── */

.lxf-htp__empty {
    font-size: 0.9375rem;
    color: var(--lxf-gray-500, #9ca3af);
    text-align: center;
    padding: 2rem;
}

/* ── Print mode ──────────────────────────────────────────────────────── */

/* print.css handles site chrome isolation via:
 *   html.lxf-print-mode body * { visibility: hidden }
 *   html.lxf-print-mode .lxf-paper-card * { visibility: visible }
 *   html.lxf-print-mode .lxf-paper-wrap { position: absolute; top: 0; left: 0; width: 100% }
 * The plan content lives inside .lxf-paper-card so it prints cleanly.
 * These rules handle HTP-specific print layout within that surface.
 */
@media print {
    .lxf-htp__print-header { display: flex !important; }
    .lxf-htp__rec { break-inside: avoid; border: 1px solid #ddd; }
    .lxf-htp__rec-detail[hidden] { display: flex !important; }
    .lxf-htp__rec-toggle { display: none !important; }
    .lxf-htp__rec-explainer { grid-template-columns: 1fr; }
    .lxf-htp__rec-evidence { break-inside: avoid; }
    .lxf-htp__sum-item--off { display: none !important; }
    .lxf-htp__verbose-grid [hidden] { display: none !important; }
}

/* ── Reduced motion ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .lxf-htp__dx-chip,
    .lxf-htp__rec,
    .lxf-htp__back-btn,
    .lxf-htp__print-btn { transition: none; }
    .lxf-htp__hero-pulse { animation: none; }
}

/* ── Insurance step ──────────────────────────────────────────────────── */
/* tools-saas.css applies card chrome + the [hidden] override */

.lxf-htp__step-ins {
    display: flex;
    justify-content: center;
    padding: var(--lxf-space-lg) var(--lxf-space-sm);
}

.lxf-htp__step-ins-card {
    max-width: 480px;
    width: 100%;
}

.lxf-htp__step-ins-card .lxf-htp__step-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lxf-blue);
    margin-bottom: 0.25rem;
}

.lxf-htp__step-ins-card .lxf-htp__step-heading {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.lxf-htp__step-ins-card .lxf-htp__step-lead {
    color: var(--lxf-gray-600, #4b5563);
    margin-bottom: 1.5rem;
}

.lxf-htp__ins-carrier {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--lxf-gray-300, #d1d5db);
    border-radius: var(--lxf-radius-sm);
    font-family: var(--lxf-font-body);
    font-size: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    appearance: auto;
    cursor: pointer;
}

.lxf-htp__ins-carrier:focus {
    outline: 2px solid var(--lxf-blue);
    outline-offset: 2px;
}

.lxf-htp__ins-ded {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.lxf-htp__ins-ded-check {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--lxf-blue);
    flex-shrink: 0;
    cursor: pointer;
}

.lxf-htp__ins-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── Insurance estimate rows on cards ────────────────────────────────── */

.lxf-htp__ins-row {
    margin-top: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: var(--lxf-light-blue, #eff6ff);
    border-radius: var(--lxf-radius-sm);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lxf-htp__ins-est {
    font-weight: 600;
    color: var(--lxf-navy);
}

.lxf-htp__ins-cov {
    color: var(--lxf-gray-600, #4b5563);
}

.lxf-htp__ins-hedge {
    font-size: 0.8125rem;
    color: var(--lxf-gray-500, #6b7280);
    margin: 0.25rem 0 0;
    font-style: italic;
}

.lxf-htp__ins-oon {
    color: var(--lxf-gray-500, #6b7280);
}

/* ── Insurance estimate in summary row ───────────────────────────────── */

.lxf-htp__sum-ins {
    font-size: 0.8125rem;
    color: var(--lxf-navy);
    font-weight: 500;
    white-space: nowrap;
    padding: 0.125rem 0.375rem;
    background: var(--lxf-light-blue, #eff6ff);
    border-radius: 0.25rem;
}

/* Print: hide insurance step; insurance rows print inline on cards */
@media print {
    .lxf-htp__step-ins { display: none !important; }
}

/* ── Care Impact Score section ───────────────────────────────────────── */

.lxf-htp__plan-score {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--lxf-navy);
    line-height: 1;
}

.lxf-htp__plan-score-num {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 0.9;
    color: var(--lxf-blue, #2563eb);
    vertical-align: middle;
    margin: 0 0.125em;
}

/* ── Aggregate impact bars ────────────────────────────────────────────── */

.lxf-htp__agg-wrap { margin-bottom: 0.75rem; }

.lxf-htp__agg-bars {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.lxf-htp__agg-row {
    display: grid;
    grid-template-columns: 1.25rem 6.5rem 1fr 2.25rem;
    align-items: center;
    gap: 0.75rem;
}

.lxf-htp__agg-icon {
    display: flex;
    align-items: center;
    color: var(--lxf-blue, #2563eb);
}

.lxf-htp__agg-icon svg { width: 1rem; height: 1rem; }

.lxf-htp__agg-label {
    font-size: 0.8125rem;
    color: var(--lxf-gray-600, #4b5563);
    white-space: nowrap;
}

.lxf-htp__agg-track {
    position: relative;
    height: 0.5rem;
    background: var(--lxf-blue-200, #bfdbfe);
    border-radius: 999px;
    overflow: hidden;
}

.lxf-htp__agg-fill {
    height: 100%;
    background: var(--lxf-blue, #2563eb);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    transition: width 0.3s ease, background 0.3s ease;
}
.lxf-htp__agg-fill::after {
    content: '';
    position: absolute;
    inset: 0 0 50% 0;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px 999px 0 0;
    pointer-events: none;
}

.lxf-htp__agg-val {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--lxf-navy);
    text-align: right;
}

/* ── Score note (disclaimer) ─────────────────────────────────────────── */

.lxf-htp__score-note {
    margin: 0;
    font-size: 0.75rem;
    color: var(--lxf-gray-500, #6b7280);
    font-style: italic;
    line-height: 1.4;
}

/* ── Score pill on recommendation cards ──────────────────────────────── */

.lxf-htp__rec-score {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--lxf-blue, #2563eb);
    background: var(--lxf-light-blue, #eff6ff);
    border: 1px solid var(--lxf-blue-200, #bfdbfe);
    border-radius: 999px;
    padding: 0.125rem 0.5rem;
    white-space: nowrap;
    margin-left: 0.375rem;
}

/* ── Score pill in summary list ──────────────────────────────────────── */

.lxf-htp__sum-score {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--lxf-blue, #2563eb);
    white-space: nowrap;
}

/* ── Post-results deductible toggle ──────────────────────────────────── */

.lxf-htp__ded-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--lxf-blue-200, #bfdbfe);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: var(--lxf-navy);
    cursor: pointer;
    user-select: none;
}

.lxf-htp__ded-check {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--lxf-blue, #2563eb);
}

.lxf-htp__ded-year { font-weight: 600; }

/* ── Optional add-ons section ────────────────────────────────────────── */

.lxf-htp__addons {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--lxf-blue-200, #bfdbfe);
}

.lxf-htp__addons-heading {
    margin: 0 0 0.25rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--lxf-navy);
}

.lxf-htp__addons-sub {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--lxf-gray-600, #4b5563);
    line-height: 1.5;
}

.lxf-htp__addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.875rem;
}

/* ── Individual add-on card ──────────────────────────────────────────── */

.lxf-htp__addon {
    background: #fff;
    border: 1.5px solid var(--lxf-gray-200, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lxf-htp__addon--on {
    border-color: var(--lxf-blue, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lxf-htp__addon-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.lxf-htp__addon-toggle {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 2px solid var(--lxf-gray-300, #d1d5db);
    background: transparent;
    color: var(--lxf-gray-500, #6b7280);
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.lxf-htp__addon--on .lxf-htp__addon-toggle {
    border-color: var(--lxf-blue, #2563eb);
    background: var(--lxf-blue, #2563eb);
    color: #fff;
}

.lxf-htp__addon-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--lxf-navy);
    flex: 1;
}

.lxf-htp__addon-score-pill {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--lxf-blue, #2563eb);
    background: var(--lxf-light-blue, #eff6ff);
    border: 1px solid var(--lxf-blue-200, #bfdbfe);
    border-radius: 999px;
    padding: 0.125rem 0.5rem;
    white-space: nowrap;
}

.lxf-htp__addon-tagline {
    margin: 0 0 0.625rem;
    font-size: 0.8125rem;
    color: var(--lxf-gray-600, #4b5563);
    line-height: 1.4;
}

.lxf-htp__addon-foot {
    margin-top: 0.625rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--lxf-gray-100, #f3f4f6);
}

.lxf-htp__addon-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lxf-navy);
}

/* ── Healthy baseline tick on aggregate bars ─────────────────────────── */

.lxf-htp__agg-healthy-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #2563eb;
    border-radius: 999px;
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
}

/* ── Stats section (bars below at-a-glance) ──────────────────────────── */

.lxf-htp__stats-section {
    padding: 1.25rem 1.5rem 1.125rem;
    border: 1px solid var(--lxf-blue-200, #bfdbfe);
    border-radius: 0 0 0.75rem 0.75rem;
    background: var(--lxf-light-blue, #eff6ff);
    margin-bottom: 1.25rem;
}

/* ── Score section: keep only the counter, remove bars from top ──────── */

.lxf-htp__score-section {
    background: var(--lxf-navy);
    color: #fff;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1rem 1.5rem;
    margin-bottom: 0;
}

.lxf-htp__score-section .lxf-htp__plan-score { color: rgba(255,255,255,0.7); margin: 0; }
.lxf-htp__score-section .lxf-htp__plan-score-num { color: #fff; }

/* ── Methodology link ─────────────────────────────────────────────────── */

.lxf-htp__method-link {
    display: inline-block;
    margin: 0.5rem 0 0;
    padding: 0;
    background: none;
    border: none;
    font-size: 0.8125rem;
    color: var(--lxf-blue, #2563eb);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lxf-htp__method-link:hover { color: var(--lxf-navy); }

/* ── Unified at-a-glance: adjuvant divider + modifier ───────────────── */

.lxf-htp__sum-section-label {
    list-style: none;
    padding: 0.5rem 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--lxf-gray-500, #6b7280);
    border-top: 1px dashed var(--lxf-gray-200, #e5e7eb);
    margin-top: 0.375rem;
}

.lxf-htp__sum-item--addon {
    opacity: 0.72;
    font-style: italic;
}

.lxf-htp__sum-item--on.lxf-htp__sum-item--addon {
    opacity: 1;
    font-style: normal;
}

/* ── Modal overlay + dialog ──────────────────────────────────────────── */

.lxf-htp__modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.lxf-htp__modal {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.lxf-htp__modal--wide { max-width: 600px; }

.lxf-htp__modal-header {
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid var(--lxf-gray-200, #e5e7eb);
}

.lxf-htp__modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--lxf-navy);
}

.lxf-htp__modal-body {
    padding: 1rem 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--lxf-gray-700, #374151);
    flex: 1;
}

.lxf-htp__modal-body p { margin: 0 0 0.75rem; }
.lxf-htp__modal-body p:last-child { margin-bottom: 0; }

.lxf-htp__modal-subhead {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--lxf-navy);
    margin: 0.875rem 0 0.25rem !important;
}

.lxf-htp__modal-note {
    font-size: 0.875rem;
    color: var(--lxf-gray-500, #6b7280);
    font-style: italic;
}

.lxf-htp__modal-footer {
    padding: 0.875rem 1.5rem 1.25rem;
    border-top: 1px solid var(--lxf-gray-200, #e5e7eb);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.lxf-htp__modal-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.lxf-htp__modal-btn:hover { opacity: 0.85; }

.lxf-htp__modal-btn--primary {
    background: var(--lxf-blue, #2563eb);
    color: #fff;
}

.lxf-htp__modal-btn--danger {
    background: var(--lxf-gray-100, #f3f4f6);
    color: var(--lxf-gray-700, #374151);
    border: 1px solid var(--lxf-gray-200, #e5e7eb);
}

/* ── Email my plan form ──────────────────────────────────────────────── */

.lxf-htp__email-wrap {
    margin: 1.75rem 0 2rem;
}

.lxf-htp__email-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1.5px solid var(--lxf-blue, #2563eb);
    border-radius: 0.5rem;
    color: var(--lxf-blue, #2563eb);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lxf-htp__email-trigger:hover:not(:disabled) {
    background: var(--lxf-blue, #2563eb);
    color: #fff;
}

.lxf-htp__email-trigger:disabled {
    border-color: #22c55e;
    color: #15803d;
    cursor: default;
}

.lxf-htp__email-panel {
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8faff;
    border: 1px solid var(--lxf-blue-200, #bfdbfe);
    border-radius: 0.625rem;
}

.lxf-htp__email-lead {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--lxf-gray-600, #4b5563);
    line-height: 1.5;
}

.lxf-htp__email-row {
    display: flex;
    gap: 0.5rem;
}

.lxf-htp__email-input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--lxf-gray-200, #e5e7eb);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: var(--lxf-gray-700, #374151);
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease;
}

.lxf-htp__email-input:focus {
    border-color: var(--lxf-blue, #2563eb);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.lxf-htp__email-send {
    padding: 0.5rem 1.125rem;
    background: var(--lxf-blue, #2563eb);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.lxf-htp__email-send:hover:not(:disabled) { opacity: 0.88; }
.lxf-htp__email-send:disabled { opacity: 0.55; cursor: default; }

.lxf-htp__email-fine {
    margin: 0.4rem 0 0;
    font-size: 0.75rem;
    color: var(--lxf-gray-400, #9ca3af);
}

.lxf-htp__email-success {
    margin: 0.5rem 0 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #15803d;
}

.lxf-htp__email-error {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: #b91c1c;
}

/* Top email button in plan-actions bar */
.lxf-htp__email-btn-top {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1.5px solid var(--lxf-blue, #2563eb);
    border-radius: var(--lxf-radius-lg);
    color: var(--lxf-blue, #2563eb);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lxf-htp__email-btn-top:hover {
    background: var(--lxf-blue, #2563eb);
    color: #fff;
}

/* Verbose (detail cards) section spacing */
.lxf-htp__verbose {
    margin-top: 2.5rem;
}

@media print {
    .lxf-htp__email-wrap { display: none !important; }
    .lxf-htp__email-btn-top { display: none !important; }
}

/* ── Color-coded aggregate bars ──────────────────────────────────────── */

.lxf-htp__agg-fill--good   { background: linear-gradient(90deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%); }
.lxf-htp__agg-fill--warn   { background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%); }
.lxf-htp__agg-fill--danger { background: linear-gradient(90deg, #f87171 0%, #ef4444 55%, #dc2626 100%); }

.lxf-htp__agg-row--good   .lxf-htp__agg-track { background: #eff6ff; }
.lxf-htp__agg-row--warn   .lxf-htp__agg-track { background: #fef3c7; }
.lxf-htp__agg-row--danger .lxf-htp__agg-track { background: #fee2e2; }

.lxf-htp__agg-row--good   .lxf-htp__agg-val { color: #1d4ed8; }
.lxf-htp__agg-row--warn   .lxf-htp__agg-val { color: #b45309; }
.lxf-htp__agg-row--danger .lxf-htp__agg-val { color: #b91c1c; }

/* Add color transition to the fill */
.lxf-htp__agg-fill { transition: width 0.3s ease, background 0.3s ease; }

/* ── Connected card: summary bridges score-section and stats-section ──── */

.lxf-htp__plan-content .lxf-htp__summary {
    margin-bottom: 0;
    padding: 1.25rem 1.75rem 1rem;
    border-bottom: none;
    border-left: 1px solid var(--lxf-blue-200, #bfdbfe);
    border-right: 1px solid var(--lxf-blue-200, #bfdbfe);
}

/* ── Print styles for new plan elements ──────────────────────────────── */

@media print {
    .lxf-htp__modal-overlay { display: none !important; }
    .lxf-htp__sum-section-label { display: none !important; }
    .lxf-htp__sum-item--addon:not(.lxf-htp__sum-item--on) { display: none !important; }
    .lxf-htp__method-link { display: none !important; }
    .lxf-htp__score-section {
        background: #1e3a5f !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .lxf-htp__score-section .lxf-htp__plan-score { color: rgba(255,255,255,0.7) !important; }
    .lxf-htp__score-section .lxf-htp__plan-score-num { color: #fff !important; }
    .lxf-htp__stats-section {
        background: #eff6ff !important;
        border: 1px solid #bfdbfe !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .lxf-htp__agg-fill,
    .lxf-htp__agg-track,
    .lxf-htp__agg-healthy-line {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .lxf-htp__agg-fill--good   { background: linear-gradient(90deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%) !important; }
    .lxf-htp__agg-fill--warn   { background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%) !important; }
    .lxf-htp__agg-fill--danger { background: linear-gradient(90deg, #f87171 0%, #ef4444 55%, #dc2626 100%) !important; }
    .lxf-htp__agg-row--good   .lxf-htp__agg-track { background: #eff6ff !important; }
    .lxf-htp__agg-row--warn   .lxf-htp__agg-track { background: #fef3c7 !important; }
    .lxf-htp__agg-row--danger .lxf-htp__agg-track { background: #fee2e2 !important; }
}

/* Screen expansion state follows hidden; retain the existing print expansion. */
@media screen {
    .lxf-htp__rec-detail[hidden] { display: none; }
}

/* Inactive selections remain readable and retain their struck-through names. */
.lxf-htp__sum-item--off,
.lxf-htp__sum-item--addon { opacity: 1; }
.lxf-htp__sum-item--off .lxf-htp__sum-name,
.lxf-htp__sum-item--off .lxf-htp__check,
.lxf-htp__score-note,
.lxf-htp__email-fine { color: #595959; }
.lxf-htp__plan-eyebrow,
.lxf-htp__summary-heading,
.lxf-htp__sum-score,
.lxf-htp__verbose-heading,
.lxf-htp__rec-score,
.lxf-htp__rec-toggle,
.lxf-htp__method-link,
.lxf-htp__email-trigger,
.lxf-htp__email-btn-top { color: var(--lxf-blue-action, #1d57d4); }
.lxf-htp__badge--indicated,
.lxf-htp__email-send,
.lxf-htp__email-trigger:hover:not(:disabled),
.lxf-htp__email-btn-top:hover { background: var(--lxf-blue-action, #1d57d4); color: #fff; }
.lxf-htp__badge--adjunctive { background: #006a62; }
.lxf-htp__badge--preventive { color: #454545; }
.lxf-htp__sum-item--on .lxf-htp__check { background: #117333; border-color: #117333; }
body:has([data-lxf-htp]) .lxf-mobile-cta__book { background: var(--lxf-blue-action, #1d57d4); }
.lxf-htp__impact-value { min-width: 1ch; color: #002559; font-variant-numeric: tabular-nums; }
.lxf-htp__email-label { display: block; color: #374151; margin-bottom: 0.25rem; }
.lxf-htp__method-link,
.lxf-htp__rec-toggle { min-height: 44px; }
.lxf-htp__email-input:focus-visible { outline: 3px solid var(--lxf-blue-action, #1d57d4); outline-offset: 2px; }
.lxf-htp__modal-btn--primary { background: var(--lxf-blue-action, #1d57d4); }
.lxf-htp__agg-key { margin: 0 0 0.5rem; font-size: 0.8125rem; color: #595959; }
.lxf-htp__agg-val { white-space: nowrap; min-width: 4.5ch; }
.lxf-htp__agg-row { grid-template-columns: 1.25rem 6.5rem minmax(0, 1fr) max-content; }
.lxf-htp__agg-row--warn .lxf-htp__agg-val { color: #854008; }
