/* ═══════════════════════════════════════════════════════════════════════════
   myCORE Portal Styles
   ═══════════════════════════════════════════════════════════════════════════ */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700&family=DM+Serif+Display&display=swap");
/* PREP brand blue — used for CTAs that must not read as part of the survey flow. */
:root {
  --mc-bg: #1a1225;
  --mc-bg-mid: #221836;
  --mc-bg-card: #2a1f3d;
  --mc-bg-input: #352a4d;
  --mc-text: #f0ecf5;
  --mc-text-muted: #9b8fb5;
  --mc-accent: #f5a623;
  --mc-accent-hover:#ffc04d;
  --mc-green: #4ec96d;
  --mc-blue: #4da4f5;
  --mc-red: #f55a5a;
  --mc-orange: #f57c23;
  --mc-purple: #a36df5;
  --mc-prep-blue: #424399;
  --mc-prep-blue-hover:#4f51b5;
  --mc-border: rgba(255, 255, 255, 0.08);
  --mc-radius: 10px;
  --mc-radius-lg: 16px;
  --mc-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --mc-font: 'DM Sans', sans-serif;
  --mc-font-display:'DM Serif Display', serif;
  --mc-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mycore-portal-page .tg-container {
  width: 100%;
  padding: 0;
}

/* Sticky-header fix. The active child theme sets `#content.site-content { overflow:
   hidden }` and Flash sets `.site { overflow-x: auto }`. Either makes an ancestor a
   scroll container, which breaks `position: sticky` — the sticky rating headers anchor
   to that ancestor (which never scrolls) instead of the viewport, so they never stick.
   Forcing the whole overflow chain back to `visible` on the portal page removes those
   scroll containers so sticky works. !important + the id selectors beat the theme.

   The real ancestor chain on the portal page is:
     html > body > #page.site > #content.site-content > .tg-container
          > .mycore-portal-body > #mycore-portal-root
   `.tg-container` and `.mycore-portal-body` were missing from this list, so any
   overflow on them re-broke sticky no matter what the sticky element itself did. */
body.mycore-portal-page #page,
body.mycore-portal-page .site,
body.mycore-portal-page #content,
body.mycore-portal-page #content.site-content,
body.mycore-portal-page .site-content,
body.mycore-portal-page #primary,
body.mycore-portal-page #main,
body.mycore-portal-page .content-area,
body.mycore-portal-page .tg-container,
body.mycore-portal-page .mycore-portal-body {
  overflow: visible !important;
}

/* Flash sets `html { overflow-y: scroll }`. That normally propagates to the viewport
   harmlessly, but paired with an overflow on <body> it makes BODY the scroll container
   instead — and then every `position: sticky` inside anchors to a box that never
   scrolls. Pin both back to the viewport on the portal page. */
html:has(body.mycore-portal-page) {
  overflow-y: auto !important;
}

body.mycore-portal-page {
  overflow: visible !important;
  /* ...but NOT horizontally. Clearing the theme's overflow off the whole ancestor
     chain above is what makes `position: sticky` work — and it also removed the thing
     that was quietly containing horizontal overflow, so any element a few pixels wider
     than the viewport started scrolling the entire page sideways.
     `overflow-x: clip` is the one value that stops that WITHOUT creating a scroll
     container: `hidden` or `auto` here would re-break sticky, which is the exact bug
     the rules above exist to fix. `clip` pairs legally with `overflow-y: visible`. */
  overflow-x: clip !important;
}

h1 {
  font-size: 50px;
}

p {
  font-size: 16px;
}

/* Reset for portal body */
body.mycore-portal-body {
  margin: 0;
  padding: 0;
  background: var(--mc-bg);
  font-family: var(--mc-font);
  color: var(--mc-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Root container ─────────────────────────────────────────────────────── */
#mycore-portal-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Landing page ───────────────────────────────────────────────────────── */
.mc-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
  background: radial-gradient(ellipse at 20% 50%, rgba(163, 109, 245, 0.12) 0%, transparent 60%), radial-gradient(ellipse at 80% 30%, rgba(78, 201, 109, 0.08) 0%, transparent 50%), radial-gradient(ellipse at 50% 80%, rgba(245, 166, 35, 0.08) 0%, transparent 50%), var(--mc-bg);
}

.mc-landing h1 {
  font-family: var(--mc-font-display);
  color: white;
  font-weight: 400;
  margin: 0 0 20px;
  line-height: 1.2;
}

.mc-landing h1 span {
  background: linear-gradient(135deg, var(--mc-green), var(--mc-blue), var(--mc-orange), var(--mc-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mc-landing-subtitle {
  color: var(--mc-text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.mc-stats {
  display: flex;
  gap: 48px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.mc-stat {
  text-align: center;
}

.mc-stat-number {
  font-family: var(--mc-font-display);
  font-weight: 400;
}

.mc-stat:nth-child(1) .mc-stat-number {
  color: var(--mc-green);
}

.mc-stat:nth-child(2) .mc-stat-number {
  color: var(--mc-blue);
}

.mc-stat:nth-child(3) .mc-stat-number {
  color: var(--mc-orange);
}

.mc-stat-label {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mc-text-muted);
  margin-top: 4px;
}

/* Required-field footnote under the privacy note — deliberately smaller than the
   16px body copy so it reads as fine print, not as another sentence. */
.mc-required-note {
  color: var(--mc-text-muted);
  font-size: 13px;
  margin: 0;
}

/* ─── Email input row ────────────────────────────────────────────────────── */
.mc-email-row {
  display: grid;
  gap: 12px;
  align-items: stretch;
  justify-content: center;
  grid-template-columns: 2fr 1fr;
}

.mc-email-row input[type=email],
.mc-email-row input.mc-authcode-input {
  padding: 14px 20px;
  border-radius: 50px;
  border: 1px solid var(--mc-border);
  background: var(--mc-bg-input);
  color: var(--mc-text);
  font-family: var(--mc-font);
  height: 57px;
  font-size: 16px;
  min-width: 280px;
  outline: none;
  transition: border-color var(--mc-transition);
}

.mc-email-row input[type=email]:focus,
.mc-email-row input.mc-authcode-input:focus {
  border-color: var(--mc-accent);
}

.mc-email-row input[type=email]::placeholder,
.mc-email-row input.mc-authcode-input::placeholder {
  color: var(--mc-text-muted);
}

.mc-intro-row {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--mc-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.mc-intro-row::before {
  content: "Don't have an Auth Code?";
  color: var(--mc-text-muted);
  font-size: 15px;
}

/* "Take me to my profile" on the AuthCode splash. Sits below the intro row, so it
   only needs to clear it — no divider, that belongs to the intro row's heading. */
.mc-profile-row {
  margin-top: 70px;
  display: flex;
  justify-content: center;
}

/* ─── Admin debug helper (auto-fill assessment) ──────────────────────────── */
.mc-debug-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 50px;
  border: 1px dashed var(--mc-accent);
  background: var(--mc-bg-mid);
  color: var(--mc-accent);
  font-family: var(--mc-font);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--mc-shadow);
  opacity: 0.85;
  transition: opacity var(--mc-transition), transform var(--mc-transition);
}

.mc-debug-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.mc-privacy-note {
  color: var(--mc-text-muted);
  margin-top: 16px;
  /* The required-note sits directly under this line as one block — no gap. */
  margin-bottom: 0;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
/* Left as bare classes on purpose. Elementor's global kit ships
   `.elementor-kit-1288 button { background-color: var(--e-global-color-accent);
   border-radius: 8px; padding: 22px }` at specificity (0,1,1), so it wins the
   sizing/shape here — and that resolved look is the one we want. Don't add an
   id prefix to these; it takes the buttons back to the pill shape below. */
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  font-family: var(--mc-font);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--mc-transition);
  text-decoration: none;
}

.mc-btn-primary {
  background: var(--mc-accent);
  color: #1a1225;
}

.mc-btn-primary:hover {
  background: var(--mc-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.3);
}

.mc-btn-primary:active {
  transform: translateY(0);
}

.mc-btn-secondary {
  background: transparent;
  color: var(--mc-text);
  border: 1px solid var(--mc-border);
}

.mc-btn-secondary:hover {
  border-color: var(--mc-text-muted);
  background: rgba(255, 255, 255, 0.04);
}

/* Solid PREP blue. Sits next to the outlined secondary buttons so it reads as a
   different kind of action rather than another step in the survey flow.
   Scoped to the portal root on purpose: Elementor's global kit ships
   `.elementor-kit-1288 button { background-color: var(--e-global-color-accent) }`,
   which at (0,1,1) outranks a bare `.mc-btn-prep` and repaints the button its yellow.
   The id selector puts us back on top. */
#mycore-portal-root .mc-btn-prep {
  background: var(--mc-prep-blue);
  color: #fff;
}

#mycore-portal-root .mc-btn-prep:hover {
  background: var(--mc-prep-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(66, 67, 153, 0.4);
}

#mycore-portal-root .mc-btn-prep:active {
  transform: translateY(0);
}

.mc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Modal / Popup overlay ──────────────────────────────────────────────── */
.mc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 18, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: mcFadeIn 0.3s ease;
}

.mc-modal {
  background: var(--mc-bg-mid);
  border-radius: var(--mc-radius-lg);
  padding: 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--mc-shadow);
  animation: mcSlideUp 0.35s ease;
}

.mc-modal h2 {
  font-family: var(--mc-font-display);
  margin: 0 0 8px;
  color: white;
  text-align: center;
}

.mc-modal-subtitle {
  color: var(--mc-text-muted);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

.mc-modal .mc-btn {
  width: 100%;
  margin-top: 8px;
}

/* "New here? Create account" / "Already have an account? Log in" under the submit
   button in the landing start popup. */
.mc-modal-switch {
  text-align: center;
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--mc-text-muted);
}
.mc-modal-switch a {
  color: var(--mc-accent);
  text-decoration: underline;
  cursor: pointer;
}

.mc-modal-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 16px;
  color: var(--mc-text-muted);
}

