/* Hanson English — trust, navigation & discovery enhancements */
/* Header patterns: AEON/Berlitz-style single-row mobile bar, phone pill + red trial CTA */

:root {
  --he-header-height: 104px;
  --he-discovery-top: 104px;
  --he-discovery-height: 54px;
  --he-blue-deep: #004175;
  --he-blue-primary: #0a66c2;
  --he-blue-mid: #0869b7;
  --he-blue-light: #3da4ef;
  --he-blue-pale: #e8f4fc;
  --he-cta-red: #e6003a;
  --he-navy-deep: #0a2d4a;
  --he-navy-mid: #0d3d5c;
  --he-navy-light: #1a5a8a;
  --he-shadow-cta-navy: 0 4px 18px rgba(10, 45, 74, 0.26);
  --he-shadow-soft: 0 4px 20px rgba(0, 41, 75, 0.09);
  --he-shadow-header: 0 2px 14px rgba(10, 102, 194, 0.1), 0 1px 0 rgba(123, 200, 255, 0.45);
  --he-shadow-cta: 0 4px 14px rgba(230, 0, 58, 0.34);
  /* Brand lock — same visual weight on every mobile width (no breakpoint jumps) */
  --he-logo-size: 56px;
  --he-brand-title-size: 26px;
  --he-brand-sub-size: 11px;
  --he-brand-title-shadow: 1px 0 1px #252525;
  --he-brand-sub-shadow: 1px 0 1px #252525;
  --he-tap-min: 48px;
  --he-header-pad-x: 12px;
  --he-header-gap: 10px;
  --he-toolbar-gap: 10px;
  --he-hero-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --he-hero-headline: #0a2d4a;
  --he-hero-sub: #2f4a5c;
  --he-hero-eyebrow: #4a6a82;
  --he-hero-text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 10px rgba(10, 45, 74, 0.09),
    0 0 1px rgba(10, 45, 74, 0.04);
  --he-hero-sub-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 6px rgba(10, 45, 74, 0.06);
  --he-hero-panel-shadow:
    0 12px 40px rgba(10, 45, 74, 0.06),
    0 2px 8px rgba(10, 102, 194, 0.04);
  --he-hero-image-shadow:
    0 8px 28px rgba(10, 45, 74, 0.1),
    0 2px 6px rgba(10, 45, 74, 0.06);
}

