/* ═══════════════════════════════════════════════════════════════════════════
   PARA Price Transparency Tool — Modern Design System
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
    /* Brand */
    --hpt-primary:          #1a56a8;
    --hpt-primary-light:    #2e6bc4;
    --hpt-primary-dark:     #0f3d80;
    --hpt-accent:           #0ea5e9;
    --hpt-accent-bg:        #e0f2fe;

    /* Status */
    --hpt-success:          #16a34a;
    --hpt-success-bg:       #f0fdf4;
    --hpt-warning:          #d97706;
    --hpt-warning-bg:       #fffbeb;
    --hpt-danger:           #dc2626;

    /* Surfaces */
    --hpt-bg:               #f1f5f9;
    --hpt-surface:          #ffffff;
    --hpt-surface-2:        #f8fafc;
    --hpt-surface-3:        #f1f5f9;

    /* Borders */
    --hpt-border:           #e2e8f0;
    --hpt-border-strong:    #cbd5e1;

    /* Text */
    --hpt-text:             #1e293b;
    --hpt-text-muted:       #64748b;
    --hpt-text-light:       #94a3b8;

    /* Shadows */
    --hpt-shadow-xs:        0 1px 2px rgba(15,23,42,.06);
    --hpt-shadow-sm:        0 2px 6px rgba(15,23,42,.08);
    --hpt-shadow:           0 4px 16px rgba(15,23,42,.09);
    --hpt-shadow-md:        0 8px 28px rgba(15,23,42,.11);
    --hpt-shadow-lg:        0 16px 48px rgba(15,23,42,.13);

    /* Shape */
    --r-xs: 4px;
    --r-sm: 6px;
    --r:    10px;
    --r-lg: 14px;
    --r-xl: 20px;

    /* Motion */
    --ease: cubic-bezier(.4,0,.2,1);
    --t:    .18s;
    --t-md: .28s;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--hpt-text);
    background: var(--hpt-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Accessibility ───────────────────────────────────────────────────────── */

/* Skip link: hiding delegated to Bootstrap's visually-hidden-focusable;
   only the branded focus state is defined here. */
.hpt-skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    padding: .5rem 1rem;
    background: var(--hpt-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 0 0 var(--r-sm) 0;
    text-decoration: none;
}

/* Focus rings for custom interactive elements not covered by Bootstrap */
:is(.hpt-btn, .fontSizeBtn, .hpt-nav-btn, .hpt-faq-header):focus-visible {
    outline: 3px solid var(--hpt-accent);
    outline-offset: 2px;
}

.hpt-service-item:focus-visible {
    outline: 3px solid var(--hpt-accent);
    outline-offset: -2px;
    border-radius: var(--r-xs);
}

/* ── Loading ─────────────────────────────────────────────────────────────── */
.hpt-loading { background: var(--hpt-bg); }
.hpt-loading-spinner { width: 3rem; height: 3rem; }

/* ── Translate banner ────────────────────────────────────────────────────── */
.hpt-translate-banner {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1rem;
    background: var(--hpt-accent-bg);
    border-bottom: 1px solid color-mix(in srgb, var(--hpt-accent) 30%, transparent);
    font-size: .85rem;
    color: var(--hpt-text);
}
.hpt-translate-banner-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: var(--hpt-accent);
}
.hpt-translate-banner-body {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .3rem .5rem;
}
.hpt-translate-banner-hint { color: var(--hpt-text-muted); }
.hpt-translate-banner-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: .2rem .4rem;
    line-height: 1;
    color: var(--hpt-text-muted);
    cursor: pointer;
    border-radius: var(--r-xs);
    transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.hpt-translate-banner-close:hover {
    background: color-mix(in srgb, var(--hpt-accent) 15%, transparent);
    color: var(--hpt-primary);
}

/* ── Page wrapper ────────────────────────────────────────────────────────── */
.hpt-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden;
    background: var(--hpt-surface);
    box-shadow: var(--hpt-shadow-md);
}

