/**
 * KH8 UI — shared cards, section rhythm, typography helpers
 */

:root {
  /* Spacing scale */
  --kh8-space-1: 0.25rem;
  --kh8-space-2: 0.5rem;
  --kh8-space-3: 1rem;
  --kh8-space-4: 1.5rem;
  --kh8-space-5: 2.5rem;
  --kh8-space-6: 4rem;
  --kh8-section-pad-y: clamp(3.25rem, 8vw, 4.75rem);
  --kh8-section-pad-y-lg: clamp(4.75rem, 9vw, 6.25rem);

  /* Design System v1 — typography */
  --kh8-font-display: 'Libre Baskerville', Georgia, serif;
  --kh8-font-body: 'Source Sans 3', system-ui, -apple-system, sans-serif;

  /* Design System v1 — colours */
  --kh8-forest: #1E3329;
  --kh8-accent: #df9601;
  --kh8-bg-warm-white: #F9F7F4;
  --kh8-bg-cream: #F2EDE4;
  --kh8-text-primary: #1C1917;
  --kh8-text-secondary: #3D3835;
  --kh8-text-tertiary: #6B6460;
  --kh8-text-quaternary: #9B918C;
  --kh8-gold-light: #B8860B;
  --kh8-gold-dark: #D4A017;
  --kh8-border-soft: rgba(40, 67, 56, 0.055);

  /* Legacy text tokens (retained for existing components) */
  --kh8-text: #3D3835;
  --kh8-text-muted: #6B6460;

  /* Footer — calm contrast on green (scoped to .kh8-footer only) */
  --kh8-footer-line: rgba(255, 255, 255, 0.11);
  --kh8-footer-fg: rgba(255, 255, 255, 0.78);
  --kh8-footer-fg-muted: rgba(255, 255, 255, 0.68);
  --kh8-footer-fg-strong: rgba(255, 255, 255, 0.9);
  --kh8-footer-kicker: rgb(225, 151, 1);
  --kh8-footer-legal: rgba(255, 255, 255, 0.52);
}

/* Force KH8 system on body + header (footer uses .kh8-footer only — no bare footer {} rules) */
body,
header {
  font-family: var(--kh8-font-body) !important;
  color: var(--kh8-text);
}

/* Rhythm: main content strips — softer than theme 5px bar, generous vertical space */
section.section-no-margin.kh8-section {
  padding-top: var(--kh8-section-pad-y);
  padding-bottom: var(--kh8-section-pad-y);
  border-top: 1px solid var(--kh8-border-soft);
}

@media (min-width: 992px) {
  section.section-no-margin.kh8-section {
    padding-top: var(--kh8-section-pad-y-lg);
    padding-bottom: var(--kh8-section-pad-y-lg);
  }
}

/* Strip sections: eased handoff into brand / outcomes */
section.section-no-margin.kh8-section.bg-color-primary {
  border-top-color: rgba(255, 255, 255, 0.12);
}

section.section-no-margin.kh8-section.kh8-cta-banner {
  border-top: 1px solid var(--kh8-border-soft);
}

/* Minimal accent line (replaces heavy theme dividers) */
.kh8-rule {
  display: block;
  width: 2.5rem;
  height: 2px;
  margin: 0 0 var(--kh8-space-4);
  padding: 0;
  border: 0;
  background: var(--kh8-accent);
  opacity: 0.9;
}

.text-center .kh8-rule,
.kh8-section-head--center .kh8-rule {
  margin-left: auto;
  margin-right: auto;
}

.kh8-section-head--center {
  text-align: center;
}

.kh8-rule--light {
  background: rgba(255, 255, 255, 0.4);
  opacity: 1;
}

.kh8-section-head {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.kh8-section-head:last-child {
  margin-bottom: 0;
}

.kh8-section-head .kh8-kicker {
  margin-bottom: var(--kh8-space-2);
}

.kh8-section-head .kh8-section-title {
  margin-bottom: var(--kh8-space-3);
}

.kh8-section-head .kh8-rule {
  margin-bottom: var(--kh8-space-4);
}

.kh8-section-head .kh8-section-intro {
  margin-top: 0;
}

/* (canonical .kh8-kicker rule is at the hero/section component block below — removed duplicate here) */

.kh8-section-title {
  font-family: var(--kh8-font-display);
  font-size: clamp(1.5rem, 4vw, 2.375rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-3);
}

.kh8-section-title--light {
  color: #F9F7F4 !important;
}

.kh8-section-title--center {
  text-align: center;
}

.kh8-section-intro {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--kh8-text);
  margin: 0;
  max-width: 38rem;
  font-weight: 400;
}

.kh8-section-intro--wide {
  max-width: none;
}

.kh8-section-intro--center {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.bg-color-primary .kh8-section-intro.text-white {
  color: rgba(255, 255, 255, 0.94);
}

@media (min-width: 992px) {
  .kh8-sidebar-intro .kh8-section-intro {
    margin-bottom: 0;
  }
}

/* Scroll reveal (once) — applied via JS */
.kh8-reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: opacity, transform;
}

.kh8-reveal.kh8-reveal--show {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .kh8-reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}

/* Card — image + title + text */
.kh8-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(40, 67, 56, 0.06);
  box-shadow: 0 1px 2px rgba(39, 44, 40, 0.04), 0 8px 24px rgba(39, 44, 40, 0.06);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

a.kh8-card-link:hover .kh8-card,
a.kh8-card-link:focus-visible .kh8-card {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 4px 12px rgba(39, 44, 40, 0.08), 0 16px 40px rgba(39, 44, 40, 0.1);
}

article.kh8-card.kh8-reveal--show:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 4px 12px rgba(39, 44, 40, 0.08), 0 16px 40px rgba(39, 44, 40, 0.1);
}

.kh8-card--text .kh8-card__body {
  flex: 1;
}

.kh8-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eceee9;
}

.kh8-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale3d(1, 1, 1);
  transform-origin: center center;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.kh8-card__img.kh8-zoom-scroll--in {
  transform: scale3d(1.08, 1.08, 1);
}

@media (prefers-reduced-motion: reduce) {
  .kh8-card__img {
    transition: none;
    will-change: auto;
  }

  .kh8-card__img.kh8-zoom-scroll--in {
    transform: none;
  }
}

/* Full-width images — clip zoom (no layout shift) */
.kh8-zoom-scope {
  overflow: hidden;
  display: block;
}

.kh8-zoom-scope > img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale3d(1, 1, 1);
  transform-origin: center center;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.kh8-zoom-scope > img.kh8-zoom-scroll--in {
  transform: scale3d(1.08, 1.08, 1);
}

@media (prefers-reduced-motion: reduce) {
  .kh8-zoom-scope > img {
    transition: none;
    will-change: auto;
  }

  .kh8-zoom-scope > img.kh8-zoom-scroll--in {
    transform: none;
  }
}

/* Parallax / band backgrounds — zoom inside overflow */
.kh8-zoom-scroll-bg {
  transform: scale3d(1, 1, 1);
  transform-origin: center center;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.kh8-zoom-scroll-bg.kh8-zoom-scroll--in {
  transform: scale3d(1.08, 1.08, 1);
}

.parallax-img.kh8-zoom-scroll-bg {
  overflow: hidden;
  background-size: cover;
  background-position: center center;
}

@media (prefers-reduced-motion: reduce) {
  .kh8-zoom-scroll-bg {
    transition: none;
    will-change: auto;
  }

  .kh8-zoom-scroll-bg.kh8-zoom-scroll--in {
    transform: none;
  }
}

.kh8-card__body {
  padding: var(--kh8-space-4) 1.25rem 1.375rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.kh8-card__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-2);
  letter-spacing: -0.01em;
}

.kh8-card__title.text-uppercase {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--kh8-forest);
}

.kh8-card__text {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--kh8-text-muted);
  margin: 0;
}

a.kh8-card-link {
  color: inherit;
  text-decoration: none;
}

a.kh8-card-link:focus-visible {
  outline: 2px solid rgb(223, 150, 1);
  outline-offset: 2px;
}

a.kh8-card-link.kh8-reveal {
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* Welcome panel — brand block, no image */
.kh8-welcome-panel {
  border-radius: 10px;
  padding: var(--kh8-space-5) var(--kh8-space-4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .kh8-welcome-panel {
    padding: 2.75rem 3rem;
  }
}

.kh8-welcome-panel p {
  font-size: 0.9375rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.kh8-welcome-panel .kh8-quote-mark {
  font-size: 2.5rem;
  line-height: 0;
  vertical-align: bottom;
  color: rgb(223, 150, 1);
}

/* Hero — photo on slide, ::before = dark overlay only */
.kh8-hero-slide {
  position: relative;
  min-height: 100vh;
  padding-top: 2rem;
  overflow: hidden;
  background-color: #1a1f1c;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.kh8-hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.kh8-hero-slide > .container {
  position: relative;
  z-index: 2;
}

.kh8-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  min-height: calc(100vh - 2rem);
  padding: var(--kh8-space-5) 0 var(--kh8-space-6);
}

.kh8-hero-heading {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 var(--kh8-space-4);
  font-size: clamp(1.35rem, 3.5vw, 2.125rem);
  line-height: 1.18;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

/* Outcome-led primary slide — dominant headline */
.kh8-hero-heading--lead {
  font-size: clamp(1.75rem, 5.5vw, 3.125rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 auto var(--kh8-space-5);
  max-width: min(40rem, 92vw);
  text-transform: none;
}

@media (min-width: 768px) {
  .kh8-hero-heading--lead {
    margin-bottom: 1.75rem;
  }
}

.kh8-hero-inner--lead .kh8-hero-sub--lead {
  margin-left: auto;
  margin-right: auto;
}

.kh8-hero-sub {
  font-size: clamp(0.9375rem, 2.2vw, 1.125rem);
  font-weight: 400;
  line-height: 1.52;
  margin: 0 0 var(--kh8-space-4);
  max-width: 28rem;
  opacity: 0.95;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.3);
  color:white;
}

.kh8-hero-sub--lead {
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  font-weight: 500;
  line-height: 1.55;
  max-width: 36rem;
  margin: 0 auto var(--kh8-space-5);
  opacity: 0.94;
}

.kh8-hero-trust {
  font-size: 0.8125rem;
  line-height: 1.45;
  margin: 0 auto var(--kh8-space-6);
  max-width: 32rem;
  opacity: 0.9;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

@media (min-width: 768px) {
  .kh8-hero-trust {
    font-size: 0.84375rem;
    margin-bottom: 2.75rem;
  }
}

.kh8-hero-tagline {
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0 0 var(--kh8-space-5);
  max-width: 34rem;
  opacity: 0.92;
  letter-spacing: 0.02em;
}

.kh8-hero-textlink {
  color: #fff !important;
  font-weight: 700;
  text-decoration: underline !important;
  text-underline-offset: 4px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.kh8-hero-textlink:hover {
  color: #fff !important;
  opacity: 0.92;
}

.kh8-hero-linknote {
  margin-top: var(--kh8-space-4) !important;
  margin-bottom: 0 !important;
}

/* Trust bar — below hero */
.kh8-trust-bar {
  background: #fff;
  border-top: 1px solid var(--kh8-border-soft);
  border-bottom: 1px solid var(--kh8-border-soft);
  padding: 1.75rem 0;
}

@media (min-width: 992px) {
  .kh8-trust-bar {
    padding: 2rem 0 2.125rem;
  }
}

.kh8-trust-bar__row {
  margin-left: 0;
  margin-right: 0;
}

.kh8-trust-bar__cell {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

@media (min-width: 992px) {
  .kh8-trust-bar__cell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .kh8-trust-bar__cell:not(:last-child) {
    border-right: 1px solid rgba(40, 67, 56, 0.08);
  }
}

.kh8-trust-bar__label {
  font-size: 0.8125rem;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--kh8-forest);
  margin: 0;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* Mid-page CTA — after Academic Pathways */
.kh8-mid-cta {
  background: linear-gradient(to bottom, #fafbfb 0%, #f4f6f5 42%, #f1f4f2 100%);
  border-top: 1px solid var(--kh8-border-soft);
  border-bottom: 1px solid var(--kh8-border-soft);
  padding: clamp(2.75rem, 6vw, 3.75rem) 0;
}

@media (min-width: 992px) {
  .kh8-mid-cta {
    padding: clamp(3.25rem, 6vw, 4.25rem) 0;
  }
}

.kh8-mid-cta__title {
  font-size: clamp(1.3125rem, 2.8vw, 1.75rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-3);
}

.kh8-mid-cta__text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--kh8-text);
  margin: 0 auto var(--kh8-space-5);
  max-width: 32rem;
}

.kh8-mid-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kh8-space-3);
  justify-content: center;
  align-items: center;
}

@media (min-width: 576px) {
  .kh8-mid-cta__actions .kh8-btn {
    min-width: 11.5rem;
  }
}

@media (min-width: 992px) {
  .kh8-trust-bar__label {
    font-size: 0.84375rem;
    line-height: 1.4;
  }
}

.kh8-trust-bar__creds {
  margin-top: var(--kh8-space-4);
  padding-top: var(--kh8-space-4);
  border-top: 1px solid rgba(40, 67, 56, 0.08);
}

.kh8-trust-bar__creds-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kh8-text-muted);
  margin: 0 0 var(--kh8-space-3);
}

.kh8-trust-bar__creds-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--kh8-space-4) var(--kh8-space-5);
  margin: 0;
  padding: 0;
}