/* —— Premium CTA (all breakpoints; mobile grid sizes below) —— */
.headerButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  margin: 0;
  padding: 0 16px;
  box-sizing: border-box;
  height: var(--he-tap-min);
  min-height: var(--he-tap-min);
  max-height: var(--he-tap-min);
  font-size: clamp(13px, 2.5vw, 16px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
  border: none;
  border-radius: 11px;
  background: linear-gradient(180deg, #ff4d73 0%, #ff0040 42%, var(--he-cta-red) 100%);
  box-shadow:
    var(--he-shadow-cta),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease,
    background 0.16s ease;
}
.headerButton i {
  font-size: 0.75em;
  opacity: 0.92;
}
.headerButton:hover {
  background: linear-gradient(180deg, #ff6b8a 0%, #ff1a52 48%, #cc0034 100%);
  box-shadow:
    0 5px 16px rgba(230, 0, 58, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  filter: brightness(1.02);
}
.headerButton:active {
  transform: scale(0.98);
  box-shadow:
    0 2px 8px rgba(230, 0, 58, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.headerButton:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(61, 164, 239, 0.55),
    var(--he-shadow-cta);
}

/* —— Header shell (all widths): light bar + depth —— */
#header {
  background: linear-gradient(180deg, #fff 0%, #fafcfe 100%);
  border-bottom-color: rgba(123, 200, 255, 0.65);
  box-shadow: var(--he-shadow-header);
}

/* —— Mobile header: single-row bar (≤812px) — logo | phone | trial CTA | menu —— */
@media (max-width: 812px) {
  :root {
    /* One height for logo + phone pill + red CTA + menu (premium single rail) */
    --he-mobile-row-h: 44px;
    --he-tap-min: var(--he-mobile-row-h);
    --he-logo-size: var(--he-mobile-row-h);
    --he-header-height: calc(var(--he-mobile-row-h) + 16px);
    --he-discovery-top: var(--he-header-height);
    /* Light blue pill family (phone + menu) */
    --he-mobile-pill-bg: #ebf5ff;
    --he-mobile-pill-border: #c8e4ff;
    --he-mobile-pill-text: #003366;
    --he-mobile-pill-hover-bg: #f7fbff;
    --he-mobile-pill-hover-border: #a8d4f5;
    /* Strong red trial CTA */
    --he-mobile-cta-from: #ff3355;
    --he-mobile-cta-to: #e6003a;
    --he-mobile-cta-shadow: 0 3px 10px rgba(230, 0, 58, 0.35);
    --he-mobile-cta-hover-shadow: 0 4px 12px rgba(230, 0, 58, 0.4);
    --he-mobile-pill-radius: 999px;
    --he-mobile-btn-radius: 9px;
    --he-mobile-font-phone: 12.5px;
    --he-mobile-font-cta: 11.5px;
    /* Tighter cluster: logo stays left; toolbar hugs logo */
    --he-header-gap: 6px;
    --he-header-logo-gap: 4px;
    /* Extra inset so menu outline stays inside header on notched phones */
    --he-header-pad-right: calc(var(--he-header-pad-x) + 2px);
  }

  /* — One flex row: logo | phone | CTA | menu (wrappers flattened) — */
  #header {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: var(--he-header-gap);
    height: auto !important;
    min-height: var(--he-header-height);
    max-width: 100%;
    overflow-x: clip;
    overflow-y: visible;
    padding:
      max(8px, env(safe-area-inset-top, 0px))
      calc(var(--he-header-pad-right, var(--he-header-pad-x)) + env(safe-area-inset-right, 0px))
      8px
      calc(var(--he-header-pad-x) + env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    text-align: left;
  }

  .he-header-brand,
  #header:not(:has(.he-header-brand)) h1,
  #header:not(:has(.he-header-brand)) #subText {
    display: none !important;
  }

  #header > a {
    flex: 0 0 var(--he-mobile-row-h);
    width: var(--he-mobile-row-h);
    height: var(--he-mobile-row-h);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: calc(var(--he-header-logo-gap) - var(--he-header-gap));
    text-decoration: none;
  }

  #logo {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: var(--he-mobile-row-h);
    height: var(--he-mobile-row-h);
    background-size: var(--he-mobile-row-h) var(--he-mobile-row-h);
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
  }

  /* Flatten nested wrappers so all four controls sit in one row */
  #headerWrapper01 {
    display: contents;
  }

  .he-header-row2 {
    display: contents;
  }

  /* Beat legacy main.css absolute positioning on small phones */
  #header #headerWrapper01,
  #header #subPhone,
  #headerWrapper01 #subPhone,
  #header > #subPhone,
  #subPhone {
    position: static !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    margin: 0;
    padding: 0;
    font-size: inherit !important;
    line-height: 1;
    text-align: left;
    border-bottom: none;
    color: inherit !important;
  }

  #header > #subPhone,
  #headerWrapper01 #subPhone,
  #subPhone {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    margin-left: 0 !important;
    padding: 0 !important;
  }

  #headerWrapper01 {
    margin-left: 0 !important;
  }

  #subPhone i {
    display: none;
  }

  /* — Phone pill (same height as CTA + menu) — */
  #subPhone a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    height: var(--he-mobile-row-h);
    min-height: var(--he-mobile-row-h);
    max-height: var(--he-mobile-row-h);
    min-width: 0;
    max-width: 100%;
    padding: 0 12px;
    font-size: var(--he-mobile-font-phone);
    line-height: 1;
    font-weight: 700;
    color: var(--he-mobile-pill-text);
    text-decoration: none;
    white-space: nowrap;
    background: var(--he-mobile-pill-bg);
    border: 1px solid var(--he-mobile-pill-border);
    border-radius: var(--he-mobile-pill-radius);
    box-shadow: none;
    transition:
      background 0.15s ease,
      border-color 0.15s ease;
  }

  #subPhone a::before {
    content: "";
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23003366'%3E%3Cpath d='M6.6 10.8c1.43 2.84 3.76 5.17 6.6 6.6l2.2-2.2c.28-.28.67-.36 1.02-.24 1.12.37 2.33.57 3.58.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.46.57 3.58.11.35.03.74-.24 1.02l-2.2 2.2z'/%3E%3C/svg%3E")
      center / contain no-repeat;
  }

  #subPhone a:hover,
  #subPhone a:focus {
    background: var(--he-mobile-pill-hover-bg);
    border-color: var(--he-mobile-pill-hover-border);
    outline: none;
  }

  #subPhone:not(:has(a)) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: var(--he-mobile-row-h);
    min-height: var(--he-mobile-row-h);
    max-height: var(--he-mobile-row-h);
    padding: 0 12px;
    font-size: var(--he-mobile-font-phone);
    font-weight: 700;
    color: var(--he-mobile-pill-text);
    white-space: nowrap;
    background: var(--he-mobile-pill-bg);
    border: 1px solid var(--he-mobile-pill-border);
    border-radius: var(--he-mobile-pill-radius);
    box-shadow: none;
  }

  /* — Red trial CTA (matched height, rounded) — */
  .he-header-row2 #signupRequest,
  #header:not(:has(.he-header-row2)) #signupRequest,
  #header .headerButton {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    height: var(--he-mobile-row-h);
    min-height: var(--he-mobile-row-h);
    max-height: var(--he-mobile-row-h);
    margin: 0 !important;
    padding: 0 11px;
    font-size: var(--he-mobile-font-cta);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    color: #fff;
    white-space: nowrap;
    border: none;
    border-radius: var(--he-mobile-btn-radius);
    background: linear-gradient(180deg, var(--he-mobile-cta-from) 0%, var(--he-mobile-cta-to) 100%);
    box-shadow: var(--he-mobile-cta-shadow);
  }

  #header .headerButton i {
    display: inline-block;
    font-size: 0.68em;
    opacity: 0.95;
    margin-left: 1px;
  }

  .he-header-row2 #signupRequest:hover,
  #header:not(:has(.he-header-row2)) #signupRequest:hover,
  #header .headerButton:hover {
    background: linear-gradient(180deg, #ff4a6a 0%, #cc0034 100%);
    box-shadow: var(--he-mobile-cta-hover-shadow);
    filter: none;
  }

  .he-header-row2 #signupRequest:active,
  #header .headerButton:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.28);
  }

  /* — Light blue menu square (same height as pills) — */
  .he-header-row2 #openMenu,
  #header:not(:has(.he-header-row2)) #openMenu,
  #openMenu {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    min-width: var(--he-mobile-row-h);
    height: var(--he-mobile-row-h);
    min-height: var(--he-mobile-row-h);
    max-height: var(--he-mobile-row-h);
    margin: 0 !important;
    padding: 0 10px !important;
    position: static !important;
    top: auto !important;
    box-sizing: border-box;
    font-size: inherit;
    color: var(--he-mobile-pill-text);
    background: var(--he-mobile-pill-bg);
    border: 1px solid var(--he-mobile-pill-border);
    border-radius: var(--he-mobile-btn-radius);
    box-shadow: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
      background 0.15s ease,
      border-color 0.15s ease;
  }

  #openMenu .fa-bars {
    font-size: 17px;
    line-height: 1;
    color: var(--he-mobile-pill-text);
  }

  .openMenu__label {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    border: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    color: inherit;
  }

  #openMenu:hover,
  #openMenu:focus {
    background: var(--he-mobile-pill-hover-bg);
    border-color: var(--he-mobile-pill-hover-border);
    color: var(--he-mobile-pill-text);
    outline: none;
  }

  #openMenu.is-open,
  #openMenu[aria-expanded="true"] {
    color: #fff;
    background: linear-gradient(180deg, var(--he-blue-light) 0%, var(--he-blue-mid) 55%, var(--he-blue-deep) 100%);
    border-color: var(--he-blue-deep);
    box-shadow: 0 3px 12px rgba(0, 65, 117, 0.28);
  }

  #openMenu.is-open .fa-bars,
  #openMenu[aria-expanded="true"] .fa-bars {
    color: #fff;
  }

  /* Legacy markup without .he-header-row2 */
  #header:not(:has(.he-header-row2)) #headerWrapper01 {
    display: flex !important;
    flex: 1 1 auto;
    flex-flow: row nowrap;
    align-items: center;
    gap: var(--he-header-gap);
    min-width: 0;
    position: static !important;
    width: auto !important;
    top: auto !important;
    right: auto !important;
  }

  #container {
    margin-top: var(--he-header-height);
  }

  #menu {
    top: var(--he-header-height);
  }
}