.mc-modal-footer a {
  color: var(--mc-red);
  text-decoration: none;
  font-weight: 600;
}

/* Already-taken popup: login/register mode toggle link */
.mc-al-toggle {
  text-align: center;
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--mc-text-muted);
}

.mc-al-toggle a {
  color: var(--mc-accent);
  text-decoration: none;
  font-weight: 600;
}

/* Survey pointers popup body — admin WYSIWYG copy, so style the tags it emits. Left
   aligned inside the centred modal: it's a list of pointers, not a headline. */
.mc-note-body {
  text-align: left;
  color: var(--mc-text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.mc-note-body p {
  margin: 0 0 14px;
}

.mc-note-body p:last-child {
  margin-bottom: 0;
}

.mc-note-body strong {
  color: var(--mc-text);
}

/* ─── Form fields ────────────────────────────────────────────────────────── */
.mc-field-group {
  margin-bottom: 18px;
}

.mc-field-group label {
  display: block;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--mc-text-muted);
  margin-bottom: 6px;
}

/* Field layout grid: fields default to a full row; inline flex-basis (set per
   field by its width %) lets two or more sit side by side. */
.mc-fields-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  align-items: flex-start;
}

.mc-fields-grid > .mc-field-group {
  flex: 0 0 100%;
}

.mc-fields-grid > .mc-form-section-title {
  flex: 0 0 100%;
}