.kh8-trust-bar__creds-list li {
  margin: 0;
}

.kh8-trust-bar__cred-link {
  display: inline-block;
  line-height: 0;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.kh8-trust-bar__cred-link:hover,
.kh8-trust-bar__cred-link:focus {
  opacity: 1;
}

.kh8-trust-bar__cred-logo {
  height: auto;
  max-height: 2.25rem;
  width: auto;
  max-width: 7.5rem;
  object-fit: contain;
}

.kh8-trust-bar__cred-more {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--kh8-forest);
  text-decoration: none;
  border-bottom: 1px solid rgba(40, 67, 56, 0.2);
}

.kh8-trust-bar__cred-more:hover,
.kh8-trust-bar__cred-more:focus {
  color: var(--kh8-accent);
  border-bottom-color: var(--kh8-accent);
}

/* Conversion CTAs */
.kh8-btn {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  text-decoration: none !important;
  text-align: center;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

/* Variant rules consolidated into the Design System section below (line ~2640).
   Removed legacy duplicates here to prevent !important cascade conflicts. */

.kh8-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: var(--kh8-space-3);
  width: 100%;
  max-width: 22rem;
  margin-top: var(--kh8-space-4);
}

.kh8-hero-inner--lead .kh8-hero-actions {
  margin-top: 0;
}

@media (min-width: 576px) {
  .kh8-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    max-width: none;
    width: auto;
  }

  .kh8-hero-actions .kh8-btn {
    min-width: 12rem;
  }
}

.kh8-hero-actions .kh8-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.kh8-hero-actions .kh8-btn--gold:focus-visible {
  outline-color: #fff;
}

/* Bottom conversion band */
section.section-no-margin.kh8-section.kh8-cta-banner {
  background: #f0f2f1;
}

.kh8-cta-banner {
  border-bottom: 1px solid var(--kh8-border-soft);
}

.kh8-cta-banner .kh8-section-head {
  margin-bottom: 0;
}

.kh8-cta-banner .kh8-section-title {
  margin-bottom: var(--kh8-space-3);
}

.kh8-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--kh8-space-3);
  margin-top: var(--kh8-space-2);
}

@media (min-width: 576px) {
  .kh8-cta-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
}

/* Student outcomes */
.kh8-outcomes-head {
  margin-bottom: clamp(2.25rem, 5vw, 3rem);
}

.kh8-outcomes-head .kh8-section-intro {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 36rem;
}

.kh8-outcomes-head .kh8-section-title.text-color-light {
  color: rgba(255, 255, 255, 0.98);
}

.kh8-outcomes-context {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72) !important;
  margin: var(--kh8-space-4) auto 0;
  max-width: 28rem;
  line-height: 1.45;
}

.kh8-stat-value {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  color: #e09701;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.kh8-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #e09701;
  margin: var(--kh8-space-3) 0 0;
  line-height: 1.4;
  text-transform: uppercase;
  max-width: 12rem;
  margin-left: auto;
  margin-right: auto;
}

/* Sidebar + grid alignment */
@media (min-width: 992px) {
  .kh8-sidebar-intro {
    padding-right: clamp(1.5rem, 3vw, 2.75rem);
  }

  /* Align sidebar title block optically with first row of cards */
  .kh8-sidebar-intro .kh8-section-head .kh8-kicker:first-child {
    margin-top: 0.125rem;
  }
}

/* Full-bleed imagery — breathe between content bands */
.kh8-visual-break {
  display: block;
  margin: clamp(3rem, 8vw, 5rem) 0;
}

.kh8-visual-break--band {
  margin-top: clamp(2.75rem, 7vw, 4.25rem);
  margin-bottom: clamp(2.75rem, 7vw, 4.25rem);
}

/* Modals / Magnific — clean content */
.kh8-dialog-plain {
  background: #fff;
}

/* -------------------------------------------------------------------------- */
/* KH8 header — cream panel, Source Sans 3 typography, no inline clutter      */
/* -------------------------------------------------------------------------- */

#header.side-header.kh8-header {
  background: #fefbe9;
}

.kh8-header-column {
  gap: var(--kh8-space-3);
}

.kh8-header-logo {
  margin: var(--kh8-space-3) 0;
}

.kh8-header-logo img {
  display: block;
  max-width: 100%;
}

.kh8-header-nav-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-right: var(--kh8-space-2);
}

.kh8-header-nav-scroll-area::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#mainNav.kh8-header-main-nav {
  flex-direction: column;
  flex-wrap: nowrap;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

#mainNav.kh8-header-main-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#header.kh8-header #mainNav > li {
  margin-bottom: 0.2rem;
}

#header.kh8-header #mainNav > li:last-child {
  margin-bottom: 0;
}

/* Sidebar — primary nav: slightly larger, more air */
#header.kh8-header .header-nav-main nav > ul > li > a.dropdown-item,
#header.kh8-header .header-nav-main nav > ul > li > a.dropdown-item.dropdown-toggle {
  font-family: var(--kh8-font-body) !important;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  text-transform: none;
  color: var(--kh8-forest) !important;
  padding: 0.7rem 1.05rem;
  line-height: 1.35;
}

/* Dropdown items — subordinate: smaller weight, indent, calmer colour */
#header.kh8-header .header-nav-main nav > ul > li.dropdown .dropdown-menu li a {
  font-family: var(--kh8-font-body) !important;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  padding: 0.52rem 1.25rem 0.52rem 1.45rem;
  color: rgba(61, 69, 64, 0.88) !important;
  line-height: 1.45;
}

#header.kh8-header .dropdown-menu .kh8-dropdown-heading {
  margin: 0;
  padding: var(--kh8-space-3) 1.35rem var(--kh8-space-2);
  font-family: var(--kh8-font-body) !important;
  font-size: 0.6875rem !important;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(40, 67, 56, 0.72) !important;
  line-height: 1.35;
  border-bottom: 1px solid var(--kh8-border-soft);
}

.kh8-header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--kh8-space-3);
  padding-top: var(--kh8-space-4);
  padding-bottom: var(--kh8-space-4);
}

@media (min-width: 768px) {
  .kh8-header-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--kh8-space-4);
  }
}

.kh8-header-copyright {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--kh8-text-muted);
  font-weight: 400;
  text-align: left;
  max-width: 18rem;
}

/* -------------------------------------------------------------------------- */
/* KH8 footer — premium rhythm, hierarchy, scoped tokens (no bare footer {})   */
/* -------------------------------------------------------------------------- */

.kh8-footer {
  font-family: var(--kh8-font-body) !important;
  color: var(--kh8-footer-fg);
}

.kh8-footer__main {
  padding-top: var(--kh8-space-6);
  padding-bottom: var(--kh8-space-6);
}

@media (max-width: 767.98px) {
  .kh8-footer__main > [class*='col-'] {
    padding-top: var(--kh8-space-2);
    padding-bottom: var(--kh8-space-2);
  }
}

.kh8-footer__brand {
  margin-bottom: var(--kh8-space-5);
  padding-bottom: var(--kh8-space-4);
  border-bottom: 1px solid var(--kh8-footer-line);
}

@media (min-width: 768px) {
  .kh8-footer__brand {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
    padding-right: var(--kh8-space-5);
    border-right: 1px solid var(--kh8-footer-line);
  }
}

.kh8-footer__logo {
  display: block;
  max-width: 100%;
  height: auto;
  margin-bottom: var(--kh8-space-5);
}

.kh8-footer__contact {
  margin: 0;
  padding: 0;
}

.kh8-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: var(--kh8-space-3);
  margin-bottom: var(--kh8-space-4);
}

.kh8-footer__contact li:last-child {
  margin-bottom: 0;
}

.kh8-footer__contact-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--kh8-footer-fg-muted);
  font-size: 0.875rem;
}

.kh8-footer__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--kh8-footer-fg);
  font-weight: 400;
}

/* All footer links: one base + modifiers */
.kh8-footer__link {
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--kh8-footer-fg-strong);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.kh8-footer__link:hover,
.kh8-footer__link:focus {
  color: rgba(255, 255, 255, 0.96);
}

.kh8-footer__contact .kh8-footer__link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.kh8-footer__contact .kh8-footer__link:hover,
.kh8-footer__contact .kh8-footer__link:focus {
  border-bottom-color: rgba(255, 255, 255, 0.38);
}

.kh8-footer__link--cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kh8-footer-fg-strong);
  border-bottom: 1px solid transparent;
}

.kh8-footer__link--cta:hover,
.kh8-footer__link--cta:focus {
  border-bottom-color: var(--kh8-accent);
}

.kh8-footer__link--cta .kh8-footer__cta-icon {
  font-size: 0.65rem;
  margin-left: 0.1rem;
}

.kh8-footer__link--social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font-size: 0.875rem;
  color: var(--kh8-footer-fg-muted);
  border-radius: 50%;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.kh8-footer__link--social:hover,
.kh8-footer__link--social:focus {
  color: var(--kh8-footer-fg-strong);
  border-color: var(--kh8-footer-line);
  background: rgba(255, 255, 255, 0.06);
}

.kh8-footer__social {
  margin-top: var(--kh8-space-5);
  padding: var(--kh8-space-4) 0 0;
  border-top: 1px solid var(--kh8-footer-line);
  text-align: left;
}

.kh8-footer__nav-wrap {
  padding-top: var(--kh8-space-3);
}

@media (min-width: 768px) {
  .kh8-footer__nav-wrap {
    padding-top: 0;
    padding-left: var(--kh8-space-2);
  }
}

@media (min-width: 992px) {
  .kh8-footer__nav-wrap {
    padding-left: var(--kh8-space-5);
  }
}

.kh8-footer__title {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kh8-footer-kicker);
  margin: 0 0 var(--kh8-space-4);
  line-height: 1.4;
}

.kh8-footer__intro {
  margin: 0 0 var(--kh8-space-4);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--kh8-footer-fg);
  font-weight: 400;
  max-width: 40rem;
}

.kh8-footer__cta-wrap {
  margin: 0 0 var(--kh8-space-5);
}

.kh8-footer__columns {
  margin-top: 0;
  padding-top: var(--kh8-space-5);
  border-top: 1px solid var(--kh8-footer-line);
}

@media (min-width: 992px) {
  /* Slightly wider optical gap between link columns (BS4-safe, no row margin hacks) */
  .kh8-footer__columns > .kh8-footer__col {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

.kh8-footer__col {
  margin-bottom: var(--kh8-space-5);
}

@media (min-width: 992px) {
  .kh8-footer__col {
    margin-bottom: 0;
  }
}

.kh8-footer__list {
  margin: 0;
  padding: 0;
}

.kh8-footer__list li {
  margin-bottom: var(--kh8-space-2);
}

.kh8-footer__list li:last-child {
  margin-bottom: 0;
}

.kh8-footer__list .kh8-footer__link {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--kh8-footer-fg);
}

.kh8-footer__list .kh8-footer__link:hover,
.kh8-footer__list .kh8-footer__link:focus {
  color: var(--kh8-footer-fg-strong);
}

.kh8-footer__copyright {
  border-top: 1px solid var(--kh8-footer-line);
}

.kh8-footer__copyright-inner {
  padding-top: var(--kh8-space-4);
  padding-bottom: var(--kh8-space-4);
}

.kh8-footer__copyright-text {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.55;
  color: var(--kh8-footer-legal);
  letter-spacing: 0.02em;
}

/* -------------------------------------------------------------------------- */
/* Homepage — mobile sticky CTA, testimonial, community strip                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
  body.kh8-has-mobile-cta {
    padding-bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px));
  }
}

.kh8-mobile-cta {
  display: none;
}

@media (max-width: 991.98px) {
  .kh8-mobile-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1039;
    padding: var(--kh8-space-2) var(--kh8-space-3) calc(var(--kh8-space-2) + env(safe-area-inset-bottom, 0px));
    background: rgba(40, 67, 56, 0.97);
    border-top: 2px solid var(--kh8-accent);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  }

  .kh8-mobile-cta__inner {
    display: flex;
    gap: var(--kh8-space-2);
    max-width: 100%;
    padding-right: 4.5rem;
  }

  .kh8-mobile-cta__btn {
    flex: 1 1 30%;
    min-width: 0;
    text-align: center;
    font-family: var(--kh8-font-body) !important;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.25;
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    text-decoration: none !important;
    border: 2px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }

  .kh8-mobile-cta__btn--gold {
    background: var(--kh8-accent);
    color: #1a1f1c !important;
    border-color: var(--kh8-accent);
  }

  .kh8-mobile-cta__btn--gold:hover,
  .kh8-mobile-cta__btn--gold:focus {
    background: #e8a31a;
    border-color: #e8a31a;
    color: #101210 !important;
  }

  .kh8-mobile-cta__btn--outline {
    background: transparent;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.55);
  }

  .kh8-mobile-cta__btn--outline:hover,
  .kh8-mobile-cta__btn--outline:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
  }

  .kh8-mobile-cta__btn--wa {
    background: transparent;
    color: #fff !important;
    border-color: rgba(37, 211, 102, 0.65);
  }

  .kh8-mobile-cta__btn--wa:hover,
  .kh8-mobile-cta__btn--wa:focus {
    border-color: #25d366;
    background: rgba(37, 211, 102, 0.12);
    color: #fff !important;
  }
}

.kh8-testimonial-strip {
  background: #fafbfb;
  border-top: 1px solid var(--kh8-border-soft);
  border-bottom: 1px solid var(--kh8-border-soft);
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
}

.kh8-testimonial {
  margin: 0;
  padding: 0;
  border: 0;
}

.kh8-testimonial__quote {
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  line-height: 1.55;
  font-weight: 500;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-4);
  letter-spacing: -0.015em;
}

.kh8-testimonial__cite {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--kh8-text-muted);
  font-style: normal;
}

.kh8-testimonial__name {
  font-style: normal;
  font-weight: 700;
  color: var(--kh8-forest);
}

.kh8-testimonial__role {
  display: block;
  margin-top: 0.2rem;
  font-weight: 500;
}

.kh8-community {
  background: #f7f8f7;
  border-top: 1px solid var(--kh8-border-soft);
  padding-top: var(--kh8-section-pad-y);
  padding-bottom: var(--kh8-section-pad-y);
}

@media (min-width: 992px) {
  .kh8-community {
    padding-top: var(--kh8-section-pad-y-lg);
    padding-bottom: var(--kh8-section-pad-y-lg);
  }
}

/* -------------------------------------------------------------------------- */
/* Admission process page                                                     */
/* -------------------------------------------------------------------------- */

.kh8-admission-content .kh8-admission-lead,
.kh8-page-admission-process .kh8-admission-lead {
  text-align: left;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--kh8-text);
}