/* Narrow phones — scale row so nothing clips (iPhone 16/17 Pro, etc.) */
@media (max-width: 390px) {
  :root {
    --he-header-pad-x: 10px;
    --he-header-gap: 5px;
    --he-header-logo-gap: 3px;
    --he-mobile-row-h: 42px;
    --he-mobile-font-phone: 11.5px;
    --he-mobile-font-cta: 10.5px;
  }

  #subPhone a {
    padding: 0 9px;
    gap: 4px;
  }

  #subPhone a::before {
    width: 13px;
    height: 13px;
  }

  .he-header-row2 #signupRequest,
  #header:not(:has(.he-header-row2)) #signupRequest,
  #header .headerButton {
    padding: 0 9px;
    letter-spacing: 0;
  }
}

/* iPhone SE / small widths — tighter but still one clean row */
@media (max-width: 375px) {
  :root {
    --he-mobile-row-h: 40px;
    --he-header-gap: 5px;
    --he-header-logo-gap: 3px;
    --he-header-pad-x: 8px;
    --he-mobile-font-phone: 10.5px;
    --he-mobile-font-cta: 10px;
    --he-brand-title-size: 23px;
    --he-brand-sub-size: 10px;
  }

  #subPhone a {
    padding: 0 7px;
  }

  .he-header-row2 #signupRequest,
  #header:not(:has(.he-header-row2)) #signupRequest,
  #header .headerButton {
    padding: 0 7px;
  }
}

@media (max-width: 320px) {
  :root {
    --he-mobile-row-h: 38px;
    --he-header-gap: 4px;
    --he-header-logo-gap: 2px;
    --he-header-pad-x: 6px;
    --he-mobile-font-phone: 10px;
    --he-mobile-font-cta: 9.5px;
  }

  #subPhone a {
    padding: 0 6px;
    letter-spacing: -0.02em;
  }

  #subPhone a::before {
    width: 12px;
    height: 12px;
  }

  .he-header-row2 #signupRequest,
  #header:not(:has(.he-header-row2)) #signupRequest,
  #header .headerButton {
    padding: 0 6px;
  }

  #openMenu .fa-bars {
    font-size: 15px;
  }

  /* Icon-only menu on the narrowest widths */
  #openMenu {
    flex: 0 0 var(--he-mobile-row-h);
    width: var(--he-mobile-row-h);
    min-width: var(--he-mobile-row-h);
    padding: 0 !important;
  }

  .openMenu__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* —— Desktop header (≥813px): flex bar + 48px toolbar rail —— */