/* Password input with a show/hide eye button pinned inside its right edge. Scoped to
   the root id so it outranks the text-input rule's !important padding in _wheel.scss
   and Elementor's global `button` styling. */
#mycore-portal-root .mc-pw-wrap {
  position: relative;
}

#mycore-portal-root .mc-pw-wrap input {
  display: block;
  padding-right: 48px !important;
}

#mycore-portal-root .mc-pw-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0 var(--mc-radius) var(--mc-radius) 0;
  background: transparent;
  color: var(--mc-text-muted);
  box-shadow: none;
  cursor: pointer;
  transition: color var(--mc-transition);
}

#mycore-portal-root .mc-pw-toggle:hover,
#mycore-portal-root .mc-pw-toggle:focus-visible {
  color: var(--mc-text);
  background: transparent;
}

#mycore-portal-root .mc-pw-toggle:focus-visible {
  outline: 2px solid var(--mc-accent);
  outline-offset: -2px;
}

#mycore-portal-root .mc-pw-toggle svg {
  display: block;
}

/* ─── Scroll wheel picker ─────────────────────────────────────────────────── */
.mc-wheel {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--mc-bg-input);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  padding: 4px 6px;
  outline: none;
}

.mc-wheel:focus-within,
.mc-wheel:focus {
  border-color: var(--mc-accent);
}

/* Scoped to the portal root: these are <button> elements, so Elementor's global kit
   rule (`.elementor-kit-1288 button`, specificity 0,1,1) otherwise wins and gives each
   arrow 22px padding, an 8px radius and the site's yellow fill — two huge blocks that
   squeeze the wheel down to nothing, which is why it stops reading as a wheel at all. */
#mycore-portal-root .mc-wheel-arrow {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: var(--mc-text-muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
}

#mycore-portal-root .mc-wheel-arrow:hover {
  color: var(--mc-accent);
  background: rgba(255, 255, 255, 0.05);
}

