/* Hanson English — premium design system (navy · soft blue) */
/* Header: single-row mobile bar, phone pill + navy trial CTA */

:root {
  /* —— Design tokens: color —— */
  --he-header-height: 104px;
  --he-discovery-top: 104px;
  --he-discovery-height: 54px;
  --he-blue-deep: #0c3558;
  --he-blue-primary: #1a6eb5;
  --he-blue-mid: #2b7fc4;
  --he-blue-light: #6eb3e0;
  --he-blue-pale: #edf4fa;
  --he-navy-deep: #0c2842;
  --he-navy-mid: #123d5c;
  --he-navy-light: #1e5f8f;
  --he-text-primary: #0c2842;
  --he-text-secondary: rgba(30, 58, 82, 0.84);
  --he-text-muted: rgba(30, 58, 82, 0.58);
  --he-text-inverse: #fff;
  /* Primary CTA — unified navy (trustworthy, no bronze/orange) */
  --he-cta-solid: #123d5c;
  --he-cta-solid-hover: #1a5278;
  --he-accent-gradient: linear-gradient(180deg, var(--he-navy-light) 0%, var(--he-navy-mid) 50%, var(--he-navy-deep) 100%);
  --he-accent-gradient-hover: linear-gradient(180deg, #2a6fa3 0%, var(--he-navy-mid) 50%, #0a2540 100%);
  --he-cta-red: var(--he-navy-deep);
  --he-warm-cream: #f6f8fb;
  --he-warm-border: rgba(12, 40, 66, 0.1);
  --he-success: #1b7a3a;
  --he-success-pale: #e8f5ec;
  --he-surface: #fff;
  --he-surface-muted: #f6f8fb;
  --he-border: rgba(12, 40, 66, 0.07);
  --he-border-strong: rgba(12, 40, 66, 0.12);

  /* —— Design tokens: typography —— */
  --he-font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --he-font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --he-font-weight-medium: 500;
  --he-font-weight-semibold: 600;
  --he-font-weight-bold: 700;
  --he-font-weight-black: 800;
  --he-line-height-tight: 1.35;
  --he-line-height-snug: 1.5;
  --he-line-height-body: 1.65;
  --he-line-height-loose: 1.75;
  --he-letter-spacing-tight: 0.02em;
  --he-letter-spacing-label: 0.1em;
  --he-letter-spacing-eyebrow: 0.12em;

  /* —— Design tokens: spacing —— */
  --he-space-1: 4px;
  --he-space-2: 8px;
  --he-space-3: 12px;
  --he-space-4: 16px;
  --he-space-5: 20px;
  --he-space-6: 24px;
  --he-space-8: 32px;
  --he-space-10: 40px;
  --he-space-12: 48px;
  --he-space-14: 56px;
  --he-space-16: 64px;

  /* —— Design tokens: radius & elevation —— */
  --he-radius-xs: 8px;
  --he-radius-sm: 11px;
  --he-radius-md: 14px;
  --he-radius-lg: 20px;
  --he-radius-xl: 24px;
  --he-radius-full: 999px;
  --he-shadow-cta-navy: 0 4px 18px rgba(12, 40, 66, 0.22);
  --he-shadow-cta-warm: var(--he-shadow-cta-navy);
  --he-shadow-soft: 0 4px 24px rgba(12, 40, 66, 0.06);
  --he-shadow-card: 0 1px 0 rgba(255, 255, 255, 0.98) inset, 0 1px 3px rgba(12, 40, 66, 0.04), 0 8px 32px rgba(12, 40, 66, 0.05);
  --he-shadow-header: 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 20px rgba(12, 40, 66, 0.06);
  --he-shadow-cta: var(--he-shadow-cta-navy);
  --he-btn-height: 48px;
  --he-btn-radius: 12px;
  --he-btn-padding-x: 1.4em;
  /* 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: var(--he-font-family);
  --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);
  --he-bg-page: linear-gradient(180deg, #fafbfc 0%, #f4f6f9 48%, #eef1f5 100%);
  --he-content-max: 960px;
}

/* —— Global design system: page shell, typography, buttons —— */
body.he-page {
  font-family: var(--he-font-family);
  font-weight: var(--he-font-weight-medium);
  line-height: var(--he-line-height-body);
  letter-spacing: var(--he-letter-spacing-tight);
  color: var(--he-text-secondary);
  background: var(--he-bg-page);
  -webkit-font-smoothing: antialiased;
}
body.he-page #container {
  max-width: none;
  padding: 0;
  background: transparent;
}
body.he-page #contentWrapper[class*="he-"] {
  width: 100%;
  max-width: var(--he-content-max);
  margin: 0 auto;
  padding: 0 var(--he-space-4) var(--he-space-10);
  box-sizing: border-box;
  text-align: left;
}

.he-page-hero {
  padding: var(--he-space-6) var(--he-space-4) var(--he-space-5);
  background:
    radial-gradient(ellipse 120% 90% at 50% -10%, rgba(10, 102, 194, 0.07) 0%, transparent 58%),
    linear-gradient(168deg, #ffffff 0%, #f9fafb 52%, #f2f5f8 100%);
  border-bottom: 1px solid var(--he-border);
}
.he-page-hero--warm {
  background:
    radial-gradient(ellipse 100% 80% at 80% 0%, rgba(10, 102, 194, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 120% 90% at 20% -10%, rgba(10, 102, 194, 0.05) 0%, transparent 55%),
    linear-gradient(168deg, #ffffff 0%, #f9fafb 55%, #f2f5f8 100%);
}
.he-page-hero__inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.he-page-hero__eyebrow {
  margin: 0 0 0.65em;
  font-size: 0.7rem;
  font-weight: var(--he-font-weight-semibold);
  letter-spacing: var(--he-letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--he-hero-eyebrow);
}
.he-page-hero__title {
  margin: 0 0 0.7em;
  font-size: clamp(1.3rem, 5.5vw, 1.8rem);
  font-weight: var(--he-font-weight-black);
  line-height: var(--he-line-height-tight);
  letter-spacing: var(--he-letter-spacing-tight);
  color: var(--he-text-primary);
  text-wrap: balance;
  word-break: keep-all;
}
.he-page-hero__lead {
  margin: 0 0 1em;
  font-size: clamp(0.84rem, 3.2vw, 0.95rem);
  font-weight: var(--he-font-weight-medium);
  line-height: var(--he-line-height-loose);
  color: var(--he-text-secondary);
}
.he-page-hero__br {
  display: none;
}

.he-section-head {
  margin-bottom: var(--he-space-4);
  text-align: center;
}
.he-section-head__title {
  margin: 0 0 0.35em;
  font-family: var(--he-font-serif);
  font-size: clamp(1.1rem, 4.2vw, 1.35rem);
  font-weight: 600;
  color: var(--he-text-primary);
  letter-spacing: 0.05em;
}
.he-section-head__sub {
  margin: 0;
  font-size: 0.82rem;
  font-weight: var(--he-font-weight-medium);
  line-height: var(--he-line-height-snug);
  color: var(--he-text-muted);
}

.he-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  box-sizing: border-box;
  min-height: var(--he-btn-height, var(--he-tap-min));
  padding: 0 var(--he-btn-padding-x);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: var(--he-font-weight-bold);
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-decoration: none;
  border: none;
  border-radius: var(--he-btn-radius);
  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-btn--navy {
  color: var(--he-text-inverse);
  background: linear-gradient(180deg, var(--he-navy-light) 0%, var(--he-navy-mid) 48%, var(--he-navy-deep) 100%);
  box-shadow: var(--he-shadow-cta-navy);
}
.he-btn--navy:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.he-btn--cta,
a.orangeBtn.he-btn--cta,
a.orangeBtn.testimonials-cta,
a.orangeBtn.join-progress__cta,
#contentWrapper a.orangeBtn[href*="contact"] {
  color: var(--he-text-inverse);
  background: var(--he-accent-gradient);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--he-shadow-cta-warm), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.he-btn--cta:hover,
a.orangeBtn.he-btn--cta:hover,
a.orangeBtn.testimonials-cta:hover,
a.orangeBtn.join-progress__cta:hover,
#contentWrapper a.orangeBtn[href*="contact"]:hover {
  background: var(--he-accent-gradient-hover);
  box-shadow: 0 6px 20px rgba(12, 40, 66, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.he-btn--cta:active,
a.orangeBtn.he-btn--cta:active,
a.orangeBtn.testimonials-cta:active,
a.orangeBtn.join-progress__cta:active {
  transform: scale(0.98);
}
.he-btn--outline {
  color: var(--he-navy-mid);
  background: var(--he-surface);
  border: 1px solid var(--he-border-strong);
}
.he-btn--outline:hover {
  background: var(--he-blue-pale);
  border-color: rgba(26, 110, 181, 0.22);
}
.he-btn:focus-visible,
.he-btn--cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(110, 179, 224, 0.5);
}

.he-card {
  background: var(--he-surface);
  border: 1px solid var(--he-border);
  border-radius: var(--he-radius-lg);
  box-shadow: var(--he-shadow-card);
}

.he-trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--he-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.he-trust-pills li {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.42em 0.75em;
  font-size: 0.72rem;
  font-weight: var(--he-font-weight-semibold);
  line-height: 1.35;
  color: rgba(10, 45, 74, 0.88);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--he-border);
  border-radius: var(--he-radius-full);
}
.he-trust-pills i {
  color: var(--he-blue-primary);
  font-size: 0.75em;
}

@media (min-width: 600px) {
  .he-page-hero {
    padding: var(--he-space-8) var(--he-space-6) var(--he-space-6);
  }
  .he-page-hero__br {
    display: inline;
  }
  body.he-page #contentWrapper[class*="he-"] {
    padding: 0 var(--he-space-6) var(--he-space-12);
  }
}

/* —— Header trial CTA (navy, matches .he-btn--cta) —— */
.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-family: inherit;
  font-size: clamp(12px, 2.4vw, 15px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  color: var(--he-text-inverse);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--he-btn-radius);
  background: var(--he-accent-gradient);
  box-shadow: var(--he-shadow-cta-warm), 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;
}
.headerButton i {
  font-size: 0.72em;
  opacity: 0.9;
}
.headerButton:hover {
  background: var(--he-accent-gradient-hover);
  box-shadow: 0 5px 16px rgba(12, 40, 66, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.04);
}
.headerButton:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(12, 40, 66, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.headerButton:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(110, 179, 224, 0.5), var(--he-shadow-cta-warm);
}

/* —— Header shell (all widths): light bar + depth —— */
#header {
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  border-bottom: 1px solid var(--he-border);
  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-mobile-header-pad-y: 8px;
    --he-tap-min: var(--he-mobile-row-h);
    --he-logo-size: var(--he-mobile-row-h);
    /* Fixed total bar (row + vertical padding + notch) — matches #header box exactly */
    --he-header-height: calc(
      var(--he-mobile-row-h) + (var(--he-mobile-header-pad-y) * 2) + env(safe-area-inset-top, 0px)
    );
    --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;
    /* Navy trial CTA (header) */
    --he-mobile-cta-from: var(--he-navy-light);
    --he-mobile-cta-to: var(--he-navy-deep);
    --he-mobile-cta-shadow: var(--he-shadow-cta-navy);
    --he-mobile-cta-hover-shadow: 0 4px 12px rgba(12, 40, 66, 0.28);
    --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) — */
  /* FIX (mobile sticky header): explicit height + top:0 so iOS never clips
     the top of the bar while scrolling (legacy main.css used 104px).
     z-index 1002 stays above discovery (997) and menu drawer (1000). */
  #header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1002;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: var(--he-header-gap);
    height: var(--he-header-height) !important;
    min-height: var(--he-header-height);
    max-height: var(--he-header-height);
    max-width: 100%;
    overflow: visible;
    padding:
      calc(var(--he-mobile-header-pad-y) + env(safe-area-inset-top, 0px))
      calc(var(--he-header-pad-right, var(--he-header-pad-x)) + env(safe-area-inset-right, 0px))
      var(--he-mobile-header-pad-y)
      calc(var(--he-header-pad-x) + env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    text-align: left;
    -webkit-font-smoothing: antialiased;
  }

  .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;
  }

  /* — Navy 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: var(--he-accent-gradient-hover);
    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(12, 40, 66, 0.2);
  }

  /* — 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;
  }

  /* Clear fixed header — overrides main.css 105px; syncs with --he-header-height */
  #container {
    margin-top: var(--he-header-height);
    padding-top: 0;
  }

  #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 — premium navy panel —— */
/* Color unified with site header/buttons (--he-blue-deep → --he-navy-deep).
   Tap targets ≥ 48px (links use 56px). Works with both the new markup
   (header bar + close button + nav wrapper) and legacy pages. */
#menu {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  right: 0 !important;
  top: var(--he-header-height);
  width: min(320px, 88vw);
  max-width: 100%;
  max-height: calc(100vh - var(--he-discovery-top, var(--he-header-height)));
  z-index: 1000;
  visibility: hidden;
  transform: translateX(100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: var(--he-font-family);
  color: #fff;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(110, 179, 224, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, var(--he-blue-deep) 0%, var(--he-navy-deep) 100%);
  border: 0;
  border-top: none;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    -12px 0 32px rgba(8, 22, 38, 0.32),
    inset 1px 0 0 rgba(255, 255, 255, 0.04);
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.36s step-end;
}
#menu.menu-is-open {
  visibility: visible;
  transform: translateX(0);
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s step-start;
}

/* Menu header bar (title + close button) */
.he-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}
#menuSideTitle {
  position: static;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  height: auto;
  left: auto;
  top: auto;
  margin: 0;
  padding: 14px 16px 6px;
  font-family: var(--he-font-serif, var(--he-font-family));
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #fff;
  text-align: left;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.he-menu__head #menuSideTitle {
  padding: 0;
}

/* Close button (× 閉じる) */
.he-menu__close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}
.he-menu__close .he-menu__close-x {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  margin-top: -2px;
}
.he-menu__close:hover,
.he-menu__close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
  outline: none;
}
.he-menu__close:active {
  transform: scale(0.97);
}

/* Log-in — premium white pill, high contrast on navy */
#menu #hpLoginBtn,
#hpLoginBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 16px 4px;
  padding: 0 18px;
  height: 48px;
  min-height: 48px;
  width: auto;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--he-blue-deep);
  text-decoration: none;
  text-align: center;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  box-shadow:
    0 4px 14px rgba(8, 22, 38, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease;
}
#menu #hpLoginBtn i,
#hpLoginBtn i {
  font-size: 16px;
  color: var(--he-blue-primary);
}
#menu #hpLoginBtn:hover,
#menu #hpLoginBtn:focus-visible,
#hpLoginBtn:hover,
#hpLoginBtn:focus-visible {
  background: #f5fbff;
  outline: none;
  box-shadow:
    0 6px 18px rgba(8, 22, 38, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}