/* ── Primary top bar ─────────────────────────────────────────────────────── */
.hpt-nav-primary {
    background: var(--hpt-surface);
    border-bottom: 3px solid var(--hpt-primary);
    padding: 14px 24px;
    box-shadow: var(--hpt-shadow-xs);
}


.hpt-header-title {
    font-size: clamp(15px, 2vw, 23px);
    font-weight: 700;
    color: var(--hpt-text);
    line-height: 1.3;
    margin: 0;
    letter-spacing: -.3px;
}

/* ── Header layout helpers ───────────────────────────────────────────────── */

.font-size-controls {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.fontSizeBtn {
    background: var(--hpt-surface-2);
    border: 1px solid var(--hpt-border);
    border-radius: var(--r-xs);
    padding: 3px 9px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    color: var(--hpt-text-muted);
    transition: background var(--t) var(--ease),
                color var(--t) var(--ease),
                border-color var(--t) var(--ease);
}
.fontSizeBtn:hover {
    background: var(--hpt-primary);
    border-color: var(--hpt-primary);
    color: #fff;
}

/* ── Secondary nav bar ───────────────────────────────────────────────────── */
.hpt-nav-secondary {
    background: var(--hpt-primary);
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.hpt-nav-secondary::-webkit-scrollbar { display: none; }

.hpt-nav-secondary .hpt-nav-btn,
.hpt-nav-secondary a.hpt-nav-btn {
    color: rgba(255,255,255,.82) !important;
    padding: 11px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .15px;
    border: none;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-bottom: 3px solid transparent;
    transition: color var(--t) var(--ease),
                background var(--t) var(--ease),
                border-color var(--t) var(--ease);
}
.hpt-nav-secondary .hpt-nav-btn:hover {
    color: #fff !important;
    background: rgba(255,255,255,.1);
    border-bottom-color: rgba(255,255,255,.5);
}
.hpt-nav-secondary .hpt-nav-btn.disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}
.hpt-nav-secondary .hpt-nav-btn.active {
    color: #fff !important;
    background: rgba(255,255,255,.18);
    border-bottom-color: #fff;
    font-weight: 700;
}

/* ── Step progress bar ───────────────────────────────────────────────────── */
.hpt-step-progress      { height: 3px; background: rgba(0,0,0,.06); }
.hpt-step-progress-fill { height: 100%; background: var(--hpt-accent); transition: width var(--t-md) var(--ease); }

/* ── Panel area ──────────────────────────────────────────────────────────── */
.hpt-panels { background: var(--hpt-surface); }

.hpt-panel { min-height: 320px; }
.hpt-panel p { text-align: justify; }

.hpt-panel-header {
    background: linear-gradient(120deg, var(--hpt-primary) 0%, var(--hpt-primary-light) 100%);
    color: #fff;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .05px;
    margin: -12px -16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(15,61,128,.2);
}

/* ── Subheader ───────────────────────────────────────────────────────────── */
.hpt-subheader {
    font-size: 15px;
    font-weight: 700;
    color: var(--hpt-primary);
    padding-bottom: 8px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--hpt-border);
    letter-spacing: -.15px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.hpt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: var(--r-sm);
    border: 2px solid var(--hpt-primary);
    background: #fff;
    color: var(--hpt-primary);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .2px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--hpt-shadow-xs);
    transition: background var(--t) var(--ease),
                color var(--t) var(--ease),
                box-shadow var(--t) var(--ease),
                transform var(--t) var(--ease),
                border-color var(--t) var(--ease);
}
.hpt-btn:hover {
    background: var(--hpt-primary);
    color: #fff;
    box-shadow: var(--hpt-shadow-sm);
    transform: translateY(-1px);
}
.hpt-btn:active { transform: translateY(0); box-shadow: var(--hpt-shadow-xs); }

.hpt-btn-primary {
    background: var(--bs-success);
    color: #fff;
    border-color: var(--bs-success);
    box-shadow: 0 2px 10px rgba(var(--bs-success-rgb), .30);
}
.hpt-btn-primary:hover {
    background: #157347;
    border-color: #146c43;
    box-shadow: 0 4px 18px rgba(var(--bs-success-rgb), .38);
    color: #fff;
}