.kh8-admission-list li {
  margin-bottom: var(--kh8-space-2);
  text-align: left;
}

.kh8-admission-list li:last-child {
  margin-bottom: 0;
}

.kh8-admission-step__summary {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--kh8-text);
  text-align: left;
  max-width: 40rem;
}

.kh8-admission-step__toggle {
  font-family: var(--kh8-font-body) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--kh8-forest) !important;
  text-decoration: none !important;
  padding-left: 0 !important;
  margin-bottom: var(--kh8-space-2);
}

.kh8-admission-step__toggle:hover,
.kh8-admission-step__toggle:focus {
  color: var(--kh8-accent) !important;
}

.kh8-admission-step__detail {
  margin-top: var(--kh8-space-2);
}

.kh8-admission-step__detail-inner {
  padding: var(--kh8-space-3) var(--kh8-space-4);
  background: #fafbfb;
  border: 1px solid var(--kh8-border-soft);
  border-radius: 8px;
  text-align: left;
}

.kh8-admission-step__para {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--kh8-text);
  margin-bottom: 0;
}

.kh8-admission-mid-cta {
  margin: var(--kh8-space-5) 0;
  padding: var(--kh8-space-5) var(--kh8-space-4);
  text-align: center;
  background: linear-gradient(to bottom, #f4f6f5 0%, #eef1ef 100%);
  border: 1px solid var(--kh8-border-soft);
  border-radius: 10px;
}

.kh8-admission-mid-cta__title {
  font-size: clamp(1.25rem, 2.8vw, 1.5rem);
  font-weight: 700;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-2);
  letter-spacing: -0.02em;
}

.kh8-admission-mid-cta__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--kh8-text-muted);
  margin: 0 auto var(--kh8-space-4);
  max-width: 28rem;
}

.kh8-admission-mid-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--kh8-space-3);
}

.kh8-admission-process--part2 {
  padding-top: var(--kh8-space-2);
}

.kh8-admission-final {
  background: #f7f8f7;
  border-top: 1px solid var(--kh8-border-soft);
  padding-top: clamp(2.75rem, 6vw, 4rem) !important;
  padding-bottom: clamp(2.75rem, 6vw, 4rem) !important;
}

.kh8-admission-final__kicker {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kh8-accent);
  margin-bottom: var(--kh8-space-2);
}

.kh8-admission-final__title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-2);
}

.kh8-admission-final__reassurance {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--kh8-text-muted);
  margin: 0 auto var(--kh8-space-3);
  max-width: 28rem;
  text-align: center;
}

.kh8-admission-final__rule {
  max-width: 3rem;
}

.kh8-admission-final__intro {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--kh8-text);
  margin: 0 auto var(--kh8-space-5);
  max-width: 34rem;
  text-align: center;
}

.kh8-admission-final__grid {
  margin-top: var(--kh8-space-2);
}

.kh8-admission-final__card {
  padding: var(--kh8-space-5) var(--kh8-space-4);
  background: #fff;
  border: 1px solid var(--kh8-border-soft);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(39, 44, 40, 0.04), 0 8px 24px rgba(39, 44, 40, 0.06);
  min-height: 0;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.kh8-admission-final__card:hover,
.kh8-admission-final__card:focus-within {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 4px 12px rgba(39, 44, 40, 0.08), 0 16px 40px rgba(39, 44, 40, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .kh8-admission-final__card {
    transition: none;
  }

  .kh8-admission-final__card:hover,
  .kh8-admission-final__card:focus-within {
    transform: none;
  }
}

.kh8-admission-final__card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-3);
}

.kh8-admission-final__card-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--kh8-text-muted);
  text-align: center;
}

.kh8-admission-final__card-actions {
  margin-top: auto;
  padding-top: var(--kh8-space-4);
  width: 100%;
}

@media (max-width: 991.98px) {
  .kh8-admission-final__cta {
    display: block;
    width: 100%;
  }
}

.kh8-admission-final__rec-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kh8-accent);
  margin: 0 0 var(--kh8-space-2);
  text-align: center;
}

@media (min-width: 992px) {
  .kh8-admission-final__rec-spacer {
    min-height: 2.625rem;
    margin-bottom: var(--kh8-space-2);
  }
}

.kh8-admission-final__card--primary {
  padding: var(--kh8-space-6) var(--kh8-space-5);
  border: 1px solid rgba(223, 150, 1, 0.35);
  border-top: 3px solid var(--kh8-accent);
  box-shadow: 0 4px 12px rgba(39, 44, 40, 0.08), 0 16px 40px rgba(40, 67, 56, 0.1);
}

.kh8-admission-final__card--primary:hover,
.kh8-admission-final__card--primary:focus-within {
  box-shadow: 0 6px 16px rgba(39, 44, 40, 0.1), 0 20px 48px rgba(40, 67, 56, 0.12);
}

.kh8-admission-final__card--primary .kh8-admission-final__card-title {
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
}

.kh8-admission-final__btn-primary {
  font-size: 1rem;
  padding: 1rem 2rem;
}

.kh8-admission-final__card--secondary {
  padding: var(--kh8-space-4) var(--kh8-space-3);
  box-shadow: 0 1px 2px rgba(39, 44, 40, 0.04);
}

.kh8-admission-final__card--secondary .kh8-admission-final__card-title {
  font-size: 1rem;
}

/* -------------------------------------------------------------------------- */
/* Admissions landing (admissions.php) — steps grid                           */
/* -------------------------------------------------------------------------- */

.kh8-admissions-steps {
  list-style: none;
  margin: var(--kh8-space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--kh8-space-4);
  grid-template-columns: 1fr;
  counter-reset: kh8-admissions-step;
}

@media (min-width: 576px) {
  .kh8-admissions-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .kh8-admissions-steps {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--kh8-space-3);
  }
}

.kh8-admissions-steps__item {
  position: relative;
  padding: var(--kh8-space-4) var(--kh8-space-3) var(--kh8-space-4) var(--kh8-space-4);
  background: #fff;
  border: 1px solid var(--kh8-border-soft);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(39, 44, 40, 0.04);
  text-align: left;
  counter-increment: kh8-admissions-step;
}

.kh8-admissions-steps__item::before {
  content: counter(kh8-admissions-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: var(--kh8-space-2);
  font-size: 0.875rem;
  font-weight: 700;
  color: #1a1f1c;
  background: var(--kh8-accent);
  border-radius: 50%;
}

.kh8-admissions-steps__title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-2);
}

.kh8-admissions-steps__text {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--kh8-text-muted);
  margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Enquiry page (make-an-enquiry.php) — form card, success, trust            */
/* -------------------------------------------------------------------------- */

.kh8-enquiry-section {
  padding-top: var(--kh8-section-pad-y);
  padding-bottom: var(--kh8-section-pad-y-lg);
  background: #f7f8f6;
}

.kh8-enquiry-layout {
  width: 100%;
  max-width: 42.5rem;
  margin-left: auto;
  margin-right: auto;
}

.kh8-enquiry-trustlines {
  text-align: center;
  margin-bottom: var(--kh8-space-4);
}

.kh8-enquiry-trustlines--below {
  margin-top: var(--kh8-space-4);
  margin-bottom: 0;
}

.kh8-enquiry-trustline {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--kh8-text-muted);
  margin: 0;
  opacity: 0.85;
}

.kh8-enquiry-trustline + .kh8-enquiry-trustline {
  margin-top: 0.125rem;
}

.kh8-enquiry-card.kh8-card {
  height: auto;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(39, 44, 40, 0.05), 0 12px 32px rgba(40, 67, 56, 0.08);
}

.kh8-enquiry-card__inner {
  padding: var(--kh8-space-5) var(--kh8-space-4);
}

@media (min-width: 576px) {
  .kh8-enquiry-card__inner {
    padding: var(--kh8-space-5) var(--kh8-space-5);
  }
}

.kh8-enquiry-form {
  display: flex;
  flex-direction: column;
  gap: var(--kh8-space-4);
}

.kh8-enquiry-field__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--kh8-forest);
  margin-bottom: var(--kh8-space-2);
}

.kh8-enquiry-field__req {
  color: #b45309;
  font-weight: 700;
}

.kh8-enquiry-field__opt {
  font-weight: 400;
  color: var(--kh8-text-muted);
}

.kh8-enquiry-field__input,
.kh8-enquiry-field__textarea {
  display: block;
  width: 100%;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--kh8-text);
  background: #fff;
  border: 1px solid rgba(40, 67, 56, 0.12);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kh8-enquiry-field__textarea {
  min-height: 7rem;
  resize: vertical;
}

.kh8-enquiry-field__input:focus,
.kh8-enquiry-field__textarea:focus {
  outline: none;
  border-color: rgba(40, 67, 56, 0.35);
  box-shadow: 0 0 0 3px rgba(40, 67, 56, 0.08);
}

.kh8-enquiry-field__input::placeholder,
.kh8-enquiry-field__textarea::placeholder {
  color: #8a9590;
}

.kh8-enquiry-field__error {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #b91c1c;
  margin: var(--kh8-space-2) 0 0;
}

.kh8-enquiry-field__error[hidden] {
  display: none;
}

.kh8-enquiry-submit-row {
  display: flex;
  flex-direction: column;
  gap: var(--kh8-space-3);
  margin-top: var(--kh8-space-2);
}

.kh8-enquiry-submit-note {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--kh8-text-muted);
  margin: 0;
  text-align: center;
}

.kh8-enquiry-submit.kh8-btn {
  width: 100%;
  margin-top: 0;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
}

.kh8-enquiry-submit.kh8-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.kh8-enquiry-alert {
  border-radius: 10px;
  padding: var(--kh8-space-3) var(--kh8-space-4);
  margin-bottom: var(--kh8-space-4);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.kh8-enquiry-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.kh8-enquiry-success {
  text-align: center;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(40, 67, 56, 0.08);
  box-shadow: 0 2px 6px rgba(39, 44, 40, 0.05), 0 18px 48px rgba(40, 67, 56, 0.08);
  padding: clamp(2.25rem, 5.5vw, 3.5rem) clamp(1.25rem, 4vw, 2.75rem);
}

.kh8-enquiry-success__title {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-3);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.kh8-enquiry-success__text {
  font-size: 1rem;
  color: var(--kh8-text-muted);
  margin: 0;
  line-height: 1.6;
}

.kh8-enquiry-success__actions {
  display: flex;
  flex-direction: column;
  gap: var(--kh8-space-3);
  margin: var(--kh8-space-4) 0;
}

.kh8-enquiry-success__btn.kh8-btn {
  width: 100%;
}

.kh8-enquiry-success__hint {
  font-size: 0.875rem;
  color: var(--kh8-text-muted);
  margin: 0;
  line-height: 1.55;
}

@media (min-width: 768px) {
  .kh8-enquiry-success__actions {
    flex-direction: row;
    justify-content: center;
  }

  .kh8-enquiry-success__btn.kh8-btn {
    width: auto;
    min-width: 14rem;
  }
}

/* Make an enquiry — SEO intro + FAQ */
.kh8-enquiry-seo-intro {
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  padding-bottom: clamp(1rem, 2.5vw, 1.75rem);
}

.kh8-enquiry-seo-intro__grid {
  display: grid;
  gap: var(--kh8-space-3);
  margin-top: var(--kh8-space-4);
}

@media (min-width: 992px) {
  .kh8-enquiry-seo-intro__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--kh8-space-4);
  }
}

.kh8-enquiry-seo-intro__panel.kh8-card {
  text-align: left;
}

.kh8-enquiry-seo-intro__footer {
  margin-top: var(--kh8-space-4);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--kh8-text-muted);
}

.kh8-enquiry-faq-section {
  padding-top: clamp(1rem, 2.5vw, 1.5rem);
  padding-bottom: clamp(2.25rem, 5vw, 3.25rem);
  background-color: #fafbfa;
}

.kh8-enquiry-faq-list {
  margin-top: var(--kh8-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--kh8-space-3);
}

.kh8-enquiry-faq-item.kh8-card {
  text-align: left;
  border: 1px solid rgba(0, 74, 57, 0.08);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.kh8-enquiry-faq-item__question.kh8-card__title {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  margin-bottom: 0.5rem;
}

.kh8-enquiry-faq-item__related {
  margin-top: 0.65rem;
  font-size: 0.875rem;
}

.kh8-enquiry-faq-footnote {
  margin-top: var(--kh8-space-4);
  font-size: 0.875rem;
  color: var(--kh8-text-muted);
}

/* Footer theme overrides */
body .footer,
body #footer {
  background-color: #004a39;
  color: rgba(255, 255, 255, 0.85);
}