#menu #hpLoginBtn:active,
#hpLoginBtn:active {
  transform: scale(0.98);
  box-shadow:
    0 2px 8px rgba(8, 22, 38, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Nav links — large tap targets, premium hover indicator */
#menu .he-menu__nav {
  display: flex;
  flex-direction: column;
  padding: 6px 8px 18px;
}
#menu a:not(#hpLoginBtn) {
  position: relative;
  display: block;
  width: auto !important;
  min-height: 56px;
  margin: 2px 0;
  padding: 12px 16px 12px 22px;
  font-size: 16px !important;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #fff;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.18s ease,
    padding-left 0.18s ease,
    color 0.18s ease;
}
#menu a:not(#hpLoginBtn):last-child {
  border-bottom: none;
}
#menu a:not(#hpLoginBtn)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: var(--he-blue-light);
  transform: translateY(-50%);
  transition:
    height 0.22s ease,
    background 0.22s ease;
}
#menu a:not(#hpLoginBtn):hover,
#menu a:not(#hpLoginBtn):focus-visible {
  background: rgba(255, 255, 255, 0.08);
  padding-left: 26px;
  outline: none;
}
#menu a:not(#hpLoginBtn):hover::before,
#menu a:not(#hpLoginBtn):focus-visible::before {
  height: 26px;
  background: #ffffff;
}
#menu a:not(#hpLoginBtn):active {
  background: rgba(255, 255, 255, 0.12);
}
#menu em {
  display: block;
  margin-top: 4px;
  font-size: 11.5px !important;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  opacity: 1;
}

/* Backdrop refinement */
body.menu-open {
  overflow: hidden;
}
body.menu-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(8, 22, 38, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 998;
  animation: he-menu-backdrop-in 0.28s ease;
}
@keyframes he-menu-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Narrow phones — keep links comfortable, defeat legacy width:27% / 12px rules */
@media (max-width: 500px) {
  #menu a:not(#hpLoginBtn) {
    width: auto !important;
    font-size: 15.5px !important;
    min-height: 54px;
  }
}
@media (max-width: 375px) {
  #menu {
    width: min(300px, 92vw);
  }
  #menu a:not(#hpLoginBtn) {
    width: auto !important;
    font-size: 15px !important;
    min-height: 52px;
    padding: 10px 14px 10px 20px;
  }
  #menu em {
    font-size: 11px !important;
  }
}

/* Desktop / tablet — slightly wider, refined shadow */
@media (min-width: 813px) {
  #menu {
    width: min(360px, 38vw);
    max-height: calc(100vh - var(--he-header-height));
    box-shadow:
      -16px 0 40px rgba(8, 22, 38, 0.28),
      inset 1px 0 0 rgba(255, 255, 255, 0.05);
  }
  #menu a:not(#hpLoginBtn) {
    min-height: 58px;
    font-size: 16px !important;
    padding: 14px 18px 14px 24px;
  }
  #menu #hpLoginBtn,
  #hpLoginBtn {
    margin: 16px 18px 6px;
    height: 50px;
    min-height: 50px;
    font-size: 14.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #menu {
    transition: none;
  }
  #menu a:not(#hpLoginBtn) {
    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-btn-height, var(--he-tap-min, 48px));
  padding: 0 var(--he-btn-padding-x);
  font-family: var(--he-hero-font);
  font-size: clamp(0.86rem, 2.35vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--he-text-inverse);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--he-btn-radius);
  background: var(--he-accent-gradient);
  box-shadow: var(--he-shadow-cta-warm), 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: var(--he-accent-gradient-hover);
  box-shadow: 0 6px 20px rgba(12, 40, 66, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.he-hero__cta:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(12, 40, 66, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.he-hero__cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(110, 179, 224, 0.5), var(--he-shadow-cta-warm);
}
@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: var(--he-space-8) 0 var(--he-space-6);
  padding: var(--he-space-8) var(--he-space-4) var(--he-space-6);
  background: linear-gradient(165deg, #fff 0%, var(--he-blue-pale) 100%);
  border-radius: var(--he-radius-lg);
  border: 1px solid var(--he-border-strong);
  box-shadow: var(--he-shadow-card);
}
.he-section-head--testimonials .he-section-head__title {
  font-family: var(--he-font-serif);
}
.testimonials-proof-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  margin: 0.65em auto 0;
  padding: 0.4em 0.85em;
  font-size: 0.72rem;
  font-weight: var(--he-font-weight-semibold);
  color: var(--he-navy-mid);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--he-border);
  border-radius: var(--he-radius-full);
}
.testimonials-proof-bar__stars {
  display: inline-flex;
  gap: 2px;
  color: #d4a017;
  font-size: 0.68rem;
}
.he-section-head__sub-short {
  display: none;
}
@media (max-width: 479px) {
  .he-section-head__sub-full {
    display: none;
  }
  .he-section-head__sub-short {
    display: block;
  }
}
.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: var(--he-surface);
  border: 1px solid var(--he-border-strong);
  border-radius: var(--he-radius-md);
  padding: var(--he-space-5) var(--he-space-4) var(--he-space-4);
  box-shadow: var(--he-shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--he-space-3);
  transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}
.testimonial-card:hover {
  border-color: var(--he-border-strong);
  box-shadow: 0 6px 24px rgba(12, 40, 66, 0.07);
}
.testimonial-card__header {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px 12px;
}
.testimonial-card__photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
  border: 2px solid #fff;
  background: var(--he-blue-pale);
  grid-row: 1 / 3;
  box-shadow: 0 0 0 1px rgba(12, 40, 66, 0.12), 0 2px 6px rgba(12, 40, 66, 0.1);
}
.testimonial-card__photo[src*="parent-01"] { object-position: 58% 32%; }
.testimonial-card__photo[src*="parent-02"] { object-position: 50% 35%; }
.testimonial-card__photo[src*="parent-03"] { object-position: 55% 30%; }
.testimonial-card__photo[src*="parent-04"] { object-position: 50% 32%; }
.testimonial-card__identity {
  min-width: 0;
}
.testimonial-card__name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--he-text-primary);
  line-height: 1.3;
}
.testimonial-card__location {
  margin: 4px 0 0;
  font-size: 0.76rem;
  color: var(--he-text-muted);
  line-height: 1.3;
}
.testimonial-card__location i {
  color: var(--he-blue-primary);
  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.66rem;
  font-weight: 600;
  color: var(--he-navy-mid);
  background: var(--he-blue-pale);
  border: 1px solid var(--he-border-strong);
  border-radius: var(--he-radius-full);
  padding: 4px 10px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.testimonial-card__badge--accent {
  color: var(--he-navy-mid);
  background: var(--he-blue-pale);
  border-color: rgba(26, 110, 181, 0.2);
}
.testimonial-card__rating {
  margin: 0;
  padding: 0.35em 0 0.15em;
}
.testimonial-card__stars {
  display: inline-flex;
  gap: 4px;
  color: #d4a017;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}
.testimonial-card__stars .fa-star {
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.06));
}
.testimonial-card__stars .fa-regular.fa-star {
  color: rgba(212, 160, 23, 0.32);
  filter: none;
}
.testimonial-card__quote {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 0.86rem;
  line-height: 1.72;
  color: var(--he-text-secondary);
  flex: 1;
}
.testimonial-card__quote p {
  margin: 0;
}
.testimonial-card__quote p::before {
  content: "\201C";
  color: var(--he-blue-primary);
  font-weight: 600;
  margin-right: 2px;
}
.testimonial-card__quote-short {
  display: none;
}
.testimonial-card__role {
  margin: 0;
  font-size: 0.72rem;
  color: var(--he-text-muted);
  border-top: 1px solid var(--he-border);
  padding-top: var(--he-space-3);
}
.testimonials-note {
  text-align: center;
  font-size: 0.7rem;
  color: var(--he-text-muted);
  margin: 0 0 var(--he-space-5);
  letter-spacing: 0.02em;
}
.testimonials-cta-wrap {
  text-align: center;
  padding: 0 var(--he-space-2);
}
.testimonials-cta-wrap .orangeBtn,
.testimonials-cta-wrap .testimonials-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 22rem;
  min-height: var(--he-btn-height);
  margin: 0 auto;
  padding: 0 var(--he-btn-padding-x);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-decoration: none;
  border-radius: var(--he-btn-radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--he-text-inverse);
  background: var(--he-accent-gradient);
  box-shadow: var(--he-shadow-cta-warm), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.testimonials-cta-wrap .testimonials-cta:hover {
  background: var(--he-accent-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(12, 40, 66, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.join-progress__cta.orangeBtn,
.join-progress__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 22rem;
  min-height: var(--he-btn-height);
  margin: 0 auto;
  padding: 0 var(--he-btn-padding-x);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border-radius: var(--he-btn-radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--he-text-inverse);
  background: var(--he-accent-gradient);
  box-shadow: var(--he-shadow-cta-warm);
}
.join-progress__cta:hover {
  background: var(--he-accent-gradient-hover);
  transform: translateY(-1px);
}
@media (max-width: 479px) {
  .testimonial-card__quote-full {
    display: none;
  }
  .testimonial-card__quote-short {
    display: block;
  }
  .testimonial-card {
    padding: var(--he-space-4) var(--he-space-3);
    gap: var(--he-space-2);
  }
  .testimonial-card__quote {
    font-size: 0.82rem;
    line-height: 1.65;
  }
  .testimonials-grid {
    gap: var(--he-space-3);
  }
  #testimonialsSection {
    padding: var(--he-space-6) var(--he-space-3) var(--he-space-5);
    margin-left: calc(-1 * var(--he-space-2));
    margin-right: calc(-1 * var(--he-space-2));
  }
}
@media (max-width: 420px) {
  .testimonial-card__header {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
  }
  .testimonial-card__photo {
    width: 48px;
    height: 48px;
    grid-row: 1 / 2;
    box-shadow: 0 0 0 1px rgba(12, 40, 66, 0.12), 0 1px 4px rgba(12, 40, 66, 0.08);
  }
  .testimonial-card__badge {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    margin-top: 0;
  }
}

/* —— Enrollment progress (navy · blue) —— */
.join-progress {
  max-width: 720px;
  margin: 0 auto 20px;
  padding: 0 8px;
}
.join-progress__bar {
  height: 6px;
  background: var(--he-blue-pale);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.join-progress__bar span {
  display: block;
  height: 100%;
  width: 33%;
  background: var(--he-blue-primary);
  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: var(--he-text-muted);
  line-height: 1.35;
}
.join-progress__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--he-blue-pale);
  color: var(--he-blue-primary);
  font-weight: 800;
  font-size: 1rem;
  border: 2px solid rgba(26, 110, 181, 0.2);
}
.join-progress__step.is-current .join-progress__badge {
  background: var(--he-navy-mid);
  color: #fff;
  border-color: var(--he-navy-mid);
  box-shadow: 0 2px 10px rgba(12, 40, 66, 0.2);
}
.join-progress__step.is-done .join-progress__badge {
  background: var(--he-blue-primary);
  color: #fff;
  border-color: var(--he-blue-primary);
}
.join-progress__label {
  font-weight: 600;
  color: var(--he-text-primary);
}
.join-progress__label-short {
  display: none;
}
.join-progress__step.is-current .join-progress__label {
  color: var(--he-navy-deep);
}
.join-progress__hint {
  text-align: center;
  font-size: 0.88rem;
  color: #555;
  line-height: 1.6;
  margin: 14px 0 12px;
}

#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: 767px) {
  .join-progress__list {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 20rem;
    margin: 0 auto;
  }
  .join-progress__step {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
    padding: 10px 12px;
    background: var(--he-surface);
    border: 1px solid var(--he-border);
    border-radius: var(--he-radius-sm);
  }
  .join-progress__label-full {
    display: none;
  }
  .join-progress__label-short {
    display: inline;
  }
  .join-progress__bar {
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@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__step {
    font-size: 0.8rem;
  }
  .join-progress__badge {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    flex-shrink: 0;
  }
}

@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 (premium bar) —— */
body.he-floating-cta-on {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 768px) {
  body.he-floating-cta-on {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
}

.he-floating-cta {
  position: fixed;
  z-index: 1001;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.42s ease;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.94) 32%, #fff 100%);
}
.he-floating-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.he-floating-cta__inner {
  position: relative;
  display: flex;
  align-items: stretch;
  max-width: 400px;
  margin: 0 auto;
  padding-top: 6px;
  background: #fff;
  border: 1px solid var(--he-border-strong);
  border-radius: var(--he-radius-md);
  box-shadow: 0 6px 28px rgba(12, 40, 66, 0.1), 0 1px 4px rgba(12, 40, 66, 0.05);
}
.he-floating-cta__action {
  flex: 1;
  min-width: 0;
  min-height: var(--he-tap-min);
  padding: 12px 44px 12px 18px;
  margin: 0;
  border: none;
  border-radius: var(--he-radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--he-text-inverse);
  background: var(--he-cta-solid);
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.16s ease, filter 0.16s ease;
}
.he-floating-cta__action:hover,
.he-floating-cta__action:focus {
  background: var(--he-cta-solid-hover);
  outline: none;
}
.he-floating-cta__action:focus-visible {
  outline: 3px solid var(--he-blue-light);
  outline-offset: 2px;
}
.he-floating-cta__action:active {
  filter: brightness(0.96);
}
.he-floating-cta__dismiss {
  position: absolute;
  top: -10px;
  right: -6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--he-border-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--he-text-muted);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(12, 40, 66, 0.08);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.he-floating-cta__dismiss-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.72rem;
  line-height: 1;
}
.he-floating-cta__dismiss:hover,
.he-floating-cta__dismiss:focus {
  background: var(--he-blue-pale);
  color: var(--he-navy-mid);
  border-color: rgba(26, 110, 181, 0.22);
  outline: none;
}
.he-floating-cta__dismiss:focus-visible {
  outline: 2px solid var(--he-blue-light);
  outline-offset: 2px;
}
.he-floating-cta__dismiss:active {
  transform: scale(0.96);
}

@media (min-width: 768px) {
  .he-floating-cta {
    left: auto;
    right: 20px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: auto;
    padding: 0;
    background: transparent;
    transform: translateY(72px);
  }
  .he-floating-cta.is-visible {
    transform: translateY(0);
  }
  .he-floating-cta__inner {
    max-width: none;
    padding-top: 0;
    padding-right: 4px;
    border-radius: var(--he-radius-full);
    overflow: visible;
  }
  .he-floating-cta__action {
    padding: 12px 20px 12px 24px;
    border-radius: var(--he-radius-full) 0 0 var(--he-radius-full);
    background: var(--he-accent-gradient);
    box-shadow: var(--he-shadow-cta-navy);
  }
  .he-floating-cta__action:hover,
  .he-floating-cta__action:focus {
    background: var(--he-accent-gradient-hover);
  }
  .he-floating-cta__dismiss {
    position: static;
    align-self: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    min-width: 36px;
    margin: 0 6px 0 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
  }
  .he-floating-cta__dismiss:hover,
  .he-floating-cta__dismiss:focus {
    background: rgba(12, 40, 66, 0.06);
  }
  .he-floating-cta__dismiss-icon {
    font-size: 0.78rem;
  }
}

