/* Phone layouts share the same content, with space reserved for every control. */
.goal-label-short { display: none; }
.review-player-message:empty { display: none; }
:is(.small-star,.button-spark,.portrait-star,.showcase-star,.mini-star)>svg { width: 1em; height: 1em; }
@media (min-width: 701px) and (max-width: 900px) {
  .site-header { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px 20px; padding-block: 18px 8px; }
  .site-header .header-action { grid-column: 2; grid-row: 1; }
  .site-header nav { grid-column: 1 / -1; justify-content: space-between; border-top: 1px solid #e5e9f1; padding-top: 4px; }
  .site-header nav a { display: flex; align-items: center; min-height: 44px; }
  .hero-art { right: 0; width: 48%; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 20px; }
  .wrap { width: calc(100% - 40px); }
  h1, h2, h3 { overflow-wrap: anywhere; }
  .site-header { display: flex; flex-wrap: wrap; gap: 12px 10px; min-height: 0; padding-block: 16px 8px; }
  .site-header .brand { flex: 1 0 auto; font-size: 1.0625rem; gap: 9px; }
  .site-header .brand>span:last-child { min-width: 0; overflow-wrap: anywhere; }
  .site-header .brand-sub { font-size: .625rem; line-height: 1.5; }
  .site-header .brand-mark { font-size: 2rem; }
  .site-header .header-action { min-height: 44px; padding: 9px 13px; font-size: .75rem; justify-content: center; margin-left: auto; }
  .header-action .small-star { display: none; }
  .site-header nav { display: flex; flex-wrap: wrap; order: 3; flex: 0 0 100%; gap: 0 8px; justify-content: space-between; border-top: 1px solid #e5e9f1; padding-top: 2px; font-size: .8125rem; }
  .site-header nav a { display: flex; align-items: center; min-height: 44px; padding-inline: 3px; }
  .site-header nav a::after { bottom: 4px; }
  .hero { padding-top: 32px; padding-bottom: 16px; }
  .hero .eyebrow { font-size: .625rem; letter-spacing: .5px; gap: 8px; margin-bottom: 22px; }
  .eyebrow-line { flex: 0 0 16px; }
  .hero h1 { font-size: clamp(2.5rem, 11.2vw, 3.375rem); letter-spacing: -.055em; line-height: 1.12; margin-bottom: 29px; }
  .gold-word { display: inline-block; max-width: 100%; }
  .hero-description { font-size: 1rem; line-height: 1.75; margin-bottom: 24px; }
  .hero .button { width: 100%; min-height: 58px; padding: 16px 18px; gap: 12px; font-size: .875rem; }
  .button-spark { flex-shrink: 0; }
  .cta-note { justify-content: center; flex-wrap: wrap; gap: 10px; font-size: .8125rem; margin-block: 14px 0; }
  .hero-film-link { min-height: 48px; margin: 18px auto 0; font-size: .875rem; }
  .hero-film-arrow { flex-shrink: 0; }
  .hero-art { width: min(100%, 420px); height: auto; margin: 16px auto 0; padding: 24px 0 32px; }
  #math-field { inset: 0; width: 100%; height: 100%; }
  .portrait-panel, .hero-art:hover .portrait-panel { position: relative; inset: auto; width: 82%; height: auto; aspect-ratio: auto; margin-inline: auto; border-width: 4px; border-radius: 22px; transform: rotate(3deg); }
  .portrait { position: relative; inset: auto; display: block; aspect-ratio: 4 / 5; }
  .portrait img { position: absolute; inset: 0; }
  .portrait-caption { position: relative; inset: auto; padding: 15px 16px; gap: 10px; }
  .portrait-caption>div { min-width: 0; }
  .portrait-caption strong { display: block; font-size: 1.125rem; overflow-wrap: anywhere; }
  .portrait-caption div>span { font-size: .625rem; line-height: 1.6; }
  .portrait-star { flex-shrink: 0; font-size: 1.5rem; }
  .hero-sticker { top: 10px; right: 0; width: 74px; height: 74px; animation: none; }
  .hero-sticker strong { font-size: 14px; }
  .hero-sticker span { font-size: 7px; }
  .floating-equation, .orbit-formula { display: none; }
  .trust-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; padding-block: 24px; }
  .trust-strip>div>span { font-size: .75rem; line-height: 1.6; }
  .trust-strip .trust-words { grid-column: 1 / -1; display: flex; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-top: 16px; border-top: 1px solid #e3e8f1; }
  .trust-words strong { font-size: 1rem; }
  .trust-strip .trust-words>span { margin: 0; }
  .reviews-section, .goals-section, .approach-section, .math-lab { padding-block: 48px; }
  .reviews-heading h2 { font-size: clamp(2rem, 8.7vw, 2.5rem); line-height: 1.16; letter-spacing: -.055em; }
  .reviews-toolbar { padding-block: 10px; }
  .reviews-navigation { width: 100%; justify-content: flex-end; }
  .reviews-counter { margin-right: auto; font-size: .8125rem; }
  .reviews-navigation button { display: grid; place-items: center; font-size: 20px; padding: 0; }
  .reviews-track { grid-auto-columns: 100%; gap: 24px; align-items: start; padding-top: 26px; padding-bottom: 24px; overflow-anchor: none; }
  .review-portrait { width: min(224px, 78%); margin: 10px auto 28px; }
  .review-story h3 { font-size: 1.375rem; line-height: 1.4; letter-spacing: -.035em; }
  .review-story h3 br { display: none; }
  .review-story-head { padding-top: 18px; }
  .review-story-head p { font-size: .8125rem; }
  .review-story-head>span { flex-shrink: 0; font-size: .75rem; }
  .review-description { font-size: 1rem; line-height: 1.75; margin-bottom: 20px; }
  .review-change { margin-top: 0; padding: 16px; grid-template-columns: minmax(0,1fr) 12px minmax(0,1fr); gap: 10px; }
  .review-change p { overflow-wrap: anywhere; }
  .review-change>div>span { font-size: .75rem; }
  .reviews-bottom { margin-top: 0; padding-top: 16px; }
  .reviews-bottom a { min-height: 48px; font-size: .875rem; }
  .goals-heading h2, .approach-intro h2, .lab-heading h2, .section-heading h2, .faq-section h2 { font-size: clamp(1.875rem, 8.4vw, 2.25rem); letter-spacing: -.045em; line-height: 1.22; }
  .goal-tabs { grid-template-columns: repeat(auto-fit,minmax(min(100%,5rem),1fr)); gap: 4px; }
  .goal-tabs button { min-height: 48px; padding: 12px 6px; text-align: center; font-size: .9375rem; overflow-wrap: normal; }
  .goal-label-full { display: none; }
  .goal-label-short { display: inline; }
  .goal-copy h3 { font-size: clamp(1.625rem, 7.5vw, 2rem); letter-spacing: -.045em; line-height: 1.3; }
  .goal-cta { min-height: 48px; font-size: .875rem; gap: 12px; }
  .goal-example { padding: 20px 18px 5px; }
  .example-solution summary { min-height: 52px; gap: 12px; }
  .example-solution summary>span { flex-shrink: 0; }
  .result-showcase { padding-block: 32px; }
  .showcase-top .eyebrow { font-size: .6875rem; letter-spacing: .5px; }
  .showcase-numbers { flex-wrap: nowrap; font-size: min(6rem,23vw); letter-spacing: -.055em; gap: 12px; }
  .showcase-score>p { font-size: .6875rem; line-height: 1.6; letter-spacing: .6px; }
  .showcase-copy h3 { font-size: 1.875rem; line-height: 1.3; }
  .showcase-copy>p { font-size: 1rem; line-height: 1.75; }
  .showcase-bottom>p { font-size: .75rem; line-height: 1.75; }
  .secondary-result>span { font-size: .625rem; line-height: 1.6; }
  .secondary-result strong { font-size: min(2rem,9vw); }
  .showcase-link { min-height: 44px; font-size: .875rem; }
  .approach-intro h2 { margin-bottom: 22px; }
  .approach-sign { font-size: 1.25rem; line-height: 1.6; }
  .principle { grid-template-columns: 25px minmax(0,1fr); gap: 12px; }
  .principle h3 { font-size: 1.375rem; line-height: 1.4; }
  .lab-example .lab-question { font-size: 1.5rem; }
  .lab-example .solution-switch button { min-height: 52px; font-size: .8125rem; }
  .lab-example .solution-figure { padding: 18px 14px; }
  .solution-equivalence { font-size: .75rem; }
  .solution-sum { font-size: 1rem; }
  .graph-controls input { height: 44px; margin-block: 8px; touch-action: pan-y; }
  .lesson-section { padding-block: 0 48px; }
  .lesson-steps { grid-template-columns: minmax(0,1fr); gap: 0; margin-top: 28px; }
  .lesson-steps article { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 8px 12px; padding-block: 20px; }
  .lesson-steps article::before { display: none; }
  .lesson-steps article>span { grid-column: 1; grid-row: 1 / 3; padding-top: 3px; }
  .lesson-steps h3 { grid-column: 2; font-size: 1.1875rem; margin: 0; }
  .lesson-steps p { grid-column: 2; font-size: 1rem; line-height: 1.75; }
  .booking-section { padding-block: 48px; }
  .booking-section-heading h2 { font-size: clamp(2rem, 9.7vw, 2.625rem); letter-spacing: -.05em; line-height: 1.2; }
  .booking-widget { padding: 24px 18px; border-radius: 20px; }
  .widget-heading { font-size: 1.375rem; line-height: 1.4; letter-spacing: -.035em; }
  .widget-steps { gap: 8px; justify-content: space-between; font-size: .75rem; }
  .widget-steps li { gap: 5px; }
  .widget-steps li>span { flex-shrink: 0; }
  .widget-actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .widget-actions>p { font-size: .8125rem; }
  .widget-actions>p br { display: none; }
  .widget-actions .button { width: 100%; min-height: 52px; font-size: .9375rem; }
  .booking-widget input:not([type=checkbox]), .booking-widget select, .booking-widget textarea { min-height: 52px; font-size: max(1rem,16px); }
  .booking-widget textarea { min-height: 104px; }
  .booking-widget label { font-size: .9375rem; }
  .trial-search-wrap>svg { top: 17px; }
  .trial-region-results button { min-height: 62px; padding: 12px; }
  .trial-region-results button>span { min-width: 0; overflow-wrap: anywhere; }
  .trial-region-results small { font-size: .75rem; }
  .trial-region-results em { font-size: .75rem; flex-shrink: 0; }
  .booking-field-help, .zone-note, .selected-time small { font-size: .8125rem; }
  .widget-back, .widget-link, .booking-text-button { min-height: 44px; font-size: .875rem; }
  .date-list, .time-list { grid-template-columns: repeat(auto-fit,minmax(min(100%,4.5rem),1fr)); gap: 8px; padding: 4px; }
  .date-choice { min-height: 70px; }
  .date-choice span, .time-choice small { font-size: .75rem; }
  .time-choice { min-height: 66px; }
  .time-choice b { font-size: 1rem; }
  .selected-time, .status-proposal { overflow-wrap: anywhere; }
  .widget-form .button { min-height: 56px; font-size: .9375rem; }
  .booking-fallback { font-size: .875rem; line-height: 1.85; }
  .faq-section { padding-block: 48px; }
  .faq-list summary { min-height: 60px; padding-right: 30px; font-size: 1rem; }
  .faq-list p { margin-right: 0; line-height: 1.75; }
  .faq-section .text-link { min-height: 44px; font-size: .875rem; }
  .site-footer { gap: 16px; padding-block: 24px max(28px,env(safe-area-inset-bottom)); }
  .site-footer>a:last-child { min-height: 44px; display: flex; align-items: center; font-size: .8125rem; }
  .site-footer>span { font-size: .75rem; }
  .status-page h1 { font-size: 2.5rem; line-height: 1.2; letter-spacing: -.05em; }
  .status-buttons { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,7rem),1fr)); gap: 10px; }
  .status-buttons .button { min-height: 48px; padding-inline: 12px; }
  .review-dialog { width: calc(100% - 24px); max-width: none; max-height: calc(100dvh - 24px); padding: 14px 16px; }
  .review-dialog-top { position: sticky; top: -14px; z-index: 3; background: #fff; padding-block: 4px; }
  .review-dialog-top>span { font-size: .6875rem; letter-spacing: .5px; }
  .review-player-circle { width: min(100%,300px,36dvh); }
  .review-dialog h2 { font-size: 1.125rem; line-height: 1.45; }
  #review-dialog-role, .review-player-message { font-size: .8125rem; }
  .review-player-controls { gap: 8px; padding: 10px 8px; }
  .review-seek-wrap input { height: 36px; }
  .review-seek-wrap>div, .review-dialog-bottom>span { font-size: .75rem; }
  .review-dialog-bottom>button { font-size: .8125rem; }
  .approach-film-header { position: sticky; top: -17px; padding-block: 4px; z-index: 3; background: #fff; }
  .approach-film-video { max-height: none; }
  .approach-film-footer>a { width: 100%; justify-content: space-between; }
}
@media (max-width: 359px) {
  .wrap { width: calc(100% - 32px); }
  .site-header .brand-sub { max-width: 130px; font-size: .5625rem; }
  .site-header .brand { gap: 6px; font-size: 1rem; }
  .site-header .header-action { padding-inline: 10px; font-size: .6875rem; }
  .review-change { padding: 14px 12px; gap: 8px; }
  .booking-widget { padding-inline: 15px; }
  .widget-steps { font-size: .6875rem; gap: 6px; }
}
@media (hover: none) {
  .button-gold:hover, .review-open:hover, .review-open:hover .review-play, .hero-film-link:hover .hero-film-play, .hero-film-link:hover .hero-film-arrow { transform: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .review-dialog { width: min(700px,calc(100% - 24px)); padding: 14px 18px; }
  .review-dialog[open] { display: grid; grid-template-columns: min(32dvh,170px) minmax(0,1fr); column-gap: 24px; }
  .review-dialog-top { grid-column: 1 / -1; margin-bottom: 8px; }
  .review-player-circle { grid-column: 1; grid-row: 2 / 5; width: 100%; margin: 0; align-self: center; }
  #review-dialog-role { grid-column: 2; grid-row: 2; }
  .review-dialog h2 { grid-column: 2; grid-row: 3; font-size: 1.0625rem; margin-bottom: 12px; }
  .review-player-controls { grid-column: 2; grid-row: 4; }
  .review-player-message, .review-player-error, .review-dialog-bottom { grid-column: 1 / -1; }
  .review-dialog-bottom { margin-top: 12px; }
  .approach-film-video { max-height: none; }
}
@media (max-width: 700px) and (max-height: 700px) and (orientation: portrait) {
  .review-player-circle { width: min(100%,260px,28dvh); margin-bottom: 10px; }
  .review-dialog-top { margin-bottom: 6px; }
  .review-dialog h2 { font-size: 1.0625rem; margin-bottom: 12px; }
  .review-dialog-bottom { margin-top: 12px; }
}

/* Keep icon controls readable when browser text is enlarged. */
.review-close,.approach-film-close { font-size: 28px; display: grid; place-items: center; padding: 0; }
@media (hover: none) and (max-width: 700px) {
  .site-header nav a { border-radius: 8px; }
  .site-header nav a:active { background: #eaf0ff; color: #243fba; }
  .review-close:active,.approach-film-close:active { background: #dce6ff; }
}

/* Booking choices stay in page flow, with one group per part of the day. */
.booking-widget .date-list{max-height:none;overflow:visible;grid-template-columns:repeat(auto-fit,minmax(min(100%,5rem),1fr))}
.booking-widget .time-list{display:block;max-height:none;overflow:visible;padding:4px}
.time-group{margin:0 0 22px}.time-group h5{font-size:.9375rem;font-weight:600;margin:0 0 10px;color:#526078}
.time-group-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,4.5rem),1fr));gap:8px}
.contact-field #contact-label{margin-top:18px}.contact-field .contact-error{color:#a12e34;font-size:.875rem;margin:6px 0 0}.contact-error:empty{display:none}
.booking-widget input[aria-invalid=true]{border-color:#a12e34;background:#fff8f8}
.review-lower-nav{display:flex;align-items:center;gap:12px;padding:16px 0;border-top:1px solid #e5e9f1}
.review-lower-nav button{min-width:48px;min-height:48px;border:1px solid #dbe1ee;border-radius:12px;background:#fff;color:#3459e8;padding:10px 14px;font-size:.875rem}
.review-lower-nav>span{color:#526078;font-size:.8125rem;white-space:nowrap}.review-lower-nav button:last-child{margin-left:auto}
@media(max-width:700px){.review-lower-nav{gap:8px;flex-wrap:wrap}.review-lower-nav button{padding-inline:11px}.approach-layout{gap:26px}.principle{padding-block:20px}.lesson-steps article{padding-block:16px}}

/* A short path to the first available appointment. */
.nearest-time{padding-top:8px}.nearest-label{margin:0 0 12px;color:#3459e8;font-weight:600;font-size:.875rem}
.nearest-time .selected-time{margin-block:0 8px;font-size:1.0625rem;padding:20px;background:#f0f4ff;border-radius:0 14px 14px 0}
.nearest-time .button{display:flex;width:100%;margin-top:20px;justify-content:space-between}
.nearest-time .widget-link{display:block;width:100%;min-height:48px;margin-top:8px;text-align:center}
.nearest-time .widget-notice{margin-bottom:0}
.booking-details{border-block:1px solid #e3e8f2;padding-block:4px}
.booking-details summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;cursor:pointer;color:#3459e8;font-size:.9375rem;list-style:none}
.booking-details summary::-webkit-details-marker{display:none}.booking-details summary>span{font-size:24px;line-height:1;flex-shrink:0}
.booking-details[open] summary>span{transform:rotate(45deg)}
.booking-details-fields{display:grid;gap:18px;padding:12px 0 20px}

/* The sculpture has its own clear space, away from text and the portrait. */
.lab-heading-spatial{display:grid;grid-template-columns:minmax(0,1fr) 350px;align-items:center;gap:24px}
.math-sculpture{margin:0;min-width:0;width:100%;max-width:400px;justify-self:center}
.sculpture-stage{position:relative;aspect-ratio:400/250;background:radial-gradient(ellipse 27% 5% at 50% 88%,#173e7c25 0,transparent 100%),radial-gradient(ellipse at 50% 48%,#eaf0ff 0,transparent 65%)}
.sculpture-stage canvas,.sculpture-fallback{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.sculpture-stage canvas{visibility:hidden}.math-sculpture.sculpture-ready canvas{visibility:visible}.sculpture-ready .sculpture-fallback{visibility:hidden}
.math-sculpture figcaption{display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap;color:#65738a;font-size:.75rem}
.math-sculpture button{border:0;border-radius:99px;background:#eaf0ff;color:#3459e8;padding:10px 16px;min-height:44px;font-size:.8125rem}
.math-sculpture button:hover{background:#dde6ff}.math-sculpture button span{margin-left:8px;font-size:18px}
@media(max-width:700px){
 .hero{display:flex;flex-direction:column;min-height:0;padding-top:22px;padding-bottom:18px}
 .hero-copy{display:contents}.hero-copy>.eyebrow{order:1;margin-bottom:12px}
 .hero h1{order:2;font-size:clamp(2.375rem,10.2vw,3rem);line-height:1.08;margin-bottom:20px;letter-spacing:-.05em}
 .hero-description{order:3;font-size:.9375rem;line-height:1.6;margin-bottom:18px}
 .hero-copy>.button{order:4;min-height:54px;padding-block:14px}
 .hero-copy>.cta-note{order:5;margin-top:10px}
 .hero-art{order:6;margin-top:4px;padding-top:16px;padding-bottom:16px}
 .hero-copy>.hero-film-link{order:7;margin:4px auto 0}
 .portrait-panel,.hero-art:hover .portrait-panel{width:88%}
 .hero-sticker{top:8px}
 .lab-heading-spatial{grid-template-columns:minmax(0,1fr);gap:4px}
 .lab-heading-spatial h2{margin-bottom:0}
 .math-sculpture{max-width:360px}.sculpture-stage{aspect-ratio:400/245}
 .math-sculpture figcaption{gap:10px}
}

.cube-demo .sculpture-stage{aspect-ratio:400/300}
.cube-demo figcaption{display:flex;flex-direction:column;gap:8px;text-align:center}
#cube-formula{font-size:1.5rem;font-weight:650;color:#3459e8;letter-spacing:-.03em}
#cube-explanation{margin:0;max-width:330px;font-size:.875rem;line-height:1.6;color:#636e82;min-height:2.8em}
.cube-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:4px}
.cube-actions button{min-height:48px;padding-inline:14px}#cube-split{background:#3459e8;color:white}
.cube-demo{padding-bottom:12px}

/* Make the moving orbit visible around the mobile portrait. */
@media(max-width:700px){
 .hero-art{padding-top:32px;padding-bottom:32px}
 .portrait-panel,.hero-art:hover .portrait-panel{width:78%}
 #math-field{inset:0;width:100%;height:100%}
}

/* Keep the portrait and its uniform background consistent on every screen. */
.portrait img{object-fit:cover;object-position:center bottom}
@media(min-width:701px){.portrait-panel{width:65%;height:min(620px,90%)}.portrait{bottom:90px}}
@media(max-width:700px){.portrait{aspect-ratio:7/10}}

/* A quieter badge and a little more breathing room around the portrait. */
.hero-sticker{width:92px;height:92px;background:#f8faff;color:#294fd0;border:1px solid #bfd0ff;box-shadow:0 8px 24px #3459e81b}
.hero-sticker strong{font-size:1rem}
@media(min-width:901px){
 .floating-equation{left:auto;right:84%;top:445px;padding:11px 15px 7px;white-space:nowrap}
 .floating-equation strong{font-size:.9rem}
 .floating-equation i{font-size:1.15rem;margin-inline:5px}
 .floating-equation svg{width:135px;height:9px}
}
@media(max-width:700px){
 .portrait{aspect-ratio:3/4}
 .hero-sticker{top:13px;right:2%;width:66px;height:66px}
 .hero-sticker strong{font-size:12px}
 .hero-sticker span{font-size:6px;letter-spacing:1px}
}
