/* ============================================================
   OwnersPath Pre-Qualification Wizard — prequalification.css
   Reuses existing CSS variables from member-dashboard.css
   and frontend.css where possible.
   ============================================================ */

/* ── Variables (aligned with existing theme) ───────────────── */
:root {
    --preq-navy:         var(--mb-olive, #1a3a5c);
    --preq-navy-dark:    var(--mb-olive-dark, #152e4a);
    --preq-olive:        var(--mb-olive-light, #8a9a5b);
    --preq-olive-dark:   var(--mb-olive, #6f7d49);
    --preq-body-bg:      #f4f4f0;
    --preq-card-radius:  12px;
    --preq-shadow:       0 4px 14px rgba(0, 0, 0, 0.08);
    --preq-strip-width:  190px;
    --preq-label-color:  #444;
    --preq-font:         'Inter', sans-serif;
}

/* ── Page scaffolding ──────────────────────────────────────── */
.preq-body {
    background: var(--preq-body-bg);
    font-family: var(--preq-font);
    margin: 0;
    padding: 0;
}

.preq-page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Left navy strip ───────────────────────────────────────── */
.preq-left-strip {
    width: var(--preq-strip-width);
    min-width: var(--preq-strip-width);
    background: var(--preq-navy);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.preq-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.preq-logo {
    max-width: 140px;
    height: auto;
}

.preq-logo-fallback {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    gap: 0.4rem;
    align-items: center;
}

/* ── Main content area ─────────────────────────────────────── */
.preq-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Top white bar (always shown, same for auth & guest) ─────── */
.preq-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e8e8e4;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.preq-topbar-left  { flex: 1; }
.preq-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preq-topbar-meta {
    font-size: 0.98rem;
    color: #555;
}

/* ── Page content below topbar ──────────────────────────────── */
.preq-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preq-content-area {
    padding: 0.5rem 2rem 2rem;   /* top trimmed from 2rem: the gap under the top bar was too big */
    flex: 1;
}

/* ── Two-column layout: form card + right sidebar ──────────── */
.preq-two-col {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-top: 1.5rem;
}

/* ── Form card ─────────────────────────────────────────────── */
.preq-form-card {
    background: #fff;
    border-radius: var(--preq-card-radius);
    box-shadow: var(--preq-shadow);
    padding: 2rem;
    flex: 1 1 66%;
    min-width: 0;
}

.preq-section-title {
    color: var(--preq-navy);
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--preq-olive);
    padding-bottom: 0.5rem;
}

.preq-label {
    color: var(--preq-label-color);
    font-weight: 500;
    font-size: 1.03rem;
}

.preq-sublabel {
    font-size: 0.92rem;
    color: #777;
    display: block;
    margin-bottom: 0.2rem;
}

.preq-input {
    font-size: 1.03rem;
    border-radius: 6px;
}

.preq-section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: var(--preq-navy);
    font-weight: 600;
    font-size: 1.03rem;
}

.preq-section-divider::before,
.preq-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

/* ── Buttons ───────────────────────────────────────────────── */
.preq-btn-row {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.preq-btn-row--split {
    justify-content: space-between;
}

.project-submit-btn {
    padding: 0.5rem 1.8rem;
    font-weight: 600;
    font-size: 1.03rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.project-box-color {
    background: var(--preq-navy);
    color: #fff;
    border-color: var(--preq-navy);
}

.project-box-color:hover,
.project-box-color:focus {
    background: var(--preq-navy-dark);
    border-color: var(--preq-navy-dark);
    color: #fff;
}

.project-box-color-outline {
    background: transparent;
    color: var(--preq-navy);
    border-color: var(--preq-navy);
}

.project-box-color-outline:hover,
.project-box-color-outline:focus {
    background: var(--preq-navy);
    color: #fff;
}

.project-box-color-sm {
    background: var(--preq-olive);
    color: #fff;
    border-color: var(--preq-olive);
    padding: 0.3rem 1rem;
    font-size: 0.98rem;
}

.project-box-color-sm:hover {
    background: var(--preq-olive-dark);
    border-color: var(--preq-olive-dark);
}

.preq-continue-btn {
    min-width: 175px;
    justify-content: center;
}

/* ── Guest (unauthorized) wrapper — no sidebar, blank topbar ── */
.preq-guest-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--preq-body-bg);
}

.preq-guest-wrapper .mb-topbar {
    padding: 0 1.5rem;
}

.preq-guest-logo {
    height: 36px;
    width: auto;
}

.preq-guest-wrapper .mb-main-content {
    flex: 1;
}

/* Ensure blank topbar for unauthorized users has same height as authenticated topbar */
.preq-topbar-guest {
    min-height: 56px;
}

/* ── Wizard page heading ─────────────────────────────────────── */
.preq-wizard-heading {
    font-size: 1.09rem;
    font-weight: 700;
    color: var(--preq-navy);
    margin-bottom: 0.6rem;
    letter-spacing: 0.01em;
}

/* ── Step navigation: arrow progress bar ──────────────────────
   Arrow shapes are cut with clip-path (no pseudo-element triangles),
   so they line up at every width. Done steps and the current step
   fill with blue; upcoming steps stay grey. */
#dvGoal .steps-design {
    --step-arrow: 16px;          /* depth of each arrow point */
    --step-done-bg:    #d6e9fa;  /* completed steps: pale powder blue */
    --step-active-bg:  #9cc9f0;  /* current step: light blue */
    --step-todo-bg:    #e4e4e2;  /* upcoming steps: light grey */
    --step-ink:        #0f3a60;  /* dark navy text on blue */
    --step-sub:        #2f5f8a;  /* subtitle text on blue */
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

#dvGoal .steps-design > .project-box.project-box-color {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 0 0 calc(var(--step-arrow) * -0.75);
    padding: 10px calc(var(--step-arrow) + 6px) 10px calc(var(--step-arrow) + 10px);
    border: 0;
    border-radius: 0;
    background: var(--step-todo-bg);
    clip-path: polygon(0 0, calc(100% - var(--step-arrow)) 0, 100% 50%,
                       calc(100% - var(--step-arrow)) 100%, 0 100%, var(--step-arrow) 50%);
}

#dvGoal .steps-design > .project-box.project-box-color:first-child {
    margin-left: 0;
    padding-left: 12px;
    clip-path: polygon(0 0, calc(100% - var(--step-arrow)) 0, 100% 50%,
                       calc(100% - var(--step-arrow)) 100%, 0 100%);
}

#dvGoal .steps-design > .project-box.project-box-color:last-child {
    padding-right: 12px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, var(--step-arrow) 50%);
}

