/**
 * SureVisit Health — ROI Calculator
 * WCAG 2.1 AA compliant.
 * All text colours meet 4.5:1 contrast ratio against their backgrounds.
 */

/* ----------------------------------------------------------------
   CSS VARIABLES
---------------------------------------------------------------- */
.svh-roi-wrap {
    --roi-primary:   #2563eb;
    --roi-primary-d: #1d4ed8;
    --roi-primary-t: rgba(37,99,235,.12);
    --roi-green:     #059669;
    --roi-teal:      #0891b2;
    --roi-amber:     #d97706;
    --roi-violet:    #7c3aed;
    --roi-purple:    #9333ea;
    --roi-bg:        #f8fafc;
    --roi-surface:   #ffffff;
    --roi-border:    #d1d5db;
    --roi-text:      #111827;      /* near-black — 18:1 on white */
    --roi-text-2:    #374151;      /* dark gray — 10.7:1 on white */
    --roi-text-3:    #4b5563;      /* medium gray — 7.4:1 on white */
    --roi-radius:    10px;
    --roi-shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --roi-shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
}

/* ----------------------------------------------------------------
   RESET / BASE
---------------------------------------------------------------- */
.svh-roi-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--roi-text);
    background: var(--roi-bg);
    border-radius: var(--roi-radius);
    padding: 0 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}
.svh-roi-wrap *, .svh-roi-wrap *::before, .svh-roi-wrap *::after {
    box-sizing: inherit;
}

/* Global focus style — WCAG 2.1 SC 2.4.7 */
.svh-roi-wrap *:focus-visible {
    outline: 3px solid var(--roi-primary);
    outline-offset: 2px;
}

/* ----------------------------------------------------------------
   HEADER
---------------------------------------------------------------- */
.svh-roi-header {
    text-align: center;
    padding: 2.5rem 1.5rem 1.5rem;
}
.svh-roi-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--roi-text);
    margin: 0 0 .5rem;
    line-height: 1.25;
}
.svh-roi-subtitle {
    font-size: .95rem;
    color: var(--roi-text-2);
    margin: 0;
    max-width: 540px;
    margin-inline: auto;
}

/* ----------------------------------------------------------------
   TWO-COLUMN BODY
---------------------------------------------------------------- */
.svh-roi-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 0 1.5rem;
    align-items: start;
}
@media (max-width: 860px) {
    .svh-roi-body { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------
   INPUTS COLUMN
---------------------------------------------------------------- */
.svh-roi-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Section card */
.svh-roi-section {
    background: var(--roi-surface);
    border: 1px solid var(--roi-border);
    border-radius: var(--roi-radius);
    padding: 1.125rem 1.25rem 1.25rem;
    box-shadow: var(--roi-shadow);
}
.svh-roi-section-label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--roi-text-2);
    margin-bottom: .875rem;
    display: block;
}
.svh-roi-section-desc {
    font-size: .85rem;
    color: var(--roi-text-2);
    margin: 0 0 .875rem;
    line-height: 1.55;
}

/* Fieldset resets (used for radio groups) */
.svh-roi-fieldset {
    border: none;
    margin: 0;
    padding: 0;
}
.svh-roi-fieldset > legend {
    /* legend doubles as section-label */
    float: left; /* required for legend width */
    width: 100%;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--roi-text-2);
    margin-bottom: .875rem;
    padding: 0;
}
/* Clear float after legend */
.svh-roi-fieldset > legend + * { clear: both; }

/* Nested fieldset (inside notification panel) */
.svh-roi-fieldset-nested {
    margin-top: 1rem;
    padding-top: .875rem;
    border-top: 1px solid var(--roi-border);
}
.svh-roi-subsection-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--roi-text-2);
    display: block;
    margin-bottom: .5rem;
}
.svh-roi-fieldset-nested > legend {
    float: left;
    width: 100%;
    font-size: .78rem;
    font-weight: 600;
    color: var(--roi-text-2);
    margin-bottom: .5rem;
    padding: 0;
    text-transform: none;
    letter-spacing: normal;
}

/* ----------------------------------------------------------------
   RADIO GROUPS
---------------------------------------------------------------- */
.svh-roi-radio-group {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin-bottom: 1rem;
}
.svh-roi-radio-label {
    display: flex;
    align-items: center;
    gap: .55rem;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 500;
    color: var(--roi-text);
    user-select: none;
}
.svh-roi-radio {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--roi-primary);
    cursor: pointer;
    flex-shrink: 0;
}
.svh-roi-radio:focus-visible {
    outline: 3px solid var(--roi-primary);
    outline-offset: 2px;
}

