/* User-supplied Medeo Sans variable fonts, hosted locally under SIL OFL 1.1. */
@font-face {
    font-family: "Medeo Sans";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/MedeoSansVariable.woff2") format("woff2");
}

@font-face {
    font-family: "Medeo Sans";
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/MedeoSansVariable-Italic.woff2") format("woff2");
}


/* Shared visual system for public Alfa Chess pages. The pages keep their content and structure. */
:root {
    --school-paper: #faf9f6;
    --school-surface: #ffffff;
    --school-raised: #f2f0eb;
    --school-ink: #10243f;
    --school-text: #172033;
    --school-muted: #596579;
    --school-amber: #d6b565;
    --school-blue: #2457c5;
    --school-line: rgba(16, 36, 63, .12);
    --school-radius-button: 999px;
    --school-radius-input: 22px;
    --school-radius-card: 32px;
    --school-radius-panel: 40px;
    --school-focus: #2457c5;
    --school-ease: cubic-bezier(.22, 1, .36, 1);
}

body.school-site {
    --font-main: "Medeo Sans", Arial, sans-serif;
    --font: var(--font-main);
    min-width: 0;
    color: var(--school-text);
    background-color: var(--school-paper);
    font-family: var(--font-main) !important;
    font-optical-sizing: auto;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.school-site :is(button, input, select, textarea) {
    font-family: var(--font-main) !important;
}

body.school-site :is(h1, h2, h3, h4, h5, h6) {
    color: var(--school-ink);
    font-family: inherit;
    font-weight: 600 !important;
    letter-spacing: 0;
    line-height: 1.2;
}

body.school-site :is(p, li) {
    text-wrap: pretty;
}

body.school-site a {
    text-underline-offset: .18em;
}

body.school-site :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--school-focus) !important;
    outline-offset: 3px !important;
    box-shadow: none !important;
}

/* Quiet shared header; active state is a small neutral surface, not a color stripe. */
body.school-site .header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--school-line) !important;
    border-radius: 0 !important;
    background: rgba(250, 249, 246, .98) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    font-family: inherit !important;
}

body.school-site .header > .container {
    box-sizing: border-box !important;
    width: min(1280px, calc(100% - 64px)) !important;
    max-width: none !important;
    height: 72px !important;
    margin-inline: auto !important;
    padding-inline: 16px !important;
}

body.school-site .header .nav {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 72px !important;
    gap: 20px !important;
}

body.school-site .header .logo {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    gap: 12px !important;
    color: var(--school-ink) !important;
    font-family: inherit !important;
    text-decoration: none !important;
}

body.school-site .header .logo svg,
body.school-site .header .logo .logo-icon {
    width: 39px !important;
    height: 44px !important;
    flex: 0 0 39px !important;
    object-fit: contain !important;
}

body.school-site .logo .logo-icon {
    display: block !important;
    width: 39px !important;
    height: 44px !important;
    flex: 0 0 39px !important;
    object-fit: contain !important;
}

body.school-site .logo .logo-wordmark {
    display: block !important;
    width: clamp(120px, 10.5vw, 150px) !important;
    height: auto !important;
    max-width: min(150px, 42vw) !important;
    flex: 0 1 auto !important;
    object-fit: contain !important;
}

body.school-site :is(.footer, .success-footer) .logo .logo-wordmark {
    padding: 0;
    border-radius: 0;
    background: transparent;
}

body.school-site :is(.footer, .success-footer) .logo {
    display: inline-flex !important;
    width: fit-content !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    background: #fff !important;
}

body.school-site .header .logo-text {
    color: var(--school-ink) !important;
    font-family: inherit !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
}

body.school-site .header .nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
}

body.school-site .header .nav-links a,
body.school-site .header .nav-mobile-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    padding: 8px 14px !important;
    border-radius: var(--school-radius-button) !important;
    color: var(--school-text) !important;
    background: transparent !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 20px !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    transition: color 160ms ease, background-color 160ms ease !important;
}

body.school-site .header .nav-links a::after {
    display: none !important;
}

body.school-site .header .nav-links a:hover,
body.school-site .header .nav-links a.active,
body.school-site .header .nav-mobile-links a:hover,
body.school-site .header .nav-mobile-links a[aria-current="page"] {
    color: var(--school-ink) !important;
    background: var(--school-raised) !important;
}

body.school-site .header .header-actions {
    display: flex !important;
    align-items: center !important;
}

body.school-site .header .header-cta.btn-primary {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 20px !important;
    border: 1px solid var(--school-blue) !important;
    border-radius: var(--school-radius-button) !important;
    color: #fff !important;
    background: var(--school-blue) !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
}

body.school-site .hamburger {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 8px !important;
    border: 1px solid transparent !important;
    border-radius: var(--school-radius-button) !important;
    background: transparent !important;
    transition: background-color 160ms ease, border-color 160ms ease !important;
}

body.school-site .hamburger:hover,
body.school-site .hamburger[aria-expanded="true"] {
    border-color: var(--school-line) !important;
    background: var(--school-raised) !important;
}