@media (max-width: 380px) {
  .he-floating-cta__action {
    font-size: 0.84rem;
    padding: 12px 40px 12px 14px;
  }
  .he-floating-cta__dismiss {
    width: 30px;
    height: 30px;
    min-width: 30px;
    top: -9px;
    right: -4px;
  }
}

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

/* —— Contact / trial signup (unified) —— */
body.he-contact-page {
  font-family: var(--he-hero-font);
  background: linear-gradient(180deg, #f8f9fb 0%, #f0f3f7 52%, #ebeff4 100%);
}
body.he-contact-page #main {
  padding-bottom: 2.75rem;
}
body.he-contact-page #container {
  max-width: none;
  padding: 0;
}
body.he-contact-page #contentWrapper.he-contact-main {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 36px;
  box-sizing: border-box;
}
body.he-contact-page #footer.he-contact-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 10px 12px 12px;
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: rgba(10, 45, 74, 0.34);
  background: linear-gradient(180deg, rgba(248, 249, 251, 0) 0%, rgba(248, 249, 251, 0.92) 28%, #f4f6f9 100%);
  border-top: 1px solid rgba(10, 45, 74, 0.05);
  box-sizing: border-box;
}
body.he-contact-page #footer.he-contact-footer a {
  color: rgba(10, 45, 74, 0.38);
  text-decoration: none;
  transition: color 0.15s ease;
}
body.he-contact-page #footer.he-contact-footer a:hover {
  color: rgba(10, 45, 74, 0.52);
}
.he-contact-footer__sep {
  margin: 0 0.35em;
  opacity: 0.5;
  font-weight: 400;
}
.he-contact-footer__copy {
  font-weight: 500;
}
body.he-contact-page .colWrapper,
body.he-contact-page #contactUsRight {
  display: none;
}

.he-contact-hero {
  padding: 22px 16px 20px;
  background:
    radial-gradient(ellipse 120% 90% at 50% -10%, rgba(10, 102, 194, 0.06) 0%, transparent 58%),
    linear-gradient(168deg, #ffffff 0%, #f9fafb 52%, #f2f5f8 100%);
  border-bottom: 1px solid rgba(10, 45, 74, 0.05);
}
.he-contact-hero__inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}
.he-contact-hero__eyebrow {
  margin: 0 0 0.65em;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--he-hero-eyebrow);
}
.he-contact-hero__title {
  margin: 0 0 0.65em;
  font-size: clamp(1.25rem, 5.2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--he-hero-headline);
  text-wrap: balance;
  word-break: keep-all;
}
.he-contact-hero__lead {
  margin: 0 0 0.9em;
  font-size: clamp(0.82rem, 3.2vw, 0.9rem);
  font-weight: 500;
  line-height: 1.65;
  color: rgba(42, 74, 96, 0.78);
}
.he-contact-hero__br {
  display: none;
}
.he-contact-hero__badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35em 0.5em;
  margin: 0 auto 1em;
  padding: 0.45em 0.95em;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--he-navy-mid);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(10, 102, 194, 0.1);
  border-radius: 999px;
  box-shadow: 0 1px 8px rgba(10, 45, 74, 0.04);
}
.he-contact-hero__badge i {
  color: var(--he-blue-primary);
  font-size: 0.85em;
}
.he-contact-hero__badge-sep {
  opacity: 0.45;
  font-weight: 400;
}
.he-contact-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.he-contact-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 0.7em;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(10, 45, 74, 0.82);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(10, 45, 74, 0.06);
  border-radius: 999px;
}
.he-contact-trust i {
  flex-shrink: 0;
  color: var(--he-blue-primary);
  font-size: 0.68rem;
}

.he-contact-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}
.he-contact-card {
  background: #fff;
  border: 1px solid rgba(10, 45, 74, 0.06);
  border-radius: 20px;
  padding: 22px 18px 24px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 16px rgba(10, 45, 74, 0.05),
    0 8px 28px rgba(10, 45, 74, 0.03);
}
.he-contact-card__title {
  margin: 0 0 0.35em;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--he-hero-headline);
  letter-spacing: 0.03em;
}
.he-contact-card__note {
  margin: 0 0 1.2rem;
  padding-bottom: 1rem;
  font-size: 0.78rem;
  color: rgba(90, 112, 128, 0.88);
  line-height: 1.55;
  border-bottom: 1px solid rgba(10, 45, 74, 0.05);
}

#contactFormTable {
  scroll-margin-top: calc(var(--he-header-height, 104px) + 16px);
}

.he-contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.he-contact-form fieldset.he-contact-field {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
  gap: 8px;
}
.he-contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.he-contact-field--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.he-contact-field__label,
.he-contact-form legend.he-contact-field__label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--he-hero-headline);
  letter-spacing: 0.02em;
  padding: 0;
  line-height: 1.4;
}
.he-contact-field__hint {
  margin: -2px 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(107, 130, 148, 0.85);
}
.he-contact-required {
  display: inline-block;
  margin-left: 0.45em;
  padding: 0.15em 0.5em;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  background: var(--he-navy-mid);
  border-radius: 5px;
  vertical-align: middle;
}
.he-contact-optional {
  display: inline-block;
  margin-left: 0.45em;
  padding: 0.1em 0.45em;
  font-size: 0.66rem;
  font-weight: 600;
  color: #5a7080;
  background: #f0f4f8;
  border-radius: 5px;
}

.he-contact-purpose {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.he-contact-purpose__select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.he-contact-purpose__btn {
  min-height: var(--he-tap-min, 48px);
  padding: 10px 8px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--he-navy-mid);
  background: #f6f9fc;
  border: 1px solid #c8d8e8;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.he-contact-purpose__btn.is-active {
  color: #fff;
  background: linear-gradient(180deg, var(--he-navy-light) 0%, var(--he-navy-mid) 50%, var(--he-navy-deep) 100%);
  border-color: var(--he-navy-deep);
  box-shadow: 0 3px 10px rgba(10, 45, 74, 0.22);
}
.he-contact-purpose__btn:focus-visible {
  outline: 2px solid var(--he-blue-light);
  outline-offset: 2px;
}

.he-contact-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  color: #1a2d3d;
  background: #fafcfd;
  border: 1px solid #c5d4e0;
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.he-contact-input::placeholder {
  color: #94a8b8;
}
.he-contact-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--he-blue-primary);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.16);
}
.he-contact-input--area {
  min-height: 5em;
  max-height: 10em;
  resize: vertical;
  line-height: 1.6;
}

.he-contact-field--submit {
  margin-top: 8px;
  padding-top: 20px;
  gap: 12px;
  border-top: 1px solid rgba(10, 45, 74, 0.06);
}
.he-contact-submit__reassurance {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: var(--he-navy-mid);
  letter-spacing: 0.02em;
}
.he-contact-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  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.24);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.he-contact-submit:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.he-contact-submit:active {
  transform: scale(0.98);
}
.he-contact-submit:focus-visible {
  outline: 3px solid var(--he-blue-light);
  outline-offset: 2px;
}
.he-contact-privacy {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.55;
  text-align: center;
  color: rgba(107, 130, 148, 0.82);
}
.he-contact-privacy a {
  color: rgba(10, 102, 194, 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(10, 102, 194, 0.2);
}
.he-contact-privacy a:hover {
  color: var(--he-blue-mid);
  border-bottom-color: rgba(10, 102, 194, 0.4);
}

.he-contact-aside {
  text-align: center;
  padding: 4px 6px 12px;
}
.he-contact-aside__heading {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5a7080;
  letter-spacing: 0.04em;
}
.he-contact-phone {
  display: block;
  padding: 18px 18px;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(10, 102, 194, 0.16);
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(8, 105, 183, 0.07);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.he-contact-phone:hover {
  background: var(--he-blue-pale);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(8, 105, 183, 0.1);
}
.he-contact-phone__label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: #5a7080;
  margin-bottom: 6px;
}
.he-contact-phone__number {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--he-navy-deep);
  letter-spacing: 0.02em;
}
.he-contact-phone__number i {
  margin-right: 0.35em;
  color: var(--he-blue-primary);
  font-size: 0.92em;
}
.he-contact-aside__hours,
.he-contact-aside__addr {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.55;
  color: rgba(107, 130, 148, 0.88);
}

.he-contact-success {
  padding: 32px 22px;
  text-align: center;
  background: linear-gradient(180deg, #f0faf5 0%, #e6f4ec 100%);
  border: 1px solid #81c995;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(46, 125, 50, 0.08);
}
.he-contact-success__icon {
  font-size: 2.4rem;
  color: #2e7d32;
  margin-bottom: 10px;
}
.he-contact-success__title {
  margin: 0 0 0.55em;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1b5e20;
}
.he-contact-success p {
  margin: 0 0 0.45em;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #2e5c3a;
}
.he-contact-success__brand {
  margin-top: 0.85em !important;
  font-size: 0.78rem !important;
  color: #558b2f !important;
}

@media (max-width: 359px) {
  .he-contact-field--split {
    grid-template-columns: 1fr;
  }
  .he-contact-purpose__btn {
    font-size: 0.74rem;
    padding: 10px 4px;
  }
  .he-contact-trust li {
    font-size: 0.7rem;
    padding: 0.4em 0.6em;
  }
}

@media (min-width: 600px) {
  body.he-contact-page #contentWrapper.he-contact-main {
    max-width: 580px;
    padding: 0 24px 44px;
  }
  body.he-contact-page #footer.he-contact-footer {
    font-size: 0.64rem;
    padding: 11px 16px 14px;
  }
  .he-contact-hero {
    padding: 32px 24px 28px;
  }
  .he-contact-hero__br {
    display: inline;
  }
  .he-contact-layout {
    gap: 24px;
    margin-top: 24px;
  }
  .he-contact-card {
    padding: 28px 28px 30px;
    border-radius: 22px;
  }
  .he-contact-form {
    gap: 22px;
  }
  .he-contact-field--split {
    gap: 16px;
  }
}

/* —— Courses page (premium layout) —— */
body.he-courses-page {
  font-family: var(--he-font-family);
  background: var(--he-bg-page);
}
.he-courses-hero__promise {
  display: flex;
  align-items: flex-start;
  gap: 0.65em;
  margin: 0 0 1em;
  padding: 0.85em 1em;
  text-align: left;
  font-size: clamp(0.78rem, 3vw, 0.84rem);
  font-weight: var(--he-font-weight-medium);
  line-height: 1.65;
  color: var(--he-navy-mid);
  background: var(--he-blue-pale);
  border: 1px solid rgba(10, 102, 194, 0.12);
  border-radius: var(--he-radius-md);
}
.he-courses-hero__promise strong {
  color: var(--he-navy-deep);
  font-weight: var(--he-font-weight-black);
}
.he-courses-hero__promise-icon {
  flex-shrink: 0;
  margin-top: 0.12em;
  color: var(--he-blue-primary);
  font-size: 1.05em;
}