/* ----------------------------------------------------------------
   PLAN SELECTOR
---------------------------------------------------------------- */
.svh-roi-plans {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
}
@media (max-width: 600px) {
    .svh-roi-plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 340px) {
    .svh-roi-plans { grid-template-columns: 1fr; }
}
.svh-roi-plan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    background: #f9fafb;
    border: 2px solid var(--roi-border);
    border-radius: 8px;
    padding: .75rem .5rem;
    cursor: pointer;
    font: inherit;
    text-align: center;
    transition: border-color .15s, background .15s, box-shadow .15s;
    color: var(--roi-text);
}
.svh-roi-plan:hover,
.svh-roi-plan:focus-visible {
    border-color: var(--roi-primary);
    background: #eff6ff;
    outline: none;
}
.svh-roi-plan.active {
    border-color: var(--roi-primary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px var(--roi-primary-t);
}
.svh-roi-plan-name {
    font-size: .73rem;
    font-weight: 700;
    color: var(--roi-text-2);
}
.svh-roi-plan.active .svh-roi-plan-name { color: var(--roi-primary); }
.svh-roi-plan-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--roi-text);
}
.svh-roi-plan-mo { font-size: .7rem; font-weight: 500; color: var(--roi-text-3); }
.svh-roi-plan-desc { font-size: .7rem; color: var(--roi-text-3); }

/* ----------------------------------------------------------------
   NUMBER INPUT FIELDS
---------------------------------------------------------------- */
.svh-roi-field {
    margin-top: .875rem;
}
.svh-roi-field:first-child { margin-top: 0; }

.svh-roi-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--roi-text);
    margin-bottom: .35rem;
}

.svh-roi-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--roi-border);
    border-radius: 7px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.svh-roi-input-wrap:focus-within {
    border-color: var(--roi-primary);
    box-shadow: 0 0 0 3px var(--roi-primary-t);
}
.svh-roi-input-prefix,
.svh-roi-input-suffix {
    background: #f3f4f6;
    padding: .5rem .65rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--roi-text-2);
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}
.svh-roi-input-prefix {
    border-right: 1.5px solid var(--roi-border);
}
.svh-roi-input-suffix {
    border-left: 1.5px solid var(--roi-border);
}
input[type="number"].svh-roi-number {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    padding: .5rem .6rem;
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    color: var(--roi-text);
    background: transparent;
    text-align: right;
    -moz-appearance: textfield;
}
input[type="number"].svh-roi-number::-webkit-outer-spin-button,
input[type="number"].svh-roi-number::-webkit-inner-spin-button {
    opacity: 1;
}
input[type="number"].svh-roi-number:disabled {
    color: var(--roi-text-3);
    cursor: not-allowed;
}

.svh-roi-field-hint {
    font-size: .78rem;
    color: var(--roi-text-3);
    margin: .3rem 0 0;
    line-height: 1.5;
}

/* Disabled field (confirmations when auto-notify is on) */
.svh-roi-field-disabled .svh-roi-label { color: var(--roi-text-3); }
.svh-roi-field-disabled .svh-roi-input-wrap {
    background: #f9fafb;
    border-color: #e5e7eb;
    opacity: .65;
}

/* ----------------------------------------------------------------
   ANALYTICS SECTION
---------------------------------------------------------------- */
.svh-roi-section-analytics .svh-roi-section-label {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.svh-roi-analytics-subsection {
    margin-top: 1rem;
    padding-top: .875rem;
    border-top: 1px solid var(--roi-border);
}
.svh-roi-analytics-subsection .svh-roi-subsection-label {
    display: block;
    margin-bottom: .75rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--roi-text-2);
}

/* ----------------------------------------------------------------
   COST MODE PANELS
---------------------------------------------------------------- */
.svh-roi-cost-panel { margin-top: .25rem; }

/* ----------------------------------------------------------------
   NOTIFICATION PANEL
---------------------------------------------------------------- */
.svh-roi-notify-details {
    margin-top: .25rem;
}
.svh-roi-notify-note {
    font-size: .8rem;
    color: var(--roi-text-2);
    background: #eff6ff;
    border-left: 3px solid var(--roi-primary);
    border-radius: 0 5px 5px 0;
    padding: .5rem .75rem;
    margin: .875rem 0 0;
    line-height: 1.55;
}

