/*
 * quiz.php mobile responsiveness
 * Loaded last in <head>. css/brians_spie_chart.css is loaded later in <body>
 * on the results view, so pie-chart rules below use higher specificity.
 * Desktop (>=768px) appearance is intended to be unchanged.
 * Width queries are screen-only so printing uses the desktop layout + css/dashboard-print.css.
 * "Phone" = narrower than 768px OR a short touch screen (a phone in landscape, e.g. 844x390) OR a
 * touch tablet (coarse pointer, no hover, up to 1366px: every iPad in both orientations; touch laptops
 * report hover and stay desktop); quiz.php uses the same query in ocPhoneMQ.
 */

/* ---------- Rating widget: fluid at every width (identical at 370px) ---------- */
.answer-checks-container {
  width: 100%;
  max-width: 370px;
}
.answer-checks,
.answer-numbers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 370px;
  background-size: 100% 18px;
  background-repeat: no-repeat;
}
.answer-checks .ans,
.answer-numbers .ans-nums {
  position: relative;
  margin-left: 0;
  flex: 0 0 18px;
}
.answer-checks .ans {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Hit area: 54x54px around each 18px dot, no overlap with neighbours
   (dot pitch is >=70px even at 320px wide). */
.answer-checks .ans:after {
  content: '';
  position: absolute;
  top: -18px;
  bottom: -18px;
  left: -18px;
  right: -18px;
}

/* ---------- Honor jQuery .hide() on the FINISH/NEXT controls ----------
   oc-brand-override.css sets display:inline-flex !important on .quiz-finish,
   which defeats $(".quiz-finish").hide(); re-assert the inline display:none. */
.quiz-finish[style*="display: none"],
.quiz-finish[style*="display:none"],
.quiz-start[style*="display: none"],
.quiz-start[style*="display:none"] {
  display: none !important;
}

/* ---------- Pie chart container: no blank gap on phones ---------- */
#quiz_results #piechartQuiz {
  position: relative;
}
#quiz_results #piechartQuiz .quizCanvas {
  height: auto;
  left: 0;
  top: 0;
}

/* ---------- Media / fixed-width elements ---------- */
.presc-vid-image img,
.presc-eos-tools-image img,
.cta-img-container img {
  max-width: 100%;
  height: auto;
}

/* ---------- Phone-only elements: hidden at every width by default ---------- */
.oc-m-progress,
.oc-m-bar,
.oc-m-label,
.oc-m-acc,
.oc-m-answers,
.oc-m-score-of {
  display: none;
}
#ocAnswersCol[hidden] {
  display: none !important;
}

/* ---------- Lead form additions (all widths) ---------- */
/* "share with my EOS Implementer": the checkbox sits in its own 44px box left of the email input.
   (Bootstrap positioned it absolutely under the full-width input on desktop, so it could not be clicked.) */