/* Old triangle pseudo elements are no longer used */
#dvGoal .steps-design > .project-box.project-box-color::before,
#dvGoal .steps-design > .project-box.project-box-color::after {
    display: none !important;
}

/* Completed steps (any step before the current one) */
#dvGoal .steps-design > .project-box.project-box-color:has(~ .active-tab-step) {
    background: var(--step-done-bg);
}

/* Current step */
#dvGoal .steps-design > .project-box.project-box-color.active-tab-step {
    background: var(--step-active-bg);
}

#dvGoal .steps-design > .project-box.project-box-color h2 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    color: #8a8a8a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#dvGoal .steps-design > .project-box.project-box-color p {
    font-size: 14px;
    margin: 2px 0 0;
    color: #9a9a9a;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#dvGoal .steps-design > .project-box.project-box-color.active-tab-step h2,
#dvGoal .steps-design > .project-box.project-box-color:has(~ .active-tab-step) h2 {
    color: var(--step-ink);
    font-weight: 700;
}

#dvGoal .steps-design > .project-box.project-box-color.active-tab-step p,
#dvGoal .steps-design > .project-box.project-box-color:has(~ .active-tab-step) p {
    color: var(--step-sub);
}

/* Theme-matched progress colors: tints of the white-label brand color
   (--mb-olive from the partner theme file), so every partner instance
   gets a step bar in its own color. Browsers without color-mix()
   keep the blue above. */
