/* ── v2 additions: assessment card/form styling ──────────────────── */

.av2-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  margin-inline: auto;
}
.av2-card-bar {
  /* .av2-card itself used to carry `overflow: hidden` purely so this
     flush, square-cornered strip didn't poke past the card's rounded
     top corners. That also silently clipped anything else in the card
     that needed to render outside its box -- specifically the
     type-ahead suggestions dropdown (.av3-suggestions) on fields like
     Skills/Talents/Sports and Exams Attempted, which sits well inside
     the card visually but is CSS-positioned absolute and can extend
     past the card's own edge. With overflow:hidden on the ancestor,
     that dropdown got hard-clipped a few rows in with no way to reach
     the rest, even though the dropdown itself scrolls fine on its own
     (main_v2_additions.css .av3-suggestions).

     A first attempt rounded this element's OWN top corners to match
     the card's radius, but that still overflowed: this element is only
     6px tall, and a border-radius far larger than an element's own
     height gets clamped down by the browser to fit that height -- so
     its actual rendered curve was nowhere near the card's much wider
     32px sweep, leaving a square corner poking past the card's true
     rounded edge (visible in practice, not just in theory).

     Fix: take this element out of flow, size ITS OWN box to exactly
     the card's rounded-corner region (height: the same r-xl radius)
     with matching radius + overflow:hidden, and paint the actual thin
     gradient strip as a ::before inside that clipped box. At y = r-xl
     the card's rounding has already fully resolved back to full
     width, so this clip region never reaches (and never re-clips)
     anything below it, including .av3-suggestions further down the
     card. */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--r-xl);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  overflow: hidden;
  pointer-events: none;
}
.av2-card-bar::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--clr-mint), var(--clr-navy));
}
.av2-card-inner {
  padding: var(--sp-10) var(--sp-8);
}
.av2-lead-title {
  max-width: 100%;
}

.av2-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  margin-top: var(--sp-6);
}
.av2-field-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.av2-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--txt-secondary);
}
.av2-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* A small "?" icon next to a field's label -- click or hover reveals a
   short helper tip in a popover instead of a permanent line under the
   field, so a form with several hinted fields doesn't get visually
   noisier just because they have a note attached. */
.av2-help-wrap {
  position: relative;
  display: inline-flex;
  line-height: 0;
}
.av2-help-icon {
  display: block;
  width: 14px;
  height: 14px;
  padding: 0;
  border: none;
  background-color: var(--clr-mint);
  cursor: pointer;
  /* Same question-mark-circle glyph this form already uses elsewhere,
     as an inline SVG mask so it tints mint automatically and needs no
     extra image asset or icon font. */
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}
.av2-help-tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 20;
  width: max-content;
  max-width: 220px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--clr-navy);
  color: #fff;
  font-size: var(--fs-xs);
  font-style: normal;
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}
.av2-help-wrap:hover .av2-help-tooltip,
.av2-help-wrap.is-open .av2-help-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Marks a field group that starts a conceptually different question
   from the ones above it in the same form (e.g. "who is this for"
   after identity fields) -- a quiet top rule, not a new card. */
.av2-field-group-divider {
  padding-top: var(--sp-6);
  margin-top: var(--sp-2);
  border-top: 1px solid var(--border);
}

.av2-select, .av2-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-family: inherit;
  background: var(--bg-page);
  color: var(--txt-primary);
  transition: border-color var(--ease);
  scroll-margin-top: calc(var(--nav-h) + var(--announce-h, 0px) + 24px);
}
.av2-select:focus, .av2-input:focus {
  outline: none;
  border-color: var(--clr-mint);
}
.av2-input-narrow { max-width: 180px; }
/* A numberEl() field (a year, a duration) -- its column was widened to
   160px so the LABEL above it ("Completion year", "Duration (years)")
   doesn't wrap onto two lines, but the actual box only ever holds a
   couple of digits and looked oversized inheriting that same width.
   Capped independently of the column so it reads as a short numeric
   field regardless of how wide its label needed the column to be. */
.av2-input-number { max-width: 100px; }

/* Compound "country code + number" field used for mobile numbers on
   the profile and guardian screens: a narrow dial-code <select> beside
   a growing numeric <input>, laid out as one row so it reads as a
   single field even though it posts two values. */