body .footer a,
body #footer a {
  color: rgba(255, 255, 255, 0.85);
}

body .footer a:hover,
body #footer a:hover {
  color: #eb9103;
}

/* ─── KH8 Page Hero System v1 ────────────────────────────────────────────────
   Unified hero for all admissions pages.
   Spec: padding 44→64px top, 56→80px bottom; breadcrumb 1.375rem gap;
   title unrestricted width; sub max 36rem; CTAs column→row at 576px;
   contact line 2.5rem above.
   ─────────────────────────────────────────────────────────────────────────── */
.kh8-page-hero {
  background-color: var(--kh8-forest);
  color: #fff;
  text-align: center;
  padding: clamp(2.75rem, 6vw, 4rem) 0 clamp(3.5rem, 7vw, 5rem);
  margin-bottom: 0;
}

.kh8-page-hero__nav {
  margin-bottom: 1.375rem;
}

.kh8-page-hero__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
  background: transparent;
}

.kh8-page-hero__title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #eb9103;
  margin: 0 auto var(--kh8-space-3);
}

.kh8-page-hero__sub {
  font-size: clamp(0.9375rem, 2.2vw, 1.0625rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto var(--kh8-space-5);
  max-width: 36rem;
}

/* Mobile: stacked full-width buttons, min() prevents overflow on 320px screens */
.kh8-page-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--kh8-space-3);
  width: 100%;
  max-width: min(22rem, 100%);
  margin: 0 auto;
}

/* Contact line: increased from 1.5rem to 2.5rem for visual separation from CTAs */
.kh8-page-hero__contact {
  margin: var(--kh8-space-5) auto 0;
  max-width: 42rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Links inside the contact line sit on the dark forest hero — must be white, not Porto's dark green */
.kh8-page-hero__contact a,
.kh8-page-hero__contact a:visited {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.kh8-page-hero__contact a:hover,
.kh8-page-hero__contact a:focus-visible,
.kh8-page-hero__contact a:focus,
.kh8-page-hero__contact a:active {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.kh8-page-hero--fees {
  padding: clamp(1.2rem, 3.2vw, 1.8rem) 0 clamp(1.6rem, 4vw, 2.4rem);
}

.kh8-page-hero--fees .kh8-page-hero__nav {
  margin-bottom: var(--kh8-space-2);
}

.kh8-page-hero--fees .kh8-page-hero__sub {
  margin-bottom: var(--kh8-space-3);
}

.kh8-page-hero--fees .kh8-page-hero__actions {
  gap: var(--kh8-space-2);
}

.kh8-page-hero--fees .kh8-page-hero__contact {
  margin-top: var(--kh8-space-2);
}

.kh8-fees-glance {
  margin-top: -0.5rem;
}

.kh8-fees-glance-intro {
  max-width: 43.75rem;
  margin: 0 auto;
  text-align: left;
}

.kh8-fees-glance-summary {
  margin: var(--kh8-space-3) auto 0;
  max-width: 43.75rem;
  text-align: left;
  color: var(--kh8-text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.kh8-fees-glance-summary p {
  margin: 0;
}

.kh8-fees-glance-summary p + p {
  margin-top: 0.35rem;
}

.kh8-fee-year-heading {
  margin-top: var(--kh8-space-4);
  margin-bottom: var(--kh8-space-3);
  font-size: clamp(1.125rem, 2.3vw, 1.375rem);
  font-weight: 700;
  color: var(--kh8-forest);
  position: relative;
  padding-bottom: 0.5rem;
}

.kh8-fee-year-heading::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 2px;
  background: var(--kh8-accent);
  margin-top: 0.5rem;
}

.kh8-fee-group {
  margin-bottom: var(--kh8-space-5);
}

.kh8-fee-group__title {
  font-family: var(--kh8-font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--kh8-forest);
  margin-bottom: var(--kh8-space-3);
}

/* Plain bullet list for fee exclusions — no Porto list-icons dependency */
.kh8-fees-exclusion-list {
  list-style: none;
  padding: 0;
  margin: var(--kh8-space-3) 0 0;
}

.kh8-fees-exclusion-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: var(--kh8-text);
  line-height: 1.6;
}

.kh8-fees-exclusion-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--kh8-accent);
}

/* ─── Fees Calculator ────────────────────────────────────────────────────────── */
.kh8-calculator-card {
  background: #fff;
  border: 1px solid var(--kh8-border-soft);
  border-radius: 0.5rem;
  padding: 2rem;
}

.kh8-calculator-form {
  display: flex;
  flex-direction: column;
  gap: var(--kh8-space-4);
}

.kh8-calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.kh8-calc-label {
  font-family: var(--kh8-font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--kh8-forest);
  text-transform: uppercase;
  margin: 0;
}

.kh8-calc-input {
  font-family: var(--kh8-font-body) !important;
  font-size: 1rem !important;
  color: var(--kh8-text) !important;
  border: 1px solid rgba(20, 36, 28, 0.2) !important;
  border-radius: 0.25rem !important;
  padding: 0.625rem 0.875rem !important;
  background: #fff !important;
}

.kh8-calc-input:focus {
  border-color: var(--kh8-forest) !important;
  box-shadow: 0 0 0 3px rgba(30, 51, 41, 0.12) !important;
  outline: none !important;
}

.kh8-calc-action {
  padding-top: 0.5rem;
}

/* Output panel */
.kh8-calc-output {
  border-top: 2px solid var(--kh8-forest);
  padding-top: var(--kh8-space-4);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kh8-calc-output__group-heading {
  font-family: var(--kh8-font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kh8-forest);
  padding: 0.75rem 0 0.375rem;
  border-bottom: 1px solid var(--kh8-border-soft);
  margin-bottom: 0;
}

.kh8-calc-output__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--kh8-border-soft);
}

.kh8-calc-output__row--highlight {
  background: rgba(20, 51, 41, 0.04);
  padding: 0.625rem 0.75rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  border-bottom: none;
}

.kh8-calc-output__row--total {
  border-top: 2px solid var(--kh8-forest);
  border-bottom: none;
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.kh8-calc-output__label {
  font-size: 0.9375rem;
  color: var(--kh8-text-secondary);
}

.kh8-calc-output__row--highlight .kh8-calc-output__label,
.kh8-calc-output__row--total .kh8-calc-output__label {
  font-weight: 600;
  color: var(--kh8-forest);
}

.kh8-calc-output__value {
  font-weight: 600;
  font-size: 1rem;
  color: var(--kh8-forest);
  white-space: nowrap;
}

.kh8-calc-output__row--total .kh8-calc-output__value {
  font-size: 1.125rem;
  color: var(--kh8-accent);
}

.kh8-calc-remarks {
  font-size: 0.8125rem;
  color: var(--kh8-text-tertiary);
  line-height: 1.65;
  margin: 0;
  padding-top: var(--kh8-space-3);
  border-top: 1px solid var(--kh8-border-soft);
}

/* ─── PDF Embed ──────────────────────────────────────────────────────────────── */
.kh8-pdf-embed-wrap embed {
  display: block;
  border: 1px solid var(--kh8-border-soft);
  border-radius: 0.375rem;
}

.kh8-pdf-fallback {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--kh8-text-tertiary);
}

/* ≥576px: inline row layout, buttons centred, gap tightened for visual balance */
@media (min-width: 576px) {
  .kh8-page-hero__actions {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: auto;
    max-width: none;
    gap: 0.75rem;
  }

  /* Consistent button width — prevents 3 buttons wrapping to mismatched widths */
  .kh8-page-hero__actions .kh8-btn {
    min-width: 11rem;
  }
}

.kh8-next-steps-grid {
  margin-top: var(--kh8-space-4);
}

.kh8-next-steps-grid > [class*='col-'] {
  margin-bottom: var(--kh8-space-3);
}

.kh8-next-steps-card.kh8-card {
  height: 100%;
}

.kh8-next-steps-card__body {
  align-items: center;
  text-align: center;
  justify-content: space-between;
  gap: var(--kh8-space-3);
}

.kh8-next-steps-card__title {
  margin-bottom: 0;
}

.kh8-next-steps-card__text {
  margin: 0;
}

/* ─── Sticky mobile admissions CTA (mount lives before `<footer>`) ───────── */
:root {
  /* Three CTAs may wrap on narrow screens — reserve space for up to two toolbar rows */
  --kh8-sticky-mobile-cta-reserve: calc(108px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 991.98px) {
  html:has(#kh8-sticky-mobile-cta-mount) {
    scroll-padding-bottom: var(--kh8-sticky-mobile-cta-reserve);
  }

  /* Keep Google Translate chip clear of the bar (footer widget) */
  body:has(#kh8-sticky-mobile-cta-mount) .floating-container {
    bottom: calc(100px + var(--kh8-sticky-mobile-cta-reserve));
    right: 10px;
    left: auto;
    margin: 0;
    width: auto;
    height: auto;
    z-index: 1040;
  }

  body:has(#kh8-sticky-mobile-cta-mount) .floating-container .floating-button {
    width: auto;
    max-width: 100%;
  }
}

@media (min-width: 992px) {
  .kh8-sticky-mobile-cta-mount {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .kh8-sticky-mobile-cta-mount .kh8-sticky-mobile-cta-spacer {
    height: var(--kh8-sticky-mobile-cta-reserve);
    width: 100%;
    flex-shrink: 0;
    pointer-events: none;
  }

  .kh8-sticky-mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10560;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(0, 74, 57, 0.1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .kh8-sticky-mobile-cta__inner {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    max-width: 40rem;
    margin: 0 auto;
    width: 100%;
  }

  .kh8-sticky-mobile-cta__btn {
    flex: 1 1 calc(33.333% - 7px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    line-height: 1.25;
    box-sizing: border-box;
    transition:
      transform 0.15s ease,
      box-shadow 0.15s ease,
      border-color 0.15s ease;
  }

  .kh8-sticky-mobile-cta__btn:focus-visible {
    outline: 2px solid var(--kh8-accent);
    outline-offset: 3px;
  }

  .kh8-sticky-mobile-cta__btn--whatsapp {
    flex: 1 1 calc(33.333% - 7px);
    min-width: min(100%, 8.5rem);
    background: #fff;
    color: var(--kh8-forest);
    border: 2px solid rgba(37, 211, 102, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .kh8-sticky-mobile-cta__btn--whatsapp:hover {
    border-color: #25d366;
    transform: translateY(-1px);
  }

  .kh8-sticky-mobile-cta__btn--whatsapp:active {
    transform: translateY(0);
  }

  .kh8-sticky-mobile-cta__btn--tour.kh8-btn,
  .kh8-sticky-mobile-cta__btn--enquiry.kh8-btn {
    flex: 1 1 calc(33.333% - 7px);
    min-width: min(100%, 7.5rem);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.65rem;
    white-space: normal;
    text-align: center;
  }

  .kh8-sticky-mobile-cta__icon {
    font-size: 1.35rem;
    color: #25d366;
  }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
  .kh8-sticky-mobile-cta__btn--whatsapp:hover {
    transform: none;
  }
}

/* Related resources (internal SEO linking) — see includes/kh8-related-resources.php */
.kh8-related-resources__list .kh8-related-resources__item:last-child {
  margin-bottom: 0 !important;
}

.kh8-related-resources--compact.kh8-related-resources--section .kh8-section-title,
.kh8-related-resources--compact .kh8-card__title {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

.kh8-related-resources--compact.kh8-related-resources--section {
  padding-top: 2.25rem !important;
  padding-bottom: 2.25rem !important;
}

.kh8-related-resources__link {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
  text-align: inherit;
}

.kh8-related-resources--sidebar-card .kh8-related-resources__link {
  display: block;
}

/* ==========================================================================
   KH8 DESIGN SYSTEM v1 — Homepage Components
   ========================================================================== */

/* ─── Background utilities ──────────────────────────────────────────────── */
.kh8-bg-warm-white,
section.kh8-bg-warm-white,
section.section-no-margin.kh8-bg-warm-white {
  background-color: var(--kh8-bg-warm-white) !important;
}

.kh8-bg-cream,
section.kh8-bg-cream,
section.section-no-margin.kh8-bg-cream {
  background-color: var(--kh8-bg-cream) !important;
}

/* ─── Section intro (subheadline below h2) ──────────────────────────────── */
.kh8-section-intro {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--kh8-text-secondary);
  margin: 0.75rem 0 0;
  max-width: 38rem;
}

.kh8-section-intro--center {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.kh8-section-intro--light {
  color: rgba(249, 247, 244, 0.82) !important;
}

/* ─── Rule — horizontal divider below headings ──────────────────────────── */
.kh8-rule {
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--kh8-accent);
  border: 0;
  margin: 1.125rem 0;
}

.kh8-rule--center {
  margin-left: auto;
  margin-right: auto;
}

.kh8-rule--light {
  background: rgba(249, 247, 244, 0.38);
}

/* ─── Kicker (eyebrow label above headings) ─────────────────────────────── */
.kh8-kicker {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kh8-text-tertiary);
  margin-bottom: 0.875rem;
  max-width: none;
  width: 100%;
}

/* Centred section headers — kickers must span full width to align with title */
.kh8-kicker.text-center,
.kh8-kicker.kh8-kicker--center,
.kh8-section-head--center .kh8-kicker,
p.kh8-kicker:has(+ .kh8-section-title.text-center),
p.kh8-kicker:has(+ .kh8-section-title--center),
p.kh8-kicker:has(+ h2.text-center),
p.kh8-kicker:has(+ h3.text-center) {
  text-align: center;
}

.kh8-kicker--dark {
  color: var(--kh8-gold-dark) !important;
}

/* Kicker on dark forest backgrounds (e.g. hero sections, dark CTA banners) */
.kh8-kicker--light {
  color: rgba(249, 247, 244, 0.72) !important;
}

/* Kicker horizontally centred (e.g. quote interlude, centred content blocks) */
.kh8-kicker--center {
  text-align: center;
  max-width: none;
  width: 100%;
}

/* ─── Text link with inline arrow ───────────────────────────────────────── */
.kh8-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--kh8-forest);
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 51, 41, 0.22);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
  margin-top: 1.25rem;
}

.kh8-text-link:hover,
.kh8-text-link:focus {
  color: var(--kh8-accent);
  border-bottom-color: var(--kh8-accent);
  text-decoration: none;
}

/* ─── Sidebar intro layout (text left, cards right) ─────────────────────── */
/* Grid wrapper (Wave 3): static container — only __sidebar sticks */
.kh8-sidebar-intro:has(> .kh8-sidebar-intro__sidebar) {
  position: static;
  top: auto;
  align-self: auto;
}

/* Legacy Bootstrap column / standalone sidebar column */
.kh8-sidebar-intro:not(:has(> .kh8-sidebar-intro__sidebar)) {
  position: sticky;
  top: 2rem;
  align-self: flex-start;
}

@media (max-width: 991.98px) {
  .kh8-sidebar-intro:not(:has(> .kh8-sidebar-intro__sidebar)) {
    position: static;
  }
}

/* ─── Feature item (flat, prospectus-style, replaces card grids) ─────────── */
.kh8-feature-item {
  padding: 1.25rem 0;
  border-top: 2px solid var(--kh8-accent);
}

.kh8-feature-item__title {
  font-family: var(--kh8-font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--kh8-forest);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.kh8-feature-item__text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--kh8-text-secondary);
  margin: 0;
}

/* ─── Differentiator callout (left-border quotation) ────────────────────── */
.kh8-differentiator-callout {
  border-left: 2px solid var(--kh8-accent);
  padding: 0.75rem 0 0.75rem 1.125rem;
  margin: 1.25rem 0;
}

.kh8-differentiator-callout p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--kh8-text-secondary);
  margin: 0;
  font-style: italic;
  max-width: 100%;
}

