/* Hallmark · macrostructure: Workbench · tone: EtudeSpark warm · anchor hue: ember
 * Existing system: Fraunces + Nunito Sans · pre-emit critique: P5 H5 E4 S5 R5 V4
 * Real local screenshots · no added entrance motion
 */
@import url('../tokens.css?v=compact-header-18');

.tour-shell { width: min(var(--tour-max), 100% - var(--gutter) * 2); margin-inline: auto; }
.teacher-page h1, .teacher-page h2 { min-width: 0; }
.tour-overview { position: sticky; top: var(--header-h); z-index: 90; background: var(--paper-warm); border-bottom: 1px solid var(--hairline); }
.teacher-page main > section[id] { scroll-margin-top: calc(44px + var(--space-2xs) + 1px); }
.roster-section { padding-block: var(--space-xl); }
.teacher-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--space-lg); align-items: center; margin-bottom: var(--space-xl); }
.teacher-context { color: var(--ember-strong); margin-bottom: var(--space-sm); font-size: 1rem; }
.teacher-intro h1 { font-size: var(--text-display); line-height: 1.06; margin-bottom: 0; }
.teacher-intro-copy { max-width: 48ch; padding-top: var(--space-md); }
.teacher-intro-copy .lede { color: var(--ink); margin-bottom: var(--space-xs); }
.teacher-intro-copy > p:not(.lede) { color: var(--ink-soft); }
.teacher-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; margin-top: var(--space-2xs); padding: var(--space-xs) var(--space-sm); color: var(--paper-warm); background: var(--ember-strong); border: 1px solid var(--ember-strong); border-radius: var(--radius); line-height: 1; font-weight: 700; font-size: 1rem; white-space: nowrap; }
.teacher-button:hover { background: var(--ink); border-color: var(--ink); }
.teacher-button:active { transform: translateY(1px); }
.teacher-intro-copy .availability-note { margin: var(--space-xs) 0 0; font-size: var(--text-caption); }
.product-shot { min-width: 0; width: 100%; max-width: 520px; margin: 0 auto; }
.hero-shot { max-width: 800px; }
.screenshot-link, .screenshot-device { position: relative; display: block; padding: var(--space-screenshot-frame); border: 2px solid var(--color-device-edge); border-radius: var(--radius-device); background: var(--color-device-bezel); box-shadow: var(--shadow-screenshot); }
.screenshot-link::before, .screenshot-device::before { content: ""; position: absolute; left: 5px; top: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: var(--color-device-camera); }
.screenshot-link[data-orientation="portrait"]::before, .screenshot-device[data-orientation="portrait"]::before { left: calc(50% - 3px); top: 5px; }
.screenshot-link { overflow: clip; cursor: zoom-in; }
.screenshot-link img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; background: var(--paper-soft); border-radius: var(--radius-device-screen); }
.screenshot-link[data-orientation="portrait"] img { aspect-ratio: auto; }
.screenshot-link:hover { outline: 1px solid var(--ember); outline-offset: 2px; }
.screenshot-link:active { opacity: 0.85; }
.product-shot figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xs); margin-top: var(--space-xs); color: var(--ink-soft); font-size: var(--text-caption); line-height: 1.5; }
.demo-note { margin-top: var(--space-xs); margin-bottom: var(--space-md); color: var(--ink-soft); font-size: var(--text-caption); }
.tour-nav { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-md); padding-block: var(--space-2xs); overflow-x: auto; scrollbar-width: none; }
.tour-nav::-webkit-scrollbar { display: none; }
.tour-nav a { flex: none; }
.tour-nav a[aria-current="location"] { color: var(--ember-strong); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.tour-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 1rem; line-height: 1; white-space: nowrap; }
.tour-nav a:hover, .teacher-text-link:hover { color: var(--ember-strong); text-decoration: underline; text-underline-offset: 3px; }
.tour-nav a:active, .teacher-text-link:active { opacity: 0.75; }
.tour-section { padding-block: var(--space-xl); }
.feature-split { display: grid; grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr); gap: var(--space-lg); align-items: center; }
.feature-copy p { color: var(--ink-soft); }
.feature-copy h2 { margin-bottom: var(--space-sm); }
.feature-points { list-style: none; padding: 0; margin: var(--space-md) 0; }
.feature-points li { padding-block: var(--space-2xs); border-bottom: 1px solid var(--hairline); font-size: 1rem; }
.feature-copy .feature-aside { font-size: 1rem; }
.feature-reverse { grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr); }
.feature-reverse .feature-copy { grid-column: 2; grid-row: 1; }
.feature-reverse .product-shot { grid-column: 1; grid-row: 1; }
.assignment-section { padding-block: var(--space-xl); background: var(--paper-soft); border-block: 1px solid var(--hairline); }
.section-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-lg); align-items: start; margin-bottom: var(--space-lg); }
.section-intro h2 { margin: 0; }
.section-intro p { color: var(--ink-soft); }
.section-intro p:last-child { margin-bottom: 0; }
.assignment-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); margin-top: var(--space-md); }
.assignment-details p { color: var(--ink-soft); margin-bottom: 0; font-size: 1rem; }
.assignment-details strong { color: var(--ink); }
.studio-section { background: var(--paper-deep); border-block: 1px solid var(--hairline); padding-block: var(--space-xl); }
.studio-shots { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: var(--space-md); align-items: start; max-width: 880px; margin-inline: auto; }
.studio-shots .product-shot:last-child { max-width: 280px; margin-top: var(--space-lg); }
.studio-shots .product-shot:last-child img { height: auto; }
.studio-footnote { max-width: 65ch; margin: var(--space-md) 0 0; color: var(--ink-soft); }
.family-status { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--space-lg); align-items: center; padding-block: var(--space-xl); }
.family-status p { color: var(--ink-soft); }
.teacher-text-link { display: inline-flex; white-space: nowrap; align-items: center; gap: var(--space-2xs); color: var(--ember-strong); min-height: 44px; font-size: 1rem; }
.screenshot-dialog { width: min(1440px, 96vw); max-width: 96vw; max-height: 94dvh; padding: var(--space-xs); color: var(--ink); background: var(--paper-soft); border: 1px solid var(--hairline); border-radius: var(--radius); }
.screenshot-dialog::backdrop { background: var(--color-modal-backdrop); }
.screenshot-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); margin-bottom: var(--space-xs); }
.screenshot-toolbar p { margin: 0; font-weight: 700; font-size: 1rem; }
.screenshot-toolbar button { flex: none; width: auto; min-height: 44px; margin: 0; padding: var(--space-2xs) var(--space-xs); border: 1px solid var(--hairline); background: var(--paper); color: var(--ink); white-space: nowrap; cursor: pointer; }
.screenshot-toolbar button:hover { background: var(--paper-deep); }
.screenshot-toolbar button:active { transform: translateY(1px); }
.screenshot-toolbar button:disabled { opacity: 0.5; cursor: default; }
.screenshot-scroll { overflow: auto; max-height: 72dvh; border-radius: var(--radius-device-screen); background: var(--paper-soft); }
.screenshot-scroll img { width: 100%; max-width: none; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: var(--radius-device-screen); }
.screenshot-device[data-orientation="portrait"] { max-width: 640px; margin-inline: auto; }
.screenshot-device[data-orientation="portrait"] img { aspect-ratio: auto; }
.screenshot-help { color: var(--ink-soft); font-size: var(--text-caption); margin: var(--space-2xs) 0 0; }
body:has(.screenshot-dialog[open]) { overflow-y: hidden; }
@media (max-width: 760px) {
  .teacher-intro, .section-intro, .feature-split, .family-status { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .teacher-intro { margin-bottom: var(--space-lg); }
  .teacher-intro-copy { padding-top: 0; max-width: 60ch; }
  .teacher-intro h1 { font-size: var(--text-display); }
  .feature-reverse .feature-copy, .feature-reverse .product-shot { grid-column: auto; grid-row: auto; }
  .feature-copy { max-width: 65ch; }
  .feature-copy br, .section-intro br { display: none; }
  .studio-shots { grid-template-columns: minmax(0, 1fr); }
  .product-shot { width: 90%; }
  .studio-shots .product-shot:last-child { margin-top: 0; width: 80%; margin-inline: auto; }
  .studio-shots .product-shot:last-child img { aspect-ratio: auto; }
  .assignment-details { grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); }
  .screenshot-link, .screenshot-device { border-radius: 20px; padding: 12px; }
  .screenshot-link::before, .screenshot-device::before { left: 3px; width: 5px; height: 5px; }
  .screenshot-link[data-orientation="portrait"]::before, .screenshot-device[data-orientation="portrait"]::before { left: calc(50% - 2.5px); top: 3px; }
  .screenshot-toolbar p { font-size: var(--text-caption); }
}
@media (max-width: 374px) {
  .teacher-button { padding-inline: var(--space-xs); font-size: 0.9rem; }
  .product-shot figcaption { flex-wrap: wrap; gap: var(--space-2xs); }
}
@media (prefers-reduced-motion: reduce) {
  .teacher-page *, .teacher-page *::before, .teacher-page *::after { scroll-behavior: auto; transition: none; animation: none; }
  .teacher-page a:active, .teacher-page button:active { transform: none; }
}