.hpt-btn-secondary {
    border-color: var(--hpt-border-strong);
    color: var(--hpt-text-muted);
    background: var(--hpt-surface-2);
}
.hpt-btn-secondary:hover {
    background: var(--hpt-text-muted);
    border-color: var(--hpt-text-muted);
    color: #fff;
}

.hpt-btn:disabled,
.hpt-btn[disabled] {
    opacity: .42;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ── Welcome CTA cards ───────────────────────────────────────────────────── */
.hpt-cta-card {
    flex: 1;
    min-width: 240px;
    border: 1px solid var(--hpt-border);
    border-radius: var(--r);
    padding: 20px 22px;
    background: var(--hpt-surface);
    box-shadow: var(--hpt-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--t-md) var(--ease),
                transform var(--t-md) var(--ease),
                border-color var(--t) var(--ease);
}
.hpt-cta-card:hover {
    box-shadow: var(--hpt-shadow-md);
    transform: translateY(-3px);
    border-color: var(--hpt-accent);
}

.hpt-cta-body {
    flex: 1;
    font-size: 13.5px;
    color: var(--hpt-text-muted);
    line-height: 1.65;
}

/* ── Download cards (Welcome panel) ──────────────────────────────────────── */
.hpt-download-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}
.hpt-download-card {
    flex: 1;
    min-width: 190px;
    max-width: 260px;
    border: 1px solid var(--hpt-border);
    border-radius: var(--r);
    padding: 14px 16px;
    background: var(--hpt-surface);
    box-shadow: var(--hpt-shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow var(--t-md) var(--ease),
                transform var(--t-md) var(--ease),
                border-color var(--t) var(--ease);
}
.hpt-download-card:hover {
    box-shadow: var(--hpt-shadow-md);
    transform: translateY(-2px);
    border-color: var(--hpt-accent);
}
.hpt-download-card-icon  { font-size: 22px; color: var(--hpt-primary); line-height: 1; text-align: center; }
.hpt-download-card-title { font-size: 12.5px; font-weight: 700; color: var(--hpt-text); line-height: 1.3; text-align: center; }
.hpt-download-card-meta  { font-size: 11px; color: var(--hpt-text-muted); text-align: center; }
.hpt-download-card-desc  { font-size: 12px; color: var(--hpt-text-muted); line-height: 1.5; flex: 1; margin: 0; text-align: center; }

/* ── Services ────────────────────────────────────────────────────────────── */
.hpt-service-list {
    border: 1.5px solid var(--hpt-border);
    border-top: none;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    overflow: hidden;
    background: var(--hpt-surface);
}

.hpt-service-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--hpt-border);
    transition: background var(--t) var(--ease),
                padding-left var(--t) var(--ease);
}
.hpt-service-item:last-child { border-bottom: none; }
.hpt-service-item:hover {
    background: var(--hpt-accent-bg);
    padding-left: 20px;
}

.hpt-selected-services {
    background: var(--hpt-accent-bg);
    border: 1.5px solid var(--hpt-accent) !important;
    border-radius: var(--r-sm);
}

/* ── Estimate tables ─────────────────────────────────────────────────────── */
.hpt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    border-radius: var(--r-sm);
    overflow: hidden;
    box-shadow: var(--hpt-shadow-xs);
    border: 1px solid var(--hpt-border);
}
.hpt-table th {
    background: var(--hpt-primary);
    color: #fff;
    font-weight: 600;
    padding: 9px 11px;
    text-align: left;
    font-size: 12.5px;
    letter-spacing: .2px;
}
.hpt-table tr:nth-child(even) td { background: var(--hpt-surface-2); }
.hpt-table td {
    padding: 5px 11px;
    vertical-align: top;
    border-bottom: 1px solid var(--hpt-border);
}
.hpt-table tr:last-child td { border-bottom: none; }