.av2-mobile-field {
  display: flex;
  gap: var(--sp-2);
  scroll-margin-top: calc(var(--nav-h) + var(--announce-h, 0px) + 24px);
}
.av2-mobile-field .av2-mobile-code {
  flex: 0 0 auto;
  width: auto;
  min-width: 6.5rem;
  max-width: 9rem;
}
.av2-mobile-field .av2-mobile-number {
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 480px) {
  .av2-mobile-field { flex-wrap: wrap; }
  .av2-mobile-field .av2-mobile-code { flex-basis: 100%; max-width: none; }
}

/* 6-digit OTP field -- no reason for it to stretch full form width. */
.av2-otp-input {
  max-width: 160px;
  text-align: center;
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: 0.3em;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Native date input: the browser's own calendar popup can't be fully
   restyled cross-browser, but the field itself (background, border,
   text color, and the small calendar icon on Chromium/WebKit) is made
   to match the theme instead of showing raw browser-default chrome. */
input[type="date"].av2-input {
  color-scheme: light;
}
[data-theme="dark"] input[type="date"].av2-input {
  color-scheme: dark;
}
input[type="date"].av2-input::-webkit-calendar-picker-indicator {
  filter: invert(0.5) sepia(1) saturate(4) hue-rotate(100deg);
  cursor: pointer;
  opacity: 0.8;
}
input[type="date"].av2-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.av2-dob-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: var(--sp-3);
  scroll-margin-top: calc(var(--nav-h) + var(--announce-h, 0px) + 24px);
}

.av2-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  scroll-margin-top: calc(var(--nav-h) + var(--announce-h, 0px) + 24px);
}
.av2-check-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.av2-check-item:has(input:checked) {
  border-color: var(--clr-mint);
  background: var(--clr-accent-lt);
}
.av2-check-item input { accent-color: var(--clr-mint); }
/* A checklist item auto-unchecked because it contradicts another
   selection (e.g. "Currently studying" vs "Not studying or working")
   is grayed out and inert until the conflicting item is unchecked. */
.av2-check-item:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}
.av2-check-item input:disabled { cursor: not-allowed; }
.av2-hint {
  width: 100%;
  font-size: var(--fs-xs);
  color: var(--txt-muted);
  margin-top: var(--sp-1);
}

/* Review & confirm screen -- condensed recap before payment */
.av2-review-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.av2-review-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.av2-review-row:last-child { border-bottom: none; }
.av2-review-row:nth-child(even) { background: var(--bg-surface-2); }
.av2-review-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--txt-muted);
}
.av2-review-value {
  font-size: var(--fs-sm);
  color: var(--txt-primary);
  word-break: break-word;
}

/* Wrapper for a Turnstile widget mounted into a form -- just breathing
   room, since Cloudflare's widget renders its own box/iframe. Managed
   mode is usually near-invisible for a legitimate visitor, so this
   reserves a little vertical space without demanding attention. */
.av2-turnstile {
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.av2-nav {
  display: flex;
  justify-content: flex-end;
  max-width: 100%;
  margin-top: var(--sp-8);
}
/* A sub-page with a "Back" button (pagedNavRow() in assessment.js)
   pushes it to the left, keeping Continue/Next on the right. */
.av2-nav.av2-nav-paged {
  justify-content: space-between;
}
/* Very small screens: main.css forces every .btn-lg to width:100% here,
   which would otherwise squeeze Back and Continue/Next into the same
   row -- stack them instead, primary action on top since that's the one
   most people tap. */
@media (max-width: 480px) {
  .av2-nav.av2-nav-paged {
    flex-direction: column-reverse;
    gap: var(--sp-3);
  }
}

/* Screen 1 only: the Turnstile widget sits beside "Who is this roadmap
   for?" instead of below it -- field left, widget right, vertically
   aligned. */
.av2-profile-final-row {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-6);
}
.av2-profile-final-row .av2-turnstile {
  margin: 0 0 0 auto;
  flex: 0 0 auto;
}
.av2-profile-final-row .av2-field-group {
  flex: 0 0 auto;
  width: 260px;
  min-width: 0;
}
@media (max-width: 640px) {
  .av2-profile-final-row {
    flex-direction: column;
    align-items: stretch;
  }
  .av2-profile-final-row .av2-turnstile {
    margin-left: 0;
  }
}