/* The same live roster, captured at three actual viewport sizes. */
.responsive-section { padding-top: var(--space-xl); padding-bottom: var(--space-lg); border-bottom: 1px solid var(--hairline); }
.responsive-showcase { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 0.6fr); gap: var(--space-md); align-items: end; }
.responsive-showcase .product-shot { width: 100%; max-width: none; }
.responsive-showcase .screenshot-link img { aspect-ratio: auto; }
.responsive-showcase figcaption { min-height: 5em; }
.responsive-showcase figcaption strong { display: inline-block; margin-bottom: var(--space-2xs); color: var(--ink); font-size: 1rem; }
.responsive-desktop .screenshot-link { padding: 8px; border-radius: 14px; }
.responsive-desktop .screenshot-link::before { display: none; }
.responsive-phone .screenshot-link { padding: 10px; border-radius: 24px; }
.screenshot-device[data-device="desktop"] { padding: 8px; border-radius: 14px; }
.screenshot-device[data-device="desktop"]::before { display: none; }
.screenshot-device[data-device="phone"] { max-width: 390px; padding: 12px; }
.screenshot-device[data-device="desktop"] img, .screenshot-device[data-device="tablet"] img, .screenshot-device[data-device="phone"] img { aspect-ratio: auto; }
.screenshot-device[data-device="phone"] img { min-width: 0; }

