/* Phones only: loaded with media="(max-width: 767px)". Larger screens never apply this file. */
:root {
  --section-y: 32px;
  --header-h: 56px;
  --fs-display: 2.125rem;
  --fs-h2: 1.625rem;
  --fs-h3: 1.0625rem;
  --fs-body: 1rem;
  --fs-lead: 1.0625rem;
  --lh-body: 1.5;
}

/* One rhythm between sections, everywhere. */
main > section.section, #tests > .section, #individual, #faq { padding-top: 28px !important; padding-bottom: 28px !important; }

/* Color marks each new section: white alternates with the brand's tints. Lilac and the
   booking Ivory already come from the main stylesheet. Bands replace the hairlines. */
#tests, #reports { background: var(--color-ivory); }
main > section { border-top: 0 !important; }

#tests { padding: 0 !important; }
.test-index__row:last-child { padding-bottom: 0; }
.section-head, .how__head { margin-bottom: 20px; }
h2 + .lead, h2 + p { margin-top: 10px; }

/* Header: Sign in on the left, Menu on the right, always in the same place. */
.site-header__inner { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
.signin--compact { grid-column: 1; grid-row: 1; width: 44px; min-height: 44px; margin: 0; }
.site-header__logo { grid-column: 2; grid-row: 1; justify-self: center; }
.site-header__logo img { height: 30px; }
.menu-button { grid-column: 3; grid-row: 1; justify-content: center; width: 44px; min-height: 44px; margin: 0; padding: 0; }
.menu-button__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top of the page: header and hero are one. The large logo sits between the two buttons;
   once it scrolls away, the solid bar and small logo take over, so one logo shows at a time. */
.site-header, .site-header__logo { transition: background-color .15s, border-color .15s, opacity .15s; }
.m-top .site-header { background: transparent; border-bottom-color: transparent; }
.m-top .site-header:has(.site-nav.is-open) { background: var(--color-white); }
.m-top .site-header__logo { opacity: 0; visibility: hidden; }
.m-top .signin--compact, .m-top .menu-button { background: var(--color-white); }
.m-ready .hero { margin-top: calc(-1 * var(--header-h)); padding-top: 8px !important; }

/* Read more, and sections that open on tap. */
.m-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.m-fold { display: none !important; }
.m-more {
  display: inline-flex; white-space: nowrap; align-items: center; gap: 6px; min-height: 44px; margin-top: 2px; padding: 0;
  background: none; border: 0; font: 600 0.9375rem/1.2 var(--font-body); color: var(--color-amethyst); cursor: pointer;
}
.m-more::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.m-more[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.m-more:focus-visible, .m-toggle:focus-visible { outline: 2px solid var(--color-amethyst); outline-offset: 2px; }

/* Hero: centered, logo first, button on the first screen. */
.hero { padding-top: 20px !important; text-align: center; }
.hero__grid { gap: 14px; justify-items: center; }
.hero__brand { display: flex; justify-content: center; width: 100%; }
.hero__brand img { width: min(56vw, 230px); margin: 0 auto; }
.eyebrow__line { display: block; }
.eyebrow__sep { display: none; }
.hero .eyebrow { font-size: 0.6875rem; line-height: 1.5; letter-spacing: .06em; margin-bottom: 10px; }
.hero .eyebrow::after { margin-left: auto; margin-right: auto; }
.hero__lead { margin: 10px 0 16px; width: 100%; max-width: none; font-size: 1rem; text-align: left; }
.hero .btn-row { display: grid; gap: 8px; width: 100%; }
.hero .btn-row .btn { width: 100%; justify-content: center; }
.admits { margin-top: 22px; }
.admits__title { max-width: none !important; width: 100%; padding: 0 !important; margin: 0 0 10px; text-wrap: balance; }
.admits__toggle { position: static; display: block; margin: 8px auto 0; }

/* Mobile bar appears after the hero and never leaves dead space. */
.mobile-bar.m-bar-off { display: none; }
body:has(.mobile-bar.m-bar-off) { padding-bottom: 0; }
body:has(.mobile-bar[hidden]) { padding-bottom: 0; }

/* Tests: three colored groups, every test visible. Same three colors as desktop. */
.tests-intro { margin-bottom: 0; padding-bottom: 0; gap: 0; }
.test-index { margin-top: 16px; }
.test-index__rows { display: grid; gap: 10px; }
.test-index__row { display: block; padding: 14px !important; border: 0; border-radius: var(--radius-md); }
.test-index__row--lilac { background: var(--color-lilac); color: var(--color-midnight); }
.test-index__row--amethyst { background: var(--color-amethyst); color: var(--color-white); }
.test-index__row--midnight { background: var(--color-midnight); color: var(--color-white); }
.test-index__row .test-index__cat { display: flex; align-items: center; gap: 8px; width: auto; padding: 0; min-height: 0; background: none; color: inherit; font-size: 1rem; font-weight: 700; }
.test-index__row .test-index__who, .test-index__row .test-index__who .test-index__note { color: inherit; font-size: 0.8125rem; line-height: 1.4; margin-top: 6px; }
.test-index__tests { gap: 6px; margin-top: 10px; }
.test-index__test { display: block; padding: 7px 10px; background: var(--color-white); border-radius: var(--radius-sm); color: var(--color-midnight); font-size: 1.125rem; line-height: 1.1; }
.test-index__row--lilac .test-index__test { box-shadow: inset 0 0 0 1px rgba(15, 42, 74, .14); }
.test-index__dests { gap: 10px; margin-top: 10px; }
.test-index__dest { gap: 0; }
.test-index__dest dt { color: inherit; font-size: 0.8125rem; line-height: 1.3; }
.test-index__dest .test-index__tests { margin-top: 5px; }

/* A plan, not a guess */
.how__note { font-size: 0.875rem; }
.progress-chart { margin-top: 12px; }
.steps { margin-top: 16px; }
.step { padding-bottom: 12px; }
.step h3 { font-size: 1rem; }
.step p { font-size: 0.875rem; margin-top: 2px; }

/* Every plan */
.plan__lead span { display: inline; }
.plan__tile { min-height: 48px; }

/* Our method */
.method { margin-top: 12px; }
.method__board { display: grid; grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
.method__main, .method__panels, .method__panel { min-width: 0; max-width: 100%; }
.method__panel * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.method__side { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.method__corner { max-width: 96px; width: 96px; transition: width .25s ease, max-width .25s ease; }
/* While the narration is under way, playing or paused, the presenter stays larger. */
.method.is-narrating .method__corner { width: min(44vw, 176px); max-width: min(44vw, 176px); }
.method.is-narrating .method__watch { width: 100%; max-width: none; padding: 10px 4px; font-size: 0.8125rem; }
@media (prefers-reduced-motion: reduce) { .method__corner { transition: none; } }
.method__watch { position: static; transform: none; width: 100%; max-width: 96px; box-sizing: border-box; white-space: normal; margin: 6px 0 0; padding: 8px 4px; font-size: 0.6875rem; line-height: 1.2; }
.method__question { padding: 10px; font-size: 0.875rem; }
.method.is-ready .method__panel:not(.is-active) { display: none; }
.method__panels { padding: 0; }
.method__flip-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px; }
.method__flip-label { grid-column: 1 / -1; }
.method__panels { overflow: hidden; }
.method__flip-card { width: 100%; padding: 8px 4px; font-size: 0.8125rem; overflow-wrap: anywhere; text-align: center; }
.method__rise li { overflow-wrap: anywhere; hyphens: auto; }

/* Progress reports */
.report__body { padding: 14px; }
.report__head { padding: 12px 14px; }

/* Founder: photo beside the name, then the story. */
.founder { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 0 14px; align-items: center; }
.founder__media, .founder__text { display: contents; }
.founder__photo { grid-column: 1; grid-row: 1 / span 2; width: 104px; aspect-ratio: 4 / 5; margin: 0; }
#founder-title { grid-column: 2; grid-row: 1; align-self: end; }
.founder__role { grid-column: 2; grid-row: 2; align-self: start; font-size: 0.8125rem; line-height: 1.4; margin-top: 4px; }
.founder .measure { grid-column: 1 / -1; grid-row: 3; margin-top: 14px; }
.founder .short-link { grid-column: 1 / -1; grid-row: 5; margin-top: 12px; }
.founder__awards { grid-column: 1 / -1; grid-row: 4; margin-top: 14px; padding-top: 14px; }
.founder__awards .highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.founder__awards .highlights li { padding: 0; font-size: 0.75rem; line-height: 1.35; display: flex; flex-direction: column; gap: 6px; }
.founder__awards .highlights li::before { display: none; }
.credentials { grid-column: 1 / -1; grid-row: 6; margin-top: 10px; gap: 0; }
.credentials__group { border-top: 1px solid var(--line); }

/* Tap-to-open headings: founder credentials and FAQ topics. */
.m-toggle {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 52px; padding: 6px 0;
  background: none; border: 0; text-align: left; color: var(--text-heading); font: inherit; cursor: pointer;
}
.m-toggle::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 0 auto; border-right: 2px solid var(--color-amethyst); border-bottom: 2px solid var(--color-amethyst); transform: translateY(-2px) rotate(45deg); }
.m-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.credentials__title { margin: 0; }
.credentials .highlights { padding-bottom: 12px; }
.credentials .highlights li { font-size: 0.9375rem; }

/* FAQs */
.faq__groups { gap: 8px; }
.faq__group-title { margin: 0; }
.faq__list { gap: 8px; margin-top: 4px; padding-bottom: 8px; }
#faq summary { min-height: 56px; padding-top: 8px; padding-bottom: 8px; font-size: 0.9375rem; }
#faq .faq__icon { width: 32px; height: 32px; }

/* Booking form */
.booking { gap: 16px; }
.booking__contact { margin-top: 12px; }
.booking__contact a { font-size: 0.9375rem; }
.booking__panel { padding: 16px; }
.form__grid { gap: 14px; }
.field input, .field select { min-height: 48px; }
.checks { gap: 4px 8px; }
.check { min-height: 40px; }

/* Footer: the Tests list repeats the Tests section, so phones skip it. */
.foot { gap: 18px; }
.foot > :nth-child(2) { display: none; }
.site-footer { padding-bottom: 12px; }

/* Very small phones. */
@media (max-width: 359px) {
  :root { --fs-display: 1.875rem; --fs-h2: 1.5rem; }
  .founder { grid-template-columns: 84px minmax(0, 1fr); }
  .founder__photo { width: 84px; }
  .method__corner, .method__watch { width: 80px; max-width: 80px; }
  .site-header__logo img { height: 26px; }
}

/* Phones held sideways: the screen is short, so the logo gives way to the headline. */
@media (max-height: 480px) {
  .hero__brand img { width: 96px; }
  .hero .btn-row { grid-template-columns: 1fr 1fr; }
}
