/* History draft: scoped photo fitting and first-screen copy; shared UI stays intact. */
.hero [hidden], .site-header [hidden], [data-history-pending][hidden] { display: none !important; }
.hero-next-step { margin: 0; font-size: 13px; line-height: 1.5; color: #64748b; max-width: 440px; }
#about .hero-lead p { margin: 0; }
#about .hero-lead p + p { margin-top: 8px; }
.hero .hero-fact-card { min-width: 0; }
#about .hero-facts { align-items: start !important; }
.hero .hero-fact-card strong { white-space: normal !important; }
.hero .portrait-stage { transform: none; }
.hero .portrait-stage img { width: 100%; max-width: 100%; object-fit: contain; }
.hero .badge-mcko { top: 24%; left: 0; }
.hero .badge-group { bottom: 14%; right: 0; }
@media (min-width: 1180px) {
  #about #hero-title { font-size: clamp(34px, 3.4vw, 46px) !important; }
}
@media (min-width: 961px) and (max-width: 1179px) {
  #about .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; }
  #about .hero-badge-float { display: none; }
}
#about .hero-cta-btn { max-width: 100% !important; height: auto !important; padding: 14px 24px !important; }
#teacher .teacher-video-aspect { aspect-ratio: 16 / 9; background: #0f172a; }
#teacher .history-teacher-video { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.history-messenger-dialog::backdrop { background: transparent; }
.quiz-photo-slot img { max-width: 210px; max-height: 250px; }
.trial-compact-photo-stage { min-height: 250px; padding-top: 36px; box-sizing: border-box; }
.trial-alexander-photo { max-height: 280px; }
.parent-personal-avatar { object-position: 50% 0%; }
.final-portrait img { height: auto; max-height: none; object-fit: contain; }
#testimonials .review-source-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; border: 0; background: transparent; color: #475569; font: inherit; text-align: left; cursor: pointer; }
#testimonials .review-source-button img { flex: 0 0 88px; width: 88px; height: 56px; object-fit: contain; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; }
#testimonials .review-source-button:hover span { color: #d10d3d; text-decoration: underline; }
#testimonials .review-source-button:focus-visible { outline: 2px solid #d10d3d; outline-offset: 5px; border-radius: 4px; }
@media (max-width: 640px) {
  .hero .portrait-stage img { max-height: 500px; }
  .hero .hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; padding: 14px 12px !important; gap: 10px !important; }
  .hero .hero-facts { align-items: start !important; }
  .hero .hero-fact-card strong { font-size: 12px !important; line-height: 1.4 !important; }
  #about .hero-fact-card strong { min-height: 2.8em; }
  .hero .hero-fact-card span { font-size: 11px !important; line-height: 1.45 !important; }
  .quiz-photo-slot img { max-height: 210px; }
}

