/* ==========================================================================
   My IELTS World — logged-out homepage
   --------------------------------------------------------------------------
   Built into the theme in v5.18.0 (was v2.5.0 of the pasted landing CSS).
   Markup: includes/landing-page.php. Loaded only for visitors who are not
   signed in, on the Student Homepage (miw_landing_enqueue()).

   Scoped under .miw-landing. The theme supplies the site header, the featured
   image at the top, and the footer — none of those are styled here.

   The landing is drawn full width by the template, outside any content
   column, so the old full-bleed breakout and the negative-margin "vertical
   fit" fix are gone. Breakpoints are container queries against
   .miw-landing-wrap, the element around .miw-landing.
   ========================================================================== */

/* ---------- Scoped design tokens ----------
   The theme header samples at #0077a0 (hue 195°). The section bands are a
   warm charcoal, #22201d — 159° from the header with saturation under 10%,
   so there is no hue competition. The header keeps the teal, orange keeps the
   accent, and the charcoal is the neutral structure holding both.

   The bands are DARK, so text on them is light. Those colours are the
   "on-band" group below — change the band and only that group needs
   revisiting.
   ---------------------------------------------------------------------- */
.miw-landing {
  /* Sampled from the theme header. Update if the header changes. */
  --miw-header: #0077a0;

  /* Warm charcoal bands */
  --miw-band: #22201d;             /* dark section backgrounds */
  --miw-band-700: #38342e;         /* deeper partner, CTA gradient */

  /* On-band colours. white 16.25:1 on band / 12.36:1 on band-700
     muted 10.07 / 7.66 · orange accent 6.93 / 5.27 */
  --miw-on-band: #ffffff;          /* headings and strong text on a band */
  --miw-on-band-muted: #cfcbc6;    /* body copy on a band */
  --miw-on-band-accent: #ff8a3d;   /* stat numbers, check marks */

  /* Light sections */
  --miw-ink: #1f1c19;              /* headings, strong text */
  --miw-muted: #6d675f;            /* body copy */
  --miw-bg-soft: #f9f8f6;
  --miw-line: #ece9e4;
  --miw-white: #ffffff;

  /* Teal — links, tying back to the header */
  --miw-link: #0f698a;

  /* Legacy aliases, so anything still referencing the old names works. */
  --miw-deep: var(--miw-ink);
  --miw-deep-700: var(--miw-band-700);
  --miw-deep-600: var(--miw-link);
  --miw-navy: var(--miw-ink);
  --miw-navy-700: var(--miw-band-700);
  --miw-navy-600: var(--miw-link);

  /* Warm accent — buttons, bullets, stat numbers, badges */
  --miw-accent: #ff8a3d;
  --miw-accent-hover: #ff9d5e;
  --miw-accent-deep: #e96f1c;

  /* Cool accent — small labels (eyebrows, lesson counts, FAQ marker).
     #2b84a0 is 4.28:1 on white, 4.03:1 on --miw-bg-soft; AA at this text size
     wants 4.5:1. Swap in #25738b for full AA — nothing else changes. */
  --miw-accent-cool: #2b84a0;
  --miw-accent-cool-light: #7ec8dd;   /* eyebrow on a band */

  --miw-radius: 16px;
  --miw-radius-sm: 12px;
  --miw-shadow-sm: 0 1px 2px rgba(34, 32, 29, .07), 0 4px 12px rgba(34, 32, 29, .06);
  --miw-shadow-md: 0 2px 4px rgba(34, 32, 29, .07), 0 12px 28px rgba(34, 32, 29, .13);

  --miw-container: 1200px;
  --miw-gutter: 32px;
  --miw-section-y: 104px;

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--miw-ink);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

/* Breakpoints key off the wrapper's width, not the viewport. The container
   is the wrapper, not .miw-landing itself: an element can't be restyled by a
   query on its own size, so the phone values of --miw-section-y and
   --miw-gutter (set on .miw-landing in the queries below) would never apply. */
.miw-landing-wrap {
  container: miw / inline-size;
}