/* Screen 1, first visit: the security check sits on the left and Continue on the right, on one line. */
.av2-ts-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4) var(--sp-6); margin-top: var(--sp-6); }
.av2-ts-row .av2-turnstile { margin: 0; flex: 0 1 auto; min-width: 0; }
.av2-ts-row .av2-nav { margin-top: 0; flex: 0 0 auto; width: auto; }
@media (max-width: 640px) {
  .av2-ts-row { flex-direction: column; align-items: stretch; }
  .av2-ts-row .av2-nav { justify-content: stretch; }
  .av2-ts-row .av2-nav .btn { width: 100%; }
}

/* Screen 1 only: Continue sits beside the privacy notice line instead of
   below it -- notice left, button right, vertically centered. */
.av2-privacy-row {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-top: var(--sp-6);
}
.av2-privacy-row .av2-privacy-notice {
  margin-top: 0;
  flex: 1 1 auto;
}
.av2-privacy-row .av2-nav-inline {
  margin-top: 0;
  flex: 0 0 auto;
  margin-left: auto;
}
.av2-privacy-row .av2-nav-inline .btn {
  min-width: 180px;
}
@media (max-width: 640px) {
  .av2-privacy-row {
    flex-direction: column;
    align-items: stretch;
  }
  .av2-privacy-row .av2-nav-inline {
    margin-left: 0;
  }
}

/* Short reassurance line under the Screen 1 form, with a small lock
   icon before it -- same inline-SVG-mask technique as the field-help
   icon, tinted with the muted text color rather than mint since this
   isn't a hint about the form, just a quiet trust statement. */
.av2-privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--txt-muted);
  margin-top: var(--sp-6);
}
.av2-privacy-notice::before {
  content: '';
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 2px;
  background-color: var(--txt-muted);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}
.av2-privacy-notice a {
  color: var(--clr-mint);
  font-weight: 600;
  text-decoration: underline;
}

.assessment-top-notice { margin-bottom: var(--sp-6); }

.assessment-top-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  font-weight: 700;
  color: var(--txt-primary);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-2);
}

.roadmap-v2-top-link {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--txt-muted);
  margin-bottom: var(--sp-2);
}
.roadmap-v2-top-link a {
  color: var(--clr-mint);
  font-weight: 600;
  text-decoration: underline;
}

.assessment-refresh-warning {
  text-align: left;
  font-size: var(--fs-xs);
  color: var(--txt-muted);
  background: rgba(245, 158, 11, 0.08);
  border-left: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: var(--sp-2) var(--sp-4);
  max-width: none;
  margin: 0;
}
[data-theme="dark"] .assessment-refresh-warning {
  color: #f0c896;
  background: rgba(245, 158, 11, 0.16);
  border-left-color: rgba(245, 158, 11, 0.65);
}

@media (max-width: 640px) {
  .av2-card-inner { padding: var(--sp-8) var(--sp-6); }
  .av2-dob-row { grid-template-columns: 1fr; }
  .av2-profile-row { grid-template-columns: 1fr !important; }
}

/* About page's hero uses its own class names (shared "About Us" body
   sections also reuse .about-label, so overrides here are scoped to
   the hero instance only) but the same visual language as every other
   page-hero: mint uppercase eyebrow, single-line title, two-line
   description, same corner decoration above. Padding/buttons are left
   as they were -- only the label/title/description treatment changes. */
.about-hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + var(--announce-h, 0px) + 16px);
  padding-bottom: 16px;
}
.about-hero .about-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-mint);
}
.about-hero-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.about-hero-sub {
  max-width: 640px;
  margin-bottom: 0;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
@media (max-width: 640px) {
  .about-hero-title { white-space: normal; }
}


.av2-consent-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  margin-top: var(--sp-6);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.av2-consent-item:has(input:checked) {
  border-color: var(--clr-mint);
  background: var(--clr-accent-lt);
}
.av2-consent-item input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--clr-mint);
  flex-shrink: 0;
}
.av2-consent-item span {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--txt-primary);
}

.av2-field-invalid,
.av2-select.av2-field-invalid:focus,
.av2-input.av2-field-invalid:focus {
  border-color: #E24B4A !important;
  box-shadow: 0 0 0 3px rgba(226,75,74,0.18) !important;
}