@supports (background: color-mix(in srgb, red 50%, white)) {
    #dvGoal .steps-design {
        --step-done-bg:   color-mix(in srgb, var(--mb-olive, #1a3a5c) 14%, #fff);
        --step-active-bg: color-mix(in srgb, var(--mb-olive, #1a3a5c) 34%, #fff);
        --step-ink:       var(--mb-olive-dark, #152e4a);
        --step-sub:       color-mix(in srgb, var(--mb-olive-dark, #152e4a) 80%, #fff);
    }
}

/* Safety net: hide any accidental empty element that ends up inside .steps-design */
#dvGoal .steps-design > div:empty,
#dvGoal .steps-design > :not(.project-box) {
    display: none !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* ── Check icon (current step) ─────────────────────────────── */
.step-shield-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--step-ink, #0f3a60);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-shield-icon::after {
    content: '\2713';
    font-size: 12px;
    color: var(--step-ink, #0f3a60);
    font-weight: 700;
    line-height: 1;
}

/* ── Right sidebar / virtual coach ─────────────────────────── */
.right-sdebar-panel {
    width: 325px;
    min-width: 325px;
    max-width: 325px;
    flex: 0 0 325px;        /* fixed — never grows or shrinks */
}

.preq-coach-header {
    background: var(--preq-navy);
    color: #fff;
    border-radius: var(--preq-card-radius) var(--preq-card-radius) 0 0;
    padding: 1rem 1.2rem;
}

.preq-coach-header h5 {
    margin: 0 0 0.2rem;
    font-weight: 700;
    font-size: 1.15rem;
}

.preq-coach-header p {
    margin: 0;
    font-size: 0.94rem;
    opacity: 0.85;
}

.preq-video-wrap {
    background: #fff;
    padding: 0.75rem;
    text-align: center;
}

.preq-coach-badges {
    background: #fff;
    border-radius: 0 0 var(--preq-card-radius) var(--preq-card-radius);
    padding: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    box-shadow: var(--preq-shadow);
}

.preq-badge-img {
    max-height: 40px;
    width: auto;
}

/* ── Results page ───────────────────────────────────────────── */
.preq-results-section {
    margin-top: 1rem;
}

.preq-results-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--preq-navy);
    margin-bottom: 0.75rem;
}

.preq-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.preq-results-list li {
    padding: 0.35rem 0;
    font-size: 1.03rem;
    border-bottom: 1px solid #f0f0ec;
}

/* ── Results tables (3-column: Item | Yes | Not Yet) ──────────── */
.resultmaintable {
    margin-bottom: 0.75rem;
}

.result-table {
    width: 80%;
    border-collapse: collapse;
    font-size: 1.01rem;
    margin-bottom: 0;
}

.result-th-main {
    width: 50%;
    background: silver;
    font-weight: 700;
    line-height: 25px;
    padding: 0.3rem 0.5rem;
    color: #222;
}

.result-th-col {
    width: 15%;
    background: silver;
    font-weight: 700;
    line-height: 25px;
    padding: 0.3rem 0.5rem;
    color: #222;
}

.result-table tbody tr td {
    padding: 0.3rem 0.5rem;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    font-size: 1rem;
}

.result-table .result-yes {
    color: #2a7a2a;
    font-weight: 700;
    font-size: 1.15rem;
}

.result-table .result-no {
    color: #c0392b;
    font-weight: 700;
    font-size: 1.15rem;
}

.result-footer {
    padding: 0.4rem 0.5rem;
    font-size: 0.92rem;
    color: #555;
    font-style: italic;
    background: #f5f5f5;
}

.preq-results-intro {
    font-size: 1.09rem;
    color: #333;
    margin-bottom: 1rem;
}

.NoRecordFound {
    padding: 1rem;
    background: #fff8e1;
    border-left: 4px solid #f0a500;
    border-radius: 4px;
    font-size: 1.03rem;
    color: #7a5c00;
}

.preq-credentials-box {
    background: #f5f5f5;
    border: 1px solid #ccc;
    padding: 0.75rem 1rem;
    font-size: 1.03rem;
    margin-top: 0.5rem;
}

.preq-login-btn {
    font-weight: 700;
    padding: 0.5rem 1.5rem;
}

/* ── Experian result box (Step 3) ──────────────────────────── */
.preq-experian-box {
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #fff;
    margin-bottom: 1rem;
}

.preq-experian-box .exp-status-label {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.35rem;
}

.preq-experian-box .exp-biz-name {
    color: #1a60a0;
    font-weight: 600;
    text-decoration: underline;
    margin-bottom: 0.35rem;
}

.preq-experian-box .exp-match-msg {
    margin-bottom: 0.4rem;
}

.preq-experian-box ul {
    margin: 0 0 0.4rem 0;
    padding-left: 1.25rem;
    max-height: 140px;
    overflow-y: auto;
}

.preq-experian-box ul li a {
    color: #1a60a0;
    font-weight: 600;
    text-decoration: underline;
}

.preq-experian-box ul li a:hover {
    color: #0d3d6e;
}

.preq-experian-box ul li small {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-top: 1px;
}

.exp-credit-metrics {
    display: flex;
    gap: 0.5rem;
    margin: 0.6rem 0 0.4rem 0;
}

.exp-metric {
    flex: 1;
    text-align: center;
}

.exp-metric-label {
    color: #1a60a0;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
    text-decoration: underline;
}

.exp-metric-value {
    font-weight: 700;
    color: #222;
    font-size: 1.03rem;
}

.exp-move-on {
    font-size: 0.94rem;
    color: #444;
    margin-top: 0.3rem;
}

/* ── Step 1 form: label-left / input-right inline layout ─────── */
.form-row-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-row-item > label {
    width: 220px;
    min-width: 220px;
    font-size: 17px;
    color: #333333;
    font-weight: 500;
    padding-right: 10px;
    flex-shrink: 0;
}

.form-field {
    flex: 1;
    min-width: 0;
}

.form-field .form-control,
.form-field .form-select {
    width: 100%;
}

/* Contact Name: First: [input] Last: [input] all on one row */
.contact-name-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.contact-name-inputs .cn-label {
    font-size: 17px;
    color: #333333;
    white-space: nowrap;
    flex-shrink: 0;
}

.contact-name-inputs .form-control {
    flex: 1;
    min-width: 80px;
}

/* Continue button centered */
.btn-wrap {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 20px;
}

/* ── Page title (h1 above the white card) ───────────────────── */
h1.page-header {
    font-size: 21px;
    font-weight: 700;
    color: #000000;
    margin: 10px 0 10px;
    padding-bottom: 9px;
    border-bottom: none;
}

/* ── Outer layout: card (left) + sidebar (right) ─────────────── */
.FundabilityTestStep {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    gap: 40px;                  /* spacing between the card and the coach sidebar */
    overflow: visible;          /* visible so the card's shadow isn't clipped;
                                   min-width: 0 on .RightPanel keeps the sidebar in place */
}

/* Any RightPanel in this layout fills the row. The Edit page uses a
   plain .RightPanel (no .w-66, no coach column); without this it shrinks
   to fit its content, and because .page-body is a size container (see
   Responsive), the card would collapse to ~330px. */
.FundabilityTestStep > .RightPanel {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;                /* also fills when the layout stacks below 1200px */
}

/* Edit page only (its panel has no .w-66 and there is no coach column):
   - cap the card so it doesn't stretch across very wide screens
   - let the form use the card's width instead of Bootstrap's 1200px
     .container, which left big empty margins inside the card
   - drop the clearfix div that was adding a stray 40px flex gap */
.FundabilityTestStep > .RightPanel:not(.w-66) { max-width: 1280px; }
.RightPanel:not(.w-66) .page-body > .container {
    max-width: none;
    padding-left: clamp(16px, 3vw, 40px);
    padding-right: clamp(16px, 3vw, 40px);
}
.FundabilityTestStep:has(> .RightPanel:not(.w-66)) > .ClearBoth { display: none; }

.RightPanel.w-66 {
    flex: 1 1 0%;               /* grows to fill remaining space */
    min-width: 0;               /* critical — prevents flex overflow */
    max-width: calc(100% - 325px - 40px);
    overflow: visible;          /* don't clip the .page-body shadow */
}

.ClearBoth {
    clear: both;
}

/* ── White card (.page-body) ─────────────────────────────────── */
.page-body {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 4px 20px 0px;
    padding: 30px 0 0 0;
    overflow: hidden;
    margin-bottom: 20px;
}

/* ── Step indicator container padding (inside card at top) ───── */
#dvGoal {
    width: 100%;
    overflow: hidden;
    padding: 0 30px 0 15px;
}

/* ── Bottom badges (outside white card, inside .RightPanel) ──── */
.right-panel-btm-logo {
    display: flex;
    justify-content: space-between;
    padding: 0 0 15px;
    align-items: center;
}

.right-panel-btm-logo img {
    max-height: 50px;
    width: auto;
}

/* ── Virtual Coach Video container ──────────────────────────────
   Matches the treatment used on the Coach step pages (step-1-1.asp
   etc. — see .videoposition rules in member-dashboard.css and the
   enhance()/setupPoster() logic in frontend.js): #e8e8e8 background
   instead of the source clip's baked-in black, the widget's own
   unstyled poster hidden in favor of the injected .vp-poster overlay,
   and its control bar kept but shrunk/centered. The 1_{spokesmodel}.js
   script used here targets #wthvideo1 specifically (not the bare
   #wthvideo the 5_/7_-numbered scripts use), so both ids are covered
   defensively — same reasoning as .videoposition's own dual coverage. */
#wthvideo2 {
    width: 325px;
    height: 322.5px;
    background: #e8e8e8;
    display: block;
    overflow: hidden;
    position: relative;   /* re-roots the spokesmodel JS's fixed-positioned video/poster
                              elements to this box instead of the viewport — otherwise
                              they escape this container and overlap the caption below */
    transform: translateZ(0);
}

#wthvideo2 #wthvideo-wrapper,
#wthvideo2 #wthvideo,
#wthvideo2 #wthvideo1,
#wthvideo2 #controls {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    transform: none !important;
    overflow: hidden !important;
    background: transparent !important;
    justify-content: center !important;
}

#wthvideo2 video { display: none !important; }
#wthvideo2 #bufferCanvas { display: none !important; }
#wthvideo2 canvas {
    display: block !important;
    position: absolute !important;
}
#talkingCanvas {
    left: 50% !important;
    transform: translateX(-50%);
}