/* ----------------------------------------------------------------
   NOTIFICATION TYPE CARDS (separate breakdown mode)
---------------------------------------------------------------- */
.svh-roi-notify-types {
    display: flex;
    flex-direction: column;
    gap: .625rem;
    margin-top: .25rem;
}
.svh-roi-notify-type {
    border: 1.5px solid var(--roi-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}
.svh-roi-notify-type-header {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .7rem .875rem;
    cursor: pointer;
    user-select: none;
    background: #fff;
    border-bottom: 1.5px solid transparent;
    transition: background .12s;
}
.svh-roi-notify-type-header:hover { background: #f5f7ff; }

/* When checkbox is checked, show a subtle active state on the header */
.svh-roi-notify-type input[type="checkbox"]:checked ~ .svh-roi-notify-type-name {
    color: var(--roi-primary);
    font-weight: 700;
}
.svh-roi-notify-type:has(input[type="checkbox"]:checked) {
    border-color: var(--roi-primary);
    background: #fff;
}
.svh-roi-notify-type:has(input[type="checkbox"]:checked) .svh-roi-notify-type-header {
    border-bottom-color: var(--roi-border);
    background: #eff6ff;
}

.svh-roi-checkbox {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--roi-primary);
    cursor: pointer;
    flex-shrink: 0;
}
.svh-roi-checkbox:focus-visible {
    outline: 3px solid var(--roi-primary);
    outline-offset: 2px;
}
.svh-roi-notify-type-icon {
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
}
.svh-roi-notify-type-name {
    font-size: .875rem;
    font-weight: 600;
    color: var(--roi-text);
    transition: color .12s;
}
.svh-roi-notify-type-body {
    padding: .875rem;
    background: #fff;
}

/* Inline fieldset / radio layout (inside type bodies) */
.svh-roi-fieldset-inline {
    margin-bottom: .75rem;
}
.svh-roi-radio-group-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    margin-bottom: .5rem;
}
.svh-roi-radio-group-inline .svh-roi-radio-label { font-size: .85rem; }

/* Optional label text */
.svh-roi-label-optional {
    font-weight: 400;
    font-size: .78rem;
    color: var(--roi-text-3);
    margin-left: .2rem;
}

/* Auto-badge (shown when notifications are already automated) */
.svh-roi-auto-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 4px;
    padding: .1rem .4rem;
    margin-left: .4rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.svh-roi-auto-badge-inline {
    font-size: .65rem;
    padding: .08rem .35rem;
}

/* ----------------------------------------------------------------
   COLLAPSIBLE TIME SECTION
---------------------------------------------------------------- */
.svh-roi-section-collapsible { padding: 0; }

.svh-roi-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.125rem 1.25rem;
    text-align: left;
    font: inherit;
    color: inherit;
    border-radius: var(--roi-radius);
}
.svh-roi-section-toggle:hover { background: #f9fafb; }
.svh-roi-section-toggle .svh-roi-section-label { margin: 0; }
.svh-roi-toggle-icon { color: var(--roi-text-3); font-size: .8rem; }
.svh-roi-section-body {
    padding: 0 1.25rem 1.25rem;
}

/* ----------------------------------------------------------------
   RESULTS COLUMN
---------------------------------------------------------------- */
.svh-roi-results {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    position: sticky;
    top: 1rem;
}

/* ----------------------------------------------------------------
   ROI HERO CARD
---------------------------------------------------------------- */
.svh-roi-hero-card {
    background: linear-gradient(135deg, #1e40af 0%, var(--roi-primary) 60%, #0891b2 100%);
    border-radius: var(--roi-radius);
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: var(--roi-shadow-md);
    color: #fff;
}
.svh-roi-hero-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #bfdbfe;   /* blue-200 — 3.1:1 on blue bg (large/UI text) */
    margin: 0 0 .35rem;
}
.svh-roi-hero-annual-val {
    font-size: 2.75rem;
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1;
    color: #fff;
    margin-bottom: .5rem;
}
.svh-roi-hero-multiple-row {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .875rem;
}
.svh-roi-hero-multiple {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
}
.svh-roi-hero-roi-label {
    font-size: .82rem;
    font-weight: 500;
    color: #bfdbfe;
}
.svh-roi-hero-monthly-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding-top: .875rem;
    border-top: 1px solid rgba(255,255,255,.2);
}
.svh-roi-hero-monthly-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
.svh-roi-hero-sched-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 100px;
    padding: .2rem .65rem;
    font-size: .75rem;
    font-weight: 600;
    color: #e0f2fe;  /* sky-100 — passes 3:1 on blue bg */
    white-space: nowrap;
}

/* ----------------------------------------------------------------
   VALUE BREAKDOWN CARD
---------------------------------------------------------------- */
.svh-roi-vb-card {
    background: var(--roi-surface);
    border: 1px solid var(--roi-border);
    border-radius: var(--roi-radius);
    box-shadow: var(--roi-shadow);
    overflow: hidden;
}