/* ── Estimate charges table ──────────────────────────────────────────────── */
.hpt-charges-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.hpt-charges-table th,
.hpt-charges-table td {
    padding: 8px 10px;
    vertical-align: middle;
}
.hpt-ct-num { width: 32px; }

.hpt-ct-header th {
    background: var(--hpt-primary);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .1px;
}
.hpt-ct-service-name td {
    background: var(--hpt-surface-2);
    color: var(--hpt-primary-dark);
    font-weight: 600;
    font-size: 12.5px;
    border-bottom: 2px solid var(--hpt-accent);
    padding: 9px 10px;
}
.hpt-ct-service-type {
    font-weight: 400;
    font-size: 12px;
    color: var(--hpt-text-muted);
}
.hpt-ct-row td { border-bottom: 1px solid var(--hpt-border); }
.hpt-ct-row:hover td { background: var(--hpt-accent-bg); }
.hpt-ct-total td {
    background: var(--hpt-surface-3);
    font-weight: 700;
    border-top: 2px solid var(--hpt-border-strong);
    border-bottom: none;
}
.hpt-ct-custom-note td {
    font-size: 12.5px;
    color: var(--hpt-text-muted);
    font-style: italic;
    padding: 6px 10px 2px;
}
.hpt-ct-contract-header td {
    background: var(--hpt-surface-2);
    font-weight: 600;
    font-size: 11px;
    color: var(--hpt-text-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    border-top: 2px solid var(--hpt-border);
    padding: 4px 10px;
}
.hpt-ct-contract-row td {
    border-bottom: 1px solid var(--hpt-border);
    color: var(--hpt-text-muted);
    font-size: 12px;
    padding: 2px 10px;
    line-height: 1.3;
}
.hpt-ct-contract-row:hover td { background: var(--hpt-accent-bg); }
.hpt-ct-selfpay td { color: var(--hpt-success); font-weight: 600; }

/* ── Final estimate charges table ────────────────────────────────────────── */
.hpt-final-charges-table {
    border-collapse: collapse;
    font-size: 13.5px;
}
.hpt-final-charges-table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--hpt-border);
    vertical-align: middle;
}
.hpt-final-charges-table tr:last-child td { border-bottom: none; }
.hpt-final-charges-table tr:hover td { background: var(--hpt-accent-bg); }

.hpt-estimate-total {
    font-size: 15px;
    font-weight: 600;
    padding: 12px 16px;
    background: var(--hpt-accent-bg);
    border-radius: var(--r-sm);
    border-left: 4px solid var(--hpt-accent);
    color: var(--hpt-primary-dark);
}

.hpt-estimate-footer {
    font-size: 12px;
    color: var(--hpt-text-light);
    line-height: 1.55;
}

/* ── Final panel ─────────────────────────────────────────────────────────── */
.hpt-final-type {
    font-size: 15px;
    font-weight: 700;
    color: var(--hpt-text);
    letter-spacing: -.1px;
}

.hpt-ins-block table { font-size: 13px; width: 100%; }
.hpt-ins-block td { padding: 2px 6px; }
.hpt-ins-block td:first-child {
    padding-right: 20px;
    color: var(--hpt-text-muted);
    width: 44%;
}