.teacher-page .closing .teacher-button { color: var(--ink); background: var(--honey); border-color: var(--honey); }
.teacher-page .closing .teacher-button:hover { background: var(--paper-soft); border-color: var(--paper-soft); }

/* Broad surfaces give each part of the tour its own pace. */
.teacher-page { background: var(--paper-warm); }
.surface-band { position: relative; isolation: isolate; }
.surface-band::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: var(--section-surface); }
.responsive-section { --section-surface: var(--paper-warm); padding-block: var(--space-xl); border: 0; }
#schedule, #payments { --section-surface: var(--paper-soft); }
#library { --section-surface: var(--paper-warm); }
.studio-section { background: var(--color-surface-sand); border: 0; }
.family-status { --section-surface: var(--color-surface-sage); }
.assignment-section { background: var(--ink); color: var(--paper-soft); border: 0; }
.assignment-section h2, .assignment-section strong { color: var(--paper-soft); }
.assignment-section .section-intro p, .assignment-section .assignment-details p, .assignment-section figcaption { color: var(--color-on-dark-muted); }
.responsive-showcase { position: relative; }
.responsive-controls { display: none; }
.responsive-controls[hidden] { display: none; }
.carousel-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .responsive-section .section-intro { margin-bottom: var(--space-sm); }
  .responsive-showcase { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 100%; gap: var(--space-md); align-items: stretch; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding: var(--space-xs) var(--space-2xs) var(--space-lg); }
  .responsive-showcase::-webkit-scrollbar { display: none; }
  .responsive-showcase .product-shot { width: 100%; min-width: 0; display: grid; grid-template-rows: 340px auto; align-items: center; scroll-snap-align: center; scroll-snap-stop: always; }
  .responsive-showcase .screenshot-link { width: 100%; margin-inline: auto; }
  .responsive-showcase .responsive-phone .screenshot-link { width: 150px; padding: 8px; border-radius: 24px; }
  .responsive-showcase .responsive-tablet .screenshot-link { padding: 10px; border-radius: 20px; }
  .responsive-showcase figcaption { min-height: 0; margin-top: var(--space-sm); }
  .responsive-controls { display: flex; align-items: center; justify-content: center; gap: var(--space-2xs); max-width: 360px; margin-inline: auto; }
  .responsive-controls button { flex: 1; min-width: 0; min-height: 44px; width: auto; margin: 0; padding: var(--space-2xs); border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--paper-soft); color: var(--ink); font-size: 0.875rem; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer; }
  .responsive-controls button:hover { background: var(--paper-deep); }
  .responsive-controls button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper-soft); }
  .responsive-controls button:active { transform: translateY(1px); }
  .responsive-controls button:disabled { opacity: 0.5; cursor: default; }
}
@media (min-width: 761px) {
  .responsive-showcase:focus-visible { outline: none; }
}