@media (min-width: 813px) {
  /* FIX: Flex layout replaces legacy absolute logo / h1 / headerWrapper01 stacking */
  #header {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    height: auto !important;
    min-height: 104px;
    padding: 14px 20px 14px 10px;
    gap: 12px;
    box-sizing: border-box;
    text-align: left;
    box-shadow: var(--he-shadow-header);
    overflow: visible;
  }

  #header > a {
    position: static;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    text-decoration: none;
  }

  #logo {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 70px;
    height: 70px;
    background-size: 70px 70px;
    flex-shrink: 0;
  }

  .he-header-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 2px;
  }

  #header h1,
  .he-header-brand h1 {
    position: static !important;
    left: auto !important;
    top: auto !important;
    margin: 0;
    padding: 0;
    font-size: 40px;
    line-height: 1;
    color: var(--he-blue-primary);
  }

  #subText,
  .he-header-brand #subText {
    position: static !important;
    left: auto !important;
    top: auto !important;
    margin: 0;
    padding: 0;
    max-width: none;
    font-weight: 900;
    color: var(--he-blue-deep);
  }

  #header:not(:has(.he-header-brand)) h1,
  #header:not(:has(.he-header-brand)) #subText {
    position: static !important;
    left: auto !important;
    top: auto !important;
    flex: 0 1 auto;
  }

  /* FIX: Toolbar cluster — phone pill | red CTA | menu @ exactly 48px height, 10px gaps */
  #headerWrapper01 {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: var(--he-toolbar-gap);
    margin-left: auto;
    margin-right: 0;
    padding: 0;
  }

  .he-header-row2 {
    display: flex;
    align-items: center;
    gap: var(--he-toolbar-gap);
    flex: 0 0 auto;
  }

  #subPhone {
    position: static !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    font-size: inherit;
    border-bottom: none;
  }

  #subPhone a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    height: var(--he-tap-min);
    min-height: var(--he-tap-min);
    max-height: var(--he-tap-min);
    padding: 0 16px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: var(--he-blue-deep);
    text-decoration: none;
    white-space: nowrap;
    background: var(--he-blue-pale);
    border: 1px solid rgba(10, 102, 194, 0.22);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.1);
    transition:
      background 0.15s ease,
      border-color 0.15s ease,
      box-shadow 0.15s ease,
      transform 0.12s ease;
  }

  #subPhone a::before {
    content: "";
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230a66c2'%3E%3Cpath d='M6.6 10.8c1.43 2.84 3.76 5.17 6.6 6.6l2.2-2.2c.28-.28.67-.36 1.02-.24 1.12.37 2.33.57 3.58.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.46.57 3.58.11.35.03.74-.24 1.02l-2.2 2.2z'/%3E%3C/svg%3E")
      center / contain no-repeat;
  }

  #subPhone a:hover,
  #subPhone a:focus {
    background: #fff;
    border-color: var(--he-blue-primary);
    box-shadow: 0 3px 10px rgba(10, 102, 194, 0.14);
    outline: none;
    transform: translateY(-1px);
  }

  #subPhone a:active {
    transform: translateY(0);
  }

  #header #signupRequest.headerButton,
  #header .headerButton {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 0 18px;
    font-size: 15px;
    letter-spacing: 0.04em;
    border-radius: 11px;
  }

  #header #openMenu {
    position: static !important;
    top: auto !important;
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 0 16px;
    font-size: 14px !important;
    border-radius: 10px;
  }

  /* Legacy pages: phone is a direct child of #header */
  #header:not(:has(.he-header-row2)) > #subPhone {
    margin-left: auto;
  }

  #header:not(:has(.he-header-row2)) #headerWrapper01 {
    margin-left: var(--he-toolbar-gap);
  }
}

/* —— Hamburger / menu button — premium pill (desktop only; mobile styled above) —— */
@media (min-width: 813px) {
  #openMenu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    line-height: 1;
    color: var(--he-blue-deep);
    background: linear-gradient(180deg, #fff 0%, var(--he-blue-pale) 100%);
    border: 1px solid rgba(10, 102, 194, 0.22);
    border-radius: 10px;
    box-shadow:
      0 2px 8px rgba(0, 65, 117, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    box-sizing: border-box;
    width: auto;
    min-width: auto;
    height: var(--he-tap-min);
    min-height: var(--he-tap-min);
    max-height: var(--he-tap-min);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition:
      background 0.2s ease,
      border-color 0.2s ease,
      box-shadow 0.2s ease,
      color 0.2s ease,
      transform 0.14s ease;
  }

  #openMenu:active {
    transform: scale(0.97);
    box-shadow:
      0 1px 4px rgba(0, 65, 117, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }
}
.he-menu-toggle__icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
  height: 16px;
  flex-shrink: 0;
}
.he-menu-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease,
    width 0.2s ease;
}
#openMenu.is-open .he-menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#openMenu.is-open .he-menu-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#openMenu.is-open .he-menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.openMenu__label {
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
@media (min-width: 813px) {
  #openMenu:hover,
  #openMenu:focus {
    background: linear-gradient(180deg, #fff 0%, #d4ecfa 100%);
    border-color: var(--he-blue-mid);
    outline: none;
  }

  #openMenu:focus-visible {
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 5px rgba(8, 105, 183, 0.45);
  }

  #openMenu.is-open,
  #openMenu[aria-expanded="true"] {
    color: #fff;
    background: linear-gradient(180deg, var(--he-blue-light) 0%, var(--he-blue-mid) 55%, var(--he-blue-deep) 100%);
    border-color: var(--he-blue-deep);
    box-shadow:
      0 3px 12px rgba(0, 65, 117, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  #openMenu.is-open .openMenu__label,
  #openMenu[aria-expanded="true"] .openMenu__label {
    color: #fff;
  }
}

/* —— Slide-in navigation —— */
#menu {
  display: block !important;
  right: 0 !important;
  width: min(300px, 88vw);
  max-width: 100%;
  z-index: 1000;
  visibility: hidden;
  transform: translateX(100%);
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.32s step-end;
  box-shadow: -6px 0 24px rgba(0, 65, 117, 0.18);
  overflow-y: auto;
  max-height: calc(100vh - var(--he-discovery-top, 104px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#menu.menu-is-open {
  visibility: visible;
  transform: translateX(0);
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s step-start;
}
#menu a {
  padding: 14px 20px 14px 48px;
  font-size: 15px;
  line-height: 1.35;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
#menu a:last-child {
  border-bottom: none;
}
#menu em {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  opacity: 0.9;
}
#menuSideTitle {
  position: static;
  writing-mode: horizontal-tb;
  height: auto;
  padding: 16px 16px 8px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
body.menu-open {
  overflow: hidden;
}
body.menu-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 41, 75, 0.35);
  z-index: 998;
  animation: he-menu-backdrop-in 0.28s ease;
}
@keyframes he-menu-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  #menu {
    transition: none;
  }
  body.menu-open::before {
    animation: none;
  }
}