/* Value strip — 教材・設備費無料 */
.he-courses-value {
  margin-top: var(--he-space-6);
  padding: var(--he-space-5) var(--he-space-4);
  text-align: center;
  background: linear-gradient(165deg, var(--he-navy-deep) 0%, var(--he-navy-mid) 55%, #0d4a6e 100%);
  border-radius: var(--he-radius-lg);
  box-shadow: var(--he-shadow-cta-navy);
}
.he-courses-value__kicker {
  margin: 0 0 0.35em;
  font-size: 0.68rem;
  font-weight: var(--he-font-weight-semibold);
  letter-spacing: var(--he-letter-spacing-eyebrow);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.he-courses-value__headline {
  margin: 0 0 0.45em;
  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: var(--he-font-weight-bold);
  line-height: var(--he-line-height-tight);
  color: #fff;
}
.he-courses-value__headline-accent {
  display: block;
  margin-top: 0.15em;
  font-size: clamp(1.35rem, 5.5vw, 1.65rem);
  font-weight: var(--he-font-weight-black);
  letter-spacing: 0.04em;
  color: #fff;
}
.he-courses-value__sub {
  margin: 0 0 0.85em;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.8rem;
  font-weight: var(--he-font-weight-medium);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}
.he-courses-value__from {
  margin: 0;
  padding-top: 0.75em;
  font-size: 0.8rem;
  font-weight: var(--he-font-weight-semibold);
  color: rgba(255, 255, 255, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.he-courses-value__from-label {
  display: block;
  margin-bottom: 0.2em;
  font-size: 0.72rem;
  font-weight: var(--he-font-weight-medium);
  opacity: 0.85;
}
.he-courses-value__from strong {
  font-size: clamp(1.35rem, 5vw, 1.55rem);
  font-weight: var(--he-font-weight-black);
  color: #fff;
  letter-spacing: -0.02em;
}
.he-courses-value__from span {
  font-size: 0.88em;
  font-weight: var(--he-font-weight-bold);
}

.he-courses-compare__included {
  display: inline-block;
  margin-left: 0.25em;
  padding: 0.15em 0.5em;
  font-size: 0.72em;
  font-weight: var(--he-font-weight-bold);
  color: var(--he-blue-deep);
  background: var(--he-blue-pale);
  border-radius: var(--he-radius-xs);
  border: 1px solid rgba(10, 102, 194, 0.15);
}
.he-courses-compare__col-group {
  background: linear-gradient(180deg, var(--he-blue-mid) 0%, var(--he-blue-deep) 100%) !important;
}
.he-courses-compare__group-col {
  background: rgba(232, 244, 252, 0.7);
}
.he-compare-row__meta {
  display: block;
  margin-top: 0.2em;
  font-size: 0.72em;
  font-weight: var(--he-font-weight-medium);
  color: var(--he-text-muted);
}
body.he-courses-page #main {
  padding-bottom: 2.75rem;
}
body.he-courses-page #container {
  max-width: none;
  padding: 0;
  background: transparent;
}
body.he-courses-page #contentWrapper.he-courses-main {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
  box-sizing: border-box;
  text-align: left;
}

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

/* Hero */
.he-courses-hero {
  padding: 28px 16px 26px;
  background:
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(10, 102, 194, 0.09) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  border-bottom: 1px solid var(--he-border);
}
.he-courses-hero__inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.he-courses-hero__eyebrow {
  margin: 0 0 0.65em;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--he-hero-eyebrow);
}
.he-courses-hero__title {
  margin: 0 0 0.65em;
  font-size: clamp(1.4rem, 5.8vw, 1.85rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--he-navy-deep);
  text-wrap: balance;
  word-break: keep-all;
}
.he-courses-hero__br {
  display: none;
}
.he-courses-hero__lead {
  margin: 0 0 1em;
  font-size: clamp(0.84rem, 3.2vw, 0.95rem);
  font-weight: 500;
  line-height: 1.7;
  color: rgba(42, 74, 96, 0.78);
}
.he-courses-hero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 1.15em;
  padding: 0;
  list-style: none;
}
.he-courses-hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.42em 0.75em;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(10, 45, 74, 0.85);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(10, 45, 74, 0.06);
  border-radius: 999px;
}
.he-courses-hero__trust i {
  color: var(--he-blue-primary);
  font-size: 0.75em;
}
.he-courses-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--he-tap-min);
  padding: 0 1.35em;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--he-navy-light) 0%, var(--he-navy-mid) 48%, var(--he-navy-deep) 100%);
  box-shadow: var(--he-shadow-cta-navy);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.he-courses-hero__cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.he-courses-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);
}
.he-courses-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.he-courses-hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 0.5em;
  font-size: 0.82rem;
  font-weight: var(--he-font-weight-semibold);
  color: var(--he-blue-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.he-courses-hero__cta-secondary:hover {
  color: var(--he-blue-deep);
}
.he-courses-hero__cta-secondary:focus-visible {
  outline: 2px solid var(--he-blue-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Section headings */
.he-courses-section-head {
  margin-bottom: 1rem;
  text-align: center;
}
.he-courses-section-head__title {
  margin: 0 0 0.35em;
  font-size: clamp(1.1rem, 4.2vw, 1.35rem);
  font-weight: 800;
  color: var(--he-hero-headline);
  letter-spacing: 0.02em;
}
.he-courses-section-head__sub {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(42, 74, 96, 0.72);
}

/* Comparison table */
.he-courses-compare {
  margin-top: 36px;
  padding: 20px 16px 18px;
  background: #fff;
  border: 1px solid rgba(10, 45, 74, 0.06);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 16px rgba(10, 45, 74, 0.05),
    0 8px 28px rgba(10, 45, 74, 0.03);
}
.he-courses-compare__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 2px 4px 6px;
}
.he-courses-compare__table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  table-layout: fixed;
}
.he-courses-compare__table thead th {
  padding: 14px 10px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  text-align: center;
  background: var(--he-navy-mid);
  border: none;
}
.he-courses-compare__table thead th.he-courses-compare__col-group {
  background: linear-gradient(180deg, var(--he-blue-mid) 0%, var(--he-blue-deep) 100%);
}
.he-courses-compare__table thead th:first-child {
  border-radius: 12px 0 0 0;
  text-align: left;
}
.he-courses-compare__table thead th:last-child {
  border-radius: 0 12px 0 0;
}
.he-courses-compare__table thead th span {
  display: block;
  margin-top: 0.2em;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.88;
}
.he-courses-compare__table tbody th,
.he-courses-compare__table tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(10, 45, 74, 0.08);
  vertical-align: middle;
}
.he-courses-compare__table tbody th {
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--he-hero-headline);
  text-align: left;
  background: rgba(232, 244, 252, 0.45);
}
.he-courses-compare__table tbody td {
  text-align: center;
  background: #fff;
}
.he-courses-compare__table tbody tr:last-child th,
.he-courses-compare__table tbody tr:last-child td {
  border-bottom: none;
}
.he-courses-compare__table tbody tr:last-child th:first-child {
  border-radius: 0 0 0 12px;
}
.he-courses-compare__table tbody tr:last-child td:last-child {
  border-radius: 0 0 12px 0;
}
.he-courses-compare__note {
  display: flex;
  align-items: flex-start;
  gap: 0.45em;
  margin: 12px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(42, 74, 96, 0.7);
}
.he-courses-compare__note i {
  flex-shrink: 0;
  margin-top: 0.15em;
  color: var(--he-blue-primary);
}
.he-compare-cell {
  vertical-align: middle;
}
.he-compare-cell__per {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
  font-weight: var(--he-font-weight-semibold);
  line-height: 1.35;
  color: var(--he-navy-mid);
  letter-spacing: 0.01em;
}
.he-compare-cell__per strong {
  font-size: 1.12em;
  font-weight: var(--he-font-weight-black);
  color: var(--he-navy-deep);
}
.he-compare-cell__per--highlight {
  color: var(--he-blue-deep);
}
.he-compare-cell__per--highlight strong {
  color: var(--he-blue-primary);
}
.he-compare-cell__monthly {
  display: block;
  font-size: 0.68rem;
  font-weight: var(--he-font-weight-medium);
  line-height: 1.3;
  color: var(--he-text-muted);
}
.he-courses-compare__tip {
  display: flex;
  align-items: flex-start;
  gap: 0.45em;
  margin: 14px 0 0;
  padding: 12px 14px;
  font-size: 0.78rem;
  font-weight: var(--he-font-weight-medium);
  line-height: 1.6;
  color: var(--he-navy-mid);
  background: var(--he-blue-pale);
  border-radius: var(--he-radius-md);
  border: 1px solid rgba(10, 102, 194, 0.1);
}
.he-courses-compare__tip i {
  flex-shrink: 0;
  margin-top: 0.12em;
  color: var(--he-blue-primary);
}
.he-courses-compare__tip strong {
  font-weight: var(--he-font-weight-bold);
  color: var(--he-navy-deep);
}
.he-courses-compare__table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.85);
}
.he-courses-compare__table tbody tr:nth-child(even) td.he-courses-compare__group-col {
  background: rgba(232, 244, 252, 0.95);
}

/* Course grid */
.he-courses-list {
  margin-top: 24px;
}
.he-courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.he-course-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(10, 45, 74, 0.06);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 14px rgba(10, 45, 74, 0.05);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.he-course-card.is-dimmed {
  opacity: 0.38;
  pointer-events: none;
}
.he-course-card.is-match {
  box-shadow:
    0 0 0 2px rgba(10, 102, 194, 0.35),
    0 4px 20px rgba(10, 102, 194, 0.12);
}
.he-course-card--highlight {
  border-color: rgba(10, 102, 194, 0.2);
  box-shadow:
    0 0 0 1px rgba(10, 102, 194, 0.12),
    0 2px 14px rgba(10, 102, 194, 0.08);
}
.he-course-card--highlight .he-course-card__visual::after {
  content: "次のステップ";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.32em 0.55em;
  font-size: 0.58rem;
  font-weight: var(--he-font-weight-black);
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--he-blue-primary);
  border-radius: var(--he-radius-xs);
  box-shadow: 0 2px 8px rgba(10, 45, 74, 0.2);
}
.he-course-card__photo-tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 2.4em 10px 10px;
  font-size: clamp(0.72rem, 2.8vw, 0.82rem);
  font-weight: var(--he-font-weight-bold);
  line-height: 1.35;
  color: #fff;
  text-align: left;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 45, 74, 0.88) 100%);
  pointer-events: none;
}
.he-course-card__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--he-blue-pale);
}
.he-course-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.he-course-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  bottom: auto;
  padding: 0.3em 0.55em;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(10, 45, 74, 0.72);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  z-index: 1;
}
.he-course-card__badge--accent {
  background: linear-gradient(135deg, var(--he-blue-mid) 0%, var(--he-blue-deep) 100%);
}
.he-course-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 16px 16px;
}
.he-course-card__title {
  margin: 0 0 0.35em;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--he-hero-headline);
}
.he-course-card__hook {
  margin: 0 0 0.45em;
  font-size: 0.74rem;
  font-weight: var(--he-font-weight-medium);
  line-height: 1.45;
  color: var(--he-text-muted);
}
.he-courses-grid--glance .he-course-card__hook {
  margin-bottom: 0.35em;
  font-size: 0.68rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.he-course-card__tagline {
  margin: 0 0 0.75em;
  font-size: 0.8rem;
  font-weight: var(--he-font-weight-medium);
  line-height: 1.55;
  color: var(--he-text-secondary);
}
.he-course-card__price-glance {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 0.65em;
  padding: 0.55em 0.65em;
  background: var(--he-blue-pale);
  border: 1px solid rgba(10, 102, 194, 0.1);
  border-radius: var(--he-radius-sm);
}
.he-course-card__price-per {
  font-size: 0.8rem;
  font-weight: var(--he-font-weight-semibold);
  line-height: 1.35;
  color: var(--he-navy-mid);
}
.he-course-card__price-per strong {
  font-size: 1.28em;
  font-weight: var(--he-font-weight-black);
  color: var(--he-blue-deep);
  letter-spacing: -0.02em;
}
.he-course-card__price-monthly {
  font-size: 0.68rem;
  font-weight: var(--he-font-weight-medium);
  color: var(--he-text-muted);
  line-height: 1.35;
}
.he-course-card__price-monthly strong {
  font-weight: var(--he-font-weight-bold);
  color: inherit;
}
.he-course-card__price-monthly-note {
  font-size: 0.92em;
  font-weight: var(--he-font-weight-medium);
}
.he-course-card__benefits {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
  flex: 1;
}
.he-course-card__benefits li {
  position: relative;
  padding: 0.35em 0 0.35em 1.35em;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(10, 45, 74, 0.82);
}
.he-course-card__benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--he-blue-light);
  box-shadow: 0 0 0 3px rgba(61, 164, 239, 0.2);
}
.he-course-card__benefits--short {
  margin-bottom: 0.75em;
}
.he-course-card__benefits--short li {
  padding-top: 0.28em;
  padding-bottom: 0.28em;
  font-size: 0.78rem;
}
.he-courses-grid--glance .he-course-card__body {
  padding: 12px 10px 10px;
}
.he-courses-grid--glance .he-course-card__title {
  margin-bottom: 0.4em;
  font-size: 0.95rem;
}
.he-courses-grid--glance .he-course-card__price-glance {
  margin-bottom: 0.55em;
  padding: 0.45em 0.55em;
}
.he-courses-grid--glance .he-course-card__price-per {
  font-size: 0.74rem;
}
.he-courses-grid--glance .he-course-card__more {
  min-height: 40px;
  font-size: 0.78rem;
}
.he-course-card__details {
  margin-top: auto;
}
.he-course-card__details summary {
  list-style: none;
}
.he-course-card__details summary::-webkit-details-marker {
  display: none;
}
.he-course-card__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  width: 100%;
  min-height: 44px;
  padding: 0 1em;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--he-navy-mid);
  cursor: pointer;
  border: 1px solid rgba(10, 45, 74, 0.12);
  border-radius: 11px;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.he-course-card__more::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.7em;
  opacity: 0.55;
  transition: transform 0.2s ease;
}
.he-course-card__details[open] .he-course-card__more {
  color: #fff;
  background: linear-gradient(180deg, var(--he-blue-mid) 0%, var(--he-blue-deep) 100%);
  border-color: transparent;
}
.he-course-card__details[open] .he-course-card__more::after {
  transform: rotate(180deg);
  opacity: 0.9;
}
.he-course-card__more:hover {
  border-color: rgba(10, 102, 194, 0.35);
  background: rgba(232, 244, 252, 0.5);
}
.he-course-card__details[open] .he-course-card__more:hover {
  background: linear-gradient(180deg, var(--he-blue-primary) 0%, var(--he-blue-deep) 100%);
}
.he-course-card__detail-inner {
  margin-top: 12px;
  padding: 14px 14px 4px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.65;
  color: rgba(10, 45, 74, 0.78);
  background: rgba(248, 250, 252, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(10, 45, 74, 0.05);
}
.he-course-card__detail-inner p {
  margin: 0 0 0.75em;
}
.he-course-card__detail-inner ul {
  margin: 0 0 0.75em;
  padding-left: 1.2em;
}

/* Private lesson bridge */
.he-courses-private-bridge {
  margin-top: 28px;
}
.he-courses-private-bridge__inner {
  padding: 22px 18px 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(10, 102, 194, 0.08) 0%, transparent 65%),
    linear-gradient(168deg, #fff 0%, var(--he-blue-pale) 100%);
  border: 1px solid rgba(10, 102, 194, 0.12);
  border-radius: var(--he-radius-lg);
  box-shadow: var(--he-shadow-card);
}
.he-courses-private-bridge__eyebrow {
  margin: 0 0 0.4em;
  font-size: 0.68rem;
  font-weight: var(--he-font-weight-bold);
  letter-spacing: var(--he-letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--he-blue-primary);
}
.he-courses-private-bridge__title {
  margin: 0 0 0.55em;
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-weight: var(--he-font-weight-black);
  line-height: 1.45;
  color: var(--he-hero-headline);
}
.he-courses-private-bridge__text {
  margin: 0 auto 1em;
  max-width: 36em;
  font-size: 0.84rem;
  font-weight: var(--he-font-weight-medium);
  line-height: 1.65;
  color: var(--he-text-secondary);
}
.he-courses-private-bridge__text strong {
  font-weight: var(--he-font-weight-bold);
  color: var(--he-navy-deep);
}
.he-courses-private-bridge__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--he-tap-min);
  padding: 0 1.35em;
  font-size: 0.86rem;
  font-weight: var(--he-font-weight-bold);
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  border-radius: var(--he-radius-sm);
  background: linear-gradient(180deg, var(--he-navy-light) 0%, var(--he-navy-mid) 48%, var(--he-navy-deep) 100%);
  box-shadow: var(--he-shadow-cta-navy);
  transition: transform 0.16s ease, filter 0.16s ease;
}
.he-courses-private-bridge__cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Bottom: campaign + trust */
.he-courses-bottom {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: var(--he-space-5);
}
.he-courses-campaign {
  padding: 24px 20px;
  text-align: center;
  color: #fff;
  background: linear-gradient(145deg, var(--he-navy-mid) 0%, var(--he-navy-deep) 55%, #062238 100%);
  border-radius: 20px;
  box-shadow: var(--he-shadow-cta-navy);
}
.he-courses-campaign__label {
  display: inline-block;
  margin: 0 0 0.5em;
  padding: 0.25em 0.65em;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--he-navy-deep);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 6px;
}
.he-courses-campaign__title {
  margin: 0 0 0.65em;
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 800;
  line-height: 1.45;
}
.he-courses-campaign__price {
  margin: 0 0 0.85em;
  font-size: 1rem;
  font-weight: 500;
}
.he-courses-campaign__price s {
  opacity: 0.65;
  font-size: 0.9em;
}
.he-courses-campaign__price strong {
  font-size: 1.35em;
  font-weight: 800;
  color: #a8d4ff;
}
.he-courses-campaign__price-note {
  display: block;
  margin-top: 0.25em;
  font-size: 0.75rem;
  opacity: 0.85;
}
.he-courses-campaign__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 0 0 1.15em;
  padding: 0;
  list-style: none;
}
.he-courses-campaign__list li {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.78rem;
  font-weight: 600;
}
.he-courses-campaign__list i {
  color: var(--he-blue-light);
}
.he-courses-campaign__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--he-tap-min);
  padding: 0 1.5em;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--he-navy-deep);
  text-decoration: none;
  background: linear-gradient(180deg, #fff 0%, #f0f4f8 100%);
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.he-courses-campaign__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.he-courses-trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.he-courses-trust-item {
  padding: 16px 14px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(10, 45, 74, 0.06);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(10, 45, 74, 0.04);
}
.he-courses-trust-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 0.5em;
  font-size: 1rem;
  color: var(--he-blue-primary);
  background: var(--he-blue-pale);
  border-radius: 50%;
}
.he-courses-trust-item strong {
  display: block;
  margin-bottom: 0.35em;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--he-hero-headline);
}
.he-courses-trust-item p {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(42, 74, 96, 0.75);
}