.mc-wheel-viewport {
  position: relative;
  flex: 1 1 auto;
  height: 200px; /* 5 × 40px items */
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.mc-wheel-viewport.is-dragging {
  cursor: grabbing;
}

.mc-wheel-list {
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.mc-wheel-opt {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.05rem;
  color: var(--mc-text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, transform 0.15s;
}

.mc-wheel-opt.selected {
  color: var(--mc-accent);
  font-weight: 700;
  transform: scale(1.1);
}

/* Top/bottom fade — sits above the items, below the selection band. */
.mc-wheel-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--mc-bg-input) 0%, rgba(53, 42, 77, 0) 34%, rgba(53, 42, 77, 0) 66%, var(--mc-bg-input) 100%);
}

.mc-wheel-band {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 80px; /* slot 3 of 5 */
  height: 40px;
  z-index: 2;
  pointer-events: none;
  border-top: 1px solid var(--mc-accent);
  border-bottom: 1px solid var(--mc-accent);
  background: rgba(245, 166, 35, 0.08);
  border-radius: 6px;
}

body.mycore-portal-page {
  font-family: var(--mc-font);
  color: var(--mc-text);
  -webkit-font-smoothing: antialiased;
}

body.mycore-portal-page .mycore-portal-body {
  background: var(--mc-bg);
  min-height: 100vh;
}

/* Text-style inputs only — checkboxes and radios keep their native control. */
.mc-field-group input:not([type=checkbox]):not([type=radio]),
.mc-field-group select {
  width: 100% !important;
  padding: 12px 16px !important;
  border-radius: var(--mc-radius) !important;
  border: 1px solid var(--mc-border) !important;
  background: var(--mc-bg-input) !important;
  color: var(--mc-text) !important;
  font-size: 16px;
  height: 50px;
  font-family: var(--mc-font);
  outline: none;
  transition: border-color var(--mc-transition);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.mc-field-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239b8fb5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.mc-field-group input:focus,
.mc-field-group select:focus {
  border-color: var(--mc-accent);
}

.mc-field-group input::placeholder {
  color: var(--mc-text-muted);
}

/* Checkbox groups (multi-select field type) */
.mc-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mc-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--mc-text);
  cursor: pointer;
}

.mc-checkbox input[type=checkbox] {
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 auto;
  accent-color: var(--mc-accent);
  cursor: pointer;
}

/* Radio groups (single-select shown as a list) */
.mc-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mc-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--mc-text);
  cursor: pointer;
}

.mc-radio input[type=radio] {
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 auto;
  accent-color: var(--mc-accent);
  cursor: pointer;
}

.mc-field-hint {
  font-weight: 400;
  color: var(--mc-text-muted);
  font-size: 13px;
}

/* Searchable combobox */
.mc-combo {
  position: relative;
}

.mc-combo-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: var(--mc-bg-input);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.mc-combo-list[hidden] {
  display: none;
}

.mc-combo-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--mc-text);
  font-size: 15px;
}

.mc-combo-item:hover {
  background: var(--mc-accent);
  color: #1a1330;
}

/* select2-style "Use “…”" tagging row: create a free-typed value not in the list. */
.mc-combo-create {
  border-top: 1px solid var(--mc-border);
  margin-top: 4px;
  color: var(--mc-text-muted);
  font-style: italic;
}

.mc-combo-create:hover {
  background: var(--mc-accent);
  color: #1a1330;
}

/* Wheel select — styled as a normal select for now (true wheel picker TBD) */
.mc-wheel {
  text-align-last: center;
}

/* Page blurb + completion screen */
.mc-page-blurb {
  color: var(--mc-text-muted);
  margin: -8px 0 20px;
  line-height: 1.5;
}

.mc-prewrap {
  white-space: pre-wrap;
}

/* WYSIWYG-authored intro page (Part II interstitial) */
.mc-intro-content {
  font-family: var(--mc-font);
  color: var(--mc-text);
  line-height: 1.6;
  text-align: center;
  padding: 12px 0;
  color: var(--mc-text-muted);
  font-size: 25px;
  font-weight: 500;
  /* The admin copy wraps the emphasised word (e.g. "others") in a <span>. It gets
     its own centred line in white bold, but at the SAME size as the sentence around
     it — a larger size read as a second heading. */
}
.mc-intro-content span {
  display: block;
  color: white;
  font-weight: bold;
  text-align: center;
}

.mc-intro-content h1,
.mc-intro-content h2,
.mc-intro-content h3 {
  font-family: var(--mc-font-display);
  margin: 0 0 16px;
  color: white;
}