.av2-field-error {
  font-size: var(--fs-xs);
  color: #E24B4A;
  margin: var(--sp-1) 0 0;
}
[data-theme="dark"] .av2-field-invalid,
[data-theme="dark"] .av2-select.av2-field-invalid:focus,
[data-theme="dark"] .av2-input.av2-field-invalid:focus {
  border-color: #f2a29c !important;
  box-shadow: 0 0 0 3px rgba(226,75,74,0.25) !important;
}
[data-theme="dark"] .av2-field-error { color: #f2a29c; }

#assessment-error {
  scroll-margin-top: calc(var(--nav-h) + var(--announce-h, 0px) + 24px);
}
[data-theme="dark"] #assessment-error {
  background: rgba(220,38,38,0.15) !important;
  border-color: rgba(252,165,165,0.35) !important;
  color: #fca5a5 !important;
}

.av2-handoff-notice {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--txt-secondary);
  background: var(--bg-surface-2);
  border-left: 3px solid var(--clr-mint);
  border-radius: var(--r-sm);
  padding: var(--sp-4) var(--sp-5);
  margin-top: var(--sp-6);
}

/* Conditional parent/guardian box on the profile screen (Screen 1) --
   shown live the instant the entered Date of Birth indicates a minor.
   A distinct rounded panel so it reads as a self-contained sub-section,
   not just another field row. */
.av2-guardian-box {
  padding: var(--sp-6);
  margin-top: var(--sp-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-surface-2);
}
.av2-guardian-box .av2-handoff-notice {
  margin-top: 0;
  margin-bottom: var(--sp-5);
  background: var(--bg-surface);
}
.av2-guardian-box .av2-form {
  margin-top: 0;
}
.av2-guardian-box .av2-consent-item {
  background: var(--bg-surface);
}

/* ── Get My Roadmap v3: session-based assessment ──────────────────────
   Reuses the site's existing design tokens (--clr-mint, --r-lg, --sp-N,
   .btn/.btn-primary, --bg-surface, --border, --txt-*) rather than
   introducing new hardcoded colors, so it matches every other page. */
.av3-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-8);
  max-width: 560px;
  margin-inline: auto;
}
.av3-card h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-2);
}
.av3-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-1);
}
.av3-field { margin-bottom: var(--sp-5); }
.av3-field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--txt-primary);
  margin-bottom: var(--sp-2);
}
.av3-field input,
.av3-field select,
.av3-field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  font-family: inherit;
  background: var(--bg-surface);
  color: var(--txt-primary);
  box-sizing: border-box;
  transition: border-color var(--ease);
}
.av3-field input:focus,
.av3-field select:focus,
.av3-field textarea:focus {
  outline: none;
  border-color: var(--clr-mint);
}
.av3-field textarea { min-height: 100px; resize: vertical; }
.av3-hint { font-size: var(--fs-sm); color: var(--txt-muted); margin: 0 0 var(--sp-4); }
.av3-notice {
  background: var(--clr-accent-lt);
  border-left: 3px solid var(--clr-mint);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--txt-primary);
  margin-bottom: var(--sp-5);
}
.av3-checklist { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.av3-check-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: var(--fs-base);
  transition: border-color var(--ease), background var(--ease);
}
.av3-check-item:hover { border-color: var(--clr-mint); }
.av3-check-item input:checked ~ span,
.av3-check-item:has(input:checked) { border-color: var(--clr-mint); background: var(--clr-accent-lt); }
.av3-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
  font-size: var(--fs-sm);
  color: var(--txt-secondary);
  cursor: pointer;
  line-height: 1.5;
}
.av3-error {
  color: #b3261e;
  background: #fdecea;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  margin: var(--sp-4) 0;
}
[data-theme="dark"] .av3-error { background: rgba(179,38,30,0.15); color: #f2a29c; }

.av3-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); min-height: 20px; }
.av3-chip {
  background: var(--clr-accent-lt);
  border: 1px solid var(--clr-mint);
  color: var(--txt-primary);
  border-radius: var(--r-full);
  padding: 0.3rem 0.8rem;
  font-size: var(--fs-sm);
  line-height: 1.3;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.av3-chip-x { cursor: pointer; margin-left: var(--sp-2); color: var(--txt-muted); font-weight: 700; }
.av3-chip-x:hover { color: #b3261e; }
.av3-chip-input-wrap { position: relative; margin-bottom: var(--sp-4); }
.av3-suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  z-index: 10;
  /* Was `overflow: hidden`, which -- combined with a raised result cap --
     silently clipped matches below the visible edge with no way to
     reach them. A capped height with its own scrollbar shows as many
     results as fit and lets the rest be reached by scrolling. */
  max-height: 260px;
  overflow-y: auto;
}
.av3-suggestion-item { padding: var(--sp-3) var(--sp-4); cursor: pointer; font-size: var(--fs-sm); }
.av3-suggestion-item:hover { background: var(--bg-surface-2); }
.av3-explore-toggle {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: var(--fs-sm); color: var(--txt-secondary);
  margin: var(--sp-5) 0; cursor: pointer;
}

.assessment-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-4);
  margin-bottom: var(--sp-2);
}
.assessment-top-row:empty { display: none; margin-bottom: 0; }
.assessment-reset-link {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--txt-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color var(--ease);
  white-space: nowrap;
}
.assessment-reset-link:hover { color: var(--txt-primary); }