/* Courses page — mobile text variants (Miller's Law) */
.he-courses-hero__lead-short,
.he-courses-value__sub-short,
.he-courses-section-head__sub-short,
.he-courses-compare__sub-short {
  display: none;
}
.he-courses-hero__lead-full,
.he-courses-value__sub-full,
.he-courses-section-head__sub-full,
.he-courses-compare__sub-full {
  display: inline;
}

.he-courses-social-proof {
  padding: var(--he-space-5) var(--he-space-4);
  text-align: center;
  background: #fff;
  border: 1px solid var(--he-border-strong);
  border-radius: var(--he-radius-lg);
  box-shadow: var(--he-shadow-soft);
}
.he-courses-social-proof__eyebrow {
  margin: 0 0 0.5em;
  font-size: 0.66rem;
  font-weight: var(--he-font-weight-bold);
  letter-spacing: var(--he-letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--he-blue-primary);
}
.he-courses-social-proof__quote {
  margin: 0 0 var(--he-space-3);
  padding: 0;
  border: none;
}
.he-courses-social-proof__quote p {
  margin: 0 0 0.5em;
  font-size: 0.9rem;
  font-weight: var(--he-font-weight-medium);
  line-height: 1.7;
  color: var(--he-text-secondary);
}
.he-courses-social-proof__quote p::before {
  content: "\201C";
  color: var(--he-blue-primary);
  font-weight: 700;
  margin-right: 2px;
}
.he-courses-social-proof__quote footer {
  font-size: 0.72rem;
  font-weight: var(--he-font-weight-semibold);
  color: var(--he-text-muted);
}
.he-courses-social-proof__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--he-space-3);
}
.he-courses-social-proof__stars {
  display: inline-flex;
  gap: 3px;
  color: #d4a017;
  font-size: 0.82rem;
}
.he-courses-social-proof__link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.65em;
  font-size: 0.78rem;
  font-weight: var(--he-font-weight-semibold);
  color: var(--he-blue-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.he-courses-social-proof__link:hover {
  color: var(--he-blue-deep);
}

/* Courses page — tablet+ */
@media (min-width: 600px) {
  .he-courses-hero {
    padding: 36px 24px 32px;
  }
  .he-courses-hero__br {
    display: inline;
  }
  .he-courses-hero__actions {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
  }
  body.he-courses-page #contentWrapper.he-courses-main {
    padding: 0 24px 48px;
  }
  .he-courses-compare {
    padding: 24px 22px 20px;
  }
  .he-courses-compare__table thead th:first-child,
  .he-courses-compare__table tbody th {
    width: 32%;
  }
  .he-courses-compare__table thead th:not(:first-child),
  .he-courses-compare__table tbody td {
    width: 22.66%;
  }
  .he-courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .he-courses-grid--glance {
    gap: 18px;
  }
  .he-courses-trust-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .he-courses-private-bridge__inner {
    padding: 28px 28px 30px;
  }
}

@media (min-width: 900px) {
  body.he-courses-page #contentWrapper.he-courses-main {
    max-width: 1040px;
    padding: 0 24px 40px;
  }
  .he-courses-list {
    margin-top: 18px;
  }
  .he-courses-section-head {
    margin-bottom: 0.75rem;
  }
  .he-courses-value {
    margin-top: var(--he-space-5);
    padding: var(--he-space-4) var(--he-space-5);
  }
  .he-courses-grid--glance {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-items: stretch;
  }
  .he-courses-grid--glance .he-course-card {
    height: 100%;
  }
  .he-courses-grid--glance .he-course-card__visual {
    aspect-ratio: 5 / 3;
  }
  .he-courses-grid--glance .he-course-card__body {
    flex: 1;
    padding: 10px 10px 8px;
  }
  .he-courses-grid--glance .he-course-card__title {
    margin-bottom: 0.35em;
    font-size: 0.9rem;
    line-height: 1.35;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .he-courses-grid--glance .he-course-card__price-glance {
    flex: 1 0 auto;
    justify-content: center;
    gap: 4px;
    margin-bottom: 0.45em;
    padding: 0.45em 0.5em;
    min-height: 3.2em;
  }
  .he-courses-grid--glance .he-course-card__price-per {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--he-text-muted);
    white-space: nowrap;
  }
  .he-courses-grid--glance .he-course-card__price-per strong {
    font-size: 1.15em;
    font-weight: 800;
    color: var(--he-blue-deep);
  }
  .he-courses-grid--glance .he-course-card__price-monthly {
    color: var(--he-navy-mid);
  }
  .he-courses-grid--glance .he-course-card__price-monthly-meta {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--he-text-muted);
    line-height: 1.25;
  }
  .he-courses-grid--glance .he-course-card__price-monthly strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--he-navy-deep);
    letter-spacing: -0.02em;
  }
  .he-courses-grid--glance .he-course-card__price-monthly-note {
    display: block;
    margin-top: 2px;
    font-size: 0.58rem;
    line-height: 1.25;
    color: var(--he-text-muted);
  }
  .he-courses-grid--glance .he-course-card__more {
    min-height: 36px;
    font-size: 0.74rem;
  }
  .he-courses-compare {
    margin-top: 28px;
  }
  .he-compare-cell__per {
    font-size: 0.78rem;
    color: var(--he-text-muted);
  }
  .he-compare-cell__monthly strong {
    display: block;
    margin-top: 2px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--he-navy-deep);
    letter-spacing: -0.02em;
  }
  .he-courses-compare__scroll {
    overflow-x: visible;
  }
  .he-courses-compare__table {
    min-width: 100%;
  }
}

/* Courses page — iPhone SE / narrow */
@media (max-width: 374px) {
  .he-courses-hero__trust li {
    font-size: 0.68rem;
    padding: 0.38em 0.55em;
  }
  .he-courses-grid--glance {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .he-courses-grid--glance .he-course-card__visual {
    aspect-ratio: 16 / 9;
    max-width: 100%;
    margin: 0 auto;
  }
  .he-course-card__body {
    padding: 14px 12px 12px;
  }
  .he-courses-campaign {
    padding: 20px 14px;
  }
}

/* Courses page — mobile: card grid (no horizontal swipe) */
@media (max-width: 599px) {
  .he-courses-hero__lead-full,
  .he-courses-value__sub-full,
  .he-courses-section-head__sub-full,
  .he-courses-compare__sub-full {
    display: none;
  }
  .he-courses-hero__lead-short,
  .he-courses-value__sub-short,
  .he-courses-section-head__sub-short,
  .he-courses-compare__sub-short {
    display: block;
  }
  .he-courses-hero__lead-short {
    display: block;
  }
  .he-courses-grid--glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .he-courses-grid--glance .he-course-card__visual {
    aspect-ratio: 4 / 3;
  }
  .he-courses-grid--glance .he-course-card__body {
    padding: 10px 10px 8px;
  }
  .he-courses-grid--glance .he-course-card__title {
    font-size: 0.88rem;
    margin-bottom: 0.2em;
  }
  .he-courses-grid--glance .he-course-card__more {
    min-height: var(--he-tap-min);
    font-size: 0.76rem;
  }
  .he-courses-hero__actions .he-courses-hero__cta,
  .he-courses-hero__actions .he-courses-hero__cta-secondary {
    width: 100%;
    max-width: 20rem;
    min-height: var(--he-tap-min);
  }
  .he-courses-campaign__cta {
    width: 100%;
    max-width: 20rem;
    min-height: var(--he-tap-min);
  }
  .he-courses-private-bridge .he-btn {
    width: 100%;
    max-width: 20rem;
    min-height: var(--he-tap-min);
  }
  .he-courses-hero__promise {
    text-align: left;
  }
  .he-courses-value {
    padding: var(--he-space-4) var(--he-space-3);
  }
  .he-courses-compare__scroll {
    overflow-x: visible;
    margin: 0;
    padding: 0;
  }
  .he-courses-compare__table {
    min-width: 0;
    display: block;
  }
  .he-courses-compare__table thead {
    display: none;
  }
  .he-courses-compare__table tbody {
    display: flex;
    flex-direction: column;
    gap: var(--he-space-3);
  }
  .he-courses-compare__table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    overflow: hidden;
    background: var(--he-surface);
    border: 1px solid var(--he-border);
    border-radius: var(--he-radius-md);
    box-shadow: 0 2px 10px rgba(10, 45, 74, 0.04);
  }
  .he-courses-compare__table tbody th {
    grid-column: 1 / -1;
    padding: 10px 12px;
    font-size: 0.78rem;
    text-align: center;
    border-bottom: 1px solid var(--he-border);
    border-radius: 0;
  }
  .he-courses-compare__table tbody td {
    padding: 12px 6px 14px;
    font-size: 0.82rem;
    border-bottom: none;
    text-align: center;
  }
  .he-courses-compare__table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-size: 0.58rem;
    font-weight: var(--he-font-weight-semibold);
    line-height: 1.25;
    color: var(--he-text-muted);
    letter-spacing: 0.02em;
  }
  .he-compare-cell__per {
    font-size: 0.8rem;
  }
  .he-compare-cell__per strong {
    font-size: 1.08em;
  }
  .he-compare-cell__monthly {
    font-size: 0.62rem;
  }
  .he-courses-grid--glance .he-course-card__photo-tag {
    font-size: 0.78rem;
    padding: 2em 10px 8px;
  }
  .he-courses-compare__table tbody tr:last-child th:first-child,
  .he-courses-compare__table tbody tr:last-child td:last-child {
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .he-course-card,
  .he-courses-hero__cta,
  .he-courses-campaign__cta {
    transition: none;
  }
}

/* —— Teachers page —— */
body.he-teachers-page #container {
  max-width: none;
  padding: 0;
}

.he-teachers-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--he-space-3);
  margin-top: var(--he-space-5);
}

.he-teachers-trust-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--he-space-3);
  margin: 0 0 var(--he-space-8);
  padding: 0;
  list-style: none;
}
.he-teachers-trust-bar li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0 0.75em;
  align-items: center;
  padding: var(--he-space-4);
  background: var(--he-surface);
  border: 1px solid var(--he-border);
  border-radius: var(--he-radius-md);
  box-shadow: var(--he-shadow-soft);
}
.he-teachers-trust-bar__icon {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.1rem;
  color: var(--he-blue-primary);
  background: var(--he-blue-pale);
  border-radius: var(--he-radius-sm);
}
.he-teachers-trust-bar__label {
  font-size: 0.88rem;
  font-weight: var(--he-font-weight-black);
  color: var(--he-text-primary);
  line-height: 1.3;
}
.he-teachers-trust-bar__desc {
  font-size: 0.75rem;
  font-weight: var(--he-font-weight-medium);
  color: var(--he-text-muted);
  line-height: 1.4;
}

.he-teachers-roster-section {
  margin-bottom: var(--he-space-10);
}
body.he-teachers-page #photoGallery.he-teachers-roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--he-space-3);
  width: 100%;
  text-align: inherit;
}
body.he-teachers-page #photoGallery.he-teachers-roster-grid img {
  width: 100% !important;
  height: 100% !important;
  float: none !important;
  margin: 0 !important;
}
body.he-teachers-page #photoGallery.he-teachers-roster-grid a {
  padding: 0;
  font-size: inherit;
}
.he-teachers-roster-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--he-space-2);
  min-height: var(--he-tap-min);
  padding: var(--he-space-3) var(--he-space-2) var(--he-space-4);
  text-decoration: none;
  text-align: center;
  background: var(--he-surface);
  border: 1px solid var(--he-border);
  border-radius: var(--he-radius-lg);
  box-shadow: var(--he-shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.he-teachers-roster-card:hover,
.he-teachers-roster-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(10, 102, 194, 0.22);
  box-shadow: 0 6px 24px rgba(10, 45, 74, 0.1), var(--he-shadow-card);
}
.he-teachers-roster-card--staff {
  background: linear-gradient(180deg, #fff 0%, var(--he-warm-cream) 100%);
  border-color: var(--he-warm-border);
}
.he-teachers-roster-card.is-dimmed {
  opacity: 0.38;
}
.he-teachers-roster-card.is-match {
  border-color: rgba(10, 102, 194, 0.35);
  box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.18), var(--he-shadow-card);
}
.he-teachers-roster-card__photo {
  display: block;
  width: 100%;
  max-width: 7.5rem;
  aspect-ratio: 1;
  border-radius: var(--he-radius-md);
  overflow: hidden;
  box-shadow: var(--he-hero-image-shadow);
}
.he-teachers-roster-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.he-teachers-roster-card__name {
  font-size: 0.92rem;
  font-weight: var(--he-font-weight-black);
  color: var(--he-text-primary);
  letter-spacing: 0.02em;
}
.he-teachers-roster-card__tag {
  font-size: 0.68rem;
  font-weight: var(--he-font-weight-semibold);
  line-height: 1.35;
  color: var(--he-text-muted);
}

.he-teachers-profiles {
  display: flex;
  flex-direction: column;
  gap: var(--he-space-6);
}
.he-teachers-profiles-head {
  margin-bottom: var(--he-space-2);
}

.he-teacher-card {
  padding: var(--he-space-5);
  background: var(--he-surface);
  border: 1px solid var(--he-border);
  border-radius: var(--he-radius-lg);
  box-shadow: var(--he-shadow-card);
  scroll-margin-top: calc(var(--he-header-height) + var(--he-discovery-height) + 16px);
}
.he-teacher-card--staff {
  background: linear-gradient(168deg, #fff 0%, var(--he-warm-cream) 100%);
  border-color: var(--he-warm-border);
}
.he-teacher-card.is-dimmed {
  opacity: 0.38;
}
.he-teacher-card.is-match {
  border-color: rgba(10, 102, 194, 0.35);
  box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.2), var(--he-shadow-card);
}

.he-teacher-card__header {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--he-space-4);
  margin-bottom: var(--he-space-4);
  padding-bottom: var(--he-space-4);
  border-bottom: 1px solid var(--he-border);
}
.he-teacher-card__photo {
  margin: 0;
  width: 100%;
  max-width: 11rem;
  aspect-ratio: 1;
  border-radius: var(--he-radius-lg);
  overflow: hidden;
  box-shadow: var(--he-hero-image-shadow);
}
.he-teacher-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.he-teacher-card__name {
  margin: 0 0 0.35em;
  font-size: clamp(1.2rem, 4.5vw, 1.45rem);
  font-weight: var(--he-font-weight-black);
  color: var(--he-text-primary);
  line-height: var(--he-line-height-tight);
}
.he-teacher-card__name a {
  color: inherit;
  text-decoration: none;
}
.he-teacher-card__origin {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin: 0 0 0.5em;
  font-size: 0.8rem;
  font-weight: var(--he-font-weight-semibold);
  color: var(--he-text-muted);
}
.he-teacher-card__origin i {
  color: var(--he-blue-primary);
  font-size: 0.85em;
}
.he-teacher-card__specialty {
  margin: 0 0 var(--he-space-3);
  font-size: 0.84rem;
  font-weight: var(--he-font-weight-semibold);
  line-height: var(--he-line-height-snug);
  color: var(--he-navy-mid);
}
.he-teacher-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 var(--he-space-3);
  padding: 0;
  list-style: none;
}
.he-teacher-card__tags li {
  padding: 0.32em 0.65em;
  font-size: 0.68rem;
  font-weight: var(--he-font-weight-bold);
  color: var(--he-navy-mid);
  background: var(--he-blue-pale);
  border: 1px solid rgba(10, 102, 194, 0.12);
  border-radius: var(--he-radius-xs);
}
.he-teacher-card__highlights {
  margin: 0;
  padding: 0;
  list-style: none;
}
.he-teacher-card__highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  margin-bottom: 0.45em;
  font-size: 0.8rem;
  font-weight: var(--he-font-weight-medium);
  line-height: var(--he-line-height-snug);
  color: var(--he-text-secondary);
}
.he-teacher-card__highlights li:last-child {
  margin-bottom: 0;
}
.he-teacher-card__highlights i {
  flex-shrink: 0;
  margin-top: 0.2em;
  font-size: 0.7em;
  color: var(--he-success);
}