/* ---------- Base resets ----------
   The doubled class (.miw-landing.miw-landing) lifts these above theme rules
   like `.entry-content a` (0,1,1) whatever the stylesheet order. The element
   selectors sit inside :where(), which adds no specificity — so the whole
   block lands at exactly (0,2,0).

   That number matters. Component rules below are also (0,2,0) and come later,
   so they win the tie. Without :where() these resets would be (0,2,1) and
   would override every .miw-btn rule — which is exactly how the buttons ended
   up with the base link colour and picked up an underline on hover. */
.miw-landing.miw-landing *,
.miw-landing.miw-landing *::before,
.miw-landing.miw-landing *::after {
  box-sizing: border-box;
}

.miw-landing.miw-landing :where(img) {
  max-width: 100%;
  height: auto;
  display: block;
}

.miw-landing.miw-landing :where(figure) {
  margin: 0;
}

.miw-landing.miw-landing :where(a) {
  color: var(--miw-link);
  text-decoration: none;
}

.miw-landing.miw-landing :where(a:hover) {
  text-decoration: underline;
}

.miw-landing.miw-landing :where(h1, h2, h3) {
  line-height: 1.15;
  color: var(--miw-ink);
  margin: 0 0 .5em;
  padding: 0;
  letter-spacing: -0.02em;
  border: none;
  text-wrap: balance;
}

.miw-landing.miw-landing :where(p) {
  margin: 0 0 1em;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.miw-landing.miw-landing :where(ul) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.miw-landing.miw-landing :where(li) {
  margin: 0;
}

.miw-landing.miw-landing :where(details, summary) {
  margin: 0;
  padding: 0;
}

/* Anchor targets clear a sticky theme header. */
.miw-landing [id] {
  scroll-margin-top: 96px;
}

/* ---------- Focus ----------
   Ink ring on light sections, white on the dark bands. The old rule used the
   accent orange, which was invisible on the orange primary button. No
   border-radius here — the outline follows the element's own radius. */
.miw-landing :focus-visible {
  outline: 3px solid var(--miw-ink);
  outline-offset: 2px;
}

.miw-landing .miw-stats :focus-visible,
.miw-landing .miw-cbt :focus-visible,
.miw-landing .miw-cta-band :focus-visible {
  outline-color: var(--miw-on-band);
}

/* ---------- Layout ---------- */
.miw-landing .miw-container {
  width: 100%;
  max-width: var(--miw-container);
  margin-inline: auto;
  padding-inline: var(--miw-gutter);
}

.miw-landing .miw-container-narrow {
  max-width: 860px;
}

/* ---------- Buttons ---------- */
.miw-landing .miw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;          /* touch target */
  padding: .72rem 1.6rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

/* A button is never underlined, in any state. */
.miw-landing .miw-btn,
.miw-landing .miw-btn:hover,
.miw-landing .miw-btn:focus,
.miw-landing .miw-btn:active,
.miw-landing .miw-btn:visited {
  text-decoration: none;
}

.miw-landing .miw-btn:hover {
  transform: translateY(-1px);
}

.miw-landing .miw-btn:active {
  transform: translateY(0);
}

.miw-landing .miw-btn-lg {
  min-height: 52px;
  padding: .95rem 2rem;
  font-size: 1.05rem;
}

.miw-landing .miw-btn-primary {
  background: var(--miw-accent);
  color: var(--miw-ink);
  border-color: var(--miw-accent);
  box-shadow: 0 6px 18px rgba(233, 111, 28, .26);
}

/* Hover BRIGHTENS rather than darkening: darkening to #e96f1c put the label
   at 3.11:1, below the 4.5:1 AA needs at this size. */
.miw-landing .miw-btn-primary:hover {
  background: var(--miw-accent-hover);
  border-color: var(--miw-accent-hover);
  color: var(--miw-ink);
  box-shadow: 0 10px 26px rgba(233, 111, 28, .34);
}

.miw-landing .miw-btn-outline {
  background: transparent;
  color: var(--miw-ink);
  border-color: rgba(34, 32, 29, .28);
}

.miw-landing .miw-btn-outline:hover {
  background: var(--miw-ink);
  color: var(--miw-white);
  border-color: var(--miw-ink);
}

.miw-landing .miw-btn-white {
  background: var(--miw-white);
  color: var(--miw-ink);
  border-color: var(--miw-white);
}

.miw-landing .miw-btn-white:hover {
  background: #f2ece5;
  border-color: #f2ece5;
  color: var(--miw-ink);
}

.miw-landing .miw-btn-outline-light {
  background: transparent;
  color: var(--miw-on-band);
  border-color: rgba(255, 255, 255, .5);
}

.miw-landing .miw-btn-outline-light:hover {
  background: rgba(255, 255, 255, .14);
  border-color: var(--miw-on-band);
  color: var(--miw-on-band);
}

.miw-landing .miw-btn-block {
  display: flex;
  width: 100%;
}

/* ---------- Eyebrows + section headings ---------- */
.miw-landing .miw-eyebrow {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--miw-accent-cool);
  margin-bottom: .9rem;
}