.hpt-final-estimate {
    background: linear-gradient(135deg, #eef6ff 0%, var(--hpt-accent-bg) 100%);
    border-radius: 0 var(--r) var(--r) 0;
    border-left: 4px solid var(--hpt-primary);
    font-size: 13.5px;
    line-height: 1.65;
    padding: 18px 20px;
    box-shadow: var(--hpt-shadow-sm);
}

.hpt-signature {
    border-top: 1px dashed var(--hpt-border-strong);
    padding-top: 20px;
    color: var(--hpt-text-muted);
    font-size: 12.5px;
}

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.hpt-faq-item {
    border: 1px solid var(--hpt-border);
    border-radius: var(--r-sm);
    overflow: hidden;
    transition: box-shadow var(--t) var(--ease);
}
.hpt-faq-item:hover { box-shadow: var(--hpt-shadow-sm); }

.hpt-faq-header {
    border: none;
    font-family: inherit;
    text-align: left;
    background: var(--hpt-surface-2);
    padding: 13px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13.5px;
    transition: background var(--t) var(--ease),
                color var(--t) var(--ease);
}
.hpt-faq-header:hover {
    background: var(--hpt-accent-bg);
    color: var(--hpt-primary);
}

.hpt-faq-body {
    padding: 14px 18px;
    font-size: 13.5px;
    color: var(--hpt-text-muted);
    line-height: 1.65;
    background: var(--hpt-surface);
    border-top: 1px solid var(--hpt-border);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.hpt-footer {
    background: var(--hpt-surface-2);
    border-top: 1px solid var(--hpt-border);
    font-size: 12px;
    color: var(--hpt-text-light);
    padding: 10px 24px;
}

/* ── Eligibility ─────────────────────────────────────────────────────────── */
.hpt-elig-benefits {
    background: var(--hpt-surface-2);
    border: 1px solid var(--hpt-border);
    border-radius: var(--r-sm);
    padding: 14px 16px;
}
.hpt-elig-section-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--hpt-text-muted);
}
.hpt-elig-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid var(--hpt-border);
}
.hpt-elig-row:last-child { border-bottom: none; }
.hpt-elig-label { font-size: 13px; color: var(--hpt-text-muted); }
.hpt-elig-value { font-size: 13px; font-weight: 600; color: var(--hpt-text); text-align: right; }

.hpt-eligibility-frame-container {
    border: 1.5px solid var(--hpt-border);
    border-radius: var(--r-sm);
    overflow: hidden;
    box-shadow: var(--hpt-shadow-xs);
}
.hpt-eligibility-frame {
    width: 100%;
    min-height: 420px;
    border: none;
    display: block;
}
.hpt-elig-json {
    font-size: 11.5px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--hpt-surface-2);
    padding: 12px 14px;
    border-radius: var(--r-xs);
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: var(--hpt-text-muted);
    line-height: 1.55;
}

/* ── Insurance type selector ─────────────────────────────────────────────── */
.hpt-ins-type-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px 18px;
    border: 2px solid var(--hpt-border);
    border-radius: var(--r);
    cursor: pointer;
    background: var(--hpt-surface);
    box-shadow: var(--hpt-shadow-xs);
    transition: border-color var(--t) var(--ease),
                background var(--t) var(--ease),
                box-shadow var(--t) var(--ease),
                transform var(--t) var(--ease);
}
.hpt-ins-type-option:hover {
    border-color: var(--hpt-accent);
    background: var(--hpt-accent-bg);
    box-shadow: var(--hpt-shadow-sm);
    transform: translateX(3px);
}
.hpt-ins-type-option.selected {
    border-color: var(--hpt-primary);
    background: linear-gradient(135deg, #eef6ff 0%, var(--hpt-accent-bg) 100%);
    box-shadow: 0 2px 10px rgba(26,86,168,.15);
}
.hpt-ins-type-option input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--hpt-primary);
    width: 17px;
    height: 17px;
    cursor: pointer;
}
.hpt-ins-type-body {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.6;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-bg {
    background: linear-gradient(135deg,
        var(--hpt-primary-dark) 0%,
        var(--hpt-primary)      55%,
        var(--hpt-accent)       100%);
    min-height: 100vh;
}
.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: var(--r-lg);
    box-shadow: var(--hpt-shadow-lg);
}

/* ── Print ───────────────────────────────────────────────────────────────── */

/* Print area hidden on screen; shown only when printing */
.hpt-print-area { display: none; }

/* 0.6in margins on every printed page */
@page { margin: 0.6in; }