/* Loading state for the primary "Continue / Confirm / Verify / Pay"
   button while its async request is in flight -- see withBusy() in
   assessment.js and setBusy() in payment.php. The label is hidden
   (rather than removed) so the button doesn't change width, and a
   small spinner takes its place. */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2.5px solid rgba(23,43,58,0.3);
  border-top-color: var(--clr-navy);
  border-radius: 50%;
  animation: rm-btn-spin 0.7s linear infinite;
}
@keyframes rm-btn-spin {
  to { transform: rotate(360deg); }
}

/* Repeatable certification rows on the academic-background screen
   (assessment_background.php / renderBackground() in assessment.js) --
   name/provider/year/status in one row plus a remove button, with an
   "add another" button below. Reuses the same .av2-input/.av2-select
   field styling as every other input, just laid out in a row. */
.av2-cert-rows {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.av2-cert-row {
  display: grid;
  grid-template-columns: 2fr 1.6fr 0.8fr 1.4fr auto;
  gap: var(--sp-2);
  align-items: center;
}
.av2-cert-row .av2-input,
.av2-cert-row .av2-select {
  width: 100%;
}
.av2-cert-remove {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  background: var(--bg-page);
  color: var(--txt-muted);
  font-size: var(--fs-lg);
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease);
}
.av2-cert-remove:hover {
  border-color: #E24B4A;
  color: #E24B4A;
}
.av2-cert-add {
  align-self: flex-start;
  margin-top: var(--sp-2);
  padding: 0.55rem 1rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--r-md);
  background: none;
  color: var(--clr-mint);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.av2-cert-add:hover {
  border-color: var(--clr-mint);
  background: var(--clr-accent-lt);
}
@media (max-width: 640px) {
  .av2-cert-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name name"
      "provider provider"
      "year status"
      "remove remove";
  }
  .av2-cert-row > *:nth-child(1) { grid-area: name; }
  .av2-cert-row > *:nth-child(2) { grid-area: provider; }
  .av2-cert-row > *:nth-child(3) { grid-area: year; }
  .av2-cert-row > *:nth-child(4) { grid-area: status; }
  .av2-cert-row > *:nth-child(5) { grid-area: remove; justify-self: end; }
}

/* Redesigned assessment (2026): the cascading Industry -> Designation
   picker (Background's work experience, Goals' target careers) and the
   variable-length repeatable rows built around it (qualifications,
   courses/certifications/projects, achievements) -- see
   buildIndustryDesignationRow()/repeatableRows() in assessment.js. Kept
   distinct from .av2-cert-row above since that one assumes a fixed
   5-column layout, while these rows hold a variable number of fields. */