/* The widget's own poster image is unstyled/unconstrained at its native
   pixel size — hidden in favor of the .vp-poster overlay that
   /js/frontend.js injects (same as the step pages). Its control bar
   (play/restart/mute/close) is kept, just resized/centered. */
#wthvideo2 #poster { display: none !important; }
#wthvideo2 #playerBar {
    left: 50% !important;
    right: auto !important;
    bottom: 4px !important;
    transform: translateX(-50%) !important;
    padding: 1px !important;
}
#wthvideo2 #playerBar img {
    width: 22px !important;
    height: auto !important;
    max-width: 22px !important;
}

/* .vp-poster (member-dashboard.css) defaults to a fixed 195px height sized
   for the step pages' shorter box that also has to leave room for a caption
   strip inside the same element — here the caption (.become-coach) is a
   separate element below #wthvideo2, so the poster can use the box's full
   height instead. */
#wthvideo2 .vp-poster { height: 100% !important; }

/* ── Becoming Bankable caption ───────────────────────────────── */
.become-coach {
    background: #fff;
    color: var(--mb-olive);
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    padding: 5px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    position: relative;
    z-index: 1;
}

/* ── 150 Points / 3 Goals panels ─────────────────────────────── */
.points_box {
    padding: 15px 0;
    display: block;
}