@media print {
    /* Force background colours and images to print */
    *                       { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    body                    { background: #fff !important; }

    /* Hide modals (nav/footer/buttons use Bootstrap d-print-none in markup) */
    .modal,
    .modal-backdrop         { display: none !important; }

    .hpt-wrapper            { box-shadow: none !important; max-width: 100% !important; margin: 0 !important; }

    /* Hide the screen panels; show the dedicated print area instead */
    .hpt-panels             { display: none !important; }
    .hpt-print-area         { display: block !important; }

    /* ── Print area: branding header ─────────────────────────────────────── */
    .hpt-print-header       { display: flex !important; align-items: center; gap: 18px;
                               padding: 16px 22px; margin-bottom: 18px;
                               background: linear-gradient(120deg, var(--hpt-primary) 0%, var(--hpt-primary-light) 100%);
                               border-radius: 8px; }
    .hpt-print-logo         { height: 80px; max-width: 200px; width: auto; object-fit: contain;
                               background: #fff; border-radius: 6px; padding: 4px 8px; flex-shrink: 0; }
    .hpt-print-hospital-name{ font-size: 18px; font-weight: 800; text-transform: uppercase;
                               letter-spacing: .5px; color: #fff; line-height: 1.25; }
    .hpt-print-date         { font-size: 11px; margin-top: 4px; color: rgba(255,255,255,.82); }

    /* ── Print area: insurance summary ──────────────────────────────────── */
    .hpt-print-ins-header               { margin: 0 0 0 0 !important; border-radius: 4px 4px 0 0 !important;
                                          font-size: 11px; padding: 5px 12px !important; width: 100% !important;
                                          box-sizing: border-box !important; }
    .hpt-print-area .hpt-ins-block      { width: 100% !important; }
    .hpt-print-area .hpt-table          { display: table !important; width: 100% !important;
                                          border-radius: 0 0 4px 4px !important; overflow: visible !important; }
    .hpt-print-area .hpt-ins-block td   { padding: 1px 6px !important; font-size: 11px; }

    /* ── Print area: section label ───────────────────────────────────────── */
    .hpt-print-section-label { font-weight: 700; font-size: 11px; text-transform: uppercase;
                                letter-spacing: .4px; margin: 0 0 6px;
                                padding-bottom: 3px; border-bottom: 1px solid #ccc; color: #475569; }

    /* ── Print area: charges table ───────────────────────────────────────── */
    .hpt-print-table        { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 4px; }
    .hpt-print-table th     { background: var(--hpt-primary) !important; color: #fff !important;
                               padding: 5px 8px; font-weight: 600; font-size: 10.5px;
                               border: 1px solid var(--hpt-primary-dark); text-align: left; }
    .hpt-print-table th:not(:first-child) { text-align: center; }
    .hpt-print-table th:last-child { text-align: right; }
    .hpt-print-table td     { padding: 3px 8px; border: 1px solid #d1d5db; vertical-align: top; }
    .hpt-print-col-rev,
    .hpt-print-col-cpt      { width: 70px; text-align: center !important; }
    .hpt-print-col-qty      { width: 65px; text-align: right !important; }
    .hpt-print-col-chg      { width: 85px; text-align: right !important; }

    .hpt-print-svc-row td   { font-weight: 700; background: #f1f5f9 !important;
                               color: var(--hpt-primary-dark) !important;
                               border-bottom: 2px solid var(--hpt-accent) !important; }
    .hpt-print-total-row td { font-weight: 700; background: #e0f2fe !important;
                               border-top: 2px solid var(--hpt-primary) !important; }
    .hpt-print-pricing-header td
                            { font-weight: 700; text-transform: uppercase; font-size: 9px;
                               letter-spacing: .4px; background: #f8fafc !important;
                               color: #64748b !important; border-top: 2px solid #ccc !important;
                               padding: 2px 8px !important; }
    .hpt-print-selfpay-row td { font-size: 9px; padding: 1px 8px !important;
                               font-weight: 600; color: var(--hpt-primary) !important;
                               background: #e0f2fe !important; }
    .hpt-print-pricing-row td { font-size: 9px; padding: 1px 8px !important;
                               color: #475569 !important; }
    .hpt-print-ins-row td   { font-size: 8px; padding: 0 8px !important;
                               color: #64748b !important; border-color: #e5e7eb !important;
                               line-height: 1.4; }
    .hpt-print-billed-row td { background: var(--hpt-accent-bg) !important; font-weight: 700;
                               border-top: 3px solid var(--hpt-primary) !important; padding: 5px 8px; }

    /* ── Print area: estimate boxes ──────────────────────────────────────── */
    .hpt-print-estimate-box { background: var(--hpt-accent-bg) !important;
                               border-left: 4px solid var(--hpt-primary);
                               padding: 7px 12px; font-size: 12px; font-weight: 700;
                               margin: 6px 0 16px; break-inside: avoid; }
    .hpt-print-total-box    { background: var(--hpt-accent-bg) !important;
                               border-left: 4px solid var(--hpt-primary);
                               padding: 9px 12px; font-size: 13px; font-weight: 700;
                               margin: 8px 0 18px; break-inside: avoid; }

    /* ── Print area: footer disclaimer ──────────────────────────────────── */
    .hpt-print-footer-text  { font-size: 10px; color: #64748b !important; line-height: 1.55;
                               border-top: 1px solid #ccc; padding-top: 10px; margin-top: 16px; }

    .hpt-print-service-block { margin-bottom: 14px; }
    .hpt-print-total-row,
    .hpt-print-billed-row    { break-inside: avoid; }
    .hpt-print-table tfoot   { break-inside: avoid; }

    .hpt-signature          { margin-top: 30px !important; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Tablet (≤ 1024px) — wrapper fills viewport */
@media (max-width: 1024px) {
    .hpt-wrapper { max-width: 100%; box-shadow: none; }
}

/* ── Mobile landscape / small tablet (≤ 768px) ───────────────────────────── */
@media (max-width: 768px) {

    .hpt-nav-primary                { padding: 10px 12px; }
    .hpt-header-title              { font-size: 14px; }

    /* Secondary nav: touch-friendly horizontal scroll */
    .hpt-nav-secondary             { padding: 0; }
    .hpt-nav-secondary .navbar-nav { flex-wrap: nowrap; overflow-x: auto;
                                     -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .hpt-nav-secondary .navbar-nav::-webkit-scrollbar { display: none; }
    .hpt-nav-secondary .hpt-nav-btn { padding: 10px 9px; font-size: 11px; }

    /* Panel chrome */
    .hpt-panel-header              { margin: -12px -16px 14px; padding: 10px 14px; font-size: 13.5px; }
    .hpt-btn                       { padding: 9px 14px; font-size: 12.5px; }

    /* Cards */
    .hpt-price-list-item, .hpt-download-card { max-width: 100%; }
    .hpt-ins-type-option           { padding: 12px 14px; }

    /* Tables scroll instead of overflow */
    .hpt-charges-table,
    .hpt-final-charges-table,
    .hpt-table                     { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Phone portrait (≤ 480px) ────────────────────────────────────────────── */
@media (max-width: 480px) {

    /* Tighter panel padding */
    .hpt-panel                     { padding-left: 12px !important; padding-right: 12px !important; }
    .hpt-panel-header              { margin-left: -12px !important; margin-right: -12px !important; }

    /* Title on one line */
    .hpt-header-title              { font-size: 13px; }
    .hpt-header-title br           { display: none; }

    /* Button groups: stack full-width on phones */
    .d-flex.justify-content-center.flex-wrap  { flex-direction: column !important; align-items: stretch !important; }
    .d-flex.justify-content-center.flex-wrap > .hpt-btn { width: 100%; text-align: center; }

    /* Eligibility form: inputs already use Bootstrap col-sm-*, which goes
       single-column below sm (576px). No change needed there. */

    /* Insurance type options: tighter */
    .hpt-ins-type-option           { gap: 10px; padding: 10px 12px; }
    .hpt-ins-type-body             { font-size: 12.5px; }

    /* Download cards: single column */
    .hpt-download-cards            { flex-direction: column; }
    .hpt-download-card             { max-width: 100%; }

    /* Subheader */
    .hpt-subheader                 { font-size: 13.5px; }
}