/* ─── Full-bleed photographic Hero ──────────────────────────────────────── */
.kh8-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Background image — covers full section */
.kh8-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

/* Gradient overlay — transparent top, dark forest green at base */
.kh8-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 36, 28, 0.08) 0%,
    rgba(20, 36, 28, 0.14) 28%,
    rgba(20, 36, 28, 0.60) 62%,
    rgba(20, 36, 28, 0.90) 100%
  );
}

/* Content — sits above overlay, bottom-aligned */
.kh8-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: clamp(7rem, 18vh, 12rem);
  padding-bottom: clamp(3.5rem, 8vh, 5.5rem);
}

.kh8-hero__crest {
  display: block;
  width: 52px;
  height: auto;
  margin-bottom: 1.375rem;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* Kicker on photographic background */
.kh8-kicker--hero {
  color: rgba(249, 247, 244, 0.58) !important;
}

.kh8-hero__h1 {
  font-family: var(--kh8-font-display);
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #F9F7F4;
  margin: 0.75rem 0 1.375rem;
}

.kh8-hero__sub {
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.7;
  color: rgba(249, 247, 244, 0.78);
  margin: 0 0 2rem;
  max-width: 34rem;
}

@media (max-width: 991.98px) {
  .kh8-hero {
    /* svh accounts for mobile browser chrome height */
    min-height: 92svh;
    align-items: flex-end;
  }

  .kh8-hero__bg {
    object-position: center 30%;
  }

  /* Heavier gradient on mobile for readability on smaller screens */
  .kh8-hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(20, 36, 28, 0.06) 0%,
      rgba(20, 36, 28, 0.18) 22%,
      rgba(20, 36, 28, 0.68) 56%,
      rgba(20, 36, 28, 0.93) 100%
    );
  }

  .kh8-hero__content {
    padding-top: clamp(5rem, 12vh, 8rem);
    /* Extra bottom padding clears the sticky mobile CTA bar */
    padding-bottom: clamp(5.5rem, 14vh, 7.5rem);
  }

  .kh8-hero__crest {
    width: 38px;
    margin-bottom: 1rem;
    display: none;
  }

  .kh8-hero__sub {
    max-width: 100%;
  }
}

/* ─── Hero CTA actions ───────────────────────────────────────────────────── */
.kh8-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ─── Outline hero button (white on dark hero bg) ────────────────────────── */
/* Contrast: #F9F7F4 on #1E3329 ≈ 11:1 (WCAG AAA). On hover: #1E3329 on
   #F9F7F4 ≈ 11:1 (WCAG AAA). Color uses !important to defeat Porto a:hover
   cascade which would otherwise override these values at runtime. */
.kh8-btn--outline-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.8125rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--kh8-font-body);
  letter-spacing: 0.025em;
  color: #F9F7F4 !important;
  background: transparent;
  border: 1.5px solid rgba(249, 247, 244, 0.5);
  border-radius: 3px;
  text-decoration: none !important;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  line-height: 1.3;
}

.kh8-btn--outline-hero:hover,
.kh8-btn--outline-hero:focus-visible {
  color: var(--kh8-forest) !important;
  background: #F9F7F4;
  border-color: #F9F7F4;
  text-decoration: none !important;
  outline: none;
}

.kh8-btn--outline-hero:focus {
  color: #F9F7F4 !important;
  background: transparent;
  border-color: rgba(249, 247, 244, 0.8);
  text-decoration: none !important;
  outline: 2px solid rgba(249, 247, 244, 0.7);
  outline-offset: 3px;
}

.kh8-btn--outline-hero:active {
  color: var(--kh8-forest) !important;
  background: #e8e6e3;
  border-color: #e8e6e3;
  text-decoration: none !important;
}

.kh8-btn--sm {
  padding: 0.6875rem 1.375rem;
  font-size: 0.875rem;
}

/* ─── Gold button (primary CTA on light bg) ─────────────────────────────── */
/* Contrast: #fff on #df9601 ≈ 2.9:1 — visually strong at button size/weight.
   On hover: #fff on #B8860B ≈ 4.5:1 (WCAG AA large text). !important defeats
   Porto a:hover cascade. */
.kh8-btn--gold {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--kh8-font-body);
  letter-spacing: 0.02em;
  color: #fff !important;
  background: var(--kh8-accent);
  border: 1.5px solid var(--kh8-accent);
  border-radius: 3px;
  text-decoration: none !important;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  line-height: 1.3;
}

.kh8-btn--gold:hover,
.kh8-btn--gold:focus-visible {
  background: var(--kh8-gold-light);
  border-color: var(--kh8-gold-light);
  color: #fff !important;
  text-decoration: none !important;
  outline: none;
}

.kh8-btn--gold:focus {
  color: #fff !important;
  background: var(--kh8-accent);
  border-color: var(--kh8-accent);
  text-decoration: none !important;
  outline: 2px solid var(--kh8-accent);
  outline-offset: 3px;
}

.kh8-btn--gold:active {
  background: #9a6500;
  border-color: #9a6500;
  color: #fff !important;
  text-decoration: none !important;
}

/* ─── Outline-gold button (secondary CTA on light bg) ───────────────────── */
/* Contrast: #1E3329 on transparent/cream ≈ 11:1. On hover: #F9F7F4 on
   #1E3329 ≈ 11:1 (WCAG AAA). !important defeats Porto a:hover cascade. */
.kh8-btn--outline-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--kh8-font-body);
  letter-spacing: 0.02em;
  color: var(--kh8-forest) !important;
  background: transparent;
  border: 1.5px solid var(--kh8-forest);
  border-radius: 3px;
  text-decoration: none !important;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  line-height: 1.3;
}

.kh8-btn--outline-gold:hover,
.kh8-btn--outline-gold:focus-visible {
  background: var(--kh8-forest);
  border-color: var(--kh8-forest);
  color: #F9F7F4 !important;
  text-decoration: none !important;
  outline: none;
}

.kh8-btn--outline-gold:focus {
  color: var(--kh8-forest) !important;
  background: transparent;
  border-color: var(--kh8-forest);
  text-decoration: none !important;
  outline: 2px solid var(--kh8-forest);
  outline-offset: 3px;
}

.kh8-btn--outline-gold:active {
  background: #0f201a;
  border-color: #0f201a;
  color: #F9F7F4 !important;
  text-decoration: none !important;
}

.kh8-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

/* ─── Editorial Split Section ────────────────────────────────────────────── */
.kh8-editorial-split {
  overflow: hidden;
}

/* Remove Porto default section padding on editorial splits */
.kh8-editorial-split.section-no-margin,
.kh8-editorial-split {
  padding: 0 !important;
}

.kh8-editorial-split__row {
  display: flex;
  flex-wrap: wrap;
}

.kh8-editorial-split__text {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 9vw, 5.5rem) clamp(1.5rem, 5vw, 3rem);
}

.kh8-editorial-split__text-inner {
  max-width: 520px;
}

.kh8-editorial-split__img {
  flex: 0 0 100%;
  position: relative;
  overflow: hidden;
  min-height: 300px;
}

@media (max-width: 991.98px) {
  .kh8-editorial-split__img {
    order: -1;
  }

  .kh8-editorial-split--img-left .kh8-editorial-split__img {
    order: 0;
  }
}

@media (min-width: 992px) {
  .kh8-editorial-split__text {
    flex: 0 0 48%;
    padding: clamp(4rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem);
  }

  .kh8-editorial-split__img {
    flex: 0 0 52%;
    min-height: 500px;
  }

  .kh8-editorial-split--img-left .kh8-editorial-split__row {
    flex-direction: row-reverse;
  }

  .kh8-editorial-split__text-inner {
    margin-left: auto;
  }

  .kh8-editorial-split--img-left .kh8-editorial-split__text-inner {
    margin-left: 0;
    margin-right: auto;
  }
}

@media (min-width: 1200px) {
  .kh8-editorial-split__text {
    flex: 0 0 44%;
    padding: clamp(4rem, 8vw, 6rem) clamp(3rem, 6vw, 5rem);
  }

  .kh8-editorial-split__img {
    flex: 0 0 56%;
  }
}

.kh8-editorial-split__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dark (Boarding) variant */
.kh8-editorial-split--dark .kh8-editorial-split__text {
  background: var(--kh8-forest);
}

.kh8-editorial-split--dark .kh8-section-title,
.kh8-editorial-split--dark .kh8-section-title--light {
  color: #F9F7F4;
}

.kh8-editorial-split--dark .kh8-section-intro,
.kh8-editorial-split--dark .kh8-section-intro--light {
  color: rgba(249, 247, 244, 0.8);
}

.kh8-editorial-split--dark .kh8-rule {
  background: rgba(249, 247, 244, 0.32);
}

/* ─── Quote Interlude ────────────────────────────────────────────────────── */
.kh8-quote-interlude {
  padding: clamp(4rem, 10vw, 7rem) 1.5rem;
  background: var(--kh8-bg-warm-white);
  text-align: center;
  border-top: 1px solid var(--kh8-border-soft);
  border-bottom: 1px solid var(--kh8-border-soft);
}

.kh8-quote-interlude__inner {
  max-width: 38rem;
  margin: 0 auto;
}

.kh8-quote-interlude__mark {
  display: block;
  font-family: var(--kh8-font-display);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--kh8-accent);
  margin-bottom: 0.5rem;
  user-select: none;
}