.mc-intro-content p {
  color: var(--mc-text-muted);
  margin: 0 0 14px;
}

.mc-intro-content :last-child {
  margin-bottom: 0;
}

.mc-done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.mc-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mc-field-error {
  color: var(--mc-red);
  margin-top: 4px;
}

/* ─── Wizard container ───────────────────────────────────────────────────── */
.mc-wizard {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  min-height: 100vh;
  width: 100%;
}

.mc-wizard-header {
  text-align: center;
  margin-bottom: 36px;
}

.mc-wizard-header h1 {
  font-family: var(--mc-font-display);
  margin: 0 0 8px;
  color: white;
}

.mc-wizard-header p {
  color: var(--mc-text-muted);
  font-size: 25px;
  text-align: left;
  font-weight: 500;
}
.mc-wizard-header p span {
  display: block;
  color: white;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
}
@media screen and (max-width: 768px) {
  .mc-wizard-header p span {
    text-align: left;
    padding-top: 20px;
  }
}

/* Survey pointers reminder — sits immediately left of Next/Continue on every step.
   Scoped to the portal root because Elementor's global kit styles every <button> and
   would otherwise make this a 22px-padded yellow slab. */
#mycore-portal-root .mc-note-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--mc-prep-blue);
  color: #fff;
  font-family: var(--mc-font-display);
  font-size: 19px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
  transition: background var(--mc-transition);
}

#mycore-portal-root .mc-note-icon:hover {
  background: var(--mc-prep-blue-hover);
}

/* ─── Progress bar ───────────────────────────────────────────────────────── */
.mc-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 40px;
}

.mc-progress-step {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--mc-border);
  transition: background var(--mc-transition);
}

.mc-progress-step.active {
  background: var(--mc-accent);
}

.mc-progress-step.complete {
  background: var(--mc-green);
}

/* ─── Form card ──────────────────────────────────────────────────────────── */
.mc-form-card {
  /* Exposed so a sticky child (the rating page's pinned header) can bleed out to
     the card's edges and fully cover the rows scrolling beneath it. */
  --mc-card-pad-x: 36px;
  background: var(--mc-bg-card);
  border-radius: var(--mc-radius-lg);
  padding: 36px;
  box-shadow: var(--mc-shadow);
  margin-bottom: 24px;
  animation: mcFadeIn 0.4s ease;
}

.mc-form-card h2 {
  font-family: var(--mc-font-display);
  color: white;
  margin: 0 0 24px;
}

.mc-form-card p {
  color: #B5C3C8;
}

/* Completion screen — a compact, centered card "popup" matching the survey steps. */
.mc-form-card-done {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.mc-form-card-done h2 {
  margin-bottom: 12px;
}

.mc-form-card-done .mc-field-group {
  text-align: left;
  margin-top: 16px;
}

.mc-done-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(78, 201, 109, 0.15);
  color: var(--mc-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
}

.mc-form-section-title {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mc-text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--mc-border);
  margin: 28px 0 18px;
}

.mc-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

/* Keeps the survey-pointers icon glued to the primary button, so it holds the same
   spot whether the row's left side is empty ("Your Info") or a Back button (traits). */
.mc-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Width of the trait-label column. Every row is its own grid, so this has to be a FIXED
   width for the circles to line up down the column — and wide enough that no label wraps,
   because a wrapped label makes one row taller and knocks the left and right halves out
   of step. Sized for the longest English trait ("Argumentative").

   Declared on the CARD, not the grid: the pinned mobile Least/Most bar is a sibling of
   .mc-rating-grid, and it needs the same value to indent itself over the circles. */
.mc-form-card {
  --mc-trait-col: 168px;
}

/* ─── Rating grid (for Part 1 & 2) ──────────────────────────────────────── */
.mc-rating-grid {
  /* One token drives the row rules and the option-column rules, so the grid always
     reads as a single table. Bump this in one place to make the whole ruling
     heavier or lighter. */
  --mc-rating-line: rgba(255, 255, 255, 0.10);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0px 20px;
}

.mc-rating-header {
  display: grid;
  grid-template-columns: var(--mc-trait-col) 1fr;
  align-items: end;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 2px solid var(--mc-purple);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mc-text-muted);
  font-size: 12px;
}

/* Least (left) / Most (right) live in one region spanning the circle columns, so
   long translations wrap within their own half instead of widening the columns. */