/* —— Site search (homepage + courses + teachers) —— */
#hpDiscovery {
  background: linear-gradient(180deg, #fafcfe 0%, #f3f9fd 100%);
  border-bottom: 1px solid #d4e8f5;
  padding: 8px 14px 9px;
  box-sizing: border-box;
}
#hpDiscovery.hp-discovery-fixed {
  position: fixed;
  top: var(--he-discovery-top, 104px);
  left: 0;
  right: 0;
  z-index: 997;
  box-shadow: 0 2px 10px rgba(8, 105, 183, 0.07);
}
#hpSearchWrap {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 920px;
  margin: 0 auto 7px;
  padding: 0 2px;
}
#hpSearchWrap .fa-search {
  color: var(--he-blue-mid);
  font-size: 0.95rem;
  flex-shrink: 0;
  opacity: 0.75;
}
#hpCourseSearch.formTextBox {
  flex: 1;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #b8d4e8;
  border-radius: 10px;
  box-sizing: border-box;
  background: #fff;
  min-height: 42px;
  box-shadow: inset 0 1px 2px rgba(0, 65, 117, 0.04);
}
#hpCourseSearch.formTextBox::placeholder {
  color: #7a96ab;
  font-weight: 400;
  font-size: 14px;
}
#hpCourseSearch.formTextBox:focus {
  outline: none;
  border-color: var(--he-blue-mid);
  box-shadow:
    0 0 0 3px rgba(8, 105, 183, 0.12),
    inset 0 1px 2px rgba(0, 65, 117, 0.04);
}
#hpSearchPills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  max-width: 920px;
  margin: 0 auto;
}
.hp-pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #0869b7;
  background: #fff;
  border: 1px solid #c5dce8;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  line-height: 1.35;
}
.hp-pill:hover,
.hp-pill.is-active {
  background: #0869b7;
  color: #fff;
  border-color: #0869b7;
  box-shadow: 0 1px 4px rgba(8, 105, 183, 0.2);
}
.hp-pill:active {
  transform: scale(0.98);
}
#hpSearchStatus {
  text-align: center;
  font-size: 11px;
  color: #6a7f8f;
  margin-top: 4px;
  min-height: 1.1em;
  line-height: 1.35;
}
#hpSearchStatus:empty {
  display: none;
}
body.hp-discovery-on #container {
  margin-top: calc(var(--he-discovery-top, 104px) + var(--he-discovery-height, 54px));
}
body.hp-discovery-on #heHero {
  margin-top: 0;
}