.av2-subheading {
  margin: var(--sp-5) 0 var(--sp-2);
  font-size: var(--fs-md, 1rem);
  font-weight: 600;
  color: var(--txt);
}
.av2-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-2);
  width: 100%;
}
.av2-picker-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  flex: 1 1 320px;
}
.av2-cert-row-wrap {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
}
/* Holds the row's own fields (title/duration/status/etc.) and wraps THEM
   onto more than one line on a narrow screen -- kept separate from
   .av2-cert-row-wrap itself (which stays flex-nowrap) so the remove ("x")
   button, a sibling of this wrapper rather than one of the fields, always
   stays pinned beside the fields instead of dropping onto its own line
   below them once the fields wrap. */
.av2-cert-row-fields {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  flex: 1 1 auto;
  min-width: 0;
}
.av2-cert-row-wrap .av2-field-group {
  flex: 1 1 160px;
  min-width: 120px;
}
.av2-cert-row-wrap .av2-cert-remove {
  flex: 0 0 auto;
  align-self: center;
}
/* A fitContent select (selectEl()'s compact=true) whose longest option is
   a full phrase, not one word -- e.g. "School (up to Grade 12)" for
   Qualification, "Discontinued" for course Status -- reads fine slightly
   smaller, and shrinking it here means sizeSelectToContent() (which reads
   this same font-size before it's ever placed in the row) measures and
   renders a narrower box, leaving more of the row for Field/course name
   without clipping any option's text. */
.av2-select-compact {
  font-size: 0.8125rem;
}
@media (max-width: 640px) {
  .av2-picker-fields {
    grid-template-columns: 1fr;
  }
}

/* The type-ahead tag input (exams attempted, skills/talents/sports) sits
   inside .av3-chips, a flex row shared with the tags themselves -- without
   an explicit basis it shrinks to fit its own content instead of using
   the row's available width, which is what made the input read as a
   narrow, half-cut-off box. Forcing it onto its own full-width line fixes
   that regardless of how many tags already precede it. */
.av3-chip-input-wrap {
  flex: 1 1 100%;
  width: 100%;
}

/* Hidden help tooltips are absolutely positioned and could widen the page on narrow phones
   (horizontal scroll). Clip sideways overflow of the assessment area and cap tooltip width. */
.assessment-section-no-hero { overflow-x: hidden; overflow-x: clip; }
@media (max-width: 480px) {
  /* On phones the tooltip becomes a bottom notice, so it can never run off the screen edge. */
  .av2-help-tooltip { position: fixed; left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; z-index: 10000; padding: 10px 14px; }
}

/* iOS Safari zooms the page when a focused form field has a font size under 16px.
   Keep fields at 16px on touch-sized screens so tapping a field never zooms the layout. */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  select,
  textarea,
  .av2-select,
  .av2-input,
  .av2-select-compact { font-size: 16px; }
}


/* ══ Light-theme text contrast ═════════════════════════════════════════
   The brand mint (#34D399) is right for fills, borders and text on dark
   surfaces, but as TEXT on the light page it reads at about 1.9:1. In the
   light theme these mint text roles use a deeper mint (about 5:1 on white).
   Text on the navy surfaces (call-to-action band, footer, report previews)
   is left on the bright mint. Dark theme is unchanged. */
[data-theme="light"] { --clr-mint-text: #0A7D55; }
[data-theme="light"] .section-label,
[data-theme="light"] .hero-eyebrow,
[data-theme="light"] .rmst-eyebrow,
[data-theme="light"] .rp-label,
[data-theme="light"] .rp-value.rp-next,
[data-theme="light"] .hero-title .accent,
[data-theme="light"] .pc-offer,
[data-theme="light"] .cp-crumbs a,
[data-theme="light"] .roadmap-v2-top-link,
[data-theme="light"] .roadmap-v2-top-link a,
[data-theme="light"] .legal-content a,
[data-theme="light"] .av2-privacy-notice a,
[data-theme="light"] .cp-links a,
[data-theme="light"] .cp-block a:not(.btn),
[data-theme="light"] .text-mint,
[data-theme="light"] .roadmap-card > div[style*="var(--clr-mint)"],
[data-theme="light"] a[style*="color:var(--clr-mint)"]:not(.btn) {
  color: var(--clr-mint-text) !important;
}
[data-theme="light"] .cta-band .section-label,
[data-theme="light"] .cta-band .text-mint,
[data-theme="light"] .cta-band a[style*="color:var(--clr-mint)"],
[data-theme="light"] footer .text-mint,
[data-theme="light"] footer a[style*="color:var(--clr-mint)"] {
  color: var(--clr-mint) !important;
}


/* Review screen: plan choice (fixed once the order is created) */
.av2-plan-head {
  margin: var(--sp-6) 0 var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--txt-muted);
}
.av2-plan-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.av2-plan-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  cursor: pointer;
}
.av2-plan-card input { margin-top: 3px; accent-color: var(--clr-mint); flex: none; }
.av2-plan-card.is-selected { border-color: var(--clr-mint); box-shadow: 0 0 0 1px var(--clr-mint); }
.av2-plan-card:focus-within { outline: 2px solid var(--clr-mint); outline-offset: 2px; }
.av2-plan-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.av2-plan-name { font-weight: 700; color: var(--txt-primary); }
.av2-plan-usd, .av2-plan-was { font-weight: 500; color: var(--txt-muted); }
.av2-plan-was { text-decoration: line-through; }
.av2-plan-desc { font-size: var(--fs-sm); color: var(--txt-muted); }