body.school-site .hamburger span {
    background: var(--school-ink) !important;
}

body.school-site .nav-mobile {
    border-top: 1px solid var(--school-line) !important;
    background: var(--school-paper) !important;
    box-shadow: none !important;
}

body.school-site .header .nav-mobile-links {
    gap: 4px !important;
    padding: 16px !important;
}

@media (max-width: 1023px) {
    body.school-site .header .nav-links,
    body.school-site .header .header-actions {
        display: none !important;
    }

    body.school-site .hamburger {
        display: inline-flex !important;
    }
}

@media (max-width: 767px) {
    body.school-site .header > .container {
        width: calc(100% - 32px) !important;
        padding-inline: 8px !important;
    }

    body.school-site .header .logo-text {
        font-size: 18px !important;
    }
}

/* Shared controls and forms. Page-specific layouts remain in their own stylesheets. */
body.school-site :is(.btn-primary, .header-cta, .button, .cta a, button[type="submit"], button[type="button"]) {
    border-radius: var(--school-radius-button) !important;
    font-family: inherit;
    font-weight: 600;
    box-shadow: none;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

body.school-site :is(.btn-primary, .button, .cta a, button[type="submit"]) {
    border-color: var(--school-blue) !important;
    color: #fff !important;
    background: var(--school-blue) !important;
}

body.school-site :is(.btn-secondary) {
    border: 1px solid var(--school-line) !important;
    border-radius: var(--school-radius-button) !important;
    color: var(--school-ink) !important;
    background: var(--school-surface) !important;
    box-shadow: none !important;
}

body.school-site :is(.btn-primary, .btn-secondary, .button, .cta a, button[type="submit"], button[type="button"]):active {
    transform: scale(.98);
}

/* Shared no-glow action treatment across all public school pages and states. */
body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [type="reset"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
),
body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [type="reset"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
):is(:hover, :active, :focus, :focus-visible),
body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [type="reset"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
)::before,
body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [type="reset"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
)::after {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    background-image: none !important;
}

body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
):focus-visible {
    outline: 3px solid var(--school-focus) !important;
    outline-offset: 3px !important;
    box-shadow: none !important;
}

body.school-site :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    border: 1px solid var(--school-line) !important;
    border-radius: var(--school-radius-input) !important;
    color: var(--school-text) !important;
    background: var(--school-surface) !important;
    font: inherit;
}

body.school-site :is(.modal-content, .lead-form, .form-card, .contact-card, .success-card) {
    border: 1px solid var(--school-line);
    border-radius: var(--school-radius-panel) !important;
    box-shadow: 0 8px 24px rgba(16, 36, 63, .06) !important;
}

body.school-site .modal-close {
    width: 44px !important;
    height: 44px !important;
    border-radius: var(--school-radius-button) !important;
}

body.school-site :is(.faq-item, .card, .pricing-card, .plan-card, .testimonial-card, .teacher-card, .result-card, .advantage-card, .age-card) {
    border-radius: var(--school-radius-card) !important;
}

body.school-site img:not(.logo-icon) {
    max-width: 100%;
}

body.school-site :is(.footer, .success-footer) {
    color: rgba(255, 255, 255, .82) !important;
    background: var(--school-ink) !important;
    background-image: none !important;
}

body.school-site :is(.footer, .success-footer) :is(h2, h3, h4, .logo-text) {
    color: #fff !important;
}

body.school-site :is(.footer, .success-footer) a {
    color: rgba(255, 255, 255, .86) !important;
    text-decoration: none;
}

body.school-site :is(.footer, .success-footer) a:hover {
    color: #fff !important;
    text-decoration: underline;
}


/* Footer logo stays on an opaque white surface, independent of link opacity. */
body.school-site :is(.footer, .success-footer) .logo {
  background: #fff !important;
  opacity: 1 !important;
}