.history-trap-next { margin: 26px 0 0; text-align: center; font-weight: 600; }
.history-trap-next a { color: #c81040; text-underline-offset: 4px; }
.history-trap-next a:focus-visible { outline: 2px solid #c81040; outline-offset: 5px; }

/* Focused alignment of history quiz results and teacher actions. */
#quiz .quiz-final-view .quiz-result-title { line-height: 1.25; margin: 12px 0 16px; }
#quiz .quiz-result-situation { margin: 0 0 20px; }
#quiz .quiz-result-advice { margin: 0 0 24px; }
#quiz .quiz-final-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 0; }
#quiz .quiz-final-actions > [data-open-modal] { width: 100%; max-width: none; min-height: 52px; padding: 14px 20px; line-height: 1.3; }
#quiz .quiz-final-actions .quiz-messenger-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 10px; }
#quiz .quiz-final-actions .messenger-btn { width: 100%; min-width: 0; height: 44px !important; min-height: 44px !important; padding: 10px 12px !important; font-size: 14px !important; }
#quiz .quiz-reset { align-self: center; margin-top: 4px; }
@media (max-width: 640px) {
  #quiz .quiz-final-view .quiz-result-title { font-size: 24px !important; }
}

/* Teacher: retain the original society-page composition and compact contact row. */
#teacher { padding: 32px 0 !important; }
#teacher .section-head { max-width: 1040px; margin: 0 auto 28px; gap: 12px; }
#teacher #teacher-title { max-width: none; font-size: clamp(28px, 3vw, 40px) !important; }
#teacher .section-lead { max-width: 960px; font-size: 17px !important; line-height: 1.55; }
#teacher .teacher-grid { align-items: start; gap: clamp(24px, 3vw, 40px); }
#teacher .teacher-copy { gap: 12px; }
#teacher .teacher-copy > p { font-size: 16px; line-height: 1.6; }
#teacher .teacher-cta-btn { max-width: 360px !important; gap: 12px; }
#teacher .teacher-cta-btn span { white-space: normal; }
#teacher .gallery-thumb-btn { background: #fff; }
#teacher .gallery-thumb-btn img { object-fit: contain; }
#teacher .history-credential-badge { cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; text-align: left; }
#teacher .history-credential-badge:focus-visible { outline: 2px solid #d10d3d; outline-offset: 3px; }
#teacher .teacher-copy > .history-credentials-note { margin: 0; font-size: 13px; line-height: 1.5; color: #64748b; }
.history-trial-bonus a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 640px) {
  #teacher .teacher-cta-btn { max-width: 100% !important; }
  #teacher .teacher-copy > p { font-size: 15px; }
}

/* Keep the trial content inside its grid column at tablet breakpoints. */
#trial .trial-compact-main { min-width: 0; }
#trial .trial-compact-cta-row { flex-wrap: wrap; }
#trial .trial-cta-main { max-width: 100%; height: auto !important; padding: 12px 18px !important; white-space: normal !important; }
@media (min-width: 961px) {
  #trial .trial-compact-card { grid-template-columns: 290px minmax(0, 1fr); }
  #trial .trial-steps-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
#price .tariff-leadpay-link { max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 960px) {
  #contacts .final-portrait-wrap { max-width: 340px !important; height: auto; justify-self: center; }
}

/* Student cases follow the reviews and reuse the site's carousel and lightbox. */
#history-cases { margin-top: 44px; }
#history-cases .section-head { margin-bottom: 20px; }
#history-cases .history-cases-title { margin: 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.2; }
#history-cases .case-evidence { aspect-ratio: 3 / 2; }
#history-cases .cases-track { scroll-padding-inline: 4px; }
#history-cases .case-evidence img { object-fit: contain; }
#history-cases .case-path dt { flex-shrink: 0; }
#history-cases .case-path dd { margin: 0; }

/* Each trial step has the same order: duration, heading, description. */
#trial .trial-step-top { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 8px; }
#trial .trial-step-top strong { line-height: 1.35; }
#trial .trial-step-pill { gap: 8px; }
@media (min-width: 641px) {
  #trial .trial-step-top strong { min-height: 2.7em; }
}

/* Preserve the entire lesson frame; keep mobile controls off the slide text. */
#classroom .classroom-slide-viewport { height: auto; aspect-ratio: 16 / 9; touch-action: pan-y; }
#classroom .classroom-slide-img { object-fit: contain; }
#classroom .classroom-slide-card:hover .classroom-slide-img { transform: none; }
#classroom .classroom-slide-topbar { right: calc(12% + 16px); }
#classroom .classroom-dot { min-width: 24px; height: 32px; background: transparent; }
#classroom .classroom-dot::after { inset: 11px 7px; border-radius: 999px; background: #cbd5e1; }
#classroom .classroom-dot.active { width: 28px; box-shadow: none; }
#classroom .classroom-dot.active::after { left: 0; right: 0; background: #0284c7; }
@media (max-width: 640px) {
  #classroom .classroom-slide-viewport { display: grid; grid-template-columns: minmax(0,1fr); aspect-ratio: auto; }
  #classroom .classroom-slide-topbar { position: static; grid-area: 1 / 1; padding: 10px; gap: 8px; }
  #classroom .classroom-badge { font-size: 9px; padding: 5px 8px; }
  #classroom .classroom-zoom-pill { flex-shrink: 0; }
  #classroom .classroom-zoom-btn { grid-area: 2 / 1; height: auto; aspect-ratio: 16 / 9; }
  #classroom .classroom-nav-btn { width: 44px; height: 44px; top: calc(50% + 20px); }
}
