/* Compact mobile layout (preview v3f). Mobile only: every rule is inside the media query, desktop is untouched.
   Condenses spacing, photo crops and card stacks; text sizes, colours, fonts and content are unchanged. */
@media (max-width: 640px) {
  :root { --gutter: 14px; --bar-h: 62px; }
  :root body { padding-bottom: calc(var(--bar-h) + 8px + env(safe-area-inset-bottom)); }

  /* ---- global rhythm ---- */
  :root body .section { padding: 22px 0; }
  :root body .stack-lg { gap: 14px; }
  :root body .stack { gap: 8px; }
  :root body .grid { gap: 10px; }
  :root body .card { padding: 14px; }
  :root body .btn { min-height: 48px; padding: 0 18px; }
  :root body .btn-ghost { min-height: 46px; }
  :root body .notice { padding: 8px 12px; }
  :root body .lead { line-height: 1.45; }
  :root body p.muted, :root body .answer { line-height: 1.45; }
  :root body .check-list { gap: 5px; }
  :root body .row-link { min-height: 48px; padding: 9px 14px; }
  :root body .site-header .hdr { height: 54px; }
  :root body .logo img { height: 36px; }

  /* sticky bottom bar: slimmer, still 44px+ targets */
  :root body .action-bar { padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); }
  :root body .action-bar a, :root body .action-bar button { height: 48px; }

  /* ---- hero (home) ---- */
  :root body .hero-film .hero-loop { height: 400px; }
  :root body .hero-shade { background: linear-gradient(180deg, #2b2d312e 0px, #2b2d316b 150px, #2b2d31c7 300px, #2b2d31f2 365px, var(--ink) 400px); }
  :root body .hero { padding-top: 84px; padding-bottom: 14px; gap: 10px; }
  :root body .hero-top { gap: 8px; }
  :root body .hero-cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  :root body .hero-ctas { display: contents; }
  :root body .hero-ctas .vsl-touch { display: contents; }
  :root body .hero-ctas .btn, :root body .hero-exam, :root body .hero-watch { min-height: 48px; width: 100%; padding: 0 8px; font-size: 16px; }
  :root body .hero-ctas .vsl-touch .btn { grid-column: 1 / -1; }
  :root body .hero-ctas .vsl-touch .btn:last-child { min-height: 46px; }
  :root body .hero-proof { padding: 8px 0 10px; }
  :root body .trust { gap: 5px; }
  :root body .pass-note { margin-top: 6px; }

  /* ---- page heroes (inner pages) ---- */
  :root body .dark.has-bg .hero, :root body .has-bg > .wrap.hero { padding-top: 22px; padding-bottom: 22px; }

  /* ---- photos: wide short crops ---- */
  :root body .feat-photo { aspect-ratio: 2 / 1; margin-bottom: 4px; }
  :root body .prog-photo { aspect-ratio: 2 / 1; }
  :root body .about-photo { aspect-ratio: 2 / 1; }
  :root body .day .day-media { aspect-ratio: 2 / 1; }
  :root body .day-seal { aspect-ratio: 3 / 1; padding: 3% 0; }
  :root body .day-opt { margin-top: 2px; padding-top: 6px; }
  :root body .days { align-items: stretch; }
  :root body .days > li { display: flex; flex-direction: column; }
  :root body .days > li > .day-body { flex: 0 0 auto; }
  :root body .days > li > .day-media { flex: 1 1 auto; position: relative; min-height: 0; }
  :root body .days > li > .day-media :is(picture, video, img) { object-fit: cover; }
  :root body .days > li.day-final > .day-media { flex: 0 0 auto; aspect-ratio: 2 / 1; display: flex; align-items: center; justify-content: center; }
  :root body .days > li.day-final .pass-seal { height: 92%; width: auto; max-width: 100%; }
  :root body .about-dcs { gap: 12px; }
  :root body .about-p { font-size: 16.5px; line-height: 1.45; }

  /* ---- program rows / specialty ---- */
  :root body .prog-row { padding: 9px 12px; gap: 0 12px; }
  :root body .prog-tag { margin-bottom: 3px; }
  :root body .specialty { padding: 14px 12px; gap: 10px; }
  :root body .spec-tile { padding: 12px; gap: 8px; }

  /* ---- swipe rows (scroll-snap carousels, finger swipe + keyboard scroll, peek of next card) ---- */
  :root body .days, :root body .spec-tiles, :root body .campus-list, :root body .md-2.prog-grid, :root body .how, :root body .what, :root body .grev-rows {
    display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 8px; scroll-padding-inline: var(--gutter);
    scrollbar-width: none; align-items: stretch; position: relative;
  }
  :root body .specialty .spec-tiles { margin-inline: -12px; margin-bottom: 26px; padding-inline: 12px; scroll-padding-inline: 12px; }
  :root body .days > li, :root body .spec-tiles > li, :root body .campus-list > *, :root body .md-2.prog-grid > *, :root body .how > *, :root body .what > * {
    flex: 0 0 82%; scroll-snap-align: start; min-width: 0;
  }
  :root body .spec-tiles > li { flex-basis: 80%; }
  :root body .days:focus-visible, :root body .grev-rows:focus-visible { outline: 3px solid var(--accent-on-dark, var(--red)); outline-offset: 2px; }
  :root body .day-body { padding: 10px 14px 14px; }

  /* Google reviews: marquee replaced by ONE swipe row (all three rows merged, same cards and links) */
  :root body .grev-row, :root body .grev-track, :root body .grev-set { display: contents; }
  :root body .grev-set[aria-hidden="true"] { display: none; }
  :root body .grev-track { animation: none; }
  :root body .grev-btn { display: none; }
  :root body .grev-card { flex: 0 0 80%; width: auto; height: auto; min-height: 0; scroll-snap-align: start; }
  :root body .grev-card figure { padding: 12px 14px; gap: 6px; }
  :root body .grev-card blockquote { -webkit-line-clamp: 4; }
  :root body .grev { display: block; }
  :root body .grev-bar { margin-bottom: 8px; }
  :root body .grev-bar { min-height: 0; }

  :root body .days { align-items: stretch; }
  :root body .days > li { display: flex; flex-direction: column; }
  :root body .days > li > .day-body { flex: 0 0 auto; }
  :root body .days > li > .day-media { flex: 1 1 auto; position: relative; min-height: 0; }
  :root body .days > li > .day-media :is(picture, video, img) { object-fit: cover; }
  :root body .days > li.day-final > .day-media { flex: 0 0 auto; aspect-ratio: 2 / 1; display: flex; align-items: center; justify-content: center; }
  :root body .days > li.day-final .pass-seal { height: 92%; width: auto; max-width: 100%; }
  :root body .days, :root body .spec-tiles, :root body .campus-list, :root body .md-2.prog-grid, :root body .how, :root body .what { margin-bottom: 26px; }
  :root body .grev-rows { scrollbar-width: thin; }
  /* swipe cue for the reviews row (no auto-scrolling marquee on phones) */
  :root body .grev-bar::after { content: "Swipe \2192"; color: #dcdde0; font: 700 14px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; margin-left: auto; }
  :root[lang="es"] body .grev-bar::after { content: "Desliza \2192"; }

  /* video / student stories strip: already a snap row; 16:9 cards */
  :root body .vstrip-track .vcard { flex-basis: 80%; aspect-ratio: 16 / 9; height: auto; }
  :root body .vstrip { gap: 6px 10px; }

  /* dots (CSS carousel markers, where the browser supports them) */
  @supports selector(::scroll-marker) {
    :root body .days, :root body .spec-tiles, :root body .campus-list, :root body .md-2.prog-grid, :root body .how, :root body .what {
      scroll-marker-group: after;
    }
    :root body .days::scroll-marker-group, :root body .spec-tiles::scroll-marker-group, :root body .campus-list::scroll-marker-group,
    :root body .md-2.prog-grid::scroll-marker-group, :root body .how::scroll-marker-group, :root body .what::scroll-marker-group  {
      display: flex; justify-content: center; flex-wrap: wrap; gap: 0; padding: 2px 0 0;
    }
    :root body .days > li::scroll-marker, :root body .spec-tiles > li::scroll-marker, :root body .campus-list > *::scroll-marker,
    :root body .md-2.prog-grid > *::scroll-marker, :root body .how > *::scroll-marker, :root body .what > *::scroll-marker {
      content: ""; width: 24px; height: 24px; box-sizing: border-box; padding: 8px; background: #8a8f96; background-clip: content-box; border-radius: 50%;
    }
    :root body .days > li::scroll-marker:target-current, :root body .spec-tiles > li::scroll-marker:target-current, :root body .campus-list > *::scroll-marker:target-current,
    :root body .md-2.prog-grid > *::scroll-marker:target-current, :root body .how > *::scroll-marker:target-current, :root body .what > *::scroll-marker:target-current {
      background-color: var(--red);
    }
  }
  @supports not selector(::scroll-marker) {
    :root body .days, :root body .spec-tiles, :root body .campus-list, :root body .md-2.prog-grid, :root body .how, :root body .what { scrollbar-width: thin; }
  }

  /* ---- schedule / faq / locations / forms ---- */
  :root body details.faq { padding: 0 14px; }
  :root body details.faq summary { min-height: 46px; padding: 4px 0; }
  :root body details.faq .answer { padding-bottom: 10px; }
  :root body .ctas, :root body .group-ctas, :root body .cta-btns { display: flex; flex-wrap: wrap; gap: 8px; }
  :root body .ctas > .btn, :root body .group-ctas > .btn, :root body .cta-btns > .btn { flex: 1 1 150px; }
  :root body .campus-list .ctas .btn { padding: 0 6px; }
  :root body .field { gap: 4px; }
  :root body .form-grid { gap: 8px; }

  /* faq topic pills: one swipe row instead of 3 wrapped rows */
  :root body .topics { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-snap-type: x proximity; }
  :root body .topics > * { flex: none; scroll-snap-align: start; }
  :root body .stack.group { gap: 6px; }
  :root body .narrow.stack-lg { gap: 16px; }

  /* ---- footer ---- */
  :root body .site-footer { padding: 24px 0 16px; }
  :root body .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  :root body .foot-grid > :nth-child(1), :root body .foot-grid > :nth-child(2) { grid-column: 1 / -1; }
  :root body .foot-base { margin-top: 12px; padding-top: 12px; gap: 4px; }
  :root body .foot-phone { font-size: 30px; }
}

/* ---- Hands-on training products (v3g): checkout add-on step + programs cards. Not inside a media query. ---- */
.co-step[hidden], .co-addon-row[hidden], .co-sched-row[hidden] { display: none; }
.co-opt .co-tick { flex: none; width: 22px; height: 22px; border: 2px solid var(--line); border-radius: 6px; background: var(--white); position: relative; }
.co-opt:has(input:checked) .co-tick { background: var(--red); border-color: var(--red); }
.co-opt:has(input:checked) .co-tick::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.co-opt:has(input[type="checkbox"]) > .stack { flex: 1; min-width: 0; }
.co-sched { gap: 10px; min-width: 0; }
.co-sched .input { max-width: 100%; min-width: 0; }
.co-sched input[type="date"] { width: 100%; box-sizing: border-box; }
.co-sched input:disabled { opacity: .5; }
.co-addon-row dt { font-weight: 400; }
.co-step[data-step="3"] .co-opts { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-auto-rows: 1fr; }
.co-sched .err:not(:empty) { display: block; }

/* Adam's pass-guarantee seal (image, replaces the SVG). Centered in the picture slot, never upscaled past its pixels. */
.day-seal picture { display: contents; }
.day-seal img.pass-seal { width: auto; height: 100%; max-height: 100%; max-width: 100%; object-fit: contain; display: block; margin: 0 auto; filter: drop-shadow(0 10px 22px rgba(0,0,0,.45)); }
@media (max-width: 640px) { :root body .days > li.day-final img.pass-seal { height: auto; width: auto; max-height: min(140px, 100%); max-width: 100%; } }