.send-anonymous .checkbox-inline {
  display: flex;
  align-items: center;
  width: 100%;
  padding-left: 0;
  margin: 0;
}
.oc-check-hit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0 8px 0 -11px;
  font-weight: inherit;
  cursor: pointer;
}
.send-anonymous .checkbox-inline .oc-check-hit input[type="checkbox"] {
  position: static;
  margin: 0 !important;
}
.send-anonymous .checkbox-inline .form-control {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
.send-anonymous .oc-privacy-note {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  color: #46586E !important; /* oc-brand-override.css colours every <p> with !important */
}
.oc-privacy-note a {
  color: #0B3E60;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.oc-radio-group {
  display: inline;
}

/* ---------- "Couldn't save your answer" / "Saving your answers" line on the question card ---------- */
.oc-save-status {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 4px solid #F04E23;
  border-radius: 6px;
  background: #FFF4EC;
  color: #0B3E60;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}
.oc-save-status[hidden] {
  display: none !important;
}
.oc-save-status[data-state="saving"],
.oc-save-status[data-state="locked"] {
  border-left-color: #0D7BB4;
  background: #EEF5FA;
}
.oc-save-retry {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 0 4px;
  padding: 0 6px;
  background: none;
  border: 0;
  color: #0B3E60;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.oc-save-retry:focus {
  outline: 3px solid #0D7BB4;
  outline-offset: 2px;
}
.oc-save-retry:focus:not(:focus-visible) {
  outline: none;
}
.oc-m-primary.oc-busy {
  opacity: 0.75;
}
.answer-checks .ans:focus:not(:focus-visible) { outline: none; } /* mouse/touch only; keyboard keeps the ring */
.answer-checks .ans:focus {
  outline: 3px solid #0D7BB4;
  outline-offset: 3px;
}

/* ---------- Tablet and below ---------- */
@media screen and (max-width: 991px) {
  .cta-button2 {
    min-width: 0;
    white-space: normal;
  }
}

/* =====================================================================
   PHONES (<768px, or landscape phones): purpose-built flow. Brand: EOS Navy #0B3E60,
   EOS Orange #FF7900, Light Blue #0D7BB4, Montserrat.
   ===================================================================== */
@media screen and (max-width: 767px), screen and (pointer: coarse) and (max-height: 500px), screen and (pointer: coarse) and (hover: none) and (max-width: 1366px) {
  :root {
    --ocm-navy: #0B3E60;
    --ocm-orange: #FF7900;
    --ocm-blue: #0D7BB4;
    --ocm-text: #3A4A5E;
    --ocm-muted: #5B6B80; /* 5.5:1 on white, 5.1:1 on the #F5F7FA page */
    --ocm-line: #E8ECF1;
    --ocm-page: #F5F7FA;
    --ocm-radius: 16px;
    --ocm-gutter: 16px;
    --ocm-bar-h: 76px;
    --ocm-shadow: 0 4px 20px rgba(11, 62, 96, 0.08);
  }
  /* AdminLTE.css fixes html/body at height:100% with body overflow-y:auto, which makes
     <body> the scroll container. On phones let the viewport scroll natively instead
     (sticky/fixed bars, scrollTo, address-bar collapse all behave). Desktop is untouched. */
  html,
  body {
    height: auto !important;
    min-height: 100%;
  }
  html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }
  body {
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
  body {
    background: var(--ocm-page) !important;
  }
  /* The page is one viewport-tall column: the visible screen grows to fill it and the footer
     ends it, so nothing scrolls when the content fits (no 100vh + footer overflow).
     Bottom padding keeps the end of the page clear of the fixed question bar and of the
     cookie banner (--oc-consent-space is set by js/oc-consent.js while it is open). */
  body {
    display: flex !important;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: var(--ocm-bar-space, 0px) !important;
  }
  body.oc-q-screen {
    --ocm-bar-space: calc(var(--ocm-bar-h) + env(safe-area-inset-bottom, 0px));
    /* mid-quiz the footer is hidden, so the banner's space is reserved at the end of the page */
    padding-bottom: calc(var(--ocm-bar-space, 0px) + var(--oc-consent-space, 0px)) !important;
  }
  /* the copyright notice and links stay at the very bottom with the banner on top of them (legal review
     2026-10-27): the banner's extra space goes above the footer, not below it */
  body > .footer {
    margin-top: var(--oc-consent-space, 0px) !important;
  }
  body > .bg-info,
  body > .footer {
    flex: 0 0 auto;
    width: 100%; /* Bootstrap's auto side margins would otherwise shrink a flex item to its content */
  }
  body > .bg-info:not([style*="none"]) {
    flex-grow: 1;
  }
  .bg-info,
  .container-fluid.bg-info {
    background: var(--ocm-page) !important;
    background-image: none !important;
    min-height: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* ---- Header: compact navy strip, logo ~150px ---- */
  .header_logo {
    height: 60px !important;
    padding: 0 var(--ocm-gutter) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .header_logo::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    margin: 0 !important;
  }
  .header_logo a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .header_logo_image {
    width: 150px !important;
    max-width: 150px !important;
    height: auto;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ---- Question card ---- */
  #do_quiz {
    padding-bottom: 20px !important;
  }
  /* Centre the card vertically between the 60px header and the footer (the body column
     reserves the fixed bar): the card's auto top/bottom margins split the free space.
     Same for the start / finish cards. Not applied while jQuery has hidden a screen
     (inline display:none), so .show()/.hide() keep working. */
  #do_quiz:not([style*="none"]),
  #start_quiz:not([style*="none"]),
  #finish_quiz:not([style*="none"]) {
    display: flex !important;
    flex-direction: column;
  }
  #start_quiz.bg-info > .row,
  #finish_quiz.bg-info > .row {
    margin-top: auto !important;
    margin-bottom: auto !important;
  }
  #do_quiz > .header_logo {
    flex: 0 0 auto;
    margin-bottom: 20px;
  }
  #do_quiz .modal-dialog {
    width: auto !important;
    margin: auto var(--ocm-gutter) !important;
    animation: none !important;
  }
  #do_quiz .modal-content {
    border-radius: var(--ocm-radius) !important;
    box-shadow: var(--ocm-shadow) !important;
  }
  #do_quiz .modal-header,
  #do_quiz .modal-footer,
  #do_quiz .modal-body > .col-xs-3 {
    display: none !important;
  }
  #do_quiz .modal-body {
    padding: 20px !important;
    min-height: 0 !important;
  }

  /* Progress: caption + 6px orange bar */
  .oc-m-progress {
    display: block;
    margin: 0 0 20px;
  }
  .oc-m-progress-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ocm-muted);
    margin-bottom: 10px;
  }
  .oc-m-progress-track {
    height: 6px;
    border-radius: 3px;
    background: var(--ocm-line);
    overflow: hidden;
  }
  .oc-m-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: var(--ocm-orange);
    transition: width 0.3s ease;
  }

  #do_quiz .question {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--ocm-navy) !important;
    line-height: 1.4 !important;
    text-align: left !important;
    margin: 0 0 24px !important;
    min-height: 101px; /* four lines: the card does not jump between questions */
    letter-spacing: 0 !important;
  }

  /* ---- Answers: five 56px circles in one row ---- */
  .answer-checks-container {
    width: auto !important;
    max-width: none !important;
    margin: 0 -6px 4px !important;
  }
  .answer-desc {
    height: auto !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px;
    margin-bottom: 12px;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    color: var(--ocm-muted) !important;
  }
  .answer-desc > div {
    position: static !important;
    float: none !important;
  }
  .answer-checks {
    background: none !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .answer-checks .ans {
    position: relative !important;
    flex: 0 0 56px !important;
    width: 56px !important;
    height: 56px !important;
    margin: 0 !important;
    border-radius: 50% !important;
    border: 2px solid #7D8BA0; /* 3.5:1 non-text contrast on white */
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--ocm-navy);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
  }
  .answer-checks .ans::before {
    content: attr(data-n);
    line-height: 1;
  }
  .answer-checks .ans::after {
    display: none; /* the oversized desktop hit area must not overlap neighbours */
  }
  .answer-checks .ans:active {
    transform: scale(0.94);
  }
  /* selected: quiz.php adds .oc-selected wherever it paints the inline orange */
  .answer-checks .ans.oc-selected {
    background-color: var(--ocm-orange) !important;
    border-color: var(--ocm-orange) !important;
    color: #fff !important;
  }
  .answer-numbers {
    display: none !important;
  }

  /* ---- Single sticky bottom bar: text Back + one primary pill ---- */
  #do_quiz .oc-m-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px max(var(--ocm-gutter), env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(var(--ocm-gutter), env(safe-area-inset-left, 0px));
    background: #fff;
    border-top: 1px solid var(--ocm-line);
    box-shadow: 0 -4px 16px rgba(11, 62, 96, 0.06);
  }
  .oc-m-back {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    min-height: 52px;
    padding: 0 12px 0 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ocm-navy);
    border-radius: 8px;
  }
  .oc-m-back::before {
    content: '\2039'; /* single left angle */
    font-size: 22px;
    line-height: 0;
    margin-right: 8px;
    position: relative;
    top: -1px;
  }
  .oc-m-primary {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 auto;
    max-width: 220px;
    min-height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 26px;
    background: var(--ocm-orange);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(255, 121, 0, 0.28);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
  }
  .oc-m-primary:disabled,
  .oc-m-primary[aria-disabled="true"] {
    background: var(--ocm-line);
    color: var(--ocm-muted);
    box-shadow: none;
    cursor: default;
  }
  .oc-m-back:focus-visible,
  .oc-m-primary:focus-visible {
    outline: 3px solid var(--ocm-blue);
    outline-offset: 2px;
  }

  /* ---- Start / finish / lead-form screens: white card, full-width pill CTA ---- */
  #start_quiz .row,
  #finish_quiz .row,
  #finish_quiz_for_anonymous .row {
    margin: 0 !important;
  }
  #start_quiz .col-sm-12,
  #finish_quiz .col-sm-12,
  #finish_quiz_for_anonymous .col-sm-12 {
    padding: 0 !important;
  }
  .welcome-container {
    max-width: none !important;
    margin: 20px var(--ocm-gutter) 24px !important;
    padding: 20px !important;
    background: #fff;
    border-radius: var(--ocm-radius);
    box-shadow: var(--ocm-shadow);
    animation: none !important;
    overflow: hidden;
  }
  .welcome-title {
    font-size: 26px !important;
    line-height: 1.2 !important;
    margin: 0 0 12px !important;
    letter-spacing: -0.01em !important;
  }
  /* the start screen's hidden heading becomes the phone card's title */
  #start_quiz .oc-m-start-title {
    display: block !important;
  }
  .welcome-desc {
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin: 0 0 8px !important;
    color: var(--ocm-text) !important;
  }
  .quiz-start,
  .quiz-finish-final {
    display: flex !important;
    float: none !important;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 0 !important;
    padding: 0 24px !important;
    border-radius: 26px !important;
    font-size: 15px !important;
    animation: none !important;
    box-shadow: 0 6px 18px rgba(255, 121, 0, 0.28) !important;
  }
  .quiz-start:focus-visible,
  .quiz-finish-final:focus-visible,
  .send-anonymous .btn-primary:focus-visible {
    outline: 3px solid var(--ocm-blue);
    outline-offset: 3px;
  }

  /* ---- Lead form ---- */
  .send-anonymous {
    margin: 8px 0 0 !important;
  }
  /* the card's intro line already asks where to send the results; labels sit above each field */
  .send-anonymous .oc-m-hide {
    display: none;
  }
  .send-anonymous .form-control::placeholder {
    color: var(--ocm-muted) !important;
  }
  .send-anonymous #FName::placeholder,
  .send-anonymous #LName::placeholder,
  .send-anonymous #email::placeholder {
    color: transparent !important;
  }
  .send-anonymous .oc-radio-group {
    display: flex;
    gap: 8px;
  }
  .send-anonymous .oc-radio-group .radio-inline + .radio-inline {
    margin-left: 0;
  }
  /* 44px tap target around the "share with my EOS Implementer" checkbox */
  .send-anonymous .oc-check-hit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0 -11px 0 -11px;
    cursor: pointer;
  }
  .send-anonymous .oc-check-hit input[type="checkbox"] {
    position: static !important;
    margin: 0 !important;
  }
  .send-anonymous .oc-privacy-note {
    font-size: 14px;
    margin: 4px 0 14px;
  }
  /* brand: Montserrat for body copy on phones (oc-brand-override.css sets Roboto Condensed,
     which the brand reserves for secondary use; desktop is left as it is) */
  p, td, label, .thequestion, .thequestion td, .welcome-desc, .next-steps,
  .presc-results-container, .presc-remind, .presc-congrats-sub, .roadmap-desc {
    font-family: 'Montserrat', sans-serif !important;
  }
  .send-anonymous .form-group {
    margin-bottom: 12px;
  }
  .send-anonymous .input-group {
    display: block;
    width: 100% !important;
    float: none;
    padding: 0 !important;
  }
  .send-anonymous .input-group > label[style] {
    display: block;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ocm-navy);
    margin: 4px 0 8px;
  }
  .oc-m-label {
    display: block;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    color: var(--ocm-navy);
    margin: 0 0 6px;
  }
  .send-anonymous .form-control,
  .send-anonymous select.form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 52px !important;
    min-height: 52px;
    padding: 0 16px !important;
    font-size: 16px !important; /* no iOS zoom-on-focus */
    line-height: 50px;
    float: none;
  }
  .send-anonymous .radio-inline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 0 0;
    font-size: 16px !important;
  }
  .send-anonymous .radio-inline + .radio-inline {
    margin-left: 12px;
  }
  .send-anonymous input[type="radio"],
  .send-anonymous input[type="checkbox"] {
    position: static;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--ocm-orange);
  }
  .send-anonymous .checkbox-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0;
    margin: 0;
  }
  .send-anonymous .checkbox-inline input[type="checkbox"] {
    display: block;
    flex: 0 0 22px;
    margin: 0 !important;
  }
  .send-anonymous .checkbox-inline .form-control {
    flex: 1 1 auto;
    width: auto;
    margin: 0;
  }
  .g-recaptcha {
    display: flex;
    justify-content: center;
    max-width: 100%;
    clear: both;
    margin: 4px 0;
  }
  #g-recaptcha-response {
    max-width: 100% !important;
  }
  .send-anonymous .btn-primary {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 0 24px !important;
    border-radius: 26px !important;
    font-size: 15px !important;
    letter-spacing: 0.06em;
    position: -webkit-sticky;
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 5;
  }
  /* while the cookie banner is open the sticky button rides just above it */
  html.oc-consent-open .send-anonymous .btn-primary {
    bottom: var(--oc-consent-space, 12px);
  }

  /* ---- Results: stacked cards ---- */
  #quiz_results .modal-dialog {
    width: auto !important;
    margin: 20px var(--ocm-gutter) 0 !important;
    animation: none !important;
  }
  #quiz_results .modal-content {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible;
  }
  #quiz_results .modal-header {
    background: #fff !important;
    border: 0 !important;
    border-radius: var(--ocm-radius) !important;
    padding: 20px !important;
    margin-bottom: 16px;
    box-shadow: var(--ocm-shadow);
    overflow: hidden;
  }
  #quiz_results .modal-header::before {
    height: 4px;
  }
  #quiz_results .modal-header h1 {
    margin: 0 0 8px !important;
  }
  #quiz_results .modal-header h2 {
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere;
  }
  #quiz_results .next-steps {
    float: none !important;
    margin-top: 16px;
    text-align: left !important;
    font-size: 15px;
    line-height: 1.6;
  }
  #quiz_results .next-steps.oc-next-steps-center {
    text-align: center !important;
  }
  .view-recommendations-button {
    display: block;
    width: 100%;
    min-height: 52px;
    border-radius: 26px !important;
    white-space: normal;
    animation: none !important;
    font-size: 14px !important;
  }
  #quiz_results .modal-body {
    background: transparent !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
  #quiz_results .modal-footer {
    display: none !important;
  }
  /* kill every nested Bootstrap row/column offset inside the results body */
  #quiz_results .modal-body .row,
  #quiz_results .modal-body .mainrowcontainer {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible;
  }
  #quiz_results .modal-body div[class*="col-"] {
    float: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    position: static;
    min-height: 0;
  }
  #quiz_results .mainrowcontainer {
    display: flex;
    flex-direction: column;
  }
  /* order: score + bars + pie first; quiz.php (ocResultsLayout) moves the answers column
     after the roadmap and CTAs, into #ocAnswersSlot, collapsed behind a toggle */
  .oc-m-answers {
    display: block;
    margin: 16px var(--ocm-gutter) 24px;
  }
  .oc-m-answers-toggle {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid var(--ocm-navy);
    border-radius: 26px;
    color: var(--ocm-navy);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: left;
  }
  .oc-m-answers-toggle::after {
    content: '+';
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
  }
  .oc-m-answers.oc-open .oc-m-answers-toggle::after {
    content: '\2212';
  }
  .oc-m-answers-toggle:focus-visible {
    outline: 3px solid var(--ocm-blue);
    outline-offset: 2px;
  }
  .oc-m-answers #ocAnswersCol {
    float: none;
    width: 100%;
    padding: 0;
  }
  .oc-m-answers .table-responsive {
    margin-top: 12px; /* the rest of the card styling comes from "#quiz_results .table-responsive" below */
  }
  /* print button row (its wrapper has an inline white background and top margins) */
  #ocAnswersCol > .col-sm-3 {
    float: none;
    width: 100%;
    padding: 0;
    margin: 12px 0 0 !important;
    background: transparent !important;
  }
  #ocAnswersCol > .col-sm-3 > div {
    margin: 0 !important;
  }
  #quiz_results .mainrowcontainer > .page-break {
    display: none;
  }
  /* score hero */
  .mainrowcontainer .oc-score-hero {
    display: block !important;
    height: auto !important;
    background: #fff;
    border-radius: var(--ocm-radius);
    box-shadow: var(--ocm-shadow);
    padding: 24px 20px 20px;
    text-align: center;
  }
  .results-score-title {
    font-size: 12px !important;
    margin: 0 0 6px;
  }
  .results-score {
    font-size: 64px !important;
    margin: 0 !important;
  }
  .oc-m-score-of {
    display: block;
    margin: 2px 0 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--ocm-muted) !important;
  }
  /* six bars: label above, bar flexes, value fixed on the right */
  #quiz_results .modal-body .mainrowcontainer div.col-sm-9 {
    background: #fff;
    border-radius: var(--ocm-radius);
    box-shadow: var(--ocm-shadow);
    padding: 20px !important;
    margin-top: 16px;
  }
  #quiz_results .progress-container {
    padding: 0 !important;
    margin: 0 0 14px;
    overflow: visible;
  }
  #quiz_results .progress-container:last-child {
    margin-bottom: 0;
  }
  #quiz_results .progress-mylabel {
    float: none !important;
    display: block;
    width: auto !important;
    margin: 0 0 6px !important;
    font-size: 14px !important;
    line-height: 1.3;
  }
  #quiz_results .progress-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
  }
  #quiz_results .progress-custom .progress {
    display: block !important;
    flex: 1 1 auto;
    width: auto;
    margin: 0;
  }
  #quiz_results .progress-custom .progress-value {
    display: block !important;
    flex: 0 0 44px;
    width: 44px !important;
    padding: 0 !important;
    text-align: right;
  }
  /* pie chart: scaled by aspect ratio, in its own card */
  #quiz_results .modal-body div.firefox_print {
    background: #fff;
    border-radius: var(--ocm-radius);
    box-shadow: var(--ocm-shadow);
    padding: 8px !important;
    margin-top: 16px;
  }
  #quiz_results #piechartQuiz {
    min-height: 0 !important;
    height: auto;
    width: 100% !important;
    aspect-ratio: 860 / 788;
    margin: 0;
  }
  /* answers table card */
  #quiz_results .table-responsive {
    border: none;
    overflow-x: visible;
    background: #fff;
    border-radius: var(--ocm-radius);
    box-shadow: var(--ocm-shadow);
    padding: 8px 16px 4px;
    margin: 16px 0 0;
  }
  #quiz_results .thequestion {
    margin-bottom: 0;
  }
  #quiz_results .table-responsive > .table > thead > tr > th,
  #quiz_results .table-responsive > .table > tbody > tr > td {
    white-space: normal;
    padding: 12px 4px !important;
    overflow-wrap: anywhere;
  }
  #quiz_results .thequestion th.col-xs-1,
  #quiz_results .thequestion td.answers-list-answer {
    width: 64px !important;
    min-width: 64px;
    text-align: center;
    white-space: nowrap !important;
  }
  #quiz_results .thequestion th.col-xs-11 {
    width: auto !important;
  }
  #quiz_results .pagebreak.col-sm-3 {
    margin: 12px 0 0 !important;
    background: transparent !important;
  }
  #quiz_results .pagebreak.col-sm-3 > div {
    margin: 0 !important;
  }
  .print-btn {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0 !important;
  }

  /* roadmap + CTA rows live outside the modal (inside the container-fluid) */
  #quiz_results > .row {
    margin: 0 var(--ocm-gutter) !important;
  }
  #quiz_results > .row > .col-sm-12 {
    padding: 0 !important;
  }
  #recommend-start {
    padding: 20px 16px 8px !important;
    border-radius: var(--ocm-radius);
    overflow: hidden;
  }
  .roadmap-title {
    font-size: 22px !important;
    line-height: 1.25 !important;
    margin: 0 0 12px !important;
    overflow-wrap: anywhere;
  }
  .roadmap-desc {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 16px;
  }
  .roadmap-tabs-container {
    padding-bottom: 8px;
  }
  /* tabs become stacked sections with headings */
  .roadmap-tabs-container .nav-tabs {
    display: none !important;
  }
  .roadmap-tabs-container .tab-content {
    background: transparent !important;
  }
  .roadmap-tabs-container .tab-content > .tab-pane {
    display: block !important;
    opacity: 1 !important;
    padding: 0 !important;
    margin-bottom: 12px;
  }
  /* accordion header per component (injected by JS; see quiz.php) */
  .oc-m-acc {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-left: 4px solid var(--ocm-orange);
    border-radius: 8px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
  }
  .oc-m-acc::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
  }
  .oc-m-acc:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
  }
  .tab-pane.oc-open > .oc-m-acc {
    margin-bottom: 12px;
  }
  .tab-pane.oc-open > .oc-m-acc::after {
    content: '\2212';
  }
  .roadmap-tabs-container .tab-content > .tab-pane:not(.oc-open) > :not(.oc-m-acc) {
    display: none !important;
  }
  .roadmap-tabs-container .tab-content > .tab-pane > br,
  .roadmap-tabs-container .presc-btn-container {
    display: none !important;
  }
  .presc-container {
    padding: 20px 16px !important;
  }
  .presc-container .row {
    margin: 0 !important;
  }
  .presc-container [class*="col-"] {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
  }
  .presc-intro, .presc-reading, .presc-next-step, .presc-eos-tools,
  .presc-congrats {
    font-size: 18px !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 16px !important;
  }
  .presc-congrats-sub {
    font-size: 16px !important;
  }
  .presc-area {
    font-size: 16px;
  }
  .presc-vid-image {
    margin-bottom: 16px;
  }
  .presc-vid-image img {
    width: 100%;
    border-radius: 8px;
  }
  .presc-book-item {
    overflow: visible;
  }
  .presc-book-image {
    float: none;
    margin: 0 0 10px;
  }
  .presc-book-image img {
    width: 100px;
  }
  .presc-eos-tools-image {
    float: none;
    margin-bottom: 12px;
  }
  .presc-eos-tools-image img {
    width: 140px;
  }
  .presc-eos-tools-cta {
    padding-top: 10px;
  }
  .presc-eos-tools-cta-link a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .presc-next-step-bullets img {
    max-width: 100%;
    height: auto;
  }
  .cta-container {
    overflow: hidden;
    border-radius: var(--ocm-radius);
    margin: 16px 0 !important;
    padding: 4px 16px 20px;
  }
  .cta-container .col-sm-6 {
    float: none;
    width: 100%;
    padding: 0;
  }
  .cta-heading,
  .cta-heading2 {
    font-size: 22px;
    line-height: 1.25;
    margin-top: 24px;
    padding: 0;
    overflow-wrap: anywhere;
  }
  .cta-button,
  .cta-button2 {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 52px;
    margin: 16px 0 8px;
    border-radius: 26px;
    font-size: 15px;
    white-space: normal;
  }
  .cta-button2 .fa {
    margin-right: 8px;
  }
  .cta-img-container {
    margin: 20px 0 0;
  }
  .cta-img-container img {
    width: 200px;
    max-width: 100%;
  }
  .challenge-banner {
    flex-direction: column;
  }
  .challenge-banner button {
    margin: 10px 0 0 !important;
  }
  .footer {
    padding: 20px max(var(--ocm-gutter), env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(var(--ocm-gutter), env(safe-area-inset-left, 0px)) !important;
    font-size: 13px !important;
  }
  .footer .oc-legal {
    margin-top: 4px;
  }
  /* mid-quiz the legal footer is hidden: the card sits alone between header and bar
     (start, finish, lead-form and results screens keep it) */
  body.oc-q-screen > .footer {
    display: none !important;
  }

  /* ---- Wider phone screens (landscape): keep cards at a readable width, centred ---- */
  #do_quiz .modal-dialog,
  #quiz_results .modal-dialog,
  #quiz_results > .row,
  .oc-m-answers,
  .welcome-container {
    max-width: 640px !important;
  }
  #do_quiz .modal-dialog {
    margin-left: max(var(--ocm-gutter), calc((100% - 640px) / 2)) !important;
    margin-right: max(var(--ocm-gutter), calc((100% - 640px) / 2)) !important;
  }
}
@media screen and (min-width: 672px) and (pointer: coarse) and (hover: none) {
  .welcome-container,
  #quiz_results .modal-dialog,
  #quiz_results > .row,
  .oc-m-answers {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* ---------- Short portrait phones (e.g. 375x667): tighter question card, so the answers stay
   in view above the bar even while the cookie banner is open ---------- */
@media screen and (max-width: 767px) and (max-height: 700px) {
  #do_quiz > .header_logo {
    margin-bottom: 12px;
  }
  #do_quiz .modal-body {
    padding: 16px 20px !important;
  }
  .oc-m-progress {
    margin-bottom: 14px;
  }
  .oc-m-progress-label {
    margin-bottom: 8px;
  }
  #do_quiz .question {
    margin-bottom: 18px !important;
  }
  .answer-desc {
    margin-bottom: 8px;
  }
  #do_quiz {
    padding-bottom: 12px !important;
  }
}