/* Article-local styling. Shared school shell and tokens are supplied by school-theme.css. */
body:not(.home-premium) .hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--school-line, rgba(16,36,63,.12));
  background: var(--school-paper, #faf9f6);
  color: var(--school-text, #172033);
}

body:not(.home-premium) .hero .container {
  width: min(1184px, calc(100% - 48px));
}

body:not(.home-premium) .hero .eyebrow {
  color: var(--school-muted, #596579);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

body:not(.home-premium) .hero h1 {
  max-width: 900px;
  margin: 16px 0;
  color: var(--school-ink, #10243f);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.02em;
}

body:not(.home-premium) .hero p {
  max-width: 760px;
  color: var(--school-muted, #596579);
  font-size: 18px;
  line-height: 1.6;
}

body:not(.home-premium) .meta {
  margin-top: 20px;
  color: var(--school-muted, #596579);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

body:not(.home-premium) .layout {
  width: min(1184px, calc(100% - 48px));
  grid-template-columns: minmax(0, 760px) minmax(240px, 1fr);
  gap: 48px;
  padding: 48px 0 80px;
}

body:not(.home-premium) .article {
  color: var(--school-text, #172033);
}

body:not(.home-premium) .article h2 {
  margin: 40px 0 16px;
  color: var(--school-ink, #10243f);
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0;
}

body:not(.home-premium) .article h3 {
  margin: 28px 0 12px;
  color: var(--school-ink, #10243f);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

body:not(.home-premium) .article p,
body:not(.home-premium) .article li {
  color: var(--school-text, #172033);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.72;
}

body:not(.home-premium) .article p + p {
  margin-top: 20px;
}

body:not(.home-premium) .article ul,
body:not(.home-premium) .article ol {
  padding-left: 24px;
}

body:not(.home-premium) .article li + li {
  margin-top: 8px;
}

body:not(.home-premium) .article a {
  border-radius: 12px;
  color: var(--school-ink, #10243f);
  text-decoration-color: rgba(183,129,35,.55);
  text-underline-offset: 3px;
}

body:not(.home-premium) .article a:focus-visible,
body:not(.home-premium) .sidebar a:focus-visible {
  outline: 3px solid var(--school-amber, #f59e0b);
  outline-offset: 3px;
}

body:not(.home-premium) .callout {
  margin: 28px 0;
  padding: 24px 28px;
  border: 1px solid var(--school-line, rgba(16,36,63,.12));
  border-left: 4px solid var(--school-amber, #f59e0b);
  border-radius: 32px;
  background: #faf9f6;
  color: var(--school-text, #172033);
  font-weight: 500;
}

body:not(.home-premium) .checklist {
  gap: 12px;
  margin: 24px 0;
}

body:not(.home-premium) .check {
  padding: 20px 24px;
  border: 1px solid var(--school-line, rgba(16,36,63,.12));
  border-radius: 28px;
  background: #fff;
  color: var(--school-text, #172033);
}

body:not(.home-premium) .check strong {
  margin-bottom: 4px;
  color: var(--school-ink, #10243f);
  font-weight: 600;
}

body:not(.home-premium) .table-wrap {
  overflow: auto;
  margin: 24px 0 32px;
  border: 1px solid var(--school-line, rgba(16,36,63,.12));
  border-radius: 32px;
  background: #fff;
}

body:not(.home-premium) .table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

body:not(.home-premium) .table-wrap th,
body:not(.home-premium) .table-wrap td {
  min-width: 0;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--school-line, rgba(16,36,63,.12));
  color: var(--school-text, #172033);
  text-align: left;
  vertical-align: top;
}

body:not(.home-premium) .table-wrap th {
  background: #f4f1e9;
  color: var(--school-ink, #10243f);
  font-weight: 600;
}

body:not(.home-premium) .table-wrap tr:last-child td {
  border-bottom: 0;
}

body:not(.home-premium) .sidebar {
  top: 96px;
  padding: 24px;
  border: 1px solid var(--school-line, rgba(16,36,63,.12));
  border-radius: 36px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16,36,63,.035);
}

body:not(.home-premium) .sidebar h2 {
  color: var(--school-ink, #10243f);
  font-size: 20px;
  font-weight: 600;
}

body:not(.home-premium) .sidebar a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: var(--school-radius-button, 999px);
  background: #f4f1e9;
  color: var(--school-ink, #10243f);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

body:not(.home-premium) .cta {
  margin-top: 40px;
  padding: 32px;
  border: 1px solid var(--school-line, rgba(16,36,63,.12));
  border-radius: 40px;
  background: #f4f1e9;
  color: var(--school-text, #172033);
}

body:not(.home-premium) .cta h2 {
  margin: 0 0 12px;
  color: var(--school-ink, #10243f);
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.2;
}

body:not(.home-premium) .cta p {
  color: var(--school-muted, #596579);
}

body:not(.home-premium) .cta .button {
  min-height: 48px;
  align-items: center;
  margin-top: 20px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--school-radius-button, 999px);
  background: var(--school-amber, #f59e0b);
  color: var(--school-ink, #10243f);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 160ms ease;
}

body:not(.home-premium) .cta .button:hover {
  background: #e6a00a;
}

body:not(.home-premium) .related {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--school-line, rgba(16,36,63,.12));
  color: var(--school-muted, #596579);
  line-height: 1.8;
}

body:not(.home-premium) .related a {
  color: var(--school-ink, #10243f);
  font-weight: 500;
}

body:not(.home-premium) .move-diagram {
  margin: 24px 0 36px;
  padding: 16px;
  border: 1px solid var(--school-line, rgba(16,36,63,.12));
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16,36,63,.035);
}

body:not(.home-premium) .move-diagram img {
  border-radius: 24px;
}

body:not(.home-premium) .move-diagram figcaption {
  margin: 12px 4px 2px;
  color: var(--school-muted, #596579);
  font-size: 14px;
  font-weight: 400;
}

@media (max-width: 800px) {
  body:not(.home-premium) .hero {
    padding: 48px 0 36px;
  }

  body:not(.home-premium) .hero .container,
  body:not(.home-premium) .layout {
    width: calc(100% - 32px);
  }

  body:not(.home-premium) .hero h1 {
    font-size: clamp(32px, 9vw, 42px);
  }

  body:not(.home-premium) .hero p {
    font-size: 17px;
  }

  body:not(.home-premium) .layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0 56px;
  }

  body:not(.home-premium) .sidebar {
    position: static;
    order: 1;
  }

  body:not(.home-premium) .article p,
  body:not(.home-premium) .article li {
    font-size: 16px;
  }

  body:not(.home-premium) .article h2 {
    margin-top: 32px;
    font-size: 26px;
  }

  body:not(.home-premium) .article h3 {
    font-size: 20px;
  }

  body:not(.home-premium) .cta {
    padding: 24px;
    border-radius: 32px;
  }

  body:not(.home-premium) .table-wrap,
  body:not(.home-premium) .sidebar,
  body:not(.home-premium) .callout {
    border-radius: 28px;
  }
}




/* Mobile layout is deliberately separate from the approved desktop compositions. */
@media (max-width: 1023px) {
  body.school-site .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
  body.school-site .footer-col { min-width: 0; }
  body.school-site .footer-col a { overflow-wrap: anywhere; }
  body.school-site .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  /* One phone layout formula shared by the homepage and every child page.
     The gutter grows gently on wider phones instead of jumping at a breakpoint. */
  body.school-site {
    --phone-gutter: clamp(16px, 4.25vw, 22px);
    --phone-section-space: clamp(32px, 8vw, 44px);
    --phone-card-space: clamp(16px, 4.5vw, 22px);
    --phone-card-gap: clamp(12px, 3.2vw, 16px);
    --phone-card-radius: 24px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body.school-site :is(main, section, article, aside, .container, .glass-card, .card) {
    min-width: 0;
  }

  body.school-site :is(img, video, iframe, canvas, svg) {
    max-width: 100%;
  }

  body.school-site :is(.container, .header > .container) {
    width: calc(100% - 2 * var(--phone-gutter)) !important;
    margin-inline: auto !important;
  }

  body.school-site:not(.home-premium) :is(.cards-grid, .features-grid, .pricing-grid, .steps-grid, .refer-mutual__grid, .refer-terms__grid) > *,
  body.school-site.home-premium :is(.steps-grid, .testimonials-grid, .advantages-grid, .pricing-preview-grid, .result-grid) > * {
    min-width: 0;
    max-width: 100%;
  }

  body.school-site .container,
  body.school-site.home-premium .hero > .container,
  body.school-site.home-premium .testimonials .container {
    box-sizing: border-box;
    width: calc(100% - 2 * var(--phone-gutter)) !important;
    max-width: 560px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }

  body.school-site .header > .container {
    width: calc(100% - 2 * var(--phone-gutter)) !important;
    padding-inline: 0 !important;
  }

  body.school-site .header .logo-icon { width: 32px; height: 37px; }
  body.school-site .header .logo-wordmark { width: 112px; height: auto; }
  body.school-site .header .nav { min-height: 64px; }

  body.school-site :is(.btn-primary, .btn-secondary, .header-cta, .button) {
    min-height: 48px !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }

  body.school-site :is(input, select, textarea) { font-size: 16px !important; }
  body.school-site .modal-content { width: calc(100% - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 24px 20px !important; }

  body.school-site:not(.home-premium) :is(.hero, .contacts-hero, .policy-hero, .pricing-hero, .refer-hero, .success-main),
  body.school-site:not(.home-premium) :is(.section, .article-section, .faq, .cta-section, .pricing-included, .refer-mutual, .refer-steps, .refer-terms, .refer-final) {
    padding-block: var(--phone-section-space) !important;
  }

  body.school-site:not(.home-premium) h1 { font-size: clamp(29px, 7.8vw, 36px) !important; line-height: 1.15 !important; }
  body.school-site:not(.home-premium) :is(h2, .section-title) { font-size: clamp(24px, 6.5vw, 29px) !important; line-height: 1.2 !important; }
  body.school-site:not(.home-premium) :is(.hero-subtitle, .section-lead, .section-subtitle) { font-size: 15px !important; line-height: 1.6 !important; }
  body.school-site:not(.home-premium) :is(.cards-grid, .features-grid, .pricing-grid, .steps-grid, .refer-mutual__grid, .refer-terms__grid) { gap: var(--phone-card-gap) !important; }
  body.school-site:not(.home-premium) :is(.glass-card, .card, .feature-card, .pricing-card, .refer-mutual__card, .refer-terms__card) { box-sizing: border-box; width: 100%; max-width: 100%; padding: var(--phone-card-space) !important; border-radius: var(--phone-card-radius) !important; min-height: 0; }
  body.school-site:not(.home-premium) .pricing-duration-panel { padding: 16px !important; }
  body.school-site:not(.home-premium) .pricing-duration-panel :is(button, label) { min-width: 0; }
  body.school-site:not(.home-premium) :is(.cta-content, .refer-final__inner) { width: 100%; padding: 24px 20px !important; }
  body.school-site:not(.home-premium) .policy-document { padding: 20px !important; overflow-wrap: anywhere; }
  body.school-site:not(.home-premium) .policy-document a { overflow-wrap: anywhere; word-break: break-word; }

  body.school-site.page-pricing .pricing-duration-panel { margin-bottom: 24px !important; }
  body.school-site.page-pricing .pricing-card,
  body.school-site.page-pricing .pricing-card.featured,
  body.school-site.page-pricing .pricing-card:hover,
  body.school-site.page-pricing .pricing-card.featured:hover {
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 20px !important;
    transform: none !important;
  }
  body.school-site.page-pricing .pricing-card.featured { padding-top: 60px !important; }
  body.school-site.page-pricing .pricing-header { min-height: 0 !important; margin-bottom: 16px !important; padding-bottom: 16px !important; }
  body.school-site.page-pricing .pricing-card .pricing-title { margin: 0 !important; padding: 0 !important; font-size: 20px !important; }
  body.school-site.page-pricing .pricing-card .pricing-price { font-size: 32px !important; margin: 12px 0 8px !important; }
  body.school-site.page-pricing .pricing-desc { min-height: 0 !important; font-size: 14px !important; line-height: 1.55 !important; }
  body.school-site.page-pricing .pricing-saving { min-height: 0 !important; margin-top: 8px !important; }
  body.school-site.page-pricing .pricing-saving:empty { display: none; }
  body.school-site.page-pricing .pricing-features { margin: 16px 0 0 !important; padding: 0 !important; }
  body.school-site.page-pricing .pricing-features li { margin: 0 !important; padding: 10px 0 10px 24px !important; font-size: 14px !important; line-height: 1.5; }
  body.school-site.page-pricing .pricing-features li::before { top: 10px; }
  body.school-site.page-pricing .tariff-button { border-radius: 999px !important; }
  body.school-site.page-pricing .pricing-trust-rail { gap: 0; margin-block: 20px; }
  body.school-site.page-pricing .pricing-trust-rail > div { padding-block: 12px; }

  body.school-site.home-premium > section,
  body.school-site.home-premium .outcome-story {
    min-height: 0 !important;
    padding-block: 36px !important;
  }

  body.school-site.home-premium .hero { padding-top: 24px !important; }
  body.home-premium .hero > .container { gap: 24px !important; }
  body.home-premium .hero-kicker { margin-bottom: 16px !important; font-size: 12px !important; }
  body.home-premium .hero-title { max-width: none; margin-bottom: 16px !important; font-size: clamp(31px, 8.6vw, 39px) !important; line-height: 1.12 !important; }
  body.home-premium .hero-subtitle { margin-bottom: 12px !important; font-size: 15px !important; line-height: 1.6 !important; }
  body.home-premium .hero-promise { margin-block: 12px !important; font-size: 14px !important; }
  body.home-premium .hero-cta { margin-top: 16px !important; }
  body.home-premium .hero-rating { margin-block: 12px 0 !important; }
  body.home-premium .hero-rating__card { justify-content: center; gap: 8px; padding: 12px 16px; }
  body.home-premium .hero-image.hero-stage { min-height: 340px !important; height: 340px !important; border-radius: 26px !important; }
  /* Account for the rail becoming shorter as its text wraps less on wider phones. */
  body.home-premium .hero-child-slot {
    bottom: clamp(88px, calc(198px - 20vw), 134px) !important;
    display: block !important;
    overflow: visible !important;
  }
  body.home-premium .hero-child-photo {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    width: clamp(210px, 42vw, 230px) !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    transform: translateX(-50%) !important;
    object-fit: contain !important;
    object-position: center bottom !important;
  }
  body.home-premium .hero-stage__rail { inset: auto 8px 8px !important; }
  body.home-premium .hero-stage__rail > div { padding: 10px !important; }
  body.home-premium .hero-stage__rail strong { font-size: 12px !important; }
  body.home-premium .hero-stage__rail p { font-size: 11px !important; line-height: 1.4 !important; }

  body.school-site.home-premium :is(.section-title, .outcome-story__center h2, .child-journey__intro h2, .story-text h2, .parent-proof-panel h2) {
    max-width: none !important;
    font-size: clamp(24px, 6.5vw, 29px) !important;
    line-height: 1.2 !important;
    margin: 0 0 16px !important;
    text-wrap: balance;
    text-align: left !important;
  }

  body.school-site.home-premium :is(.section-lead, .story-text > p, .parent-proof-intro, .child-journey__intro > p:last-child) {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 0 0 20px !important;
    text-align: left !important;
  }

  body.home-premium .outcome-story__canvas {
    width: calc(100% - 32px) !important;
    padding: 20px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible;
  }
  body.home-premium .outcome-story__center { grid-column: 1 / -1 !important; padding: 0 !important; }
  body.home-premium .outcome-story__sticky { height: auto !important; inset: auto !important; }
  body.home-premium .outcome-story__item,
  body.home-premium .outcome-story__item:is(.is-active, [aria-current="true"]) {
    grid-column: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 56px !important;
    padding: 12px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    border-radius: 18px !important;
    white-space: normal !important;
  }
  body.home-premium .outcome-story__item strong {
    min-width: 0;
    max-width: 100%;
    font-size: 14px !important;
    line-height: 1.4;
    white-space: normal !important;
    overflow-wrap: break-word;
  }
  body.home-premium .outcome-story__item.outcome-story__item--5 { grid-column: 1 / -1 !important; }

  body.home-premium .steps-grid { grid-template-columns: 1fr !important; gap: 10px !important; margin-top: 20px !important; }
  body.home-premium .step-card { grid-template-columns: 32px minmax(0, 1fr) !important; grid-template-rows: auto auto; gap: 6px 12px !important; padding: 18px !important; min-height: 0 !important; border-radius: 24px !important; }
  body.home-premium .step-number { grid-row: 1 / span 2; width: 32px; height: 32px; font-size: 14px; }
  body.home-premium .step-card h3 { grid-column: 2; min-height: 0 !important; font-size: 17px !important; line-height: 1.35 !important; }
  body.home-premium .step-card p { grid-column: 2; max-width: none; font-size: 14px !important; line-height: 1.55 !important; }
  body.home-premium .section-actions { margin-top: 20px !important; }

  body.home-premium .child-journey__container { width: calc(100% - 2 * var(--phone-gutter)); max-width: 560px; margin-inline: auto; }
  body.home-premium .child-journey__intro { margin-bottom: 16px; }
  body.home-premium .child-journey__nav-wrap { padding: 6px; border-radius: 24px !important; }
  body.home-premium .child-journey__tabs { scrollbar-width: none; }
  body.home-premium .child-journey__tabs::-webkit-scrollbar { display: none; }
  body.home-premium .child-journey__details { padding: 20px; border-radius: 24px !important; }
  body.home-premium .child-journey__panel h3 { margin-top: 8px; font-size: 22px; }
  body.home-premium .child-journey__summary { font-size: 15px; line-height: 1.55; }
  body.home-premium .child-journey__columns { gap: 16px; margin-top: 16px; }
  body.home-premium .child-journey__columns > div { padding: 0; background: transparent; border: 0; border-radius: 0; }
  body.home-premium .child-journey__columns h4 { margin-bottom: 8px; font-size: 15px; }
  body.home-premium .child-journey__columns li { font-size: 14px; line-height: 1.5; }
  body.home-premium .child-journey__footer { margin-top: 16px; gap: 12px; }
  body.home-premium .child-journey__footer p { font-size: 13px; }

  /* One full-width review, not a narrow sliver with arrows over the quote. */
  body.home-premium .testimonials .section-lead { margin-inline: 0 !important; }
  body.home-premium .testimonials-grid { display: flex; gap: 16px; padding: 0; margin: 20px 0 0; scroll-padding-inline: 0; align-items: stretch; }
  body.home-premium .testimonials .testimonials-grid .testimonial-card,
  body.home-premium .testimonials .testimonials-grid .testimonial-card:last-child {
    flex: 0 0 100%;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    gap: 14px;
    padding: 16px !important;
    border-radius: 26px !important;
    scroll-snap-align: center;
  }
  body.home-premium .testimonials .testimonial-photo-slot { aspect-ratio: 16 / 9; height: auto !important; min-height: 0 !important; margin: 0 !important; border-radius: 18px !important; }
  body.home-premium .testimonials .testimonial-photo-slot img { object-fit: cover !important; }
  body.home-premium .testimonials .testimonial-text { font-size: 15px; line-height: 1.6; }
  body.home-premium .testimonials .testimonial-author { align-self: end; gap: 3px; font-size: 14px; }
  body.home-premium .testimonials .testimonial-author span { font-size: 12px; }
  body.home-premium .testimonials .testimonial-piece { top: 24px; right: 24px; width: 34px; }
  body.home-premium .testimonials-mobile-nav { position: static; display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; padding: 0; transform: none; pointer-events: auto; }
  body.home-premium .testimonials-arrow { width: 44px; height: 44px; padding: 0; font-size: 24px; }
  body.home-premium .testimonials-position { color: var(--school-muted); font-size: 14px; font-variant-numeric: tabular-nums; }

  body.home-premium .teacher-trust-layout { gap: 20px !important; }
  body.home-premium .teacher-trust-copy { grid-row: auto; gap: 0; }
  body.home-premium .teacher-media-column { grid-row: 2; }
  body.home-premium .teacher-points { grid-row: 3; }
  body.home-premium .teacher-media-column { gap: 12px !important; }
  body.home-premium .teacher-photo-panel,
  body.home-premium .teacher-lesson-slot { border-radius: 24px !important; }
  body.home-premium .teacher-points { margin-top: 0 !important; gap: 10px !important; }
  body.home-premium .teacher-point { grid-template-columns: 32px minmax(0, 1fr) !important; gap: 6px 12px !important; padding: 16px !important; }
  body.home-premium .teacher-point > span { width: 32px; height: 32px; grid-row: 1 / span 2 !important; font-size: 14px !important; }
  body.home-premium .teacher-point > strong { font-size: 15px !important; }
  body.home-premium .teacher-point > p { grid-column: 2 !important; font-size: 14px !important; }
  body.home-premium .trial-band-inner { gap: 20px; }
  body.home-premium .trial-band h2 { font-size: 26px !important; line-height: 1.2; }
  body.home-premium .trial-band p { font-size: 15px; line-height: 1.6; }

  body.home-premium :is(.story-panel, .parent-proof-panel) { gap: 20px !important; padding: 20px !important; border-radius: 26px !important; }
  body.home-premium .signal-item { padding: 14px !important; grid-template-columns: 28px minmax(0, 1fr); gap: 8px 10px; min-height: 0; }
  body.home-premium .signal-mark { grid-row: auto !important; }
  body.home-premium .signal-item p { font-size: 14px !important; }
  body.home-premium .signal-item h3 { font-size: 15px !important; }
  body.home-premium .result-grid { gap: 10px !important; grid-template-rows: auto; margin-top: 20px; }
  body.home-premium .result-card:first-child,
  body.home-premium .result-card:not(:first-child) { display: block; min-height: 0; padding: 18px !important; border-radius: 24px !important; }
  body.home-premium .result-card:first-child h3,
  body.home-premium .result-card:not(:first-child) h3 { max-width: none; margin: 10px 0 6px; font-size: 18px !important; line-height: 1.3; }
  body.home-premium .result-card p,
  body.home-premium .result-card:first-child p { font-size: 14px !important; line-height: 1.55 !important; }
  body.home-premium .proof-label { margin-bottom: 12px; }
  body.home-premium .proof-step { padding: 12px 12px 12px 26px !important; }
  body.home-premium .proof-step h3 { font-size: 15px !important; }
  body.home-premium .proof-step p { font-size: 14px !important; }

  body.home-premium .pricing-preview .container > h3.section-title { font-size: 18px !important; margin-top: 16px !important; }
  body.home-premium .pricing-preview-grid { gap: 12px; margin-top: 20px; }
  body.home-premium .pricing-preview-card { min-height: 0; padding: 20px !important; border-radius: 24px !important; gap: 0; }
  body.home-premium .pricing-preview-label { margin-bottom: 0; font-size: 12px; line-height: 1.4; }
  body.home-premium .pricing-preview-price { font-size: 25px !important; margin-block: 8px; }
  body.home-premium .pricing-preview-meta { font-size: 14px !important; margin-block: 8px 16px; }
  body.home-premium .advantages-grid { gap: 10px !important; margin-top: 20px !important; }
  body.home-premium .age-card.advantage-card,
  body.home-premium .age-card.advantage-card:last-child { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 6px 12px; min-height: 0; padding: 18px !important; border-radius: 24px !important; }
  body.home-premium .age-card.advantage-card .advantage-icon { grid-column: 1; grid-row: 1 / span 2; width: 42px; min-width: 42px; min-height: 36px; font-size: 14px !important; white-space: nowrap; }
  body.home-premium .age-card.advantage-card h3 { grid-column: 2; margin: 0 !important; font-size: 16px !important; }
  body.home-premium .age-card.advantage-card p { grid-column: 2; font-size: 14px !important; }
  body.home-premium .faq-question { padding: 16px !important; gap: 12px; }
  body.home-premium .faq-question h3 { font-size: 16px; line-height: 1.4; }
  body.home-premium .faq-answer { font-size: 14px; }

  body.home-premium .parent-guides__top { gap: 16px; margin-bottom: 16px; }
  body.home-premium .parent-guides__controls { width: 100%; justify-content: center; }
  body.home-premium .parent-guide-slide__index { padding: 16px 20px 0; }
  body.home-premium .parent-guide-slide { min-height: 0; grid-template-rows: auto auto auto; }
  body.home-premium .parent-guide-slide__index { grid-row: auto; }
  body.home-premium .parent-guide-slide__copy { padding: 16px 20px 20px; }
  body.home-premium .parent-guide-slide h3 { font-size: 23px; }
  body.home-premium .parent-guide-slide p { font-size: 14px; }
  body.home-premium .parent-guide-slide__chess { min-height: 100px; height: 100px; margin: 0 20px 20px; }
  body.home-premium .parent-guide-slide__chess img { max-height: 86px; width: auto; }
  body.home-premium .final-cta h2 { font-size: 27px !important; line-height: 1.2; }
  body.home-premium .final-cta p { font-size: 15px; line-height: 1.6; }
  body.home-premium .final-cta__steps { gap: 10px; margin-block: 20px; }
  body.school-site .footer { padding-block: 32px !important; }
}


/* Direction-aware branding; navigation stays pinned without moving page content. */
@media (min-width: 1024px) {
  body[class][class][class][class] .header .nav {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    column-gap: 24px !important;
  }
  body[class][class][class][class] .header .logo { grid-area: 1 / 1 / 2 / 4 !important; }
  body[class][class][class][class] .header .nav-links {
    grid-area: 2 / 2 !important;
    justify-self: center;
    column-gap: clamp(14px, 2.3vw, 32px) !important;
    padding-inline: 0 !important;
  }
  body[class][class][class][class] .header .header-actions { grid-area: 2 / 3 !important; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  body[class][class][class][class] .header .nav-links { column-gap: 14px !important; }
}
body[class][class][class][class] .header {
  top: 0 !important;
  transition: top 280ms ease;
}
body[class][class][class][class] .header.is-compact { top: -94px !important; }
body[class][class][class][class] .header .logo {
  opacity: 1;
  transition: opacity 220ms ease;
}
body[class][class][class][class] .header.is-compact .logo {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1023px) {
  body[class][class][class][class] .header.is-compact { top: -74px !important; }
  body[class][class][class][class] .header > .container {
    position: static !important;
    width: calc(100% - 32px) !important;
    height: auto !important;
    padding: 12px 0 !important;
  }
  body[class][class][class][class] .header .nav {
    display: grid !important;
    grid-template: 50px 48px / minmax(0, 1fr) 44px !important;
    align-items: center !important;
    gap: 12px !important;
    height: auto !important;
    min-height: 0 !important;
  }
  body[class][class][class][class] .header .logo {
    grid-area: 1 / 1 / 2 / 3 !important;
    justify-self: center;
    height: 50px !important;
    margin: 0 !important;
    flex-basis: auto !important;
  }
  body[class][class][class][class] .header .nav-links { display: none !important; }
  body[class][class][class][class] .header .header-actions {
    grid-area: 2 / 1 !important;
    justify-self: start;
    justify-content: flex-start !important;
    position: static !important;
    display: flex !important;
    padding: 0 !important;
  }
  body[class][class][class][class] .header .header-cta.btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    line-height: 20px !important;
  }
  body[class][class][class][class] .header .hamburger {
    position: relative !important;
    inset: auto !important;
    grid-area: 2 / 2 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 10px !important;
    border: 1px solid #d3deed !important;
    border-radius: 12px !important;
    background: #fff !important;
    cursor: pointer;
    box-sizing: border-box;
  }
  body[class][class][class][class] .header .hamburger span {
    position: static !important;
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    flex: 0 0 2px;
    margin: 0 !important;
    border-radius: 2px;
    background: #10243f !important;
    transform: none !important;
    transition: transform 180ms ease, opacity 180ms ease;
  }
  body[class][class][class][class] .header .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg) !important; }
  body[class][class][class][class] .header .hamburger.active span:nth-child(2) { opacity: 0; }
  body[class][class][class][class] .header .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg) !important; }
  body[class][class][class][class] .header.is-menu-open .nav-mobile {
    display: block !important;
    position: absolute !important;
    inset: 100% 0 auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: calc(100dvh - 140px);
    overflow-y: auto;
    margin: 0;
    padding: 12px 16px 20px !important;
    box-sizing: border-box;
    border: 0 !important;
    border-bottom: 1px solid #d3deed !important;
    background: #faf9f6 !important;
    box-shadow: 0 16px 24px rgb(16 36 63 / 8%);
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  body[class][class][class][class] .header .nav-mobile-links {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0 !important;
    list-style: none;
  }
  body[class][class][class][class] .header .nav-mobile-links li { margin: 0; padding: 0; }
  body[class][class][class][class] .header .nav-mobile-links a {
    display: block !important;
    padding: 12px 16px !important;
    border-radius: 12px;
    color: #10243f !important;
    font-size: 16px !important;
    line-height: 24px !important;
    text-decoration: none;
  }
  body[class][class][class][class] .header .nav-mobile-links a:hover { background: #eaf0fb; }
}

/* A little breathing room above the compact mobile controls. */
@media (max-width: 1023px) {
  body[class][class][class][class] .header.is-compact { top: -64px !important; }
}


/* Same entrance timing and movement as the homepage. JS opts elements in;
   without it, every page remains visible. Use translate, not transform, so
   existing card flips and mirrored illustrations keep their own transforms. */
@media screen {
  body.school-site [data-page-reveal].page-reveal--pending {
    opacity: 0 !important;
  }

  body.school-site [data-page-reveal].page-reveal--entering {
    animation: page-content-enter .62s cubic-bezier(.22, 1, .36, 1)
      var(--page-reveal-delay, 0ms) both !important;
  }

  @keyframes page-content-enter {
    from { opacity: 0; translate: 0 20px; }
    to { opacity: 1; translate: 0 0; }
  }
}

@media print {
  [data-page-reveal] {
    opacity: 1 !important;
    animation: none !important;
    translate: none !important;
  }
}


/* Approved AlfaChess brand logo. Keep these dimensions consistent across site pages. */
body[class][class][class][class] .logo .logo-cartoon {
  display: block !important;
  width: 178px !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 50px !important;
  object-fit: contain !important;
  flex: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}
body[class][class][class][class] :is(.footer,.success-footer) .logo .logo-cartoon {
  width: 156px !important;
}
@media(max-width:600px) {
  body[class][class][class][class] .header .logo .logo-cartoon {
    width: 178px !important;
    max-height: 50px !important;
  }
}