.mc-rating-scale {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.mc-rating-scale > span {
  max-width: 46%;
  line-height: 1.25;
  overflow-wrap: break-word;
  hyphens: auto;
}

.mc-rating-scale-least {
  text-align: left;
}

.mc-rating-scale-most {
  text-align: right;
}

/* The pinned block is a plain wrapper on desktop — it only becomes sticky on phones,
   where the per-column headers are hidden in its favour. Its Least/Most bar would be
   a duplicate here, so it's hidden until the phone breakpoint turns it on. */
.mc-rating-scale-pinned {
  display: none;
}

/* Row = trait label column + a self-contained options block (the 5 circles). Same
   shape on every screen — phones just narrow the label column (--mc-trait-col) rather
   than stacking, so the label always reads on the same line as the dots it belongs to. */
.mc-rating-row {
  /* Vertical padding is a variable because the option cells cancel it out with a
     negative margin (see .mc-rating-options label) so their dividing lines run the
     FULL height of the row and meet the next row's — an unbroken vertical rule
     rather than a dashed stack of short segments. */
  --mc-rating-row-pad: 14px;
  display: grid;
  grid-template-columns: var(--mc-trait-col) 1fr;
  align-items: center;
  gap: 0 12px;
  padding: var(--mc-rating-row-pad) 0;
  border-bottom: 1px solid var(--mc-rating-line);
  transition: background var(--mc-transition);
}

/* background-COLOR, not the `background` shorthand: the shorthand also resets
   background-image, and a row-level background is how the phone layout used to paint
   its column rules. Keep it a colour so a hover can never wipe out a background-image. */
.mc-rating-row:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* The last row in a column closes on the column's edge, not on a dangling rule. */
.mc-rating-row:last-child {
  border-bottom: 0;
}

/* The 5 circles: an even 5-column grid across the option region. Stretched to the
   row's full height (negative margin eats the row padding) so the column dividers
   below run unbroken from row to row. The leading border separates the trait-label
   column from the first circle, completing the table. */
.mc-rating-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  align-self: stretch;
  margin: calc(var(--mc-rating-row-pad) * -1) 0;
  border-left: 1px solid var(--mc-rating-line);
}

/* Trait label: ALWAYS one line. A wrapped label ("Argumentative" breaking to
   "Argumentati/ve") makes its row taller than the rest, which pushes that half of the
   grid out of step with the other — the two columns stop lining up from there down.
   So no wrapping and no mid-word breaking; the column is sized to fit instead. */
.mc-rating-row .mc-trait-label {
  font-weight: 600;
  min-width: 0;
  padding-right: 10px;
  line-height: 1.25;
  white-space: nowrap;
}

/* A thin rule between each of the 5 option columns, matching the row rules, so the
   scale reads as a grid of equal cells.

   The options block stretches to the row's FULL height — the negative margin cancels
   the row's vertical padding — and each label stretches inside it. That makes every
   divider run edge to edge, so consecutive rows' dividers join into one continuous
   vertical line instead of a dashed stack of short segments. The circles still centre
   inside their stretched cell (the label is a centring flex box). */
.mc-rating-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  align-self: stretch;
}

.mc-rating-options label + label {
  border-left: 1px solid var(--mc-rating-line);
}

.mc-rating-options input[type=radio] {
  appearance: none;
  -webkit-appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  padding: 10px !important;
  border-radius: 50% !important;
  border: 2px solid var(--mc-border) !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: all var(--mc-transition) !important;
}

.mc-rating-options input[type=radio]:hover {
  border-color: var(--mc-accent) !important;
}

.mc-rating-options input[type=radio]:checked {
  border-color: var(--mc-accent) !important;
  background: var(--mc-accent) !important;
  box-shadow: inset 0 0 0 3px var(--mc-bg-card) !important;
}

/* ── Every circle is IDENTICAL — deliberately ────────────────────────────────
   This is a scored psychometric instrument, so the response scale must not bias
   the answer. An earlier version stepped size, border-weight and ring contrast up
   from Least (1) to Most (5); that reads as visual emphasis and nudges takers
   toward the heavier end, which contaminates the scores. Positions 1–5 are peers:
   same diameter, same border width, same colour, in every state.

   DO NOT reintroduce per-position styling (`label:nth-of-type(n)`) here. Order is
   conveyed by the Least/Most axis labels in .mc-rating-scale — that's the only
   place the direction of the scale should be expressed. */
/* ── Phone layout (single column) ────────────────────────────────────────────
   MUST live at the end of the file: media queries don't add specificity, so these only
   beat the base grid rules above by coming later in source order. The two trait columns
   flatten into one list; each row keeps its label-beside-circles shape on a narrower
   label column. */