.points_box img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.points_box p {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
    line-height: 1.4;
}

.points_box span,
.points_box ul,
.points_box ol {
    font-size: 18px;
    color: #333333;
    margin: 0;
    line-height: 1.55;
}

/* Bulleted (150 Points) and numbered (3 Goals) lists share one left edge so the text lines up */
.points_box ul,
.points_box ol {
    padding-left: 22px;
    list-style-position: outside;
}

.points_box ul li,
.points_box ol li {
    margin-bottom: 4px;
    padding-left: 0;
}

/* ── Partner-colored sidebar headers + trust badges ────────────
   The 150 Points / 3 Goals header images and the two trust badge
   images were fixed teal PNGs that clash with partner themes. They are
   hidden and rebuilt in CSS with the theme's brand color (--mb-olive),
   using the Bootstrap Icons font the page already loads. */
.right-sdebar-panel > .coach-more-info {
    float: none;               /* member-dashboard.css floats it right */
    display: block;
    width: 100%;               /* lines the video up with the column edges */
    margin: 0;
}

/* Vertical rhythm: 24px video to first block, 28px between blocks,
   10px icon to heading, 6px heading to text */
.right-sdebar-panel > .points_box { padding: 0; margin-top: 24px; }
.right-sdebar-panel > .points_box + .points_box { margin-top: 28px; }
.points_box ol li:last-child { margin-bottom: 0; }