.he-teacher-card__intro {
  font-size: 0.88rem;
  font-weight: var(--he-font-weight-medium);
  line-height: var(--he-line-height-loose);
  color: var(--he-text-secondary);
}
.he-teacher-card__intro p {
  margin: 0 0 0.85em;
}
.he-teacher-card__intro p:last-child {
  margin-bottom: 0;
}

.he-teacher-card__english {
  margin-top: var(--he-space-4);
  border: 1px solid var(--he-border);
  border-radius: var(--he-radius-md);
  background: var(--he-surface-muted);
  overflow: hidden;
}
.he-teacher-card__english summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--he-tap-min);
  padding: 0 var(--he-space-4);
  font-size: 0.78rem;
  font-weight: var(--he-font-weight-bold);
  letter-spacing: var(--he-letter-spacing-label);
  text-transform: uppercase;
  color: var(--he-blue-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.he-teacher-card__english summary::-webkit-details-marker {
  display: none;
}
.he-teacher-card__english summary::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: var(--he-font-weight-black);
  line-height: 1;
}
.he-teacher-card__english[open] summary::after {
  content: "−";
}
.he-teacher-card__english-body {
  padding: 0 var(--he-space-4) var(--he-space-4);
  font-size: 0.8rem;
  line-height: var(--he-line-height-loose);
  color: var(--he-text-muted);
}
.he-teacher-card__english-body p {
  margin: 0 0 0.75em;
}
.he-teacher-card__english-body p:last-child {
  margin-bottom: 0;
}

.he-teachers-cta {
  margin-top: var(--he-space-10);
  padding: var(--he-space-6) var(--he-space-5);
  text-align: center;
}
.he-teachers-cta__eyebrow {
  margin: 0 0 0.5em;
  font-size: 0.68rem;
  font-weight: var(--he-font-weight-semibold);
  letter-spacing: var(--he-letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--he-hero-eyebrow);
}
.he-teachers-cta__title {
  margin: 0 0 0.6em;
  font-size: clamp(1.05rem, 4vw, 1.3rem);
  font-weight: var(--he-font-weight-black);
  line-height: var(--he-line-height-tight);
  color: var(--he-text-primary);
}
.he-teachers-cta__lead {
  margin: 0 0 var(--he-space-5);
  font-size: 0.84rem;
  line-height: var(--he-line-height-body);
  color: var(--he-text-secondary);
}
.he-teachers-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--he-space-3);
}

@media (min-width: 480px) {
  .he-teachers-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--he-space-4);
  }
  .he-teachers-roster-card__photo {
    max-width: 8.5rem;
  }
}

@media (min-width: 600px) {
  .he-teachers-trust-bar {
    grid-template-columns: repeat(3, 1fr);
  }
  .he-teachers-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .he-teacher-card__header {
    grid-template-columns: minmax(10rem, 12rem) 1fr;
    align-items: start;
  }
  .he-teacher-card__photo {
    max-width: none;
  }
}

@media (min-width: 768px) {
  .he-teachers-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .he-teachers-roster-card__photo {
    max-width: 9.5rem;
  }
}

@media (min-width: 900px) {
  .he-teachers-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 374px) {
  .he-teachers-roster-grid {
    gap: var(--he-space-2);
  }
  .he-teachers-roster-card {
    padding: var(--he-space-2);
  }
  .he-teachers-roster-card__photo {
    max-width: 6.25rem;
  }
  .he-teachers-hero__actions .he-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .he-teachers-roster-card,
  .he-teachers-hero__actions .he-btn {
    transition: none;
  }
}

/* —— School page (kokubunji) —— */
body.he-school-page #container {
  max-width: none;
  padding: 0;
}
body.he-school-page #contentWrapper.he-school-main {
  max-width: var(--he-content-max);
}

.he-school-hero__location {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45em;
  margin: 0 0 1.1em;
  padding: 0;
}
.he-school-hero__location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.5em 1em;
  font-size: clamp(0.88rem, 3.8vw, 1rem);
  font-weight: var(--he-font-weight-black);
  letter-spacing: 0.03em;
  color: var(--he-navy-deep);
  background: linear-gradient(180deg, #fff 0%, var(--he-blue-pale) 100%);
  border: 1px solid rgba(10, 102, 194, 0.18);
  border-radius: var(--he-radius-full);
  box-shadow: 0 4px 14px rgba(10, 45, 74, 0.08);
}
.he-school-hero__location-badge i {
  color: var(--he-blue-primary);
}
.he-school-hero__location-detail {
  font-size: 0.78rem;
  font-weight: var(--he-font-weight-medium);
  line-height: var(--he-line-height-snug);
  color: var(--he-text-muted);
}
.he-school-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--he-space-3);
  margin-top: var(--he-space-5);
}

/* Classroom gallery — 6 uniform tiles, 2×3 grid */
.he-school-gallery {
  margin-top: var(--he-space-8);
}
.he-school-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--he-space-3);
  max-width: 52rem;
  margin: 0 auto;
}
.he-school-gallery__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--he-radius-lg);
  box-shadow: var(--he-hero-image-shadow);
  background: var(--he-navy-deep);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.he-school-gallery__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(10, 45, 74, 0.14);
}
.he-school-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  vertical-align: middle;
}
.he-school-gallery__item figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0.65em 0.9em;
  font-size: 0.72rem;
  font-weight: var(--he-font-weight-semibold);
  letter-spacing: 0.04em;
  color: var(--he-text-inverse);
  background: linear-gradient(0deg, rgba(10, 45, 74, 0.78) 0%, transparent 100%);
}

/* About */
.he-school-about {
  margin-top: var(--he-space-10);
}
.he-school-about__body {
  padding: var(--he-space-6) var(--he-space-5);
}
.he-school-about__body p {
  margin: 0 0 1em;
  font-size: 0.88rem;
  line-height: var(--he-line-height-loose);
  color: var(--he-text-secondary);
}
.he-school-about__body p:last-of-type {
  margin-bottom: var(--he-space-5);
}
.he-school-about__lead {
  font-size: 0.92rem !important;
  font-weight: var(--he-font-weight-semibold);
  color: var(--he-text-primary) !important;
}
.he-school-about__highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--he-space-3);
  margin: 0;
  padding: var(--he-space-4) 0 0;
  list-style: none;
  border-top: 1px solid var(--he-border);
}
.he-school-about__highlights li {
  display: flex;
  align-items: center;
  gap: var(--he-space-3);
  font-size: 0.84rem;
  line-height: var(--he-line-height-snug);
  color: var(--he-text-secondary);
}
.he-school-about__highlights strong {
  font-weight: var(--he-font-weight-bold);
  color: var(--he-text-primary);
}
.he-school-about__highlight-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 0.95rem;
  color: var(--he-blue-primary);
  background: var(--he-blue-pale);
  border-radius: var(--he-radius-full);
}

/* Access & contact */
.he-school-access {
  margin-top: var(--he-space-10);
  padding-bottom: var(--he-space-4);
}
.he-school-access__info {
  padding: var(--he-space-5);
  margin-bottom: var(--he-space-5);
}
.he-school-access__walk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35em 0.5em;
  margin: 0 0 var(--he-space-4);
  padding: var(--he-space-3) var(--he-space-4);
  font-size: 0.84rem;
  font-weight: var(--he-font-weight-medium);
  line-height: var(--he-line-height-snug);
  color: var(--he-text-secondary);
  background: var(--he-blue-pale);
  border-radius: var(--he-radius-md);
}
.he-school-access__walk i {
  color: var(--he-blue-primary);
}
.he-school-access__walk strong {
  font-size: 0.95rem;
  font-weight: var(--he-font-weight-black);
  color: var(--he-navy-deep);
}
.he-school-access__walk span {
  font-size: 0.78rem;
  color: var(--he-text-muted);
}
.he-school-access__list {
  margin: 0;
}
.he-school-access__row {
  padding: var(--he-space-4) 0;
  border-bottom: 1px solid var(--he-border);
}
.he-school-access__row:first-child {
  padding-top: 0;
}
.he-school-access__row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.he-school-access__row dt {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin: 0 0 0.45em;
  font-size: 0.75rem;
  font-weight: var(--he-font-weight-bold);
  letter-spacing: var(--he-letter-spacing-label);
  text-transform: uppercase;
  color: var(--he-hero-eyebrow);
}
.he-school-access__row dt i {
  color: var(--he-blue-primary);
  font-size: 0.9em;
}
.he-school-access__row dd {
  margin: 0;
  font-size: 0.88rem;
  line-height: var(--he-line-height-body);
  color: var(--he-text-secondary);
}
.he-school-access__row--phone dd {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}
.he-school-access__phone {
  display: inline-block;
  min-height: var(--he-tap-min);
  padding: 0.15em 0;
  font-size: clamp(1.5rem, 6vw, 1.85rem);
  font-weight: var(--he-font-weight-black);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--he-navy-deep);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.he-school-access__phone:hover {
  color: var(--he-blue-primary);
}
.he-school-access__phone-hint {
  font-size: 0.72rem;
  font-weight: var(--he-font-weight-medium);
  color: var(--he-text-muted);
}
.he-school-access__email {
  display: inline-block;
  min-height: var(--he-tap-min);
  padding: 0.35em 0;
  font-size: 0.92rem;
  font-weight: var(--he-font-weight-semibold);
  color: var(--he-blue-primary);
  text-decoration: none;
  word-break: break-all;
}
.he-school-access__email:hover {
  text-decoration: underline;
}

/* Map card — link out, no photo */
.he-school-map-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--he-space-4);
  margin-top: var(--he-space-6);
  padding: var(--he-space-6) var(--he-space-5);
  text-align: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(10, 102, 194, 0.06) 0%, transparent 65%),
    var(--he-surface);
}
.he-school-map-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 1.35rem;
  color: var(--he-blue-primary);
  background: var(--he-blue-pale);
  border-radius: var(--he-radius-full);
}
.he-school-map-card__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--he-space-3);
  width: 100%;
  max-width: 420px;
}
.he-school-map-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: var(--he-font-weight-black);
  letter-spacing: var(--he-letter-spacing-tight);
  color: var(--he-text-primary);
}
.he-school-map-card__note {
  display: flex;
  align-items: center;
  gap: 0.45em;
  margin: 0;
  font-size: 0.82rem;
  font-weight: var(--he-font-weight-medium);
  line-height: var(--he-line-height-snug);
  color: var(--he-text-secondary);
}
.he-school-map-card__note i {
  color: var(--he-blue-primary);
}
.he-school-map-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: var(--he-tap-min);
  padding: 0 1.25em;
  font-size: 0.9rem;
  font-weight: var(--he-font-weight-bold);
  letter-spacing: 0.03em;
  color: var(--he-text-inverse);
  text-decoration: none;
  background: linear-gradient(180deg, var(--he-blue-light) 0%, var(--he-blue-primary) 55%, var(--he-blue-mid) 100%);
  border-radius: var(--he-radius-sm);
  box-shadow: 0 4px 16px rgba(10, 102, 194, 0.28);
  transition: transform 0.16s ease, filter 0.16s ease;
}
.he-school-map-card__btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.he-school-map-card__btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(61, 164, 239, 0.55);
}
.he-school-map-card__hint {
  margin: 0;
  font-size: 0.72rem;
  font-weight: var(--he-font-weight-medium);
  text-align: center;
  color: var(--he-text-muted);
}

.he-school-access__cta {
  display: flex;
  flex-direction: column;
  gap: var(--he-space-3);
  align-items: stretch;
  margin-top: var(--he-space-6);
  padding-top: var(--he-space-2);
}
.he-school-access__cta .he-btn {
  width: 100%;
}

@media (min-width: 600px) {
  .he-school-about__highlights {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--he-space-4);
    padding-top: var(--he-space-5);
  }
  .he-school-about__highlights li {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--he-space-2);
  }
  .he-school-access__cta {
    flex-direction: row;
    justify-content: center;
  }
  .he-school-access__cta .he-btn {
    width: auto;
    min-width: 220px;
  }
}

@media (min-width: 768px) {
  .he-school-gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--he-space-4);
  }
  .he-school-about__body {
    padding: var(--he-space-8) var(--he-space-6);
  }
}

@media (max-width: 374px) {
  .he-school-hero__actions .he-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .he-school-gallery__item,
  .he-school-map-card__btn,
  .he-school-hero__actions .he-btn {
    transition: none;
  }
  .he-school-gallery__item:hover {
    transform: none;
  }
}

/* —— Homepage premium polish —— */
body.he-home-page {
  font-family: var(--he-font-family);
  font-weight: var(--he-font-weight-medium);
  background: #fafbfc;
  -webkit-font-smoothing: antialiased;
}
body.he-home-page #container {
  margin-top: var(--he-header-height);
}
body.he-home-page #menu {
  top: var(--he-header-height);
}
body.he-home-page .he-home-main {
  width: 100%;
  max-width: var(--he-content-max);
  margin: 0 auto;
  padding: 0 var(--he-space-5) var(--he-space-12);
  box-sizing: border-box;
}
body.he-home-page #content,
body.he-home-page .he-home-content {
  max-width: none;
  padding: 0;
}
body.he-home-page #whyMain {
  padding: 0;
}

.he-section-head__eyebrow {
  margin: 0 0 0.5em;
  font-size: 0.68rem;
  font-weight: var(--he-font-weight-semibold);
  letter-spacing: var(--he-letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--he-hero-eyebrow);
}