@media (max-width: 767px) {
  /* Flatten the two columns into one flow (display:contents removes the column
     wrappers) so the single sticky Least/Most header can span EVERY trait row —
     not just the first column's — as the list scrolls. */
  .mc-rating-grid {
    display: block;
  }
  .mc-rating-col {
    display: contents;
  }
  /* ── The pinned header ──────────────────────────────────────────────────
     ONE sticky element holding both the Part I/II instruction and the Least/Most
     scale, so they anchor to the top of the page together while the trait list
     scrolls beneath. This replaced two separately-sticky elements in different
     parents, the second offset by the first's JS-measured height — if either
     failed to stick, or the measurement went stale, the pair broke.

     It bleeds to the card's edges (negative margin + matching padding); without
     that the card's side padding stays transparent and trait rows are visible
     sliding through the gap either side of the bar. */
  .mc-rating-sticky {
    position: sticky;
    top: 0;
    z-index: 6;
    background: var(--mc-bg-card);
    margin: 0 calc(var(--mc-card-pad-x, 18px) * -1);
    padding: 10px var(--mc-card-pad-x, 18px) 0;
    /* Keeps a scrolled row from reading as part of the pinned block. */
    box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.45);
  }
  .mc-rating-sticky .mc-wizard-header {
    margin: 0;
    padding: 0;
  }
  /* Least/Most, inside the same pinned block as the instruction.

     Indented by the trait-label column (+ the row's column gap) so the two words sit
     over the circles they actually describe. Now that the label shares the row with
     the circles, a full-width bar would put "Least" above the trait name instead of
     above the first dot. */
  .mc-rating-sticky .mc-rating-scale-pinned {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    margin-left: calc(var(--mc-trait-col, 96px) + 10px);
    padding: 6px 0 8px;
    border-bottom: 2px solid var(--mc-purple);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mc-text-muted);
    font-size: 12px;
  }
  /* The per-column headers are redundant now the pinned bar carries the scale. */
  .mc-rating-header {
    display: none;
  }
  /* NO admin-bar offset at phone widths. WordPress switches #wpadminbar to
     `position: absolute` at ≤600px, so it scrolls away with the page — an offset
     here just leaves a permanent 46px window above the pinned block, through which
     the trait rows are visible sliding past (exactly the bleed-through in the
     2026-07-30 screenshot). The bar is only genuinely fixed above that width. */
  body.admin-bar .mc-rating-sticky {
    top: 0;
  }
  /* ── Row layout on phones ────────────────────────────────────────────────
     The label sits IN the row, beside the circles, exactly like desktop — just with
     a narrower label column. It used to stack above them, which pushed the circles
     to their own band and left the Least/Most bar sitting over the label rather than
     over the scale it describes.

     Because the row is a grid again, the column rules go back to the desktop
     mechanism (stretched cells with borders) — the phone-only background gradient
     that faked them is gone. */
  .mc-form-card {
    --mc-trait-col: 96px;
  }
  .mc-rating-row {
    --mc-rating-row-pad: 12px;
    gap: 0 10px;
  }
  .mc-rating-row .mc-trait-label {
    font-size: 15px;
    line-height: 1.2;
    padding-right: 8px;
    /* Only one column of rows on a phone, so a wrapped label makes its own row
       taller without knocking anything out of alignment beside it. Long
       translations need somewhere to go, so wrapping is allowed here. */
    white-space: normal;
  }
  /* A comfortable touch band for the circles; also what sets the row's height now
     that the label no longer stacks above them. */
  .mc-rating-options {
    min-height: 46px;
  }
  /* The two columns flatten into one list here, so only the LAST row overall should
     lose its rule — the first column's last row is mid-list and still needs one. */
  .mc-rating-col:not(:last-child) .mc-rating-row:last-child {
    border-bottom: 1px solid var(--mc-rating-line);
  }
  .mc-rating-options input[type=radio] {
    padding: 7px !important;
  }
}
/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes mcFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes mcSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ─── Error message ──────────────────────────────────────────────────────── */
.mc-error-banner {
  background: rgba(245, 90, 90, 0.15);
  border: 1px solid rgba(245, 90, 90, 0.3);
  color: var(--mc-red);
  padding: 12px 16px;
  border-radius: var(--mc-radius);
  margin-bottom: 16px;
  animation: mcFadeIn 0.3s ease;
  font-size: 12px;
}