.kh8-quote-interlude__quote {
  display: block;
  font-family: var(--kh8-font-display);
  font-style: italic;
  font-size: clamp(1.125rem, 2.5vw, 1.625rem);
  line-height: 1.6;
  color: var(--kh8-text-primary);
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

.kh8-quote-interlude__cite {
  display: block;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--kh8-text-tertiary);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ─── Graduate Story Grid ────────────────────────────────────────────────── */
.kh8-graduate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .kh8-graduate-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.kh8-graduate-card {
  display: flex;
  flex-direction: column;
}

.kh8-graduate-card__portrait {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 1.25rem;
  background: var(--kh8-bg-cream);
}

.kh8-graduate-card__mark {
  display: block;
  font-family: var(--kh8-font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--kh8-accent);
  margin-bottom: 0.375rem;
  user-select: none;
}

.kh8-graduate-card__quote {
  display: block;
  font-family: var(--kh8-font-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--kh8-text-primary);
  margin: 0 0 1rem;
  flex: 1;
  padding: 0;
  border: 0;
}

.kh8-graduate-card__cite {
  font-size: 0.8125rem;
  color: var(--kh8-text-tertiary);
  font-style: normal;
  letter-spacing: 0.04em;
}

.kh8-graduate-card__name {
  font-weight: 600;
  color: var(--kh8-text-secondary);
  display: block;
  margin-bottom: 0.125rem;
}

/* ─── Statistics — on light backgrounds ─────────────────────────────────── */
.kh8-stat-value--dark {
  font-family: var(--kh8-font-display);
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 700;
  color: var(--kh8-forest);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.kh8-stat-label--dark {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--kh8-text-secondary);
  margin: 0.625rem 0 0;
  line-height: 1.4;
  text-transform: uppercase;
  max-width: 12rem;
  margin-left: auto;
  margin-right: auto;
}

.kh8-outcomes-note {
  font-size: 0.8125rem;
  color: var(--kh8-text-tertiary);
  margin: 0;
  line-height: 1.6;
}

.kh8-outcomes-note .kh8-text-link {
  font-size: 0.8125rem;
  margin-top: 0;
  display: inline-flex;
}

/* ─── Admissions CTA — header image above content ────────────────────────── */
section.section-no-margin.kh8-section.kh8-cta-banner {
  background: var(--kh8-bg-warm-white);
  padding-top: 0;
}

.kh8-cta-header-img {
  width: 100%;
  height: 240px;
  overflow: hidden;
  display: block;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .kh8-cta-header-img {
    height: 300px;
  }
}

@media (min-width: 1200px) {
  .kh8-cta-header-img {
    height: 650px;
  }
}

.kh8-cta-header-img__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── Card link wrapper (academic pathway) ───────────────────────────────── */
.kh8-card-link {
  text-decoration: none;
  color: inherit;
}

.kh8-card-link:hover,
.kh8-card-link:focus {
  text-decoration: none;
  color: inherit;
}

.kh8-card-link:hover .kh8-card {
  box-shadow: 0 4px 20px rgba(30, 51, 41, 0.12);
  transform: translateY(-2px);
}

.kh8-card {
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(30, 51, 41, 0.08);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.kh8-card__media {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.kh8-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.kh8-card-link:hover .kh8-card__img {
  transform: scale(1.03);
}

.kh8-card__body {
  padding: 1.125rem 1.25rem 1.375rem;
}

.kh8-card__title {
  font-family: var(--kh8-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--kh8-forest);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.kh8-card__text {
  font-size: 0.875rem;
  color: var(--kh8-text-tertiary);
  margin: 0;
  line-height: 1.5;
}

/* ─── Dark forest utility (Summer School enquiry CTA, Admissions CTA) ────── */
.kh8-bg-forest,
section.kh8-bg-forest,
section.section-no-margin.kh8-bg-forest {
  background-color: var(--kh8-forest) !important;
}

/* ─── Campaign hero (landing pages — 70svh, same full-bleed system) ─────── */
.kh8-hero--campaign {
  min-height: 70vh;
  min-height: 70svh;
  align-items: flex-end;
}

@media (max-width: 991.98px) {
  .kh8-hero--campaign {
    min-height: 60svh;
  }
}

/* ─── Portrait video (9:16, summer school) ──────────────────────────────── */
/* aspect-ratio: 9/16 locks the container to portrait shape before the video
   file loads, preventing the landscape-black-box flash. The poster fills the
   frame immediately so the player is never an empty black rectangle. */
.kh8-portrait-video {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(30, 51, 41, 0.14);
  background: #000;
  line-height: 0;
  aspect-ratio: 9 / 16;
}

.kh8-portrait-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Photo gallery grid ─────────────────────────────────────────────────── */
.kh8-photo-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 2rem;
}

@media (min-width: 576px) {
  .kh8-photo-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .kh8-photo-gallery {
    gap: 0.75rem;
  }
}

.kh8-photo-gallery__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--kh8-bg-cream);
}

/* First item spans 2 columns for editorial rhythm */
.kh8-photo-gallery__item:first-child {
  grid-column: span 2;
  aspect-ratio: 8 / 5;
}

@media (min-width: 576px) {
  .kh8-photo-gallery__item:first-child {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }
}

.kh8-photo-gallery__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.kh8-photo-gallery__item:hover .kh8-photo-gallery__img {
  transform: scale(1.04);
}

/* ─── Programme information table ────────────────────────────────────────── */
.kh8-programme-info {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.kh8-programme-info tr {
  border-bottom: 1px solid var(--kh8-border-soft);
}

.kh8-programme-info td {
  padding: 0.875rem 0;
  vertical-align: top;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.kh8-programme-info td:first-child {
  font-weight: 600;
  color: var(--kh8-forest);
  width: 38%;
  padding-right: 1.5rem;
}

.kh8-programme-info td:last-child {
  color: var(--kh8-text-secondary);
}

/* ─── Dark enquiry CTA section (Summer School + Admissions) ─────────────── */
.kh8-section--dark {
  background: var(--kh8-forest);
  padding: var(--kh8-section-pad-y-lg) 0;
}

.kh8-section--dark .kh8-section-title {
  color: #F9F7F4;
}

.kh8-section--dark .kh8-kicker {
  color: var(--kh8-gold-dark);
}

.kh8-section--dark .kh8-rule {
  background: rgba(249, 247, 244, 0.32);
}

.kh8-section--dark .kh8-section-intro {
  color: rgba(249, 247, 244, 0.78);
}

.kh8-section--dark p {
  color: rgba(249, 247, 244, 0.78);
}

/* Override cta-banner light background when a dark closing is requested.
   Also restores padding-top removed by the generic cta-banner rule above. */
section.section-no-margin.kh8-section.kh8-cta-banner.kh8-section--dark {
  background: var(--kh8-forest);
  border-bottom: none;
  padding-top: var(--kh8-section-pad-y);
  padding-bottom: var(--kh8-section-pad-y);
}

@media (min-width: 992px) {
  section.section-no-margin.kh8-section.kh8-cta-banner.kh8-section--dark {
    padding-top: var(--kh8-section-pad-y-lg);
    padding-bottom: var(--kh8-section-pad-y-lg);
  }
}

/* ─── Enquiry form — Summer School embedded ──────────────────────────────── */
.kh8-ss-enquiry-card {
  background: rgba(249, 247, 244, 0.06);
  border: 1px solid rgba(249, 247, 244, 0.15);
  border-radius: 4px;
  padding: 2rem 1.75rem 2.25rem;
  max-width: 540px;
}

.kh8-ss-enquiry-card .kh8-enquiry-field__label {
  color: rgba(249, 247, 244, 0.88);
}

.kh8-ss-enquiry-card .kh8-enquiry-field__input,
.kh8-ss-enquiry-card .kh8-enquiry-field__textarea {
  background: rgba(249, 247, 244, 0.08);
  border: 1px solid rgba(249, 247, 244, 0.22);
  color: #F9F7F4;
}

.kh8-ss-enquiry-card .kh8-enquiry-field__input::placeholder,
.kh8-ss-enquiry-card .kh8-enquiry-field__textarea::placeholder {
  color: rgba(249, 247, 244, 0.38);
}

.kh8-ss-enquiry-card .kh8-enquiry-field__input:focus,
.kh8-ss-enquiry-card .kh8-enquiry-field__textarea:focus {
  border-color: var(--kh8-gold-dark);
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.25);
}

/* ─── Summer School section actions ─────────────────────────────────────── */
.kh8-summer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.125rem;
  margin-top: 1.75rem;
}

.kh8-summer-actions .kh8-text-link {
  margin-top: 0;
}

/* ─── Boarding timetable ─────────────────────────────────────────────────── */
.kh8-timetable-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.kh8-timetable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.kh8-timetable thead th {
  font-family: var(--kh8-font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kh8-forest);
  border-bottom: 2px solid var(--kh8-forest);
  padding: 0.625rem 1rem;
  background: transparent;
}

.kh8-timetable tbody td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(20, 36, 28, 0.08);
  vertical-align: top;
  color: var(--kh8-text);
}

.kh8-timetable tbody tr:nth-child(even) td {
  background: rgba(20, 36, 28, 0.03);
}

.kh8-timetable tbody td:first-child {
  font-weight: 600;
  white-space: nowrap;
  color: var(--kh8-forest);
  min-width: 8.5rem;
}

/* ─── Subject Card Modal System ─────────────────────────────────────────── */
.kh8-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.kh8-subject-card {
  background: #fff;
  border: 1px solid var(--kh8-border-soft);
  border-radius: 0.375rem;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-align: center;
}

.kh8-subject-card:hover,
.kh8-subject-card:focus-visible {
  box-shadow: 0 6px 24px rgba(20, 51, 41, 0.14);
  transform: translateY(-2px);
  outline: none;
}

.kh8-subject-card__img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.kh8-subject-card__label {
  padding: 0.625rem 0.75rem;
  font-family: var(--kh8-font-body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--kh8-forest);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.kh8-subject-card__badge {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--kh8-text-tertiary);
  white-space: nowrap;
}

.kh8-subject-card__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--kh8-forest);
  color: #fff;
  border-radius: 50%;
  font-size: 0.875rem;
  flex-shrink: 0;
  line-height: 1;
}

/* Dialog modal — override Porto theme-elements `dialog { position: relative }` */
dialog.kh8-subject-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 720px;
  width: min(720px, 90vw);
  border: none;
  border-radius: 0.5rem;
  padding: 0;
  margin: 0;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
  background: #fff;
  z-index: 10050;
}

dialog.kh8-subject-modal:not([open]) {
  display: none;
}

dialog.kh8-subject-modal[open] {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%);
}

dialog.kh8-subject-modal::backdrop {
  background: rgba(20, 36, 28, 0.65);
}

.kh8-subject-modal__inner {
  padding: 2rem 2.25rem 2.25rem;
  max-height: 80vh;
  overflow-y: auto;
}

.kh8-subject-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--kh8-forest);
}

.kh8-subject-modal__title {
  font-family: var(--kh8-font-serif);
  font-size: 1.5rem;
  color: var(--kh8-forest);
  margin: 0;
  line-height: 1.3;
}

.kh8-subject-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--kh8-text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.kh8-subject-modal__close:hover {
  color: var(--kh8-forest);
}

.kh8-subject-modal__body p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--kh8-text);
  margin-bottom: 1rem;
}

/* Summer School homepage marketing popup */
dialog.kh8-ss-home-popup {
  position: fixed;
  inset: 0;
  width: min(92vw, 540px);
  max-width: 540px;
  height: fit-content;
  max-height: 90vh;
  margin: auto;
  border: none;
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(30, 51, 41, 0.06),
    0 24px 48px rgba(20, 36, 28, 0.16),
    0 48px 80px rgba(20, 36, 28, 0.12);
  z-index: 10060;
}

dialog.kh8-ss-home-popup:not([open]) {
  display: none;
}

dialog.kh8-ss-home-popup[open] {
  display: block;
  animation: kh8-ss-home-popup-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

dialog.kh8-ss-home-popup::backdrop {
  background: rgba(20, 36, 28, 0.52);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

dialog.kh8-ss-home-popup[open]::backdrop {
  animation: kh8-ss-home-popup-backdrop-in 0.22s ease-out forwards;
}

@keyframes kh8-ss-home-popup-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kh8-ss-home-popup-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.kh8-ss-home-popup__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  padding: 2rem 1.75rem 1.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.kh8-ss-home-popup__header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.kh8-ss-home-popup__body {
  text-align: center;
}

.kh8-ss-home-popup__poster-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 1.375rem;
}

.kh8-ss-home-popup__cover-link {
  display: block;
  width: 100%;
  max-width: 300px;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kh8-ss-home-popup__cover-link:hover,
.kh8-ss-home-popup__cover-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30, 51, 41, 0.14);
}

.kh8-ss-home-popup__cover {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(30, 51, 41, 0.1);
}

.kh8-ss-home-popup__highlights {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.kh8-ss-home-popup__highlight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--kh8-text);
}

.kh8-ss-home-popup__highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: rgba(30, 51, 41, 0.08);
  color: var(--kh8-forest);
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.kh8-ss-home-popup__title {
  font-family: var(--kh8-font-serif);
  font-size: clamp(1.5rem, 4.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--kh8-forest);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.kh8-ss-home-popup__subtitle {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--kh8-text-secondary);
  margin: 0 auto;
  max-width: 24rem;
}

.kh8-ss-home-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(30, 51, 41, 0.07);
  color: var(--kh8-text-secondary);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.kh8-ss-home-popup__close:hover,
.kh8-ss-home-popup__close:focus-visible {
  background: rgba(30, 51, 41, 0.12);
  color: var(--kh8-forest);
  transform: scale(1.04);
}

.kh8-ss-home-popup__footer {
  margin-top: auto;
}

.kh8-ss-home-popup__cta-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kh8-ss-home-popup__download {
  display: flex;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.kh8-ss-home-popup__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.kh8-ss-home-popup__btn {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  text-align: center;
  font-size: 0.875rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.kh8-ss-home-popup__snooze {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.125rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--kh8-text-secondary);
  cursor: pointer;
  user-select: none;
}

.kh8-ss-home-popup__snooze-input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--kh8-forest);
  cursor: pointer;
}

/* Subtle admissions conversion panel (high-traffic pages) */
.kh8-conversion-panel {
  padding: clamp(2rem, 4vw, 2.75rem) 0;
}

.kh8-conversion-panel__inner {
  padding: clamp(1.5rem, 3.5vw, 2rem) clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid rgba(30, 51, 41, 0.1);
  border-bottom: 1px solid rgba(30, 51, 41, 0.1);
}

.kh8-conversion-panel__title {
  font-family: var(--kh8-font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--kh8-forest);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.kh8-conversion-panel__sub {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--kh8-text-secondary);
  margin: 0 0 1.25rem;
}

.kh8-conversion-panel__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.kh8-conversion-panel__actions .kh8-btn {
  min-width: min(100%, 14rem);
}