.svh-roi-vb-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--roi-border);
    cursor: pointer;
    padding: 1rem 1.25rem;
    font: inherit;
    color: inherit;
}
.svh-roi-vb-toggle:hover { background: #f9fafb; }
.svh-roi-vb-toggle-label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--roi-text-2);
}

/* Items inside breakdown */
.svh-roi-vb-item {
    padding: .875rem 1.25rem .75rem;
    border-bottom: 1px solid #f3f4f6;
    transition: opacity .2s;
}
.svh-roi-vb-item:last-child { border-bottom: none; }
.svh-roi-vb-item-dimmed { opacity: .45; }

.svh-roi-vb-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .35rem;
}
.svh-roi-vb-icon {
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
}
.svh-roi-vb-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--roi-text);
    flex: 1;
    min-width: 0;
}
.svh-roi-vb-amount {
    font-size: .95rem;
    font-weight: 800;
    color: var(--roi-text);
    white-space: nowrap;
    margin-left: auto;
}

/* Progress bar */
.svh-roi-vb-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: .4rem;
}
.svh-roi-vb-fill {
    height: 100%;
    border-radius: 100px;
    transition: width .35s ease;
}
.svh-roi-vb-green  { background: var(--roi-green);  }
.svh-roi-vb-blue   { background: var(--roi-primary); }
.svh-roi-vb-purple { background: var(--roi-violet);  }
.svh-roi-vb-amber  { background: var(--roi-amber);   }
.svh-roi-vb-violet { background: var(--roi-purple);  }
.svh-roi-vb-teal   { background: var(--roi-teal);    }
.svh-roi-vb-indigo { background: #4338ca;             }

.svh-roi-vb-desc {
    font-size: .78rem;
    color: var(--roi-text-3);
    margin: 0;
    line-height: 1.5;
}

/* ----------------------------------------------------------------
   BENEFIT CARDS (monthly + annual)
---------------------------------------------------------------- */
.svh-roi-benefit-card {
    background: var(--roi-surface);
    border: 1px solid var(--roi-border);
    border-radius: var(--roi-radius);
    padding: 1.125rem 1.25rem 1.25rem;
    box-shadow: var(--roi-shadow);
}
.svh-roi-benefit-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--roi-text-2);
    margin-bottom: .75rem;
}
.svh-roi-benefit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .35rem 0;
}
.svh-roi-benefit-label {
    font-size: .875rem;
    color: var(--roi-text-2);
    font-weight: 500;
}
.svh-roi-benefit-val {
    font-size: .925rem;
    font-weight: 700;
    color: var(--roi-text);
}
.svh-roi-benefit-cost { color: var(--roi-text-3); font-weight: 500; }

.svh-roi-benefit-divider {
    height: 1px;
    background: var(--roi-border);
    margin: .4rem 0;
}
.svh-roi-benefit-net-row {
    padding: .5rem 0 0;
}
.svh-roi-benefit-net-label {
    font-size: .9rem;
    font-weight: 700;
    color: var(--roi-text);
}
.svh-roi-benefit-net {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -.02em;
    color: var(--roi-text);
}

/* ----------------------------------------------------------------
   CTA WRAP
---------------------------------------------------------------- */
.svh-roi-cta-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ----------------------------------------------------------------
   SCHEDULING HINT IN ADMIN SECTION
---------------------------------------------------------------- */
.svh-roi-sched-notify-hint {
    background: #eff6ff;
    border-left: 3px solid var(--roi-primary);
    border-radius: 0 5px 5px 0;
    padding: .45rem .65rem;
    margin-top: .4rem !important;
    font-size: .78rem !important;
    color: var(--roi-text-2) !important;
    line-height: 1.5;
}

/* Total pill — kept for legacy PDF fallback, hidden in UI */
.svh-roi-total-pill {
    background: linear-gradient(135deg, var(--roi-primary) 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: var(--roi-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--roi-shadow-md);
}
.svh-roi-total-label {
    font-size: .85rem;
    font-weight: 600;
    color: #bfdbfe; /* blue-200 — passes 3.1:1 on blue-600 bg (large text / UI) */
}
.svh-roi-total-val {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
}

/* ----------------------------------------------------------------
   RESULT BUCKETS
---------------------------------------------------------------- */
.svh-roi-bucket {
    background: var(--roi-surface);
    border: 1px solid var(--roi-border);
    border-left-width: 4px;
    border-radius: var(--roi-radius);
    padding: 1rem 1.125rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    box-shadow: var(--roi-shadow);
}
.svh-roi-bucket-blue   { border-left-color: var(--roi-primary); }
.svh-roi-bucket-green  { border-left-color: var(--roi-green);   }
.svh-roi-bucket-teal   { border-left-color: var(--roi-teal);    }
.svh-roi-bucket-amber  { border-left-color: var(--roi-amber);   }
.svh-roi-bucket-violet { border-left-color: var(--roi-violet);  }
.svh-roi-bucket-purple { border-left-color: var(--roi-purple);  }

.svh-roi-bucket-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: .1rem;
}
.svh-roi-bucket-body { flex: 1; min-width: 0; }