/* ---------- Landscape phones (short screens): compact so the answers stay above the bar ---------- */
@media screen and (pointer: coarse) and (max-height: 500px) {
  /* the cookie banner docks at the top here (css/oc-consent.css), over the header: push the page down
     only by the part of the banner that reaches below the 48px header + 8px gap */
  html.oc-consent-open body {
    padding-top: max(0px, calc(var(--oc-consent-space-top, 0px) + 6px - 56px)) !important;
  }
  .header_logo {
    height: 48px !important;
  }
  #do_quiz > .header_logo {
    margin-bottom: 8px;
  }
  #do_quiz .modal-body {
    padding: 16px 20px !important;
  }
  .oc-m-progress {
    margin-bottom: 12px;
  }
  .oc-m-progress-label {
    margin-bottom: 6px;
  }
  #do_quiz .question {
    min-height: 0;
    font-size: 17px !important;
    margin-bottom: 16px !important;
  }
  .answer-desc {
    margin-bottom: 8px;
  }
  #do_quiz {
    padding-bottom: 12px !important;
  }
  .welcome-container {
    margin-top: 12px !important;
  }
}

/* ---------- Narrow phones (<375px): 52px answer buttons keep an 8px gap ---------- */
@media screen and (max-width: 374px) {
  .answer-checks .ans {
    flex-basis: 52px !important;
    width: 52px !important;
    height: 52px !important;
    font-size: 19px;
  }
}