/* Review screen: "built in stages" reassurance strip above the payment button */
.av2-process-strip {
  margin: var(--sp-6) 0 var(--sp-2);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-surface-2);
}
.av2-process-title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--txt-primary);
}
.av2-process-steps {
  list-style: none;
  margin: 0 0 var(--sp-3);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  counter-reset: avstep;
}
.av2-process-steps li {
  counter-increment: avstep;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 2px var(--sp-3) 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--bg-surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--txt-secondary);
}
.av2-process-steps li::before {
  content: counter(avstep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--clr-accent-lt);
  color: var(--clr-accent-txt);
  font-size: 12px;
  font-weight: 800;
}
.av2-process-link {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--clr-accent-txt);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.av2-process-link:focus-visible { outline: 2px solid var(--clr-mint); outline-offset: 2px; border-radius: 2px; }

/* Shown only when JavaScript is off (roadmap assessment and checkout need it) */
.rm-noscript {
  margin: 0 0 var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--clr-mint);
  border-radius: var(--r-md);
  background: var(--bg-surface-2);
  color: var(--txt-primary);
  font-size: var(--fs-sm);
  line-height: 1.6;
}


/* ══ Public-site polish (shared) ═══════════════════════════════════════════
   Headings break into balanced lines (never a lone last word) without forcing two lines at every width;
   body text avoids a single orphaned word. Browsers that do not know these properties ignore them. */
h1, h2, h3, .page-hero-title, .section-title, .about-title, .pp-intro-title { text-wrap: balance; }
.page-hero-sub, .section-desc, .legal-content p, .card p, .faq-answer, .accordion-body { text-wrap: pretty; }

/* Links inside body copy: readable accent colour in both themes, underlined so they do not rely on colour alone */
.rm-link { color: var(--clr-mint-text, var(--clr-mint)); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.rm-link:hover { text-decoration-thickness: 2px; }

/* Tables on policy/info pages scroll inside their own box, never across the page */
.legal-table-wrap { overflow-x: auto; max-width: 100%; margin: 0 0 var(--sp-5); border: 1px solid var(--border); border-radius: var(--r-md); -webkit-overflow-scrolling: touch; }
.legal-table-wrap:focus-visible { outline: 3px solid var(--clr-mint); outline-offset: 2px; }
.legal-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--fs-sm); }
.legal-table th, .legal-table td { padding: var(--sp-3) var(--sp-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); color: var(--txt-secondary); line-height: 1.55; }
.legal-table thead th { background: var(--bg-surface-2); color: var(--txt-primary); font-weight: 700; white-space: nowrap; }
.legal-table tbody th { color: var(--txt-primary); font-weight: 600; word-break: break-word; }
.legal-table tbody tr:last-child th, .legal-table tbody tr:last-child td { border-bottom: 0; }
.legal-table code { font-size: .85em; word-break: break-all; }
.legal-content pre, .legal-content code { overflow-wrap: anywhere; }
.legal-content pre { overflow-x: auto; max-width: 100%; }

/* Shared hero: optional breadcrumb above the card, optional extras (badges, buttons) under the description */
.page-hero-crumb { font-size: var(--fs-sm); color: var(--txt-muted); margin: 0 0 var(--sp-5); }
.page-hero-crumb a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.page-hero-crumb a:hover { color: var(--clr-accent-txt); }
.page-hero-extra { margin-top: var(--sp-4); }