.kh8-conversion-panel__or {
  font-size: 0.8125rem;
  color: var(--kh8-text-secondary);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

@media (min-width: 576px) {
  .kh8-conversion-panel__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1rem;
  }

  .kh8-conversion-panel__or {
    flex: 0 0 auto;
  }
}

/* Homepage Summer School section — clearer CTA hierarchy */
.kh8-summer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
}

.kh8-summer-actions__enquiry {
  flex: 1 1 100%;
  margin-top: 0.25rem;
}

.kh8-editorial-split__img-link {
  display: block;
  border-radius: inherit;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kh8-editorial-split__img-link:hover,
.kh8-editorial-split__img-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(30, 51, 41, 0.14);
}

.kh8-editorial-split__img-link:focus-visible {
  outline: 2px solid var(--kh8-accent);
  outline-offset: 3px;
}

/* Summer School booklet preview (landing page) */
.kh8-ss-booklet-preview {
  display: inline-block;
  max-width: 280px;
  margin: 1.5rem auto 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(30, 51, 41, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kh8-ss-booklet-preview:hover,
.kh8-ss-booklet-preview:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(30, 51, 41, 0.16);
}

.kh8-ss-booklet-preview__img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #fff;
}

/* Careers — HR application panel */
.kh8-careers-hr-panel {
  background: #fff;
  border: 1px solid rgba(30, 51, 41, 0.1);
  border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 2.25rem);
  text-align: center;
  box-shadow: 0 12px 40px rgba(30, 51, 41, 0.08);
}

.kh8-careers-hr-panel__title {
  font-family: var(--kh8-font-serif);
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  color: var(--kh8-forest);
  margin: 0 0 0.75rem;
}

.kh8-careers-hr-panel__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--kh8-text-secondary);
  margin: 0 0 1rem;
}

.kh8-careers-hr-panel__email {
  margin: 0 0 1.5rem;
}

.kh8-careers-hr-panel__email-link {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--kh8-forest);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.kh8-careers-hr-panel__email-link:hover,
.kh8-careers-hr-panel__email-link:focus-visible {
  color: var(--kh8-accent);
}

.kh8-copy-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 10070;
  padding: 0.625rem 1rem;
  border-radius: 999px;
  background: rgba(30, 51, 41, 0.92);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(0.5rem);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.kh8-copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .kh8-copy-toast {
    transition: none;
  }
}

.kh8-careers-hr-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.kh8-careers-apply-btn {
  min-width: min(100%, 16rem);
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  font-size: 1rem;
}

/* EAL contact — fully clickable profile cards */
.kh8-eal-contact-grid {
  row-gap: 1.5rem;
}

.kh8-eal-contact-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(30, 51, 41, 0.08);
  box-shadow: 0 10px 28px rgba(30, 51, 41, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.kh8-eal-contact-card:hover,
.kh8-eal-contact-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(30, 51, 41, 0.14);
  border-color: rgba(223, 150, 1, 0.35);
  text-decoration: none;
  color: inherit;
}

.kh8-eal-contact-card:focus-visible {
  outline: 2px solid var(--kh8-accent);
  outline-offset: 3px;
}

.kh8-eal-contact-card__photo-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f1ec;
}

.kh8-eal-contact-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kh8-eal-contact-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.125rem 1.25rem 1.25rem;
  text-align: center;
}

.kh8-eal-contact-card__name {
  font-family: var(--kh8-font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--kh8-forest);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kh8-eal-contact-card__role {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--kh8-text-secondary);
}

.kh8-eal-contact-card__email {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--kh8-accent);
  margin-top: 0.35rem;
}

@media (max-width: 575px) {
  dialog.kh8-ss-home-popup {
    width: 92vw;
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 20px;
  }

  .kh8-ss-home-popup__inner {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .kh8-ss-home-popup__cover {
    max-height: 240px;
  }

  .kh8-ss-home-popup__actions {
    grid-template-columns: 1fr;
  }

  .kh8-ss-home-popup__close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.kh8-ss-home-popup[open],
  dialog.kh8-ss-home-popup[open]::backdrop {
    animation: none;
  }

  .kh8-ss-home-popup__close {
    transition: none;
  }
}

/* ─── Stats Bar ──────────────────────────────────────────────────────────── */
.kh8-stats-bar {
  background: var(--kh8-forest);
  padding: var(--kh8-space-6) 0;
}

.kh8-stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--kh8-space-4);
  text-align: center;
}

.kh8-stats-bar__figure {
  font-family: var(--kh8-font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--kh8-accent);
  line-height: 1.1;
  margin: 0;
}

.kh8-stats-bar__label {
  font-family: var(--kh8-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin: 0.25rem 0 0;
}

.kh8-stats-bar__compare {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0.125rem 0 0;
}

/* ─── Subject Results Grid (A Level page) ──────────────────────────────── */
.kh8-results-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: var(--kh8-space-4);
}

.kh8-results-subject-card {
  border: 1px solid var(--kh8-border-soft);
  border-radius: 0.375rem;
  padding: 1rem;
  background: #fff;
}

.kh8-results-subject-card__name {
  font-family: var(--kh8-font-body);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--kh8-forest);
  margin: 0 0 0.25rem;
}

.kh8-results-subject-card__grade {
  font-family: var(--kh8-font-body);
  font-size: 0.8125rem;
  color: var(--kh8-accent);
  font-weight: 600;
  margin: 0;
}

/* ─── Curriculum Pathway Strip ──────────────────────────────────────────── */
.kh8-curriculum-path {
  background: var(--kh8-cream);
  border-top: 1px solid var(--kh8-border-soft);
  border-bottom: 1px solid var(--kh8-border-soft);
  padding: var(--kh8-space-3) 0;
  overflow-x: auto;
}

.kh8-curriculum-path__list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  justify-content: center;
}

@media (max-width: 767px) {
  .kh8-curriculum-path__list {
    justify-content: flex-start;
    padding: 0 1rem;
  }
}

.kh8-curriculum-path__item {
  display: flex;
  align-items: center;
}

.kh8-curriculum-path__link {
  font-family: var(--kh8-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--kh8-text-secondary);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  white-space: nowrap;
  transition: color 0.15s;
}

.kh8-curriculum-path__link:hover {
  color: var(--kh8-forest);
}

.kh8-curriculum-path__link--active {
  color: var(--kh8-forest);
  background: rgba(20, 51, 41, 0.08);
}

.kh8-curriculum-path__arrow {
  color: var(--kh8-text-tertiary);
  font-size: 0.75rem;
  padding: 0 0.125rem;
  flex-shrink: 0;
}

/* ─── Learning Skills category ──────────────────────────────────────────── */
.kh8-skills-category {
  margin-bottom: var(--kh8-space-5);
}

.kh8-skills-category__heading {
  font-family: var(--kh8-font-serif);
  font-size: 1.25rem;
  color: var(--kh8-forest);
  margin: 0 0 var(--kh8-space-3);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--kh8-accent);
  display: inline-block;
}

.kh8-skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.kh8-skills-list__item {
  padding-left: 1.25rem;
  position: relative;
}

.kh8-skills-list__item::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--kh8-accent);
  font-weight: 700;
}

.kh8-skills-list__term {
  font-weight: 600;
  color: var(--kh8-forest);
  font-size: 0.9375rem;
}

.kh8-skills-list__desc {
  font-size: 0.9375rem;
  color: var(--kh8-text);
  line-height: 1.65;
}

/* ─── House shields grid ─────────────────────────────────────────────────── */
.kh8-houses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--kh8-space-4);
  text-align: center;
}

@media (min-width: 768px) {
  .kh8-houses-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kh8-house-shield img {
  max-width: 140px;
  height: auto;
}

.kh8-house-shield__name {
  font-family: var(--kh8-font-body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--kh8-forest);
  margin-top: 0.5rem;
}

/* ─── Reveal animation (scroll-triggered fade-up) ────────────────────────── */
.kh8-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.kh8-reveal--show {
  opacity: 1;
  transform: none;
}

/* First .kh8-reveal directly after the hero/curriculum-path is always in the
   initial viewport — show it immediately without waiting for scroll. */
.kh8-page-hero + .kh8-reveal,
.kh8-page-hero + * + .kh8-reveal,
.kh8-curriculum-path + .kh8-reveal,
.kh8-curriculum-path + * + .kh8-reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .kh8-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   KH8 WAVE 3 COMPONENT ALIASES
   Wave 3 pages use slightly different class names from the approved system.
   These rules alias them to the correct layout behaviour without touching
   any of the 20 PHP files.
   ========================================================================== */

/* ─── Sidebar intro: self-contained two-column pattern ──────────────────── */
/* Approved pages: .col-12.col-lg-4.kh8-sidebar-intro inside Bootstrap row   */
/* Wave 3 pages:   .kh8-sidebar-intro > .__sidebar + .__body (no Bootstrap)  */
.kh8-sidebar-intro:has(> .kh8-sidebar-intro__sidebar) {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--kh8-space-5);
  align-items: start;
}

@media (min-width: 992px) {
  .kh8-sidebar-intro:has(> .kh8-sidebar-intro__sidebar) {
    grid-template-columns: 1fr 2fr;
    gap: clamp(3rem, 6vw, 5rem);
  }
}

.kh8-sidebar-intro__sidebar {
  position: sticky;
  top: 2rem;
  align-self: flex-start;
}

@media (max-width: 991.98px) {
  .kh8-sidebar-intro__sidebar {
    position: static;
    top: auto;
  }

  .row.kh8-sidebar-intro > [class*="col-"].kh8-sidebar-intro__sidebar,
  .row.kh8-sidebar-intro > [class*="col-"].kh8-sidebar-intro__body {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }
}

.kh8-sidebar-intro__body > p:last-child {
  margin-bottom: 0;
}

/* Fallback for browsers without :has() support */
@supports not selector(:has(*)) {
  .kh8-sidebar-intro {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--kh8-space-5);
  }

  @media (min-width: 992px) {
    .kh8-sidebar-intro {
      grid-template-columns: 1fr 2fr;
      gap: clamp(3rem, 6vw, 5rem);
    }
  }
}

/* ─── Editorial split: Wave 3 pattern ───────────────────────────────────── */
/* Approved pages: .kh8-editorial-split > .__row > .__text + .__img          */
/* Wave 3 pages:   .kh8-editorial-split > .__content + .__media (no __row)   */

/* Make the outer container flex so direct __content/__media children work   */
.kh8-editorial-split {
  display: flex;
  flex-wrap: wrap;
}

/* Ensure existing __row spans full width as a flex item (backward compat)   */
.kh8-editorial-split__row {
  flex: 0 0 100%;
  width: 100%;
}

/* __content = same layout as __text */
.kh8-editorial-split__content {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2.5rem);
}

/* __media = same layout as __img container */
.kh8-editorial-split__media {
  flex: 0 0 100%;
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

/* img inside __media (Wave 3 uses class="kh8-editorial-split__img" on <img>) */
.kh8-editorial-split__media img,
.kh8-editorial-split__media .kh8-editorial-split__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* __heading = h2/h3 inside content column */
.kh8-editorial-split__heading {
  font-family: var(--kh8-font-display);
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--kh8-forest);
  line-height: 1.2;
  margin: 0 0 0.875rem;
}

/* Mobile stacking: image appears above content */
@media (max-width: 991.98px) {
  .kh8-editorial-split__media {
    order: -1;
  }
  .kh8-editorial-split--img-left .kh8-editorial-split__media {
    order: 0;
  }
}

/* Desktop: side-by-side */
@media (min-width: 992px) {
  .kh8-editorial-split__content {
    flex: 0 0 48%;
    padding: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem);
  }

  .kh8-editorial-split__media {
    flex: 0 0 52%;
    min-height: 440px;
  }
}

@media (min-width: 1200px) {
  .kh8-editorial-split__content {
    flex: 0 0 44%;
    padding: clamp(3.5rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
  }

  .kh8-editorial-split__media {
    flex: 0 0 56%;
  }
}

/* ─── Feature item: __body alias for __text ──────────────────────────────── */
.kh8-feature-item__body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--kh8-text);
  margin: 0;
}

/* Feature item body copy inside grids — no reading-width cap */
.main section p.kh8-feature-item__body {
  max-width: none;
}

.kh8-feature-item__body + .kh8-feature-item__body {
  margin-top: 0.75rem;
}

/* Editorial split inside Bootstrap columns — use full column width */
[class*="col-"] > .kh8-editorial-split {
  display: block;
}

[class*="col-"] .kh8-editorial-split__content,
[class*="col-"] .kh8-editorial-split__text {
  flex: none;
  width: 100%;
  max-width: none;
  padding: 0;
}

@media (min-width: 992px) {
  [class*="col-"] .kh8-editorial-split__content,
  [class*="col-"] .kh8-editorial-split__text {
    flex: none;
    width: 100%;
    padding: 0;
  }
}

/* ─── Wave 3 spacing utility: py-6 ──────────────────────────────────────── */
/* Bootstrap 4 only defines up to py-5 (3rem). Wave 3 pages use py-6. */
.py-6 {
  padding-top: var(--kh8-section-pad-y) !important;
  padding-bottom: var(--kh8-section-pad-y) !important;
}

@media (min-width: 992px) {
  .py-6 {
    padding-top: var(--kh8-section-pad-y-lg) !important;
    padding-bottom: var(--kh8-section-pad-y-lg) !important;
  }
}