/* Hero — premium typography & photo blend */
body.he-home-page .he-hero {
  min-height: clamp(300px, 42vw, 520px);
  background: linear-gradient(180deg, #fcfdfe 0%, #f2f5f8 100%);
}
body.he-home-page .he-hero__content {
  padding: clamp(32px, 5.5vw, 64px) clamp(20px, 4vw, 52px);
  background:
    radial-gradient(ellipse 80% 70% at 100% 40%, rgba(10, 102, 194, 0.035) 0%, transparent 55%),
    linear-gradient(168deg, #ffffff 0%, #f8fafc 50%, #f0f4f8 100%);
  z-index: 2;
}
body.he-home-page .he-hero__panel {
  position: relative;
  max-width: min(22em, 100%);
  padding: clamp(24px, 3.5vw, 36px) clamp(22px, 3.2vw, 32px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: var(--he-radius-lg);
  box-shadow:
    0 20px 56px rgba(10, 45, 74, 0.06),
    0 1px 0 rgba(255, 255, 255, 1) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.he-home-page .he-hero__eyebrow {
  margin-bottom: 1.1em;
  padding-bottom: 0.75em;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--he-hero-eyebrow);
  border-bottom: 1px solid rgba(10, 45, 74, 0.07);
}
body.he-home-page .he-hero__eyebrow::before {
  display: none;
}
body.he-home-page .he-hero__headline {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  margin: 0 0 1em;
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.45;
  letter-spacing: 0.06em;
  color: var(--he-hero-headline);
  text-wrap: balance;
  word-break: keep-all;
}
body.he-home-page .he-hero__headline-line {
  display: block;
}
body.he-home-page .he-hero__headline-line--accent {
  font-size: 0.94em;
  letter-spacing: 0.1em;
  color: var(--he-navy-mid);
}
body.he-home-page .he-hero__sub {
  margin: 0 0 1.5em;
  font-weight: 500;
  font-size: clamp(0.78rem, 1.4vw, 0.875rem);
  letter-spacing: 0.08em;
  line-height: 1.75;
  color: var(--he-text-muted);
}
body.he-home-page .he-hero__cta {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  padding: 0 1.5em;
  box-shadow: var(--he-shadow-cta-navy);
}
body.he-home-page .he-hero__visual {
  padding: clamp(16px, 2.8vw, 28px);
  background: linear-gradient(160deg, #eef2f6 0%, #e2e9f0 100%);
  z-index: 1;
}
body.he-home-page .he-hero__image {
  border-radius: var(--he-radius-md);
  box-shadow: 0 16px 48px rgba(10, 45, 74, 0.12);
  filter: contrast(1.02) saturate(1.03);
}
@media (min-width: 768px) {
  body.he-home-page .he-hero__content {
    justify-content: flex-start;
    padding-right: 0;
  }
  body.he-home-page .he-hero__panel {
    max-width: 23em;
    margin-right: -2.5rem;
    margin-bottom: 0;
  }
  body.he-home-page .he-hero__content::after {
    opacity: 0.85;
    width: clamp(32px, 5vw, 64px);
    background: linear-gradient(90deg, transparent 0%, rgba(248, 250, 252, 0.95) 100%);
  }
  body.he-home-page .he-hero__visual {
    padding-left: 0;
  }
}

/* Section rhythm */
body.he-home-page .he-home-content > section {
  margin-top: clamp(52px, 8vw, 72px);
  scroll-margin-top: calc(var(--he-header-height) + 16px);
}
body.he-home-page .he-home-content > section:first-child {
  margin-top: clamp(44px, 6vw, 56px);
}
body.he-home-page .he-section-head {
  margin-bottom: clamp(28px, 4vw, 40px);
}
body.he-home-page .he-section-head__title {
  font-weight: var(--he-font-weight-semibold);
  letter-spacing: 0.05em;
  color: var(--he-text-primary);
}

/* Feature icons — editorial hairline panel, calm & premium */
body.he-home-page .he-section-head--features {
  margin-bottom: clamp(28px, 4vw, 44px);
}
body.he-home-page .he-section-head--features .he-section-head__title {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  letter-spacing: 0.08em;
}
body.he-home-page .he-section-head--features .he-section-head__sub {
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.86rem;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--he-text-muted);
}

body.he-home-page .he-home-features__panel {
  position: relative;
  padding: clamp(28px, 4.5vw, 56px) clamp(12px, 3vw, 36px);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(237, 244, 250, 0.55) 0%, rgba(255, 255, 255, 0) 60%),
    var(--he-surface);
  border: 1px solid var(--he-border);
  border-radius: var(--he-radius-lg);
  box-shadow: var(--he-shadow-soft);
}
/* Top accent hairline — premium editorial cue */
body.he-home-page .he-home-features__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--he-navy-mid) 50%, transparent 100%);
  opacity: 0.7;
  border-radius: 2px;
}

body.he-home-page .he-home-features__grid {
  counter-reset: he-feat;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  body.he-home-page .he-home-features__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

body.he-home-page .he-home-features__item {
  counter-increment: he-feat;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  margin: 0;
  padding: clamp(24px, 4.5vw, 36px) clamp(10px, 2vw, 20px);
  min-height: 8rem;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.25s ease;
}

/* Vertical hairline between columns */
body.he-home-page .he-home-features__item::before {
  content: "";
  position: absolute;
  top: clamp(20px, 4vw, 36px);
  bottom: clamp(20px, 4vw, 36px);
  right: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 40, 66, 0.12) 25%, rgba(12, 40, 66, 0.12) 75%, transparent 100%);
}
body.he-home-page .he-home-features__item:nth-child(2n)::before {
  display: none;
}
/* Horizontal hairline between rows */
body.he-home-page .he-home-features__item::after {
  content: "";
  position: absolute;
  left: clamp(16px, 4vw, 36px);
  right: clamp(16px, 4vw, 36px);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(12, 40, 66, 0.10) 50%, transparent 100%);
}
body.he-home-page .he-home-features__item:nth-last-child(-n+2)::after {
  display: none;
}

@media (min-width: 640px) {
  body.he-home-page .he-home-features__item:nth-child(2n)::before {
    display: block;
  }
  body.he-home-page .he-home-features__item:nth-child(3n)::before {
    display: none;
  }
  body.he-home-page .he-home-features__item:nth-last-child(-n+2)::after {
    display: block;
  }
  body.he-home-page .he-home-features__item:nth-last-child(-n+3)::after {
    display: none;
  }
}

/* Outlined circular icon — refined & premium */
body.he-home-page .he-home-features__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  margin: 1.1rem 0 var(--he-space-4);
  font-size: 1.1rem;
  color: var(--he-navy-mid);
  background: var(--he-surface);
  border: 1px solid rgba(12, 40, 66, 0.18);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 4px var(--he-surface),
    inset 0 0 0 5px rgba(12, 40, 66, 0.04),
    0 1px 2px rgba(12, 40, 66, 0.04);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.25s ease;
}
/* Serif "01–06" eyebrow above each icon */
body.he-home-page .he-home-features__icon::after {
  content: "0" counter(he-feat);
  position: absolute;
  top: -1.55em;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--he-text-muted);
  font-weight: 600;
}
@media (min-width: 640px) {
  body.he-home-page .he-home-features__icon {
    width: 3.4rem;
    height: 3.4rem;
    font-size: 1.2rem;
  }
}

/* Label with small accent hairline above */
body.he-home-page .he-home-features__label {
  position: relative;
  margin: 0;
  padding-top: var(--he-space-4);
  font-size: clamp(0.78rem, 2.2vw, 0.92rem);
  font-weight: var(--he-font-weight-semibold);
  line-height: 1.7;
  color: var(--he-text-primary);
  letter-spacing: 0.04em;
}
body.he-home-page .he-home-features__label::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(12, 40, 66, 0.38) 50%, transparent 100%);
}
body.he-home-page .he-home-features__accent {
  color: var(--he-navy-deep);
  font-weight: var(--he-font-weight-bold);
}
body.he-home-page .he-home-features__br {
  display: none;
}
@media (min-width: 400px) {
  body.he-home-page .he-home-features__br {
    display: inline;
  }
}

/* Hover — lift the icon only (no card box to move) */
body.he-home-page .he-home-features__item:hover .he-home-features__icon {
  color: var(--he-navy-deep);
  border-color: rgba(12, 40, 66, 0.32);
  box-shadow:
    inset 0 0 0 4px var(--he-surface),
    inset 0 0 0 5px rgba(12, 40, 66, 0.06),
    0 6px 18px rgba(12, 40, 66, 0.10);
  transform: translateY(-1px);
}

/* Classroom gallery — temporarily hidden on homepage */
body.he-home-page .he-home-gallery[hidden] {
  display: none !important;
}

/* Classroom photo grid */
.he-home-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--he-space-3);
  max-width: 44rem;
  margin: 0 auto;
}
.he-home-gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--he-radius-md);
  background: var(--he-navy-deep);
  box-shadow: 0 2px 12px rgba(10, 45, 74, 0.06);
}
.he-home-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  vertical-align: middle;
}
@media (min-width: 768px) {
  .he-home-gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--he-space-3);
  }
}

/* Course finder — calm premium band with uniformly sized quick actions + secondary keyword search */
body.he-home-page .he-home-search {
  margin-top: clamp(56px, 8vw, 80px);
  margin-left: calc(-1 * var(--he-space-5));
  margin-right: calc(-1 * var(--he-space-5));
  padding: clamp(40px, 6vw, 60px) var(--he-space-5);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #f4f7fa 0%, #eef2f6 100%);
  border-top: 1px solid var(--he-border);
  border-bottom: 1px solid var(--he-border);
}
body.he-home-page .he-section-head--search {
  margin-bottom: clamp(24px, 3.5vw, 36px);
}
body.he-home-page .he-section-head--search .he-section-head__eyebrow {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--he-text-muted);
  text-transform: uppercase;
}
body.he-home-page .he-section-head--search .he-section-head__title {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  font-size: clamp(1.05rem, 3.4vw, 1.32rem);
  letter-spacing: 0.09em;
  color: var(--he-text-primary);
}
body.he-home-page .he-section-head--search .he-section-head__sub {
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.65;
  letter-spacing: 0.04em;
  color: var(--he-text-muted);
}
body.he-home-page #hpDiscovery,
body.he-home-page #hpDiscovery.he-home-search__inner {
  position: static !important;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* —— Quick actions: uniformly sized premium entry points ——
   Strategy:
   - Outer grid uses minmax(0, 1fr) columns + grid-auto-rows: 1fr → identical widths AND heights
   - Each card uses an internal 3-column grid (icon · text · chevron) for perfect alignment
   - Consistent padding, icon size, label/hint typography and chevron position across all 6 cards
*/
body.he-home-page .he-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.he-home-page .he-quick-actions > li {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 480px) {
  body.he-home-page .he-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
@media (min-width: 820px) {
  body.he-home-page .he-quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

body.he-home-page .he-quick-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px 18px;
  min-height: 76px;
  text-align: left;
  font: inherit;
  color: var(--he-text-primary);
  background: var(--he-surface);
  border: 1px solid var(--he-border-strong);
  border-radius: var(--he-radius-md);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.96) inset,
    0 1px 2px rgba(12, 40, 66, 0.04);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background-color 0.22s ease;
}
body.he-home-page .he-quick-action:hover,
body.he-home-page .he-quick-action:focus-visible {
  border-color: rgba(12, 40, 66, 0.28);
  background-color: #fbfcfe;
  box-shadow: 0 4px 14px rgba(12, 40, 66, 0.07);
  transform: translateY(-1px);
}
body.he-home-page .he-quick-action:focus-visible {
  outline: 2px solid rgba(10, 102, 194, 0.4);
  outline-offset: 2px;
}

body.he-home-page .he-quick-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  font-size: 1rem;
  line-height: 1;
  color: var(--he-navy-mid);
  background: var(--he-surface);
  border: 1px solid rgba(12, 40, 66, 0.16);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 3px var(--he-surface),
    inset 0 0 0 4px rgba(12, 40, 66, 0.04);
  transition: color 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}
body.he-home-page .he-quick-action:hover .he-quick-action__icon,
body.he-home-page .he-quick-action:focus-visible .he-quick-action__icon {
  color: var(--he-navy-deep);
  border-color: rgba(12, 40, 66, 0.28);
}

body.he-home-page .he-quick-action__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}
body.he-home-page .he-quick-action__label {
  font-size: clamp(0.86rem, 2.4vw, 0.93rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--he-text-primary);
}
body.he-home-page .he-quick-action__hint {
  margin-top: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--he-text-muted);
}

body.he-home-page .he-quick-action__chevron {
  flex-shrink: 0;
  margin-left: 0;
  font-size: 0.72rem;
  color: rgba(12, 40, 66, 0.3);
  transition: color 0.22s ease, transform 0.25s ease;
}
body.he-home-page .he-quick-action:hover .he-quick-action__chevron,
body.he-home-page .he-quick-action:focus-visible .he-quick-action__chevron {
  color: var(--he-navy-deep);
  transform: translateX(3px);
}

/* CTA variant — same shell, same dimensions; only the icon carries a subtle navy accent
   to anchor the consult action without breaking visual rhythm */
body.he-home-page .he-quick-action.he-quick-action--cta {
  color: var(--he-text-primary);
  background: var(--he-surface);
  border-color: var(--he-border-strong);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.96) inset,
    0 1px 2px rgba(12, 40, 66, 0.04);
}
body.he-home-page .he-quick-action--cta .he-quick-action__icon {
  color: var(--he-text-inverse);
  background: var(--he-accent-gradient);
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 6px rgba(12, 40, 66, 0.18);
}
body.he-home-page .he-quick-action--cta .he-quick-action__label {
  color: var(--he-text-primary);
}
body.he-home-page .he-quick-action--cta .he-quick-action__hint {
  color: var(--he-text-muted);
}
body.he-home-page .he-quick-action--cta .he-quick-action__chevron {
  color: var(--he-navy-mid);
}
body.he-home-page .he-quick-action.he-quick-action--cta:hover,
body.he-home-page .he-quick-action.he-quick-action--cta:focus-visible {
  background-color: #fbfcfe;
  border-color: rgba(12, 40, 66, 0.28);
  box-shadow: 0 4px 14px rgba(12, 40, 66, 0.08);
  transform: translateY(-1px);
}
body.he-home-page .he-quick-action--cta:hover .he-quick-action__icon,
body.he-home-page .he-quick-action--cta:focus-visible .he-quick-action__icon {
  color: var(--he-text-inverse);
  border-color: transparent;
  background: var(--he-accent-gradient-hover);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 3px 8px rgba(12, 40, 66, 0.22);
}
body.he-home-page .he-quick-action--cta:hover .he-quick-action__chevron,
body.he-home-page .he-quick-action--cta:focus-visible .he-quick-action__chevron {
  color: var(--he-navy-deep);
}

/* Quick action <button>s also carry .hp-pill for JS — keep them identical to the base card */
body.he-home-page .he-quick-action.hp-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px 18px;
  min-height: 76px;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  color: var(--he-text-primary);
  background: var(--he-surface);
  border: 1px solid var(--he-border-strong);
  border-radius: var(--he-radius-md);
}
body.he-home-page .he-quick-action.hp-pill:hover,
body.he-home-page .he-quick-action.hp-pill.is-active {
  background-color: #fbfcfe;
  border-color: rgba(12, 40, 66, 0.28);
  color: var(--he-text-primary);
  box-shadow: 0 4px 14px rgba(12, 40, 66, 0.07);
}