/* The eyebrow is a <p>, so `.miw-cbt-copy p` (0,2,1) outranks a bare
   `.miw-eyebrow-light` (0,2,0) and steals its colour. Matched here. */
.miw-landing .miw-eyebrow-light,
.miw-landing .miw-cbt-copy p.miw-eyebrow-light,
.miw-landing .miw-cta-band p.miw-eyebrow-light {
  color: var(--miw-accent-cool-light);
}

.miw-landing .miw-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.4rem;
}

.miw-landing .miw-section-head h2 {
  font-size: 2.1rem;                              /* fallback */
  font-size: clamp(1.75rem, 3.6cqi, 2.5rem);
  font-weight: 800;
}

.miw-landing .miw-section-lede {
  color: var(--miw-muted);
  font-size: 1.05rem;
  margin-bottom: 0;
}

.miw-landing .miw-text-link {
  color: var(--miw-link);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
}

.miw-landing .miw-text-link:hover {
  text-decoration: underline;
}

/* ---------- Hero ----------
   The featured image sits directly above. A hard white edge under a
   photograph reads as a seam, so the hero opens on a tinted wash that
   resolves to white — it joins the photo whether or not the theme prints
   the page title in between. */
.miw-landing .miw-hero {
  background:
    radial-gradient(1200px 520px at 84% -12%, rgba(255, 138, 61, .16), transparent 62%),
    radial-gradient(1000px 500px at -8% 8%, rgba(0, 119, 160, .16), transparent 62%),
    linear-gradient(180deg, #eef1f2 0%, #f8f7f5 36%, var(--miw-white) 78%);
  padding: 88px 0 76px;
}

.miw-landing .miw-hero-inner {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.miw-landing .miw-hero-title {
  font-size: 3rem;                                /* fallback */
  font-size: clamp(2.15rem, 5cqi, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: .5em;
}

.miw-landing .miw-hero-lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--miw-muted);
  max-width: 60ch;
  margin: 0 auto 2rem;
}

.miw-landing .miw-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 1.2rem;
}

.miw-landing .miw-hero-note {
  font-size: .88rem;
  color: var(--miw-muted);
  margin: 0;
}

/* ---------- Stats ---------- */
.miw-landing .miw-stats {
  background: var(--miw-band);
  color: var(--miw-on-band);
  padding: 44px 0;
}

.miw-landing .miw-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

/* Hairline separators between figures. */
.miw-landing .miw-stat + .miw-stat {
  border-left: 1px solid rgba(255, 255, 255, .14);
}

.miw-landing .miw-stat-number {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--miw-on-band-accent);
  margin-bottom: .1rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.miw-landing .miw-stat-label {
  color: var(--miw-on-band-muted);
  font-size: .95rem;
  margin: 0;
}

/* ---------- Features ---------- */
.miw-landing .miw-features {
  padding: var(--miw-section-y) 0;
  background: var(--miw-white);
}

.miw-landing .miw-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.miw-landing .miw-feature-card {
  background: var(--miw-white);
  border: 1px solid var(--miw-line);
  border-radius: var(--miw-radius);
  overflow: hidden;
  box-shadow: var(--miw-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex;
  flex-direction: column;
}

.miw-landing .miw-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--miw-shadow-md);
  border-color: #ddd8d1;
}