/* ══ Status messages (success, info, warning, error) ═══════════════════════════
   One look for every message that tells a visitor how something went. Use role="status" for calm updates and
   role="alert" for errors, so screen readers announce them. Colour is never the only signal: each variant also
   carries a bold lead-in word or icon-free left rule plus the message text itself. */
:root { --rm-ok-bd: #0E7F58; --rm-warn-bd: #B45309; --rm-err-bd: #B42318; --rm-info-bd: #3D5A6C;
        --rm-ok-bg: #E7F8F0; --rm-warn-bg: #FFF4E5; --rm-err-bg: #FDECEA; --rm-info-bg: var(--bg-surface-2); --rm-warn-tx: #7A4B00; --rm-err-tx: #8A1C13; --rm-ok-tx: #0B5F42; }
[data-theme="dark"] { --rm-ok-bd: #34D399; --rm-warn-bd: #E0A23B; --rm-err-bd: #FF8E85; --rm-info-bd: #87A3B0;
        --rm-ok-bg: rgba(52,211,153,.12); --rm-warn-bg: rgba(224,162,59,.14); --rm-err-bg: rgba(255,142,133,.12); --rm-info-bg: var(--bg-surface-2); --rm-warn-tx: #F5D9A6; --rm-err-tx: #FFC9C4; --rm-ok-tx: #BFF2DC; }
.rm-notice { padding: var(--sp-4) var(--sp-5); border: 1px solid var(--border); border-left: 4px solid var(--rm-info-bd); border-radius: var(--r-md); background: var(--rm-info-bg); color: var(--txt-primary); font-size: var(--fs-sm); line-height: 1.6; margin: 0 0 var(--sp-5); overflow-wrap: anywhere; }
.rm-notice a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.rm-notice--success { border-left-color: var(--rm-ok-bd); background: var(--rm-ok-bg); color: var(--rm-ok-tx); }
.rm-notice--warning { border-left-color: var(--rm-warn-bd); background: var(--rm-warn-bg); color: var(--rm-warn-tx); }
.rm-notice--error   { border-left-color: var(--rm-err-bd);  background: var(--rm-err-bg);  color: var(--rm-err-tx); }
[data-theme="light"] .rm-notice--success, [data-theme="light"] .rm-notice--warning, [data-theme="light"] .rm-notice--error { border-color: var(--border); }

/* Keep a short phrase together on one line (used where a heading lists steps) */
.nowrap { white-space: nowrap; }

/* How It Works framework on narrow screens: a vertical list of five steps with icon on the left, joined by a thin line,
   instead of small boxes of different widths with rotated arrows between them. */
@media (max-width: 768px) {
  .engine-flow { align-items: stretch; justify-content: flex-start; gap: 0; max-width: 440px; margin: var(--sp-8) auto; }
  .engine-node { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: var(--sp-4); align-items: center; text-align: left; padding: var(--sp-3) var(--sp-4); min-width: 0; }
  .engine-node-icon { margin: 0; width: 40px; height: 40px; grid-row: 1 / span 2; }
  .engine-node h3, .engine-node h4 { font-size: var(--fs-base); margin: 0; }
  .engine-node p { font-size: var(--fs-sm); margin: 0; }
  .engine-arrow { transform: none; font-size: 0; line-height: 0; height: 22px; padding: 0 0 0 calc(var(--sp-4) + 19px); display: flex; }
  .engine-arrow::before { content: ""; width: 2px; height: 100%; background: var(--clr-mint); border-radius: 2px; opacity: .7; }
}

.hiw-compare-single{grid-template-columns:minmax(0,640px);justify-content:center}

/* Keyboard focus: one visible, theme-aware ring for every link, button and control without its own focus style. */
:where(a, button, summary, [tabindex], input, select, textarea):focus-visible {
  outline: 3px solid var(--clr-accent-txt);
  outline-offset: 2px;
}
:where(.footer, footer, .cta-band, .page-hero-dark):focus-visible,
:where(.footer, footer, .cta-band, .page-hero-dark) :where(a, button, summary, [tabindex]):focus-visible {
  outline-color: var(--clr-mint);
}