/* ---------- Very narrow phones: the 304px reCAPTCHA widget is scaled to fit ---------- */
@media screen and (max-width: 370px) {
  .g-recaptcha {
    transform: scale(0.9);
    transform-origin: 50% 0;
  }
}
@media screen and (max-width: 359px) {
  #do_quiz .modal-body {
    padding: 20px 16px !important;
  }
}

/* ---------- Print: every answer prints, even if the browser fires no beforeprint event
   (the phone layout may have collapsed them behind the "See your 20 answers" toggle) ---------- */
@media print {
  #ocAnswersCol[hidden] {
    display: block !important;
    height: auto !important;
  }
  .oc-m-answers {
    display: block !important;
  }
  .oc-m-answers-toggle,
  .oc-save-status {
    display: none !important;
  }
}

/* Roadmap on phones: org7's April brand CSS gives .roadmap a navy background (oc-brand-override.css .roadmap), so the
   open component's content (dark text) sits on a white card under its navy accordion header. */
@media screen and (max-width: 767px), screen and (pointer: coarse) and (max-height: 500px), screen and (pointer: coarse) and (hover: none) and (max-width: 1366px) {
  .roadmap-tabs-container .tab-content > .tab-pane.oc-open > .presc-container {
    background: #fff !important;
    border-radius: 12px;
    color: #0B3E60;
  }
}