/* —— Homepage hero (split: copy left, photo right) —— */
.he-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  width: 100%;
  min-height: clamp(300px, 40vw, 500px);
  overflow: hidden;
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
  position: relative;
}
.he-hero__content {
  display: flex;
  align-items: center;
  justify-content: center;
  order: 2;
  padding: clamp(26px, 4.8vw, 52px) clamp(20px, 4vw, 44px);
  background:
    radial-gradient(ellipse 90% 70% at 100% 50%, rgba(10, 102, 194, 0.05) 0%, transparent 62%),
    radial-gradient(ellipse 120% 80% at 0% 50%, rgba(10, 102, 194, 0.035) 0%, transparent 55%),
    linear-gradient(168deg, #ffffff 0%, #f8fafd 48%, #eef3f8 100%);
  border-right: none;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.he-hero__content::after {
  content: "";
  position: absolute;
  top: 8%;
  right: 0;
  width: clamp(24px, 4vw, 48px);
  height: 84%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(238, 243, 248, 0.85) 100%);
  opacity: 0;
}
.he-hero__panel {
  width: 100%;
  max-width: 21em;
  padding: clamp(18px, 3vw, 28px) clamp(16px, 2.8vw, 24px);
  font-family: var(--he-hero-font);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  box-shadow: var(--he-hero-panel-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
}
.he-hero__eyebrow {
  margin: 0 0 0.85em;
  padding-bottom: 0.75em;
  font-size: clamp(0.68rem, 1.2vw, 0.74rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--he-hero-eyebrow);
  border-bottom: 1px solid rgba(10, 102, 194, 0.12);
}
.he-hero__eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.35em;
  height: 2px;
  margin-right: 0.55em;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--he-blue-primary) 0%, var(--he-blue-light) 100%);
  border-radius: 1px;
}
.he-hero__visual {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(200px, 34vw, 500px);
  padding: clamp(12px, 2vw, 22px) clamp(12px, 2vw, 22px) clamp(12px, 2vw, 22px) clamp(6px, 1.2vw, 14px);
  background:
    radial-gradient(ellipse 80% 60% at 0% 50%, rgba(255, 255, 255, 0.35) 0%, transparent 55%),
    linear-gradient(165deg, #e8eef5 0%, #dce6ef 55%, #d4dfe9 100%);
  box-sizing: border-box;
  position: relative;
}
.he-hero__visual::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: clamp(32px, 6vw, 72px);
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(238, 243, 248, 0.55) 0%, transparent 100%);
}
.he-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: clamp(200px, 36vw, 500px);
  object-fit: contain;
  object-position: center center;
  border-radius: 8px;
  box-shadow: var(--he-hero-image-shadow);
  filter: contrast(1.02) saturate(1.04);
}
.he-hero__headline {
  margin: 0 0 0.78em;
  font-family: inherit;
  font-size: clamp(1.22rem, 2.7vw, 1.95rem);
  font-weight: 800;
  line-height: 1.68;
  letter-spacing: 0.042em;
  color: var(--he-hero-headline);
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 1, "kern" 1;
  text-shadow: var(--he-hero-text-shadow);
}
.he-hero__sub {
  margin: 0 0 1.55em;
  font-family: inherit;
  font-size: clamp(0.86rem, 1.55vw, 0.98rem);
  font-weight: 500;
  line-height: 1.72;
  letter-spacing: 0.062em;
  color: var(--he-hero-sub);
  text-wrap: pretty;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-shadow: var(--he-hero-sub-shadow);
}
.he-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--he-tap-min, 48px);
  padding: 0 1.4em;
  font-family: var(--he-hero-font);
  font-size: clamp(0.88rem, 2.35vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    var(--he-navy-light) 0%,
    var(--he-navy-mid) 46%,
    var(--he-navy-deep) 100%
  );
  box-shadow:
    var(--he-shadow-cta-navy),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease,
    background 0.16s ease;
}
.he-hero__cta:hover {
  background: linear-gradient(180deg, #1f6a9e 0%, #0f4a6e 48%, #082438 100%);
  box-shadow:
    0 6px 20px rgba(10, 45, 74, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  filter: brightness(1.03);
  transform: translateY(-1px);
}
.he-hero__cta:active {
  transform: scale(0.98);
  box-shadow:
    0 2px 10px rgba(10, 45, 74, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.he-hero__cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(61, 164, 239, 0.55),
    var(--he-shadow-cta-navy);
}
@media (min-width: 768px) {
  .he-hero__content {
    order: 1;
  }
  .he-hero__content::after {
    opacity: 1;
  }
  .he-hero__visual {
    order: 2;
    padding-left: clamp(4px, 1vw, 12px);
  }
  .he-hero__panel {
    margin-right: clamp(0px, 1.5vw, 12px);
  }
}
@media (max-width: 767px) {
  .he-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .he-hero__content {
    order: 2;
    padding: clamp(22px, 5.8vw, 32px) clamp(18px, 5vw, 26px) clamp(26px, 6.5vw, 36px);
    border-top: none;
    background:
      radial-gradient(ellipse 100% 50% at 50% 0%, rgba(10, 102, 194, 0.04) 0%, transparent 70%),
      linear-gradient(180deg, #f5f8fb 0%, #ffffff 28%, #f8fafd 100%);
  }
  .he-hero__content::after {
    display: none;
  }
  .he-hero__panel {
    max-width: 23em;
    margin: 0 auto;
    padding: clamp(20px, 5.5vw, 26px) clamp(18px, 5vw, 24px);
    text-align: center;
    border-radius: 16px;
  }
  .he-hero__eyebrow {
    letter-spacing: 0.12em;
  }
  .he-hero__eyebrow::before {
    display: block;
    width: 2em;
    margin: 0 auto 0.65em;
  }
  .he-hero__headline {
    margin-bottom: 0.7em;
    font-weight: 700;
    line-height: 1.64;
    letter-spacing: 0.038em;
  }
  .he-hero__sub {
    margin-bottom: 1.45em;
    line-height: 1.7;
    letter-spacing: 0.055em;
  }
  .he-hero__visual {
    order: 1;
    min-height: clamp(172px, 50vw, 272px);
    padding: clamp(10px, 3vw, 16px) clamp(14px, 4vw, 20px) clamp(4px, 1.2vw, 8px);
  }
  .he-hero__visual::before {
    display: none;
  }
  .he-hero__image {
    max-height: clamp(172px, 48vw, 272px);
    border-radius: 10px;
  }
  .he-hero__cta {
    width: 100%;
    max-width: 21em;
    min-height: 48px;
    margin: 0 auto;
  }
}
@media (max-width: 389px) {
  .he-hero__content {
    padding: 20px 16px 28px;
  }
  .he-hero__panel {
    padding: 18px 16px 20px;
    border-radius: 14px;
  }
  .he-hero__eyebrow {
    font-size: 0.66rem;
    margin-bottom: 0.75em;
    padding-bottom: 0.65em;
  }
  .he-hero__headline {
    font-size: 1.14rem;
    line-height: 1.62;
    letter-spacing: 0.034em;
    margin-bottom: 0.65em;
  }
  .he-hero__sub {
    margin-bottom: 1.25em;
    font-size: 0.82rem;
    line-height: 1.68;
    letter-spacing: 0.05em;
  }
  .he-hero__cta {
    max-width: 100%;
    min-height: 48px;
    white-space: normal;
    text-align: center;
    padding: 0.72em 1em;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
  }
  .he-hero__visual {
    min-height: clamp(156px, 46vw, 228px);
    padding: 10px 12px 4px;
  }
  .he-hero__image {
    max-height: clamp(156px, 44vw, 228px);
  }
}
@media (min-width: 390px) and (max-width: 767px) {
  .he-hero__headline {
    font-size: clamp(1.2rem, 4.8vw, 1.38rem);
  }
}
@media (min-width: 1100px) {
  .he-hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  }
  .he-hero__panel {
    max-width: 22em;
    padding: 28px 26px;
  }
  .he-hero__headline {
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1.7;
    letter-spacing: 0.045em;
    margin-bottom: 0.8em;
  }
  .he-hero__sub {
    font-size: 0.98rem;
    line-height: 1.74;
    margin-bottom: 1.6em;
  }
}
@media (prefers-reduced-motion: reduce) {
  .he-hero__cta {
    transition: none;
  }
  .he-hero__cta:hover {
    transform: none;
  }
}
body.hp-discovery-on #menu {
  top: calc(var(--he-discovery-top, 104px) + var(--he-discovery-height, 54px));
}
@media (min-width: 900px) {
  #hpDiscovery {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 12px;
    row-gap: 5px;
    padding: 5px 16px 6px;
  }
  #hpSearchWrap {
    flex: 0 1 300px;
    margin: 0;
  }
  #hpSearchPills {
    flex: 1 1 auto;
    justify-content: flex-start;
    max-width: none;
    margin: 0;
  }
  #hpSearchStatus {
    flex: 1 1 100%;
    margin-top: 2px;
  }
  body.hp-discovery-on #container {
    margin-top: 152px;
  }
  body.hp-discovery-on #menu {
    top: 152px;
  }
}
.hp-discovery-target.is-dimmed {
  opacity: 0.28;
  pointer-events: none;
}
.hp-discovery-target.is-match {
  box-shadow: 0 0 0 3px #ff0040cc, 0 4px 14px rgba(8, 105, 183, 0.25);
  transform: scale(1.02);
  z-index: 1;
  position: relative;
}
body.hp-discovery-on #stepsToJoin,
body.hp-discovery-on #coursesSection,
body.hp-discovery-on #schoolAspects {
  scroll-margin-top: 168px;
}
@media (min-width: 900px) {
  body.hp-discovery-on #stepsToJoin,
  body.hp-discovery-on #coursesSection,
  body.hp-discovery-on #schoolAspects {
    scroll-margin-top: 160px;
  }
}
#contactFormTable {
  scroll-margin-top: 112px;
}
#coursesList .course-card {
  transition: opacity 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* —— Testimonials (social proof) —— */