/* Calendar subscriptions are supporting previews within scheduling. */
.schedule-visual { position: relative; width: 100%; max-width: 590px; margin-inline: auto; }
.schedule-main-shot figcaption { margin-top: 120px; }
.calendar-overlays { position: absolute; left: 0; right: 0; bottom: 52px; display: flex; justify-content: space-between; align-items: end; gap: var(--space-xs); pointer-events: none; }
.calendar-overlays .product-shot { width: 52%; max-width: 260px; margin: 0; pointer-events: auto; }
.calendar-overlays .calendar-apple { width: 23%; max-width: 112px; }
.calendar-overlays .screenshot-link img { aspect-ratio: auto; }
.calendar-overlays .calendar-google .screenshot-link { padding: 5px; border-radius: 10px; }
.calendar-overlays .calendar-google .screenshot-link::before { display: none; }
.calendar-overlays .calendar-apple .screenshot-link { padding: 5px; border-radius: 16px; }
.calendar-overlays .calendar-apple .screenshot-link::before { width: 3px; height: 3px; top: 1px; left: calc(50% - 1.5px); }
.calendar-overlays figcaption { margin-top: var(--space-2xs); font-size: 0.75rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (max-width: 760px) {
  .schedule-main-shot figcaption { margin-top: 104px; }
  .calendar-overlays { bottom: 52px; }
  .calendar-overlays .calendar-apple { width: 26%; }
  .calendar-overlays figcaption { font-size: 0.6875rem; }
}

/* Teacher-specific watercolor plate, in the home page’s illustration style. */
.teacher-hero { position: relative; isolation: isolate; overflow: clip; padding-block: calc(var(--header-h) + var(--space-lg)) var(--space-lg); min-height: 760px; display: grid; align-items: center; background: var(--paper-warm); }
.teacher-hero .hero-media img { object-position: center; }
.teacher-hero-content { position: relative; z-index: 1; }
.teacher-hero .teacher-intro { display: block; max-width: 550px; margin: 0; }
.teacher-hero h1 { font-size: clamp(3rem, 2rem + 3vw, 4.6rem); }
.teacher-hero .teacher-intro-copy { max-width: 48ch; padding-top: var(--space-sm); }
.teacher-hero .teacher-intro-copy .lede { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem); }
.teacher-opening { padding-top: var(--space-lg); }
@media (max-width: 760px) {
  .teacher-hero { align-items: start; min-height: clamp(460px, 80svh, 760px); }
  .teacher-hero .teacher-intro { max-width: none; }
  .teacher-hero .teacher-intro-copy { max-width: 60ch; }
  .teacher-hero .hero-media img { object-position: 72% center; }
  .teacher-hero .hero-media::before { background: var(--hero-mobile-copy-scrim); }
}

/* Shared watercolor pigment gives the full tour the hero’s paper-and-paint finish. */
.roster-section { --section-surface: var(--paper-warm); }
.assignment-section, .studio-section, .teacher-page .closing { position: relative; isolation: isolate; }
.surface-band::after, .assignment-section::before, .studio-section::before, .teacher-page .closing::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; pointer-events: none;
  background-image: url('../assets/section-watercolor-wash.webp'); background-repeat: no-repeat; background-size: 100% 100%;
  /* Apply strength inside the mask to avoid Firefox's masked-layer opacity bug. */
  mask-image: linear-gradient(to bottom, transparent, rgb(0 0 0 / var(--section-wash-opacity, .28)) 12%, rgb(0 0 0 / var(--section-wash-opacity, .28)) 88%, transparent);
}
.surface-band::after { left: 50%; width: 100vw; transform: translateX(-50%); }
.assignment-section::before, .studio-section::before, .teacher-page .closing::before { left: 0; right: 0; }
.responsive-section::after, #library::after, .family-status::after { transform: translateX(-50%) scaleX(-1); }
#schedule::after, #payments::after { --section-wash-opacity: .22; }
.studio-section::before { transform: scaleY(-1); --section-wash-opacity: .3; }
.assignment-section::before, .teacher-page .closing::before { mix-blend-mode: soft-light; --section-wash-opacity: .38; }
@media (max-width: 760px) {
  .surface-band::after, .assignment-section::before, .studio-section::before, .teacher-page .closing::before { background-size: auto 100%; background-position: right center; }
  .surface-band::after, .studio-section::before { --section-wash-opacity: .14; }
  .assignment-section::before, .teacher-page .closing::before { --section-wash-opacity: .26; }
}