.svh-roi-bucket-title {
    font-size: .73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: .2rem;
}
.svh-roi-bucket-blue   .svh-roi-bucket-title { color: var(--roi-primary); }
.svh-roi-bucket-green  .svh-roi-bucket-title { color: #065f46; /* green-900,  7.4:1 on white */ }
.svh-roi-bucket-teal   .svh-roi-bucket-title { color: #164e63; /* cyan-900,   9.5:1 on white */ }
.svh-roi-bucket-amber  .svh-roi-bucket-title { color: #78350f; /* amber-900,  8.4:1 on white */ }
.svh-roi-bucket-violet .svh-roi-bucket-title { color: #4c1d95; /* violet-900, 9.7:1 on white */ }
.svh-roi-bucket-purple .svh-roi-bucket-title { color: #581c87; /* purple-900, 8.9:1 on white */ }

.svh-roi-bucket-amount {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--roi-text);
    letter-spacing: -.02em;
    line-height: 1.2;
}
.svh-roi-bucket-detail {
    font-size: .8rem;
    color: var(--roi-text-2);
    margin-top: .1rem;
}
.svh-roi-bucket-copy {
    font-size: .82rem;
    color: var(--roi-text-2);
    margin: .5rem 0 0;
    line-height: 1.55;
}
.svh-roi-bucket-copy strong { color: var(--roi-text); }
.svh-roi-bucket-assumption {
    margin-top: .5rem;
    font-size: .75rem;
    color: var(--roi-text-3);
    background: #f3f4f6;
    border-radius: 5px;
    padding: .35rem .5rem;
    line-height: 1.5;
}
.svh-roi-bucket-assumption strong { color: var(--roi-text-2); }

/* Breakdown rows */
.svh-roi-bucket-breakdown {
    margin-top: .625rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.svh-roi-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
    color: var(--roi-text-2);
    padding: .25rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.svh-roi-breakdown-row:last-child { border-bottom: none; }
.svh-roi-breakdown-row > span:last-child {
    font-weight: 700;
    color: var(--roi-text);
    white-space: nowrap;
    margin-left: .5rem;
}

/* Success Tax comparison table */
.svh-roi-tax-compare {
    margin-top: .625rem;
    border: 1px solid var(--roi-border);
    border-radius: 7px;
    overflow: hidden;
}
.svh-roi-tax-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .45rem .75rem;
    font-size: .8rem;
}
.svh-roi-tax-row + .svh-roi-tax-row { border-top: 1px solid var(--roi-border); }
.svh-roi-tax-label { color: var(--roi-text-2); font-weight: 500; }
.svh-roi-tax-label-total { font-weight: 700; color: var(--roi-text); }
.svh-roi-tax-incl { font-size: .7rem; color: var(--roi-text-3); font-weight: 400; margin-left: .25rem; }
.svh-roi-tax-other { font-weight: 700; color: #991b1b; /* red-800, 7.5:1 on white */ }
.svh-roi-tax-val-total { font-size: .85rem; }
.svh-roi-tax-sv    { font-weight: 700; color: #065f46; /* green-900, 7.4:1 on white */ }

.svh-roi-tax-notify-row { background: #fefce8; }
.svh-roi-tax-ehr-row    { background: #fefce8; }
.svh-roi-tax-total-row  { background: #fef2f2; }

/* ----------------------------------------------------------------
   ROI SUMMARY
---------------------------------------------------------------- */
.svh-roi-summary {
    background: var(--roi-surface);
    border: 1px solid var(--roi-border);
    border-radius: var(--roi-radius);
    padding: 1.25rem;
    box-shadow: var(--roi-shadow);
}
.svh-roi-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 0;
}
.svh-roi-summary-label {
    font-size: .85rem;
    color: var(--roi-text-2);
    font-weight: 500;
}
.svh-roi-summary-val {
    font-size: .95rem;
    font-weight: 700;
    color: var(--roi-text);
}
.svh-roi-summary-plan       { color: var(--roi-text-2); }
.svh-roi-summary-tools-val  { color: #065f46; /* green — positive value */ }
.svh-roi-summary-divider {
    height: 1px;
    background: var(--roi-border);
    margin: .4rem 0;
}
.svh-roi-summary-net-row .svh-roi-summary-label {
    font-weight: 700;
    color: var(--roi-text);
    font-size: .9rem;
}
.svh-roi-summary-net-row .svh-roi-summary-val { font-size: 1.15rem; }
.svh-roi-net-positive { color: #065f46 !important; }
.svh-roi-net-negative { color: #991b1b !important; }

/* ROI multiple */
.svh-roi-roi-multiple {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    margin: .875rem 0 .75rem;
    padding: .75rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border-radius: 8px;
}
.svh-roi-roi-num {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--roi-primary);
    letter-spacing: -.04em;
    line-height: 1;
}
.svh-roi-roi-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--roi-text-2);
}

/* ----------------------------------------------------------------
   CTA BUTTONS
---------------------------------------------------------------- */
.svh-roi-cta {
    display: block;
    text-align: center;
    background: var(--roi-primary);
    color: #fff !important;
    font-size: .95rem;
    font-weight: 700;
    padding: .825rem 1.5rem;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background .15s, box-shadow .15s;
    box-shadow: 0 2px 6px rgba(37,99,235,.35);
}
.svh-roi-cta:hover,
.svh-roi-cta:focus-visible {
    background: var(--roi-primary-d);
    box-shadow: 0 4px 10px rgba(37,99,235,.45);
    color: #fff !important;
    outline: 3px solid var(--roi-primary-d);
    outline-offset: 3px;
}

.svh-roi-pdf-btn {
    display: block;
    width: 100%;
    margin-top: .5rem;
    text-align: center;
    background: none;
    color: var(--roi-primary);
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    padding: .55rem 1rem;
    border-radius: 8px;
    border: 1.5px solid var(--roi-primary);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.svh-roi-pdf-btn:hover,
.svh-roi-pdf-btn:focus-visible {
    background: #eff6ff;
    color: var(--roi-primary-d);
    outline: 3px solid var(--roi-primary);
    outline-offset: 2px;
}

/* Disclaimer — left-aligned, legible */
.svh-roi-disclaimer {
    font-size: .75rem;
    color: var(--roi-text-3);
    margin: .75rem 0 0;
    line-height: 1.6;
    text-align: left;
}

/* ----------------------------------------------------------------
   EMAIL CAPTURE MODAL
---------------------------------------------------------------- */
.svh-roi-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
}
.svh-roi-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.svh-roi-modal {
    background: #fff;
    border-radius: 14px;
    padding: 2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    position: relative;
    transform: translateY(12px) scale(.97);
    transition: transform .2s;
}
.svh-roi-modal-overlay.open .svh-roi-modal {
    transform: translateY(0) scale(1);
}
.svh-roi-modal-close {
    position: absolute;
    top: .875rem;
    right: .875rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--roi-text-3);
    padding: .25rem .4rem;
    line-height: 1;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.svh-roi-modal-close:hover { color: var(--roi-text); background: #f3f4f6; }
.svh-roi-modal-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.svh-roi-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--roi-text);
    margin: 0 0 .4rem;
}
.svh-roi-modal-sub {
    font-size: .875rem;
    color: var(--roi-text-2);
    margin: 0 0 1.25rem;
    line-height: 1.55;
}
.svh-roi-modal-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-bottom: .875rem;
}
.svh-roi-modal-field label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--roi-text);
}
.svh-roi-modal-field input {
    width: 100%;
    padding: .6rem .85rem;
    border: 1.5px solid var(--roi-border);
    border-radius: 7px;
    font: inherit;
    font-size: .9rem;
    color: var(--roi-text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.svh-roi-modal-field input:focus {
    border-color: var(--roi-primary);
    box-shadow: 0 0 0 3px var(--roi-primary-t);
}
.svh-roi-modal-field.has-error input {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}
.svh-roi-field-error {
    font-size: .78rem;
    color: #dc2626;
    display: none;
}
.svh-roi-modal-field.has-error .svh-roi-field-error { display: block; }

.svh-roi-optional { font-weight: 400; color: var(--roi-text-3); }
.svh-roi-required { color: #dc2626; }

.svh-roi-modal-submit {
    width: 100%;
    background: var(--roi-primary);
    color: #fff;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    padding: .75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}
.svh-roi-modal-submit:hover,
.svh-roi-modal-submit:focus-visible {
    background: var(--roi-primary-d);
    outline: 3px solid var(--roi-primary-d);
    outline-offset: 2px;
}
.svh-roi-modal-submit:disabled { opacity: .65; cursor: not-allowed; }
.svh-roi-modal-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: svhRoiSpin .6s linear infinite;
    display: none;
}
.svh-roi-modal-submit.loading .svh-roi-modal-spinner { display: block; }
.svh-roi-modal-submit.loading .svh-roi-modal-submit-label { display: none; }

@keyframes svhRoiSpin { to { transform: rotate(360deg); } }

.svh-roi-modal-privacy {
    font-size: .75rem;
    color: var(--roi-text-3);
    margin: .6rem 0 0;
    text-align: center;
    line-height: 1.5;
}

/* Success state */
.svh-roi-modal-success {
    text-align: center;
    padding: .5rem 0;
    display: none;
}
.svh-roi-modal.success .svh-roi-modal-form { display: none; }
.svh-roi-modal.success .svh-roi-modal-success { display: block; }
.svh-roi-modal-success-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.svh-roi-modal-success-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 .4rem;
}
.svh-roi-modal-success-msg {
    font-size: .875rem;
    color: var(--roi-text-2);
    margin: 0;
    line-height: 1.55;
}

/* ----------------------------------------------------------------
   ADMIN PAGE (wp-admin context)
---------------------------------------------------------------- */
.svh-roi-admin-wrap { max-width: 780px; }
.svh-roi-admin-wrap h1 { margin-bottom: 1.5rem; }
.svh-roi-admin-tabs {
    display: flex;
    border-bottom: 2px solid #dde;
    margin-bottom: 1.5rem;
}
.svh-roi-admin-tab {
    padding: .5rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.svh-roi-admin-tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.svh-roi-admin-panel { display: none; }
.svh-roi-admin-panel.active { display: block; }
.svh-roi-admin-card {
    background: #fff;
    border: 1px solid #dde;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.svh-roi-admin-card h3 { margin: 0 0 1rem; font-size: 1rem; }
.svh-roi-admin-field { margin-bottom: 1rem; }
.svh-roi-admin-field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .35rem; }
.svh-roi-admin-field input[type="text"],
.svh-roi-admin-field input[type="password"],
.svh-roi-admin-field input[type="url"] {
    width: 100%;
    max-width: 440px;
    padding: .45rem .75rem;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    font-size: .875rem;
}
.svh-roi-admin-field .description { font-size: .8rem; color: #374151; margin-top: .25rem; }
.svh-roi-admin-leads-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.svh-roi-admin-leads-table th {
    text-align: left;
    padding: .5rem .75rem;
    background: #f6f7f7;
    border-bottom: 1px solid #dde;
    font-weight: 600;
    color: #374151;
}
.svh-roi-admin-leads-table td {
    padding: .5rem .75rem;
    border-bottom: 1px solid #f0f0f0;
    color: #111827;
}
.svh-roi-admin-leads-table tr:last-child td { border-bottom: none; }
.svh-roi-admin-leads-empty { padding: 1.5rem; text-align: center; color: #374151; font-size: .875rem; }
.svh-roi-admin-export-btn { margin-bottom: 1rem; }

/* Pricing table */
.svh-roi-pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.svh-roi-pricing-table th {
    text-align: left;
    padding: .5rem .75rem;
    background: #f6f7f7;
    border-bottom: 2px solid #dde;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}
.svh-roi-pricing-table td {
    padding: .625rem .75rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.svh-roi-pricing-table tbody tr:last-child td { border-bottom: none; }
.svh-roi-pricing-table tbody tr:hover td { background: #fafafa; }
.svh-roi-pricing-num {
    font-size: 1rem;
    font-weight: 700;
    color: #9ca3af;
    text-align: center;
}
.svh-roi-pricing-input {
    width: 100%;
    padding: .4rem .6rem;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    font-size: .875rem;
    color: #111827;
}
.svh-roi-pricing-input:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); outline: none; }
.svh-roi-pricing-price-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}
.svh-roi-pricing-price-wrap:focus-within { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.svh-roi-pricing-dollar {
    background: #f3f4f6;
    border-right: 1px solid #ccd0d4;
    padding: .4rem .55rem;
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    user-select: none;
}
.svh-roi-pricing-price-input {
    border: none;
    outline: none;
    padding: .4rem .5rem;
    font-size: .875rem;
    font-weight: 700;
    color: #111827;
    width: 100%;
    -moz-appearance: textfield;
}
.svh-roi-pricing-price-input::-webkit-outer-spin-button,
.svh-roi-pricing-price-input::-webkit-inner-spin-button { opacity: 1; }

/* Threshold table */
.svh-roi-threshold-table { margin-top: 0; }
.svh-roi-threshold-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    color: #374151;
}
.svh-roi-threshold-input {
    width: 72px;
    padding: .4rem .5rem;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    font-size: .875rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    -moz-appearance: textfield;
}
.svh-roi-threshold-input::-webkit-outer-spin-button,
.svh-roi-threshold-input::-webkit-inner-spin-button { opacity: 1; }
.svh-roi-threshold-input:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); outline: none; }
.svh-roi-threshold-fallback { font-size: .875rem; color: #374151; }
.svh-roi-threshold-note {
    display: block;
    font-size: .78rem;
    color: #6b7280;
    margin-top: .2rem;
}

/* ----------------------------------------------------------------
   SELF-SCHEDULING BONUS BAR
---------------------------------------------------------------- */
.svh-roi-bonus-bar {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.1rem 1.25rem;
    background: #fefce8;
    border: 1.5px solid #eab308;
    border-radius: var(--roi-radius);
}
.svh-roi-bonus-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: .1rem;
}
.svh-roi-bonus-content {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.svh-roi-bonus-headline {
    margin: 0;
    font-size: .925rem;
    color: #78350f;
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}
.svh-roi-bonus-tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #fde68a;
    color: #92400e;
    border-radius: 4px;
    padding: .1rem .45rem;
}
.svh-roi-bonus-body {
    margin: 0;
    font-size: .86rem;
    color: #44403c;
    line-height: 1.6;
}
.svh-roi-bonus-cite {
    white-space: nowrap;
    color: #78716c;
    font-size: .8rem;
}

/* ----------------------------------------------------------------
   METHODOLOGY & SOURCES CARD
---------------------------------------------------------------- */
.svh-roi-methodology {
    margin-top: 2rem;
    padding: 1.75rem 1.5rem 1.5rem;
    background: var(--roi-surface);
    border: 1px solid var(--roi-border);
    border-radius: var(--roi-radius);
    box-shadow: var(--roi-shadow);
}
.svh-roi-meth-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    gap: .75rem;
    margin-bottom: 0;
}
.svh-roi-meth-toggle:focus-visible {
    outline: 3px solid #0047AB;
    outline-offset: 2px;
    border-radius: 4px;
}
.svh-roi-meth-toggle .svh-roi-toggle-icon {
    font-size: .8rem;
    color: var(--roi-text-3);
    flex-shrink: 0;
}
.svh-roi-meth-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--roi-text);
    margin: 0;
}
.svh-roi-meth-intro {
    font-size: .875rem;
    color: var(--roi-text-2);
    margin: 1rem 0 1.5rem;
    line-height: 1.6;
}
.svh-roi-meth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.svh-roi-meth-item {
    padding: 1rem 1.125rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.svh-roi-meth-item-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .6rem;
}
.svh-roi-meth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: .95rem;
    flex-shrink: 0;
}
.svh-roi-meth-icon-green  { background: #dcfce7; }
.svh-roi-meth-icon-teal   { background: #cffafe; }
.svh-roi-meth-icon-purple { background: #f3e8ff; }
.svh-roi-meth-icon-amber  { background: #fef9c3; }
.svh-roi-meth-icon-indigo { background: #e0e7ff; }
.svh-roi-meth-icon-blue   { background: #dbeafe; }
.svh-roi-meth-icon-violet { background: #fae8ff; }
.svh-roi-meth-label {
    font-size: .875rem;
    font-weight: 700;
    color: var(--roi-text);
}
.svh-roi-meth-formula {
    font-size: .78rem;
    color: var(--roi-text-2);
    margin: 0 0 .5rem;
    line-height: 1.55;
    padding: .4rem .6rem;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
}
.svh-roi-meth-rationale {
    font-size: .78rem;
    color: var(--roi-text-2);
    margin: 0 0 .4rem;
    line-height: 1.55;
}
.svh-roi-meth-source {
    font-size: .72rem;
    color: var(--roi-text-3);
    margin: 0;
    font-style: italic;
}
.svh-roi-meth-sources-block {
    padding: 1rem 1.125rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
}
.svh-roi-meth-sources-label {
    font-size: .82rem;
    font-weight: 700;
    color: var(--roi-text);
    margin: 0 0 .5rem;
}
.svh-roi-meth-sources-list {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.svh-roi-meth-sources-list li {
    font-size: .78rem;
    color: var(--roi-text-2);
    line-height: 1.5;
}
.svh-roi-meth-sources-list em {
    color: var(--roi-text-3);
}

/* Default plan radio group */
.svh-roi-admin-radio-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    color: #111827;
    font-weight: 500;
    margin-bottom: .5rem;
    cursor: pointer;
}