.miw-landing .miw-feature-figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--miw-bg-soft);
}

.miw-landing .miw-feature-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.miw-landing .miw-feature-body {
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.miw-landing .miw-feature-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.miw-landing .miw-feature-body p {
  color: var(--miw-muted);
  font-size: .97rem;
  flex: 1;
  margin-bottom: 1.2rem;
}

/* ---------- Courses ---------- */
.miw-landing .miw-courses {
  padding: var(--miw-section-y) 0;
  background: var(--miw-bg-soft);
}

.miw-landing .miw-course-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Flex column so the "View course" links align across a row. */
.miw-landing .miw-course-card {
  background: var(--miw-white);
  border: 1px solid var(--miw-line);
  border-radius: var(--miw-radius);
  padding: 32px;
  box-shadow: var(--miw-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex;
  flex-direction: column;
}

.miw-landing .miw-course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--miw-shadow-md);
  border-color: #ddd8d1;
}

.miw-landing .miw-course-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(0, 119, 160, .10);
  color: var(--miw-accent-cool);
  margin-bottom: 18px;
}

.miw-landing .miw-course-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .15em;
}

.miw-landing .miw-course-count {
  font-size: .85rem;
  font-weight: 700;
  color: var(--miw-accent-cool);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
}

.miw-landing .miw-course-card ul {
  margin-bottom: 1.4rem;
  flex: 1;
}

.miw-landing .miw-course-card li,
.miw-landing .miw-price-card li {
  position: relative;
  padding-left: 22px;
  color: var(--miw-muted);
  font-size: .95rem;
  margin-bottom: .45rem;
}

.miw-landing .miw-course-card li::before,
.miw-landing .miw-price-card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--miw-accent);
}

.miw-landing .miw-course-card .miw-text-link {
  margin-top: auto;
}

.miw-landing .miw-courses-note {
  text-align: center;
  margin-top: 44px;
  margin-bottom: 0;
}

/* ---------- Computer-delivered ---------- */
.miw-landing .miw-cbt {
  background: var(--miw-band);
  color: var(--miw-on-band);
  padding: var(--miw-section-y) 0;
}

.miw-landing .miw-cbt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.miw-landing .miw-cbt-figure img {
  border-radius: var(--miw-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.miw-landing .miw-cbt-copy h2 {
  color: var(--miw-on-band);
  font-size: 2.1rem;                              /* fallback */
  font-size: clamp(1.75rem, 3.6cqi, 2.5rem);
  font-weight: 800;
}

.miw-landing .miw-cbt-copy p {
  font-size: 1.05rem;
  color: var(--miw-on-band-muted);
}

.miw-landing .miw-check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: .7rem;
  font-weight: 600;
}

.miw-landing .miw-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  line-height: inherit;
  color: var(--miw-on-band-accent);
  font-weight: 800;
}

/* ---------- Pricing ---------- */
.miw-landing .miw-pricing {
  padding: var(--miw-section-y) 0;
  background: var(--miw-white);
}

.miw-landing .miw-rate-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}

.miw-landing .miw-rate {
  background: var(--miw-bg-soft);
  border: 1px solid var(--miw-line);
  border-radius: var(--miw-radius);
  padding: 26px;
  text-align: center;
}

.miw-landing .miw-rate-amount {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--miw-ink);
  margin-bottom: .2rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.miw-landing .miw-rate-label {
  color: var(--miw-muted);
  font-size: .92rem;
  margin: 0;
}

.miw-landing .miw-price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

/* All three cards carry a 2px border so the featured card doesn't shift its
   contents by a pixel relative to its neighbours. */
.miw-landing .miw-price-card {
  background: var(--miw-white);
  border: 2px solid var(--miw-line);
  border-radius: var(--miw-radius);
  padding: 34px 30px;
  box-shadow: var(--miw-shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}

.miw-landing .miw-price-card-featured {
  border-color: var(--miw-accent);
  box-shadow: var(--miw-shadow-md);
}

.miw-landing .miw-price-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--miw-accent);
  color: var(--miw-ink);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 999px;
  white-space: nowrap;
  margin: 0;
}