/* "We found an account for this email" note above the login password field. */
.mc-account-note {
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.35);
  color: var(--mc-accent);
  padding: 12px 16px;
  border-radius: var(--mc-radius);
  margin-bottom: 16px;
  animation: mcFadeIn 0.3s ease;
  font-size: 12px;
}

/* ─── Loading spinner ────────────────────────────────────────────────────── */
.mc-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: mcSpin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes mcSpin {
  to {
    transform: rotate(360deg);
  }
}
/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .mc-modal {
    padding: 28px 20px;
  }
  .mc-form-card {
    --mc-card-pad-x: 18px;
    padding: 24px 18px;
  }
  .mc-stats {
    gap: 24px;
  }
  .mc-field-row {
    grid-template-columns: 1fr;
  }
  /* Rating grid's phone layout lives in _rating.scss (stacked label + circles). */
  /* Wheels on a phone: the arrows are redundant next to a finger that can already
     drag or tap the list, and dropping them gives the numbers the whole width back.
     Row height stays 40px — WHEEL_ITEM_H in portal.js drives the transform maths and
     has to match — so only the type scales up. */
  #mycore-portal-root .mc-wheel-arrow {
    display: none;
  }
  .mc-wheel-opt {
    font-size: 1.5rem;
  }
}
/* ─── Theme toggle button ─────────────────────────────────────────────────────
   Appended to <body> (outside #mycore-portal-root), so the active WP theme's
   `button {}` styling (square corners, its own accent background) would otherwise
   win. Scope under the body class + pin every property explicitly — mirrors the
   profile toggle — so it stays a clean circular icon button on any theme. */
body.mycore-portal-page .mc-theme-toggle {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 10001;
  width: 42px;
  height: 42px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--mc-border);
  background: var(--mc-bg-card);
  color: var(--mc-accent);
  font-family: var(--mc-font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--mc-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--mc-transition), background var(--mc-transition);
}

body.mycore-portal-page .mc-theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--mc-bg-input);
}

/* Admins also get the bottom-right debug button — lift the toggle clear of it. */
body.mycore-portal-page .mc-theme-toggle--admin {
  bottom: 74px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Light mode — activated by data-mc-theme="light" on <html>. Dark stays the
   default; these rules only override the variables and the few colors that are
   hardcoded rather than read from a variable.
   ═══════════════════════════════════════════════════════════════════════════ */
:root[data-mc-theme=light] {
  --mc-bg: #f5f3fa;
  --mc-bg-mid: #ffffff;
  --mc-bg-card: #ffffff;
  --mc-bg-input: #f0ecf7;
  --mc-text: #241a33;
  --mc-text-muted: #6f6688;
  --mc-border: rgba(40,25,70,0.12);
  --mc-shadow: 0 8px 32px rgba(80,55,130,0.14);
}

:root[data-mc-theme=light] .mc-modal h2,
:root[data-mc-theme=light] .mc-form-card h2,
:root[data-mc-theme=light] .mc-wizard-header h1 {
  color: var(--mc-text);
}

/* The instruction's emphasized <span> is hardcoded white for dark mode — flip it to
   the near-black text colour on light so it stays readable. */
:root[data-mc-theme=light] .mc-wizard-header p span {
  color: var(--mc-text);
}

:root[data-mc-theme=light] .mc-form-card p {
  color: var(--mc-text-muted);
}

:root[data-mc-theme=light] .mc-overlay {
  background: rgba(40, 28, 66, 0.45);
}

:root[data-mc-theme=light] .mc-btn-secondary:hover,
:root[data-mc-theme=light] .mc-wheel-arrow:hover {
  background: rgba(40, 25, 70, 0.05);
}

/* Retint the shared ruling token, not just the row border: --mc-rating-line also
   paints the option-column rules (borders on desktop, a gradient on phones), and the
   dark default is white — invisible on a light background. */
:root[data-mc-theme=light] .mc-rating-grid {
  --mc-rating-line: rgba(40,25,70,0.14);
}

/* background-COLOR — the shorthand would reset background-image, which is what paints
   the phone layout's column rules (see _rating.scss). */
:root[data-mc-theme=light] .mc-rating-row:hover {
  background-color: rgba(40, 25, 70, 0.03);
}

:root[data-mc-theme=light] .mc-wheel-viewport::after {
  background: linear-gradient(to bottom, var(--mc-bg-input) 0%, rgba(240, 236, 247, 0) 34%, rgba(240, 236, 247, 0) 66%, var(--mc-bg-input) 100%);
}

:root[data-mc-theme=light] .mc-landing h1 {
  color: #333;
}