/* Results wheel on phones: the SVG wheel (quiz.php oc_wheel_svg(true)) replaces the old 3D canvas pie. */
@media screen and (max-width: 767px), screen and (pointer: coarse) and (max-height: 500px), screen and (pointer: coarse) and (hover: none) and (max-width: 1366px) {
  #quiz_results .firefox_print #piechartQuiz {
    display: none !important;
  }
  #quiz_results .oc-qz-wheel-m {
    display: block;
    padding: 16px 4px 8px;
  }
  .oc-qz-wheel-m .oc-qz-wheel-eyebrow {
    margin: 0 0 4px !important;
    font-size: 12px !important;
    line-height: 16px !important;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    color: #3D6580 !important;
  }
  .oc-qz-wheel-m .oc-qz-wheel-svg {
    display: block;
    width: 100%;
    max-width: 460px;
    height: auto;
    margin: 0 auto;
    overflow: visible;
  }
  .oc-qz-wheel-m .oc-qz-wheel-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 19.5px; /* SVG units: about 13px on screen at 390px wide */
    font-weight: 700;
    fill: #0B3E60;
  }
  .oc-qz-wheel-m .oc-qz-wheel-value {
    font-weight: 800;
  }
  .oc-qz-wheel-m .oc-qz-wheel-center {
    font-family: 'Montserrat', sans-serif; /* size from the markup */
    font-weight: 800;
    letter-spacing: 0.06em;
    fill: #0B3E60;
  }
}

/* Merge guard (org7 April rebrand, css/oc-brand-override.css .welcome-container / #finish_quiz_for_anonymous rules):
   keep the phone cards inset and left-aligned, and the titles bold. */
@media screen and (max-width: 767px), screen and (pointer: coarse) and (max-height: 500px), screen and (pointer: coarse) and (hover: none) and (max-width: 1366px) {
  .welcome-container,
  #finish_quiz_for_anonymous .welcome-container {
    max-width: none !important;
    margin: 20px var(--ocm-gutter) 24px !important;
    padding: 20px !important;
    text-align: left !important;
  }
  .welcome-title,
  #finish_quiz_for_anonymous .welcome-title {
    color: var(--eos-orange) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    text-align: left !important;
    margin: 0 0 12px !important;
  }
  #finish_quiz_for_anonymous .welcome-desc {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    font-size: 16px !important;
  }
  #finish_quiz_for_anonymous .send-anonymous,
  #finish_quiz_for_anonymous .send-anonymous .form-group {
    max-width: none !important;
    text-align: left !important;
  }
  #finish_quiz_for_anonymous .btn-primary {
    border-radius: 999px !important;
  }
}