.miw-landing .miw-price-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .2rem;
}

.miw-landing .miw-price-credits {
  font-size: .95rem;
  color: var(--miw-muted);
  margin-bottom: .6rem;
}

.miw-landing .miw-price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--miw-ink);
  line-height: 1.1;
  margin-bottom: .1rem;
  font-variant-numeric: tabular-nums;
}

.miw-landing .miw-price-per {
  font-size: .85rem;
  color: var(--miw-muted);
  margin-bottom: 1.4rem;
}

.miw-landing .miw-price-card ul {
  margin-bottom: 1.6rem;
  flex: 1;
}

.miw-landing .miw-pricing-note {
  text-align: center;
  color: var(--miw-muted);
  font-size: .9rem;
  margin: 32px 0 0;
}

/* ---------- FAQ ---------- */
.miw-landing .miw-faq {
  padding: var(--miw-section-y) 0;
  background: var(--miw-bg-soft);
}

.miw-landing .miw-faq-item {
  background: var(--miw-white);
  border: 1px solid var(--miw-line);
  border-radius: var(--miw-radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.miw-landing .miw-faq-item:hover,
.miw-landing .miw-faq-item[open] {
  border-color: #ddd8d1;
  box-shadow: var(--miw-shadow-sm);
}

.miw-landing .miw-faq-item summary {
  padding: 18px 22px;
  min-height: 56px;
  font-weight: 700;
  color: var(--miw-ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.miw-landing .miw-faq-item summary::-webkit-details-marker {
  display: none;
}

.miw-landing .miw-faq-item summary::after {
  content: "+";
  flex: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--miw-accent-cool);
  line-height: 1;
  transition: transform .2s ease;
}

.miw-landing .miw-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.miw-landing .miw-faq-item p {
  padding: 0 22px 20px;
  color: var(--miw-muted);
  margin: 0;
  max-width: 68ch;
}

.miw-landing .miw-faq-item a {
  font-weight: 700;
  text-decoration: underline;
}

/* ---------- Final CTA ---------- */
.miw-landing .miw-cta-band {
  background:
    radial-gradient(900px 400px at 18% -22%, rgba(255, 138, 61, .30), transparent 60%),
    radial-gradient(820px 400px at 88% 118%, rgba(0, 119, 160, .40), transparent 62%),
    linear-gradient(135deg, var(--miw-band) 0%, var(--miw-band-700) 100%);
  color: var(--miw-on-band);
  text-align: center;
  padding: 96px 0;
}

.miw-landing .miw-cta-band h2 {
  color: var(--miw-on-band);
  font-size: 2.2rem;                              /* fallback */
  font-size: clamp(1.8rem, 3.8cqi, 2.6rem);
  font-weight: 800;
  margin-bottom: .4em;
}

.miw-landing .miw-cta-band p {
  color: var(--miw-on-band-muted);
  font-size: 1.1rem;
  max-width: 56ch;
  margin: 0 auto 1.9rem;
}

.miw-landing .miw-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ==========================================================================
   Responsive — container queries against .miw-landing
   ========================================================================== */

@container miw (max-width: 1024px) {
  .miw-landing .miw-hero {
    padding: 64px 0 56px;
  }

  .miw-landing .miw-cbt-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .miw-landing .miw-cbt-figure {
    max-width: 680px;
    margin-inline: auto;   /* was left-aligned under centred copy */
  }

  .miw-landing .miw-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Orphan third card: exactly one column wide and centred, instead of
     stretching across both tracks and sitting hard left. */
  .miw-landing .miw-feature-card:last-child {
    grid-column: 1 / -1;
    max-width: calc((100% - 28px) / 2);
    margin-inline: auto;
  }
}

@container miw (max-width: 860px) {
  .miw-landing {
    --miw-section-y: 76px;
  }

  .miw-landing .miw-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 16px;
  }

  /* Separators only make sense between items on the same row. */
  .miw-landing .miw-stat + .miw-stat {
    border-left: none;
  }

  .miw-landing .miw-stat:nth-child(even) {
    border-left: 1px solid rgba(255, 255, 255, .14);
  }

  .miw-landing .miw-course-grid {
    grid-template-columns: 1fr;
  }

  .miw-landing .miw-price-grid,
  .miw-landing .miw-rate-row {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-inline: auto;
  }

  .miw-landing .miw-price-grid {
    gap: 30px;   /* clears the "Most popular" badge when stacked */
  }
}

@container miw (max-width: 640px) {
  .miw-landing {
    --miw-section-y: 60px;
    --miw-gutter: 20px;
  }

  .miw-landing .miw-hero {
    padding: 52px 0 48px;
  }

  .miw-landing .miw-cta-band {
    padding: 64px 0;
  }

  .miw-landing .miw-hero-actions,
  .miw-landing .miw-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .miw-landing .miw-hero-actions .miw-btn,
  .miw-landing .miw-cta-actions .miw-btn {
    width: 100%;
  }

  .miw-landing .miw-feature-grid {
    grid-template-columns: 1fr;
  }

  .miw-landing .miw-feature-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  .miw-landing .miw-feature-body,
  .miw-landing .miw-course-card {
    padding: 24px;
  }

  .miw-landing .miw-section-head {
    margin-bottom: 2.4rem;
  }

  .miw-landing .miw-stat-number {
    font-size: 2rem;
  }
}

/* Very narrow: the 2-up stats grid gets cramped. */
@container miw (max-width: 380px) {
  .miw-landing .miw-stats-grid {
    grid-template-columns: 1fr;
  }

  .miw-landing .miw-stat:nth-child(even) {
    border-left: none;
  }
}

/* ==========================================================================
   Fallback — browsers without container query support (pre-2023)
   Viewport media queries covering the essential grid collapses only.
   ========================================================================== */
@supports not (container-type: inline-size) {
  @media (max-width: 1024px) {
    .miw-landing .miw-cbt-grid { grid-template-columns: 1fr; gap: 40px; }
    .miw-landing .miw-cbt-figure { max-width: 680px; margin-inline: auto; }
    .miw-landing .miw-feature-grid { grid-template-columns: repeat(2, 1fr); }
    .miw-landing .miw-feature-card:last-child {
      grid-column: 1 / -1;
      max-width: calc((100% - 28px) / 2);
      margin-inline: auto;
    }
  }

  @media (max-width: 860px) {
    .miw-landing { --miw-section-y: 76px; }
    .miw-landing .miw-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
    .miw-landing .miw-stat + .miw-stat { border-left: none; }
    .miw-landing .miw-stat:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, .14); }
    .miw-landing .miw-course-grid { grid-template-columns: 1fr; }
    .miw-landing .miw-price-grid,
    .miw-landing .miw-rate-row { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
    .miw-landing .miw-price-grid { gap: 30px; }
  }

  @media (max-width: 640px) {
    .miw-landing { --miw-section-y: 60px; --miw-gutter: 20px; }
    .miw-landing .miw-hero { padding: 52px 0 48px; }
    .miw-landing .miw-cta-band { padding: 64px 0; }
    .miw-landing .miw-hero-actions,
    .miw-landing .miw-cta-actions { flex-direction: column; align-items: stretch; }
    .miw-landing .miw-hero-actions .miw-btn,
    .miw-landing .miw-cta-actions .miw-btn { width: 100%; }
    .miw-landing .miw-feature-grid { grid-template-columns: 1fr; }
    .miw-landing .miw-feature-card:last-child { grid-column: auto; max-width: none; }
    .miw-landing .miw-feature-body,
    .miw-landing .miw-course-card { padding: 24px; }
    .miw-landing .miw-section-head { margin-bottom: 2.4rem; }
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .miw-landing *,
  .miw-landing *::before,
  .miw-landing *::after {
    transition: none !important;
    animation: none !important;
  }

  .miw-landing .miw-btn:hover,
  .miw-landing .miw-feature-card:hover,
  .miw-landing .miw-course-card:hover {
    transform: none;
  }
}