/* Keep screenshot text at its captured size in the mobile detail viewer. */
@media (max-width: 760px) {
  .screenshot-dialog { inset: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; }
  .screenshot-dialog[open] { display: flex; flex-direction: column; }
  .screenshot-toolbar { flex: none; min-height: 64px; margin: 0; padding: max(var(--space-2xs), env(safe-area-inset-top)) max(var(--space-xs), env(safe-area-inset-right)) var(--space-2xs) max(var(--space-xs), env(safe-area-inset-left)); border-bottom: 1px solid var(--hairline); }
  .screenshot-toolbar p { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .screenshot-dialog .screenshot-scroll { flex: 1; min-height: 0; max-height: none; width: 100%; border-radius: 0; overscroll-behavior: contain; }
  .screenshot-dialog .screenshot-device { width: calc(var(--screenshot-width) + 28px); max-width: none; margin: var(--space-xs); padding: 12px; border-radius: 20px; }
  .screenshot-dialog .screenshot-device img { display: block; width: var(--screenshot-width); min-width: 0; max-width: none; height: auto; aspect-ratio: auto; }
  .screenshot-help { flex: none; margin: 0; padding: var(--space-2xs) max(var(--space-xs), env(safe-area-inset-right)) max(var(--space-2xs), env(safe-area-inset-bottom)) max(var(--space-xs), env(safe-area-inset-left)); border-top: 1px solid var(--hairline); }
}

/* The family app uses an iPhone frame, including in the screenshot viewer. */
.family-app-shot { max-width: 300px; }
.family-app-shot figcaption { text-align: center; justify-content: center; }
.family-app-phone,
.screenshot-dialog .screenshot-device[data-device="iphone"] {
  padding: 10px;
  border: 1px solid var(--color-device-edge);
  border-radius: 42px;
  background: var(--color-device-bezel);
}
.family-app-phone img,
.screenshot-dialog .screenshot-device[data-device="iphone"] img {
  display: block;
  border-radius: 32px;
  aspect-ratio: 390 / 844;
}
.family-app-phone::before,
.screenshot-dialog .screenshot-device[data-device="iphone"]::before {
  top: 18px;
  left: 50%;
  width: 26%;
  height: 17px;
  border-radius: 20px;
  transform: translateX(-50%);
  background: var(--color-device-bezel);
}
.family-app-phone::after,
.screenshot-dialog .screenshot-device[data-device="iphone"]::after {
  content: '';
  position: absolute;
  bottom: 18px;
  left: 50%;
  width: 30%;
  height: 4px;
  border-radius: 4px;
  transform: translateX(-50%);
  background: var(--color-device-bezel);
}
.screenshot-dialog .screenshot-device[data-device="iphone"] { width: 412px; max-width: none; margin-inline: auto; }
.screenshot-dialog .screenshot-device[data-device="iphone"] img { width: 390px; }

.pilot-note { display: grid; gap: var(--space-2xs); margin-block: var(--space-sm); padding-left: var(--space-sm); border-left: 3px solid var(--ember-strong); font-size: 1rem; }
.pilot-note strong { color: var(--ember-strong); }
.closing .pilot-invitation { max-width: 48ch; margin: var(--space-md) auto var(--space-sm); color: var(--paper-soft); }
.closing .availability-note { color: var(--honey); font-size: 1rem; }

/* Retained for the existing Chinese pages. */
.teacher-offer { color: var(--honey); font-weight: 700; margin-top: var(--space-md); }
.teacher-price { display: flex; align-items: center; gap: var(--space-xs); margin-block: var(--space-md) var(--space-sm); }
.teacher-price strong { color: var(--ember-strong); font-family: var(--serif); font-weight: 600; font-size: clamp(2.5rem, 2rem + 1vw, 3.25rem); line-height: 1; letter-spacing: -0.02em; }
.teacher-price span { color: var(--ink); font-size: 1rem; font-weight: 700; line-height: 1.35; }
.teacher-offer.teacher-price { padding-block: var(--space-sm); border-block: 1px solid var(--hairline-light); margin-bottom: var(--space-md); }
.closing .teacher-price strong { color: var(--honey); }
.closing .teacher-price span { color: var(--paper-soft); }
.teacher-hero .teacher-price { margin-block: var(--space-sm); }