#testimonialsSection {
  margin: 32px 0 24px;
  padding: 28px 12px 24px;
  background: linear-gradient(180deg, #f7fbfd 0%, #eef6fc 100%);
  border-radius: 16px;
  border: 1px solid #d4eaf7;
}
.testimonials-intro {
  text-align: center;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.65;
  margin: 0 auto 22px;
  max-width: 36em;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto 16px;
}
@media (min-width: 600px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}
@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.testimonial-card {
  background: #fff;
  border: 1px solid #c5e3f5;
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 4px 16px rgba(8, 105, 183, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.testimonial-card:hover {
  box-shadow: 0 6px 22px rgba(8, 105, 183, 0.14);
  transform: translateY(-2px);
}
.testimonial-card__header {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px 10px;
}
.testimonial-card__photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d4eaf7;
  background: #eef6fc;
  grid-row: 1 / 3;
}
.testimonial-card__identity {
  min-width: 0;
}
.testimonial-card__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #004175;
  line-height: 1.3;
}
.testimonial-card__location {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #5a7a94;
  line-height: 1.3;
}
.testimonial-card__location i {
  color: #0869b7;
  font-size: 0.72rem;
  margin-right: 2px;
}
.testimonial-card__badge {
  align-self: start;
  justify-self: end;
  grid-column: 3;
  grid-row: 1 / 3;
  font-size: 0.68rem;
  font-weight: 700;
  color: #004175;
  background: #e8f4fc;
  border: 1px solid #b8daf0;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.testimonial-card__badge--accent {
  color: #7a4a00;
  background: #fff8e8;
  border-color: #f0d89a;
}
.testimonial-card__rating {
  margin: 0;
}
.testimonial-card__stars {
  display: inline-flex;
  gap: 3px;
  color: #e6a800;
  font-size: 0.82rem;
}
.testimonial-card__stars .fa-star {
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.06));
}
.testimonial-card__quote {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 0.9rem;
  line-height: 1.75;
  color: #333;
  flex: 1;
}
.testimonial-card__quote p {
  margin: 0;
}
.testimonial-card__quote p::before {
  content: "\201C";
  color: #0869b7;
  font-weight: 700;
  margin-right: 2px;
}
.testimonial-card__role {
  margin: 0;
  font-size: 0.75rem;
  color: #777;
  border-top: 1px dashed #d0e8f5;
  padding-top: 10px;
}
.testimonials-note {
  text-align: center;
  font-size: 0.72rem;
  color: #888;
  margin: 0 0 18px;
}
.testimonials-cta-wrap {
  text-align: center;
}
.testimonials-cta-wrap .orangeBtn,
.testimonials-cta-wrap .testimonials-cta {
  display: inline-block;
  text-decoration: none;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(230, 120, 0, 0.25);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.testimonials-cta-wrap .testimonials-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(230, 120, 0, 0.32);
}
@media (max-width: 420px) {
  .testimonial-card__header {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
  }
  .testimonial-card__photo {
    width: 48px;
    height: 48px;
    grid-row: 1 / 2;
  }
  .testimonial-card__badge {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    margin-top: 2px;
  }
}

/* —— Enrollment progress (goal gradient) —— */
.join-progress {
  max-width: 720px;
  margin: 0 auto 20px;
  padding: 0 8px;
}
.join-progress__bar {
  height: 8px;
  background: #d4e8f5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.join-progress__bar span {
  display: block;
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, #6da993, #3da4ef);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.join-progress__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.join-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #666;
  line-height: 1.35;
}
.join-progress__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f4fa;
  color: #0869b7;
  font-weight: 800;
  font-size: 1rem;
  border: 2px solid #b8d4e8;
}
.join-progress__step.is-current .join-progress__badge {
  background: linear-gradient(#7d89b3, #6da993);
  color: #fff;
  border-color: #6da993;
  box-shadow: 0 2px 8px rgba(109, 169, 147, 0.45);
}
.join-progress__step.is-done .join-progress__badge {
  background: #6da993;
  color: #fff;
  border-color: #6da993;
}
.join-progress__label {
  font-weight: 600;
  color: #333;
}
.join-progress__step.is-current .join-progress__label {
  color: #004175;
}
.join-progress__hint {
  text-align: center;
  font-size: 0.88rem;
  color: #555;
  line-height: 1.6;
  margin: 14px 0 12px;
}
.join-progress__cta {
  display: block;
  max-width: 320px;
  margin: 0 auto;
  text-align: center;
  text-decoration: none;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
}

#stepsToJoin .stepBoxes {
  position: relative;
}
#stepsToJoin .step-num {
  position: absolute;
  top: 10px;
  left: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