/* ─── Wave 3 typography utilities ────────────────────────────────────────── */
.kh8-body-lead {
  font-family: var(--kh8-font-body);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--kh8-text);
  margin-bottom: 1rem;
}

.kh8-body-lead:last-child {
  margin-bottom: 0;
}

.kh8-body-small {
  font-family: var(--kh8-font-body);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--kh8-text);
}

/* ─── Wave 3 CTA Banner (dark forest variant) ───────────────────────────── */
/* Used as: <section class="kh8-bg-forest kh8-cta-banner kh8-reveal"> */
section.kh8-bg-forest.kh8-cta-banner,
.kh8-bg-forest.kh8-cta-banner {
  padding-top: var(--kh8-section-pad-y);
  padding-bottom: var(--kh8-section-pad-y);
  border-bottom: none;
}

@media (min-width: 992px) {
  section.kh8-bg-forest.kh8-cta-banner,
  .kh8-bg-forest.kh8-cta-banner {
    padding-top: var(--kh8-section-pad-y-lg);
    padding-bottom: var(--kh8-section-pad-y-lg);
  }
}

/* Title element used inside dark forest CTA banners in Wave 3 pages */
.kh8-cta-banner__title {
  font-family: var(--kh8-font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  color: #F9F7F4;
  margin: 0 0 var(--kh8-space-3);
  text-align: center;
}

/* Subtitle / description inside dark forest CTA banners */
.kh8-cta-banner__sub {
  font-family: var(--kh8-font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(249, 247, 244, 0.78);
  margin: 0 auto var(--kh8-space-4);
  max-width: 38rem;
  text-align: center;
}

/* Contact line inside dark hero or CTA banner */
.kh8-hero-contact {
  font-family: var(--kh8-font-body);
  font-size: 0.875rem;
  color: rgba(249, 247, 244, 0.65);
  margin: 0;
}

.kh8-hero-contact a {
  color: rgba(249, 247, 244, 0.80);
  text-decoration: none;
}

.kh8-hero-contact a:hover,
.kh8-hero-contact a:focus {
  color: #F9F7F4;
  text-decoration: underline;
}

/* ─── Full-width parallax image break (replaces Porto .parallax-img) ──────── */
/* Used as: <div class="kh8-img-break" style="background-image:url(...)">     */
.kh8-img-break {
  position: relative;
  width: 100%;
  display: block;
  min-height: clamp(360px, 48vh, 520px);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
  line-height: 0;
}

/* Subtle depth overlay — matches legacy .parallax-img treatment */
.kh8-img-break::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.06),
    rgba(0, 0, 0, 0.16)
  );
  pointer-events: none;
  z-index: 1;
}

/* Parallax strips must stay visible — no fade-in on scroll */
.kh8-img-break.kh8-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Mobile / touch: fixed attachment is unreliable — use scroll */
@media (max-width: 991.98px) {
  .kh8-img-break {
    background-attachment: scroll;
    min-height: clamp(280px, 52vw, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kh8-img-break {
    background-attachment: scroll;
  }
}

/* Also support an inner <img> variant */
.kh8-img-break img {
  width: 100%;
  display: block;
  min-height: clamp(360px, 48vh, 520px);
  object-fit: cover;
  object-position: center center;
}

/* ─── Student Destinations ───────────────────────────────────────────────── */
.kh8-destinations-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--kh8-border-soft);
  font-family: var(--kh8-font-body);
  font-size: 0.9375rem;
  color: var(--kh8-ink);
  line-height: 1.5;
}

.kh8-destinations-list li:last-child {
  border-bottom: none;
}

.kh8-univ-col li {
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--kh8-border-soft);
  font-family: var(--kh8-font-body);
  font-size: 0.9375rem;
  color: var(--kh8-ink);
}

.kh8-univ-col li:last-child {
  border-bottom: none;
}

.kh8-partner-btn img {
  transition: opacity 0.2s ease;
}

.kh8-partner-btn:hover img,
.kh8-partner-btn:focus img {
  opacity: 0.75;
}

.kh8-partner-btn:focus {
  outline: 2px solid var(--kh8-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ==========================================================================
   Wave 4 regression fix pack — scoped to trust/people pages only
   ========================================================================== */

/* 1. Body lead — exempt from modern-ui 42.5rem paragraph cap */
.main section p.kh8-body-lead,
.main section .kh8-sidebar-intro__body .kh8-body-lead {
  max-width: none;
}

/* 2. Welcome panel inside sidebar editorial column */
.kh8-sidebar-intro__body .kh8-welcome-panel {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* 3. Row + sidebar-intro hybrid — neutralize legacy sticky/padding on row wrapper */
.row.kh8-sidebar-intro:has(> .kh8-sidebar-intro__sidebar) {
  position: static;
  top: auto;
  align-self: auto;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
}

.row.kh8-sidebar-intro > [class*="col-"].kh8-sidebar-intro__sidebar,
.row.kh8-sidebar-intro > [class*="col-"].kh8-sidebar-intro__body {
  max-width: none;
}

@media (min-width: 992px) {
  .row.kh8-sidebar-intro > [class*="col-"].kh8-sidebar-intro__sidebar,
  .row.kh8-sidebar-intro > [class*="col-"].kh8-sidebar-intro__body {
    flex: none;
    width: auto;
  }
}

/* 4. People cards — original custom-thumb-info-1 polish (demo-finance parity) */
.main .col-lg-8.mx-auto > .row,
.main .row.kh8-people-grid {
  align-items: stretch;
}

.main .col-lg-8.mx-auto > .row > [class*="col-lg-4"],
.main .col-lg-8.mx-auto > .row > [class*="col-sm-6"],
.main .row.kh8-people-grid > [class*="col-lg-4"],
.main .row.kh8-people-grid > [class*="col-sm-6"] {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.875rem;
}

.kh8-people-card-btn {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  width: 100%;
}

.kh8-people-card-btn:focus-visible {
  outline: 2px solid var(--kh8-accent);
  outline-offset: 2px;
}

.main .kh8-people-card-btn .thumb-info.custom-thumb-info-1 {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  width: 100%;
  overflow: visible;
  margin-bottom: 0;
  background-color: #fff;
  border-radius: 0;
  box-shadow: none;
  transition: box-shadow 0.3s ease;
}

.kh8-people-card-btn .custom-thumb-info-1 .thumb-info-wrapper {
  flex: 0 0 auto;
  transform: none;
  overflow: hidden;
}

.main .kh8-people-card-btn .thumb-info-wrapper .img-fluid {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}

.main .col-lg-4 .kh8-people-card-btn img.img-fluid,
.main .col-sm-6 .kh8-people-card-btn img.img-fluid {
  border-radius: 0;
  box-shadow: none;
}

.kh8-people-card-btn .custom-thumb-info-1 .thumb-info-caption {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 0;
  border-bottom: 1px solid #e3e3e3;
  border-radius: 0;
  background-color: #fff;
}

.main .kh8-people-card-btn .thumb-info-caption.bg-color-light {
  padding: 0;
  border-radius: 0;
}

.kh8-people-card-btn .custom-thumb-info-1 .thumb-info-caption-text {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.875rem 1.25rem;
  padding-right: 3.25rem;
  margin: 0;
  min-height: 8.5rem;
}

.kh8-people-card-btn .thumb-info-caption-title {
  flex: 1 1 auto;
  display: block;
  text-align: left;
  line-height: 1.35;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  padding-right: 0;
}

.kh8-people-card-btn .thumb-info-caption-text p.lead {
  max-width: none;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--kh8-text-muted);
  text-align: left;
}

.kh8-people-card-btn .custom-thumb-info-caption-plus {
  position: absolute;
  top: 1.875rem;
  right: 1.25rem;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.kh8-people-card-btn:hover .thumb-info.custom-thumb-info-1,
.kh8-people-card-btn:focus-visible .thumb-info.custom-thumb-info-1 {
  box-shadow: 0 0 70px 0 rgba(139, 139, 139, 0.45);
  transform: none;
}

.kh8-people-card-btn:hover .custom-thumb-info-1 .thumb-info-caption,
.kh8-people-card-btn:focus-visible .custom-thumb-info-1 .thumb-info-caption {
  border-bottom-color: transparent;
}

/* 5. Staff directory — override Porto toggle chrome */
.kh8-staff-directory .container .container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.main .kh8-staff-directory .kh8-staff-directory__phase-heading .divider.divider-secondary.divider-small {
  display: block;
  width: 100%;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.main .kh8-staff-directory .kh8-staff-directory__phase-heading .divider.divider-secondary.divider-small hr {
  width: 4.5rem;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-color: var(--kh8-accent);
  border-width: 2px;
}

.kh8-staff-directory .toggle[data-plugin-toggle] {
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 0;
  overflow: visible;
  background: transparent;
}

.kh8-staff-directory .toggle > section.toggle {
  margin-bottom: 0;
}

.kh8-staff-directory .toggle > section.toggle + section.toggle {
  border-top: none;
}

.kh8-staff-directory .toggle > section.toggle {
  border-bottom: 1px solid var(--kh8-border-soft);
}

.main .kh8-staff-directory .toggle section.toggle > .toggle-title,
.main .kh8-staff-directory .toggle .toggle-title {
  display: block;
  width: 100%;
  padding: 0.875rem 2.75rem 0.875rem 1.5rem;
  margin-bottom: 0;
  border: none;
  border-left: 3px solid var(--kh8-forest);
  border-radius: 0;
  background: transparent;
  font-family: var(--kh8-font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--kh8-forest);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.main .kh8-staff-directory .toggle .toggle-title::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  color: var(--kh8-accent);
  transition: transform 0.2s ease;
}

.kh8-staff-directory .toggle.toggle-primary section.toggle.active > .toggle-title::after {
  content: "−";
  color: #fff;
}

.kh8-staff-directory .toggle.toggle-primary section.toggle.active > .toggle-title,
.kh8-staff-directory .toggle.toggle-primary section.toggle.active > .toggle-title:hover {
  background-color: var(--kh8-forest);
  border-left-color: var(--kh8-forest);
  color: #fff;
}

.kh8-staff-directory .toggle-title:hover,
.kh8-staff-directory .toggle section.toggle > .toggle-title:hover {
  color: var(--kh8-accent);
  background: rgba(40, 67, 56, 0.04);
}

.kh8-staff-directory .toggle.toggle-primary section.toggle.active > .toggle-title:hover {
  color: #fff;
  background-color: var(--kh8-forest);
}

.main .kh8-staff-directory .toggle .toggle-content,
.main .kh8-staff-directory .toggle-content {
  padding: 1rem 0 1.5rem 1.5rem;
}

/* ─── Mobile polish pass ─────────────────────────────────────────────────── */

/* 1. Admissions CTA — collapse decorative image strip; compact content block */
@media (max-width: 767.98px) {
  .kh8-cta-header-img,
  .kh8-cta-banner__img,
  .kh8-cta-banner__media {
    display: none;
  }

  section.section-no-margin.kh8-section.kh8-cta-banner,
  section.section-no-margin.kh8-section.kh8-cta-banner.kh8-section--dark,
  section.kh8-bg-forest.kh8-cta-banner,
  .kh8-bg-forest.kh8-cta-banner {
    padding-top: clamp(2rem, 6vw, 2.75rem);
    padding-bottom: clamp(2rem, 6vw, 2.75rem);
  }

  .kh8-cta-banner .container > .row {
    padding-top: 0 !important;
  }

  .kh8-cta-banner .kh8-section-head {
    margin-bottom: var(--kh8-space-3);
  }

  .kh8-cta-banner .kh8-cta-actions {
    margin-top: var(--kh8-space-3);
  }
}

/* Desktop: background-image CTA strip (pages using kh8-cta-banner__img) */
@media (min-width: 768px) {
  .kh8-cta-banner__img {
    width: 100%;
    height: 240px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
  }
}

@media (min-width: 992px) {
  .kh8-cta-banner__img {
    height: 300px;
  }
}

/* 2. Results statistics — dominant figures on small screens */
@media (max-width: 767.98px) {
  .kh8-stats-bar__figure {
    font-size: clamp(3rem, 10vw, 4rem);
    font-weight: 600;
  }

  .kh8-stats-bar__label {
    font-size: 0.6875rem;
    margin-top: 0.375rem;
  }

  .kh8-stat-value--dark {
    font-size: clamp(3rem, 10vw, 4rem);
    font-weight: 600;
  }

  .kh8-stat-label--dark {
    font-size: 0.6875rem;
    margin-top: 0.375rem;
  }
}

/* AAB / non-percentage figures — slightly tighter cap */
@media (max-width: 767.98px) {
  .kh8-stats-bar__cell:last-child .kh8-stats-bar__figure,
  .kh8-outcomes-head + .row .col-6:last-child .kh8-stat-value--dark,
  .kh8-outcomes-head + .row .col-lg-3:last-child .kh8-stat-value--dark {
    font-size: clamp(2.75rem, 9vw, 3.5rem);
  }
}

/* 3 & 4. Staff profile — gutter, image footprint */
@media (max-width: 767.98px) {
  .main .kh8-staff-directory .toggle .toggle-content,
  .main .kh8-staff-directory .toggle-content {
    padding: 1rem 24px 1.5rem;
  }

  .main .kh8-staff-directory .toggle-content .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }

  .main .kh8-staff-directory .toggle-content img.img-fluid {
    display: block;
    width: auto;
    max-width: 75%;
    max-height: 420px;
    height: auto;
    margin-inline: auto;
    object-fit: contain;
    object-position: top center;
  }
}