/* —— Refine block: secondary keyword search beneath the quick actions (Progressive Disclosure) —— */
body.he-home-page .he-home-search__refine {
  max-width: 34rem;
  margin: clamp(26px, 3.5vw, 36px) auto 0;
  padding-top: clamp(22px, 3vw, 30px);
}
body.he-home-page .he-home-search__refine-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 var(--he-space-3);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--he-text-muted);
  text-transform: none;
}
body.he-home-page .he-home-search__refine-label::before,
body.he-home-page .he-home-search__refine-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(12, 40, 66, 0.14) 50%, transparent 100%);
}
body.he-home-page .he-home-search__refine-label span {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.he-home-page .he-home-search__field,
body.he-home-page #hpSearchWrap.he-home-search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--he-space-3);
  padding: 0 14px;
  max-width: none;
  background: var(--he-surface);
  border: 1px solid var(--he-border-strong);
  border-radius: var(--he-radius-full);
  box-shadow: 0 1px 3px rgba(10, 45, 74, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
body.he-home-page .he-home-search__field:focus-within {
  border-color: rgba(10, 102, 194, 0.35);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.08);
}
body.he-home-page .he-home-search__icon {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--he-text-muted);
  opacity: 0.6;
}
body.he-home-page #hpCourseSearch.formTextBox,
body.he-home-page .he-home-search__input.formTextBox {
  flex: 1;
  margin: 0;
  padding: 10px 0;
  min-height: 40px;
  font-size: 0.875rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.he-home-page #hpCourseSearch.formTextBox:focus,
body.he-home-page .he-home-search__input.formTextBox:focus {
  outline: none;
  border: none;
  box-shadow: none;
}
body.he-home-page #hpCourseSearch.formTextBox::placeholder,
body.he-home-page .he-home-search__input.formTextBox::placeholder {
  font-size: 0.82rem;
  color: var(--he-text-muted);
  letter-spacing: 0.02em;
}
body.he-home-page .he-home-search__pills,
body.he-home-page #hpSearchPills.he-home-search__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: none;
  margin: 0;
}
body.he-home-page .hp-pill {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 5px 12px;
  letter-spacing: 0.03em;
  color: var(--he-navy-mid);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(10, 45, 74, 0.1);
  border-radius: var(--he-radius-full);
}
body.he-home-page .hp-pill:hover,
body.he-home-page .hp-pill.is-active {
  background: var(--he-navy-mid);
  border-color: var(--he-navy-mid);
  color: var(--he-text-inverse);
  box-shadow: none;
}
body.he-home-page .he-home-search__status,
body.he-home-page #hpSearchStatus.he-home-search__status {
  margin-top: var(--he-space-2);
  text-align: center;
  font-size: 0.72rem;
  color: var(--he-text-muted);
}

/* Testimonials — homepage spacing */
body.he-home-page #testimonialsSection {
  margin-top: var(--he-space-14);
  padding: var(--he-space-10) var(--he-space-5) var(--he-space-8);
}
body.he-home-page .testimonial-card {
  border-color: var(--he-border);
  box-shadow: none;
}
body.he-home-page .testimonial-card:hover {
  box-shadow: 0 4px 18px rgba(10, 45, 74, 0.06);
}

/* Join flow */
body.he-home-page .he-home-join {
  margin-top: var(--he-space-12);
}
body.he-home-page #stepsToJoin.he-home-steps {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: var(--he-space-3);
  max-width: 28rem;
  margin: var(--he-space-6) auto 0;
  padding: 0;
  color: inherit;
}
@media (min-width: 768px) {
  body.he-home-page #stepsToJoin.he-home-steps {
    grid-template-columns: 1fr auto 1fr auto 1fr !important;
    align-items: stretch;
    gap: var(--he-space-2);
    max-width: none;
  }
}
body.he-home-page #stepsToJoin.he-home-steps .stepBoxes {
  display: block;
  border-radius: var(--he-radius-md);
  background: var(--he-surface);
  border: 1px solid var(--he-border);
  color: var(--he-text-primary);
  padding: var(--he-space-5) var(--he-space-4) var(--he-space-4);
}
body.he-home-page #stepsToJoin.he-home-steps .stepBoxes em {
  display: block;
  margin: 0 0 0.5em;
  padding: 0 0 0.5em;
  font-size: 0.95rem;
  font-style: normal;
  font-weight: var(--he-font-weight-bold);
  text-align: left;
  color: var(--he-text-primary);
  border-bottom: 1px solid var(--he-border);
}
body.he-home-page #stepsToJoin.he-home-steps .stepBoxes p {
  margin: 0;
  padding: 0;
  color: var(--he-text-secondary);
  font-size: 0.82rem;
  line-height: var(--he-line-height-loose);
}
body.he-home-page #stepsToJoin .step-num {
  display: none;
}
.he-step__text-short {
  display: none;
}
@media (max-width: 767px) {
  .he-step__text-full {
    display: none;
  }
  .he-step__text-short {
    display: block;
  }
  body.he-home-page #stepsToJoin.he-home-steps .stepBoxes p {
    font-size: 0.8rem;
    line-height: 1.6;
  }
}
body.he-home-page #stepsToJoin .he-home-steps__arrow {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--he-text-muted);
  font-size: 1.1rem;
}
@media (min-width: 768px) {
  body.he-home-page #stepsToJoin .he-home-steps__arrow {
    display: flex;
  }
}

/* Course section intro */
body.he-home-page .he-section-head--courses {
  margin-bottom: clamp(28px, 4vw, 40px);
}
body.he-home-page .he-section-head--courses .he-section-head__title {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  letter-spacing: 0.06em;
}
body.he-home-page .he-section-head__sub--lead {
  max-width: 22em;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(0.82rem, 2.2vw, 0.9rem);
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--he-text-secondary);
}
body.he-home-page .he-section-head__br {
  display: none;
}
@media (min-width: 520px) {
  body.he-home-page .he-section-head__br {
    display: inline;
  }
}

/* Course grid */
body.he-home-page .he-home-courses {
  margin-top: var(--he-space-12);
  padding-bottom: var(--he-space-6);
}
body.he-home-page .he-home-courses .he-section-head {
  margin-bottom: var(--he-space-6);
}
body.he-home-page .he-home-courses__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--he-space-4);
}
@media (min-width: 520px) {
  body.he-home-page .he-home-courses__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  body.he-home-page .he-home-courses__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
body.he-home-page .he-home-courses__grid .course-card {
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 120px;
  border-radius: var(--he-radius-md);
  overflow: hidden;
  border: 1px solid var(--he-border-strong);
  box-shadow: var(--he-shadow-card);
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
body.he-home-page .he-home-courses__grid .course-card:hover {
  box-shadow: 0 6px 24px rgba(10, 45, 74, 0.1);
  transform: translateY(-1px);
}
body.he-home-page .he-home-courses__grid .course-card p {
  display: flex;
  align-items: flex-end;
  min-height: 100%;
  margin: 0;
  background: linear-gradient(0deg, rgba(12, 40, 66, 0.82) 0%, rgba(12, 40, 66, 0.35) 42%, transparent 72%);
  padding: 1em 0.85em 0.8em;
}
body.he-home-page .he-home-courses__grid .course-card a {
  display: block;
  min-height: var(--he-tap-min);
  padding: 0.15em 0;
  color: var(--he-text-inverse);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  font-size: 0.84rem;
  font-weight: var(--he-font-weight-semibold);
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-decoration: none;
}
@media (max-width: 519px) {
  body.he-home-page .he-home-courses__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--he-space-3);
  }
  body.he-home-page .he-home-courses__grid .course-card {
    aspect-ratio: 4 / 3;
    min-height: 100px;
  }
  body.he-home-page .he-home-courses__grid .course-card p {
    padding: 0.85em 0.65em 0.7em;
  }
  body.he-home-page .he-home-courses__grid .course-card a {
    font-size: 0.78rem;
  }
}
@media (max-width: 359px) {
  body.he-home-page .he-home-courses__grid {
    grid-template-columns: 1fr;
  }
  body.he-home-page .he-home-courses__grid .course-card {
    aspect-ratio: 16 / 9;
    max-width: 100%;
  }
}
body.he-home-page .he-home-courses__grid .course-card a i {
  display: none;
}
body.he-home-page .hp-discovery-target.is-match {
  box-shadow: 0 0 0 2px var(--he-blue-primary), var(--he-shadow-soft);
  transform: none;
}
body.he-home-page .hp-discovery-target.is-dimmed {
  opacity: 0.35;
}

@media (max-width: 767px) {
  body.he-home-page .he-hero__panel {
    max-width: none;
    margin-right: 0;
    text-align: center;
  }
  body.he-home-page .he-hero__headline {
    align-items: center;
  }
  body.he-home-page .he-hero__cta {
    width: 100%;
    max-width: 21em;
  }
  body.he-home-page .he-home-search {
    margin-left: calc(-1 * var(--he-space-5));
    margin-right: calc(-1 * var(--he-space-5));
    padding-left: var(--he-space-4);
    padding-right: var(--he-space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .he-home-features__item,
  .he-home-features__icon,
  .he-home-gallery__item,
  body.he-home-page .testimonial-card {
    transition: none;
  }
  body.he-home-page .he-home-features__item:hover .he-home-features__icon {
    transform: none;
  }
}

/* —— Design system v2: global polish & legacy overrides —— */
body.he-page,
body.he-home-page {
  font-family: var(--he-font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.he-page-hero__title,
body.he-page .he-section-head__title {
  font-family: var(--he-font-serif);
  font-weight: 600;
  letter-spacing: 0.05em;
}
/* Neutralize legacy orangeBtn gradient from main.css on public CTAs */
#contentWrapper a.orangeBtn,
.testimonials-cta-wrap a.orangeBtn,
.join-progress a.orangeBtn {
  width: auto;
  max-width: 22rem;
  background-color: transparent;
  background-image: none;
}
#signUpForm .orangeBtn,
form.signup .orangeBtn {
  background-image: linear-gradient(#7d89b3, #6da993);
}
@media (max-width: 389px) {
  .he-hero__cta,
  body.he-home-page .he-hero__cta,
  .testimonials-cta-wrap .testimonials-cta,
  .join-progress__cta {
    width: 100%;
    max-width: none;
    min-height: 48px;
    padding: 0.75em 1em;
    font-size: 0.86rem;
    white-space: normal;
    text-align: center;
  }
  .he-btn {
    min-height: 48px;
    font-size: 0.86rem;
  }
  body.he-page #contentWrapper[class*="he-"] {
    padding-left: var(--he-space-3);
    padding-right: var(--he-space-3);
  }
}
@media (min-width: 768px) {
  body.he-home-page .he-home-content > section {
    margin-top: clamp(60px, 9vw, 80px);
  }
}

/* —— Homepage footer — low-key, premium, translucent navy with light text —— */
body.he-home-page #footer.he-home-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 9px 14px 11px;
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  background: linear-gradient(180deg, rgba(12, 40, 66, 0.72) 0%, rgba(12, 40, 66, 0.92) 100%);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  box-sizing: border-box;
  z-index: 50;
  pointer-events: auto;
}
body.he-home-page #footer.he-home-footer .he-home-footer__inner {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  margin: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}
body.he-home-page #footer.he-home-footer .he-home-footer__brand {
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.72);
}
body.he-home-page #footer.he-home-footer .he-home-footer__meta {
  color: rgba(255, 255, 255, 0.48);
}
body.he-home-page #footer.he-home-footer .he-home-footer__sep {
  display: inline-block;
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.85em;
  transform: translateY(-1px);
}
body.he-home-page #footer.he-home-footer a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.18s ease;
}
body.he-home-page #footer.he-home-footer a:hover,
body.he-home-page #footer.he-home-footer a:focus-visible {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  outline: none;
}
body.he-home-page #footer.he-home-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 419px) {
  body.he-home-page #footer.he-home-footer {
    padding: 8px 10px 10px;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }
  body.he-home-page #footer.he-home-footer .he-home-footer__inner {
    gap: 0.32em;
  }
}

/* ============================================================
   Desktop primary navigation (≥813px)
   Sits as a second row inside the fixed #header, below the
   logo / brand / phone / CTA / menu rail. Mobile (<813px) keeps
   the existing slide-out #menu aside untouched.
   ============================================================ */

/* Hidden by default — mobile uses the slide-out aside */
.he-primary-nav {
  display: none;
}

@media (min-width: 813px) {
  /* Bump header height so #container offset + #menu top stay accurate
     once the nav row is added (brand row ~96px + nav row 48px = ~144px) */
  :root {
    --he-nav-height: 48px;
    --he-header-height: 152px;
    --he-discovery-top: 152px;
  }

  /* Let the header wrap so the nav can become a full-width second row.
     Tighten bottom padding because the nav row supplies its own height. */
  #header {
    flex-wrap: wrap;
    row-gap: 0;
    padding-bottom: 0;
  }

  /* Keep #container clear of the now-taller fixed header on all pages
     (overrides the legacy 105px from main-03-14-v1.css). */
  #container {
    margin-top: var(--he-header-height);
  }

  /* ── Nav row ───────────────────────────────────────────────── */
  .he-primary-nav {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex: 1 1 100%;
    width: 100%;
    margin: 6px -20px 0 -10px;    /* bleed into #header's horizontal padding */
    padding: 0 20px;
    border-top: 1px solid var(--he-border);
    background: linear-gradient(180deg, #fbfcfd 0%, #f3f6fa 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .he-primary-nav__list {
    display: flex;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .he-primary-nav__item {
    list-style: none;
  }

  .he-primary-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--he-nav-height);
    padding: 0 26px;
    color: var(--he-navy-mid);
    font-family: var(--he-font-family);
    font-size: 15px;
    font-weight: var(--he-font-weight-semibold);
    letter-spacing: 0.06em;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    background: transparent;
    transition:
      color 0.18s ease,
      background-color 0.18s ease;
  }

  /* Animated underline that scales from center on hover */
  .he-primary-nav__link::after {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 8px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--he-blue-mid) 0%, var(--he-navy-deep) 100%);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .he-primary-nav__link:hover,
  .he-primary-nav__link:focus-visible {
    color: var(--he-navy-deep);
    background-color: rgba(26, 110, 181, 0.06);
    outline: none;
  }

  .he-primary-nav__link:hover::after,
  .he-primary-nav__link:focus-visible::after {
    transform: scaleX(1);
  }

  .he-primary-nav__link:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(26, 110, 181, 0.45);
    border-radius: 6px;
  }

  /* Active page indicator */
  .he-primary-nav__link[aria-current="page"] {
    color: var(--he-navy-deep);
    font-weight: var(--he-font-weight-bold);
  }

  .he-primary-nav__link[aria-current="page"]::after {
    transform: scaleX(1);
  }
}

/* Compact desktop widths (e.g. 813–1023px): tighter item padding */
@media (min-width: 813px) and (max-width: 1023px) {
  .he-primary-nav__link {
    padding: 0 16px;
    font-size: 14px;
    letter-spacing: 0.04em;
  }

  .he-primary-nav__link::after {
    left: 14px;
    right: 14px;
  }
}