@media (max-width: 812px) {
  /* FIX: Search bar — visually lighter on phone (less dominant than header) */
  #hpDiscovery,
  #hpDiscovery.hp-discovery-fixed {
    padding: 6px var(--he-header-pad-x) 7px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6fafd 100%);
    border-bottom-color: #e2eef6;
    box-shadow: none;
  }

  #hpSearchWrap {
    margin-bottom: 4px;
    gap: 6px;
    padding: 0;
  }

  #hpSearchWrap .fa-search {
    font-size: 0.85rem;
    opacity: 0.55;
  }

  #hpCourseSearch.formTextBox {
    font-size: 16px;
    padding: 8px 11px;
    min-height: 38px;
    border-radius: 8px;
    border-color: #d4e6f2;
    box-shadow: none;
    background: #fff;
  }

  #hpCourseSearch.formTextBox::placeholder {
    font-size: 12.5px;
    color: #8fa3b3;
  }

  #hpSearchPills {
    gap: 4px;
  }

  .hp-pill {
    font-size: 10px;
    padding: 3px 8px;
    border-color: #d8e8f2;
    color: #0a5a9e;
  }

  #hpSearchStatus {
    font-size: 10px;
    margin-top: 3px;
  }
}

@media (max-width: 600px) {
  #hpDiscovery.hp-discovery-fixed {
    padding: 6px 10px 7px;
  }
  #hpSearchWrap {
    margin-bottom: 4px;
    gap: 6px;
  }
  #hpCourseSearch.formTextBox {
    font-size: 16px;
    padding: 8px 10px;
    min-height: 38px;
    border-radius: 8px;
  }
  #hpCourseSearch.formTextBox::placeholder {
    font-size: 12px;
  }
  .hp-pill {
    font-size: 10px;
    padding: 3px 8px;
  }
  .openMenu__label {
    font-size: 12px;
  }
  .join-progress__list {
    gap: 4px;
  }
  .join-progress__step {
    font-size: 0.68rem;
  }
  .join-progress__badge {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
}

@media (max-width: 390px) {
  /* iPhone SE / 12 Pro — hide search icon to reduce visual noise */
  #hpSearchWrap .fa-search {
    display: none;
  }

  #hpSearchWrap {
    gap: 0;
  }

  #hpCourseSearch.formTextBox {
    padding-left: 10px;
  }
}

@media (max-width: 375px) {
  #hpDiscovery.hp-discovery-fixed {
    padding: 5px 10px 6px;
  }
  #hpCourseSearch.formTextBox::placeholder {
    font-size: 11.5px;
  }
  #hpSearchPills {
    gap: 3px;
  }
}

/* —— Sticky floating trial CTA (high-conversion) —— */
body.he-floating-cta-on {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 768px) {
  body.he-floating-cta-on {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

.he-floating-cta {
  position: fixed;
  z-index: 1001;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(56px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s ease;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
}
.he-floating-cta.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.he-floating-cta__inner {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  filter: drop-shadow(0 4px 16px rgba(8, 105, 183, 0.28));
}
.he-floating-cta__action {
  width: auto;
  min-width: min(300px, calc(100vw - 72px));
  min-height: 52px;
  padding: 14px 42px 14px 20px;
  margin: 0;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
  color: #fff;
  background-color: #0869b7;
  background-image: linear-gradient(180deg, #3da4ef 0%, #0869b7 52%, #004175 100%);
  box-shadow:
    0 4px 14px rgba(8, 105, 183, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.he-floating-cta__action:hover,
.he-floating-cta__action:focus {
  transform: scale(1.03);
  box-shadow:
    0 6px 20px rgba(8, 105, 183, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  outline: none;
}
.he-floating-cta__action:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px #3da4ef,
    0 6px 20px rgba(8, 105, 183, 0.42);
}
.he-floating-cta__action:active {
  transform: scale(0.98);
}
.he-floating-cta__dismiss {
  position: absolute;
  top: -10px;
  right: -6px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #004175;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 65, 117, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}
.he-floating-cta__dismiss:hover,
.he-floating-cta__dismiss:focus {
  background: #0869b7;
  outline: none;
  transform: scale(1.05);
}
.he-floating-cta__dismiss:focus-visible {
  box-shadow: 0 0 0 3px #3da4ef;
}

@media (min-width: 768px) {
  .he-floating-cta {
    left: auto;
    right: 24px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(56px);
    max-width: none;
  }
  .he-floating-cta.is-visible {
    transform: translateY(0);
  }
  .he-floating-cta__action {
    min-width: 232px;
    font-size: 0.92rem;
    padding: 12px 40px 12px 20px;
    min-height: 48px;
  }
}

@media (max-width: 380px) {
  .he-floating-cta__action {
    font-size: 0.88rem;
    padding: 13px 38px 13px 16px;
    min-width: min(280px, calc(100vw - 56px));
    white-space: normal;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .he-floating-cta {
    transition: opacity 0.2s ease;
    transform: translateX(-50%);
  }
  .he-floating-cta.is-visible {
    transform: translateX(-50%);
  }
  .he-floating-cta__action,
  .he-floating-cta__dismiss {
    transition: none;
  }
  .he-floating-cta__action:hover,
  .he-floating-cta__action:focus {
    transform: none;
  }
  @media (min-width: 768px) {
    .he-floating-cta,
    .he-floating-cta.is-visible {
      transform: none;
    }
  }
}