/* Sidebar blocks centered under the video at every size:
   icon on top, heading, then text */
.points_box { text-align: center; }
.points_box ul,
.points_box ol {
    list-style-position: inside;
    padding-left: 0;
}

.points_box > img { display: none; }

.points_box > p {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 22px;
    line-height: 1.25;
    color: #233044;             /* slate navy sampled from the coach video thumbnail */
    margin: 0 0 6px;
}

.points_box > p::before {
    font-family: "bootstrap-icons";
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--mb-olive, #1a3a5c);   /* solid brand circle, same as the Continue button */
    color: #fff;
    font-size: 22px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);   /* subtle neutral lift, no colored glow */
}
.points_box:has(img[src*="150point"]) > p::before { content: "\F726"; }  /* bi-clipboard2-data-fill */
.points_box:has(img[src*="3goals"])   > p::before { content: "\F3CB"; }  /* bi-flag-fill */

/* Trust pills, CSS-only version: the two badge images under the form
   card are hidden and replaced with pills drawn by ::before / ::after,
   so no view (.cshtml) change is needed. If the view is later updated
   to the .trust-pills markup below, these rules simply stop applying. */
.right-panel-btm-logo {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.right-panel-btm-logo > img { display: none; }

.right-panel-btm-logo::before,
.right-panel-btm-logo::after {
    font-family: "bootstrap-icons", "Inter", sans-serif;
    display: inline-block;
    padding: 6px 11px;
    border: 1.5px solid #d5d8dc;
    border-radius: 999px;
    background: #fff;
    color: var(--mb-olive-dark, #152e4a);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.right-panel-btm-logo::before { content: "\F52F\00a0\00a0Privacy Protected"; }      /* bi-shield-check */
.right-panel-btm-logo::after  { content: "\F47A\00a0\00a0Secure SSL Encryption"; }  /* bi-lock-fill */

/* Trust pills (in the coach sidebar, under 3 Goals) */
.trust-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border: 1.5px solid #d5d8dc;
    border-radius: 999px;
    background: #fff;
    color: var(--mb-olive-dark, #152e4a);
    font-size: 12px;            /* sized so both pills fit on one line in the 325px sidebar */
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

@supports (background: color-mix(in srgb, red 50%, white)) {
    .trust-pill,
    .right-panel-btm-logo::before,
    .right-panel-btm-logo::after {
        border-color: color-mix(in srgb, var(--mb-olive, #1a3a5c) 35%, #fff);
    }
}

/* Desktop: coach column pinned to the top of the page, beside the form card. */
@media (min-width: 1200px) {
    /* All four pre-qualification pages (Steps 1-3 + Results): sidebar sits at the
       top, level with the card, and follows the scroll on tall pages. */
    .FundabilityTestStep > .right-sdebar-panel {
        align-self: flex-start;
        margin-bottom: 0;
        position: sticky;
        top: 84px;   /* clears the 64px guest logo bar */
    }
}

/* ── Guest view: logo top bar instead of an empty side menu ────
   Guests get no menu links, so the 220px brand-colored sidebar is
   empty. For guests only, turn it into a slim white top bar with the
   logo, drop the blank top bar, and give the content the full width.
   Logged-in members (no .preq-topbar-guest) keep the normal sidebar. */
body:has(.mb-topbar.preq-topbar-guest) .mb-sidebar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    transform: none;
    background: #fff;
    border-bottom: 1px solid #e8e8e4;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

body:has(.mb-topbar.preq-topbar-guest) .mb-sidebar-brand {
    width: auto;
    height: 64px;
    justify-content: flex-start;
    padding: 0 24px;
}

body:has(.mb-topbar.preq-topbar-guest) .mb-sidebar-logo {
    height: 44px;
}

body:has(.mb-topbar.preq-topbar-guest) .mb-main-wrapper {
    margin-left: 0;
}

.mb-topbar.preq-topbar-guest { display: none; }

@media (max-width: 575px) {
    body:has(.mb-topbar.preq-topbar-guest) .mb-sidebar-brand {
        height: 56px;
        padding: 0 16px;
    }
    body:has(.mb-topbar.preq-topbar-guest) .mb-sidebar-logo { height: 36px; }
}

/* ── Responsive ─────────────────────────────────────────────── */

/* The form card is a size container, so its contents react to the
   card's own width (not the window). This covers in-between widths
   where the member sidebar is still open and the card gets narrow. */
.page-body { container: preq-card / inline-size; }

@container preq-card (max-width: 640px) {
    .form-row-item {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 14px;
    }
    .form-row-item > label {
        width: 100%;
        min-width: 0;
        padding-right: 0;
        margin-bottom: 4px;
    }
    .form-field { width: 100%; }
    .contact-name-inputs .form-control { flex: 1 1 calc(100% - 50px); }

    #dvGoal .steps-design > .project-box.project-box-color h2 { font-size: 15px; }
    #dvGoal .steps-design > .project-box.project-box-color p  { font-size: 12px; }
}

/* Step 1 + Edit page: when the card is wide enough for label-left / input-right,
   give the label column enough room for the longest label ("Does your Business
   have an EIN ?") and stop labels / the EIN radios from wrapping. Narrower
   cards / viewports keep the stacked layout from the rules above & below. */
@media (min-width: 768px) {
    @container preq-card (min-width: 641px) {
        .FundabilityTestStep .form-row-item > label {
            width: 285px;
            min-width: 285px;
            white-space: nowrap;
        }
        .FundabilityTestStep .form-row-item .form-check-label,
        .FundabilityTestStep .form-row-item .form-field .d-flex { white-space: nowrap; flex-wrap: nowrap; }
    }
}
@container preq-card (max-width: 520px) {
    #dvGoal .steps-design { --step-arrow: 12px; }
    #dvGoal .steps-design > .project-box.project-box-color {
        min-height: 48px;
        padding: 6px 8px 6px 18px;
    }
    #dvGoal .steps-design > .project-box.project-box-color:first-child { padding-left: 8px; }
    #dvGoal .steps-design > .project-box.project-box-color:last-child  { padding-right: 6px; }
    #dvGoal .steps-design > .project-box.project-box-color h2 { font-size: 13px; }
    #dvGoal .steps-design > .project-box.project-box-color p,
    #dvGoal .step-shield-icon { display: none; }
}

/* Below 1200px the card and the coach sidebar no longer fit side by
   side next to the member menu, so stack them */
@media (max-width: 1199px) {
    .preq-two-col,
    .FundabilityTestStep {
        flex-direction: column;
        gap: 20px;
    }

    .right-sdebar-panel {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        flex: 0 0 auto;
    }

    .RightPanel.w-66 {
        width: 100%;
        max-width: 100%;
    }

    /* Keep the coach video at its native size, centered, square */
    #wthvideo2 {
        width: 100%;
        max-width: 325px;
        height: auto;
        aspect-ratio: 325 / 322.5;
        margin: 0 auto;
    }

    .become-coach {
        max-width: 325px;
        margin: 0 auto;
    }

    .right-sdebar-panel .coach-more-info { display: block; }
    .right-sdebar-panel .coach-more-info img { width: 100%; height: auto; display: block; }

    .result-table { width: 100%; }
}

/* Tablet (768-1199): coach image on the left, 150 Points / 3 Goals on the right */
@media (min-width: 768px) and (max-width: 1199px) {
    .right-sdebar-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 28px;
        align-items: start;
    }
    .right-sdebar-panel > .coach-more-info { grid-row: span 2; }
    .right-sdebar-panel > .points_box { margin-top: 0; }   /* top lines up with the video */
    .right-sdebar-panel > .points_box + .points_box { margin-top: 28px; }
}

@media (max-width: 991px) {
    .preq-left-strip {
        width: 60px;
        min-width: 60px;
        padding: 1rem 0.5rem;
    }

    .preq-logo { max-width: 40px; }
}

/* Phone */
@media (max-width: 767px) {
    /* Navy strip becomes a slim top bar instead of eating side width */
    .preq-page-wrapper {
        flex-direction: column;
    }

    .preq-left-strip {
        width: 100%;
        min-width: 0;
        min-height: 0;
        flex-direction: row;
        padding: 0.5rem 1rem;
    }

    .preq-logo-wrap { justify-content: flex-start; }

    .preq-logo {
        max-width: 130px;
        max-height: 34px;
    }

    /* Top bar */
    .preq-topbar,
    .preq-guest-wrapper .mb-topbar {
        height: auto;
        min-height: 52px;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    .preq-topbar-right { gap: 0.5rem; min-width: 0; }

    .preq-topbar-meta {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 55vw;
    }

    .preq-guest-logo { height: 30px; }

    /* .mb-main-content already gives a 16px gutter; don't double it */
    .preq-content-area { padding: 0; }
    .preq-topbar-guest { padding: 0 16px; }

    /* Step tabs: share the row evenly instead of overflowing */
    #dvGoal .steps-design > .project-box { flex: 1 1 0; min-width: 0; }

    /* Coach image + trust badges */
    .right-sdebar-panel > .coach-more-info { max-width: 400px; margin: 0 auto; }
    .right-sdebar-panel .coach-more-info img { width: 100%; height: auto; }

    h1.page-header {
        font-size: 19px;
        margin: 10px 0 6px;
        padding-bottom: 4px;
    }

    .page-body {
        padding: 16px 0 0;
        border-radius: 10px;
    }

    .preq-form-card { padding: 1.25rem 1rem; }

    #dvGoal { padding: 0 12px; }

    /* Label-left / input-right rows stack */
    .form-row-item {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 14px;
    }

    .form-row-item > label {
        width: 100%;
        min-width: 0;
        padding-right: 0;
        margin-bottom: 4px;
        font-size: 16px;
    }

    .form-field { width: 100%; }

    /* First / Last name: each pair on its own line */
    .contact-name-inputs .cn-label { font-size: 16px; }
    .contact-name-inputs .form-control { flex: 1 1 calc(100% - 50px); }

    /* 16px minimum stops iOS from zooming on focus */
    .preq-input,
    .form-field .form-control,
    .form-field .form-select,
    .contact-name-inputs .form-control {
        font-size: 16px;
    }

    /* Buttons */
    .preq-btn-row,
    .preq-btn-row--split {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .preq-btn-row .project-submit-btn,
    .btn-wrap .project-submit-btn,
    .preq-continue-btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    /* Results tables scroll sideways instead of overflowing */
    .resultmaintable {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .result-table { font-size: 0.95rem; }
    .result-th-main { width: auto; }
    .result-th-col  { width: 70px; text-align: center; }

    /* Experian box */
    .exp-credit-metrics { flex-wrap: wrap; }
    .exp-metric { flex: 1 1 45%; }

    /* Badges + points panels */

    .trust-pills { justify-content: center; }

    .points_box p    { font-size: 18px; }
    .points_box span,
    .points_box ol   { font-size: 16px; }
}

/* Small phone: hide the empty guest top bar, compact the step bar */
@media (max-width: 575px) {
    /* Guest top bar is empty, so drop it. The logged-in top bar is left
       alone because it holds the sidebar menu toggle. */
    .mb-topbar.preq-topbar-guest { display: none; }

    #dvGoal .steps-design {
        --step-arrow: 12px;
        border-radius: 8px;
        margin-bottom: 14px;
    }

    #dvGoal .steps-design > .project-box.project-box-color {
        min-height: 44px;
        padding: 6px 8px 6px 18px;
    }
    #dvGoal .steps-design > .project-box.project-box-color:first-child { padding-left: 8px; }
    #dvGoal .steps-design > .project-box.project-box-color:last-child  { padding-right: 6px; }

    #dvGoal .steps-design > .project-box.project-box-color h2 { font-size: 13px; }
    #dvGoal .steps-design > .project-box.project-box-color p,
    #dvGoal .step-shield-icon { display: none; }

}

/* Very narrow phones (iPhone SE / 360px Androids) */
@media (max-width: 380px) {
    #dvGoal { padding: 0 8px; }
    #dvGoal .steps-design > .project-box.project-box-color h2 { font-size: 12px; }
}
