body.playful-site.academic-site .course-map { min-width: 0; align-self: start; }
html { font-size: 15px; }
body.playful-site.academic-site { font-size: 15px; }
body.playful-site.academic-site .test-preparation-cards > article > .button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
@media (min-width: 621px) and (max-width: 1100px),
  (min-width: 1101px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) {
  html {
    font-size: 12px;
  }
  body.playful-site.academic-site .test-preparation-cards > article > .button {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    font-size: 10px;
    letter-spacing: -.01em;
  }
  body.playful-site.academic-site.algebra-page .course-pair {
    align-items: stretch;
  }
  body.playful-site.academic-site.algebra-page .course-pair > .course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  body.playful-site.academic-site.algebra-page .course-pair > .course-card > .a-button {
    width: 100%;
    min-height: 48px;
    margin-top: auto;
  }
  body.playful-site.academic-site .system-panel[aria-labelledby="algebra-assessments-title"] .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 160px));
    align-items: stretch;
    gap: 14px;
  }
  body.playful-site.academic-site .system-panel[aria-labelledby="algebra-assessments-title"] .hero-actions .button {
    width: 100%;
    min-height: 46px;
    padding-inline: 10px;
  }
}
@media (max-width: 620px) {
  body.playful-site.academic-site .test-preparation-cards > article > .button {
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    font-size: 12px;
  }
}

/* Keep the focused Algebra pathway visually attached to Explore Programs. */
body.playful-site.academic-site.home-page .algebra-program-link {
  margin: 16px 0 0;
}
body.playful-site.academic-site.home-page .algebra-program-link .text-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 66px;
  padding: 13px 18px;
  border: 1px solid #bccbd5;
  border-left: 3px solid #405d72;
  border-radius: 3px;
  background: #f5f8fc;
  text-decoration: none;
}
body.playful-site.academic-site.home-page .algebra-program-link span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
body.playful-site.academic-site.home-page .algebra-program-link strong {
  font-size: 14px;
  line-height: 1.35;
}
body.playful-site.academic-site.home-page .algebra-program-link small {
  color: #586b7c;
  font-size: 12px;
  line-height: 1.45;
}
body.playful-site.academic-site.home-page .algebra-program-link b {
  color: #305f86;
  font-size: 13px;
  white-space: nowrap;
}
@media (max-width: 620px) {
  body.playful-site.academic-site.home-page .algebra-program-link .text-link {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding: 13px 15px;
  }
}
body.playful-site.academic-site
  :is(.hero-lead, .hero-description, .page-hero > p:not(.kicker), .content-hero > p:not(.kicker), .section-heading > p) {
  font-size: 16px;
}
body.playful-site.academic-site
  :is(.program-card > p:not(.grade), .program-card li, .info-card p, .info-card li, .content-grid p, .content-grid li) {
  font-size: 14px;
}
@media (min-width: 1367px),
  (min-width: 1101px) and (max-width: 1366px) and (hover: hover) and (pointer: fine) {
  body.playful-site.academic-site
    :is(.hero h1, .page-hero h1, .content-hero h1, .competition-hero h1, .science-hero h1, .school-hero h1, .algebra-hero h1, .course-hero h1, .club-hero h1) {
    font-size: clamp(38px, 3.7vw, 54px);
  }
  body.playful-site.academic-site.home-page .hero .home-hero-title {
    font-size: clamp(36px, 3vw, 44px);
  }
  body.playful-site.academic-site main h2 {
    font-size: clamp(25px, 2.4vw, 34px);
  }
  body.playful-site.academic-site :is(.program-card h3, .info-card h3, .content-grid h3) {
    font-size: 20px;
  }
  body.playful-site.academic-site.home-page .home-pathways .program-card h3 {
    font-size: 23px;
  }
}
body.playful-site.academic-site .course-map > summary {
  cursor: pointer; min-height: 48px; padding: 14px 18px; margin-bottom: 14px;
  border: 1px solid currentColor; border-radius: 6px; font-size: 15px; font-weight: 600;
}

/* Keep the three homepage learning-system cards and their calls to action aligned. */
body.playful-site.academic-site.home-page .story-grid blockquote {
  display: flex;
  flex-direction: column;
  height: 100%;
}
body.playful-site.academic-site.home-page .story-grid blockquote > p {
  flex: 1 1 auto;
}
body.playful-site.academic-site.home-page .story-grid blockquote > footer {
  margin-top: auto;
}

/* Prevent the MH badge from being squeezed or pushed outside the problem card. */
body.playful-site.academic-site.home-page .problem-foot {
  min-width: 0;
  gap: 12px;
}
body.playful-site.academic-site.home-page .problem-foot > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
body.playful-site.academic-site.home-page .problem-foot > strong {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

/* Keep every Explore program button on the same baseline on desktop. */
@media (min-width: 1001px) {
  body.playful-site.academic-site.home-page .home-pathways .program-card {
    height: 100%;
  }
  body.playful-site.academic-site.home-page .home-pathways .pathway-actions {
    margin-top: auto;
  }
}
body.playful-site.academic-site .system-summary { margin-top: 36px; padding: 24px 0; border-top: 1px solid #bccbd5; }
body.playful-site.academic-site .system-summary p { margin: 8px 0; font-size: 16px; line-height: 1.7; }
body.playful-site.academic-site .system-summary a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
body.playful-site.academic-site .inquiry-form fieldset {
  grid-column: 1/-1; min-width: 0; margin: 22px 0 0; padding: 20px 0 0;
  border: 0; border-top: 1px solid #c8d3dc;
}
body.playful-site.academic-site .inquiry-form legend { padding: 0 12px 0 0; font-size: 20px; font-weight: 700; }
body.playful-site.academic-site .inquiry-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
body.playful-site.academic-site .inquiry-fields label { min-width: 0; }
body.playful-site.academic-site .inquiry-optional { grid-column: 1/-1; margin-top: 24px; border-block: 1px solid #c8d3dc; padding-block: 8px; }
body.playful-site.academic-site .inquiry-optional summary { cursor: pointer; min-height: 44px; padding-block: 12px; font-weight: 600; }
body.playful-site.academic-site .inquiry-contact { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; font-weight: 700; }
body.playful-site.academic-site .inquiry-form .required-note { font-size: 14px; }
body.playful-site.academic-site #inquiry-context { padding: 12px 14px; border-left: 3px solid #405d72; background: #edf3f7; font-size: 16px; }
body.playful-site.academic-site .inquiry-unavailable { padding: 16px; background: #fff5e9; border: 1px solid #d5a58e; border-radius: 6px; line-height: 1.6; }
body.playful-site.academic-site .inquiry-unavailable a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }
@media (max-width: 620px) {
  body.playful-site.academic-site .inquiry-fields { grid-template-columns: minmax(0,1fr); }
  body.playful-site.academic-site .system-summary { margin-top: 24px; padding-block: 20px; }
  body.playful-site.academic-site .inquiry-process { margin: 0; }
  body.playful-site.academic-site .inquiry-process summary { min-height: 44px; padding-block: 12px; cursor: pointer; font-weight: 600; }
}

/* Unified phone scale for all inner pages. The homepage has its own compact composition. */
@media (max-width: 620px) {
  body.playful-site.academic-site:not(.home-page) {
    font-size: 14px;
    line-height: 1.55;
  }
  body.playful-site.academic-site:not(.home-page)
    :is(.site-header, .simple-header, .algebra-header, .club-header, .course-header) {
    width: 100%; height: auto; min-height: 68px; padding: 9px 16px; gap: 10px;
  }
  body.playful-site.academic-site:not(.home-page) .simple-header.has-mobile-nav { flex-wrap: wrap; }
  body.playful-site.academic-site:not(.home-page)
    :is(.site-header, .simple-header, .algebra-header, .club-header, .course-header) picture .brand-logo {
    width: 124px; height: auto; max-height: 48px;
  }
  body.playful-site.academic-site:not(.home-page) .simple-header > .button {
    min-height: 40px; padding: 8px 10px; font-size: 12px;
  }
  body.playful-site.academic-site:not(.home-page) .mobile-nav-toggle {
    width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 8px;
  }
  body.playful-site.academic-site:not(.home-page) .simple-header.has-mobile-nav > nav a,
  body.playful-site.academic-site:not(.home-page) .site-header .main-nav a {
    min-height: 42px; padding-block: 9px; font-size: 13px;
  }
  body.playful-site.academic-site:not(.home-page) .club-login,
  body.playful-site.academic-site:not(.home-page) .club-header > .club-button { display: none; }
  body.playful-site.academic-site:not(.home-page) .club-header { flex-wrap: nowrap; }
  body.playful-site.academic-site:not(.home-page) .club-menu {
    margin-left: auto; min-height: 40px; padding: 8px 10px; font-size: 12px;
  }
  body.playful-site.academic-site:not(.home-page) .course-header nav { gap: 10px; font-size: 12px; }
  body.playful-site.academic-site:not(.home-page) .support-link span { margin-left: 5px; }

  body.playful-site.academic-site:not(.home-page)
    :is(.hero, .page-hero, .content-hero, .competition-hero, .science-hero, .school-hero, .algebra-hero, .course-hero) {
    padding: 30px 16px; gap: 22px;
  }
  body.playful-site.academic-site:not(.home-page)
    :is(.hero h1, .page-hero h1, .content-hero h1, .competition-hero h1, .science-hero h1, .school-hero h1, .algebra-hero h1) {
    margin-block: 10px 16px; font-size: 26px; line-height: 1.18; letter-spacing: -.025em;
  }
  body.playful-site.academic-site:not(.home-page) .course-hero h1 {
    margin-block: 8px 12px; font-size: 32px; line-height: 1.12; letter-spacing: -.03em;
  }
  body.playful-site.academic-site:not(.home-page) .club-hero {
    width: calc(100% - 32px); padding-block: 34px; gap: 26px;
  }
  body.playful-site.academic-site:not(.home-page) .club-hero h1 {
    margin-bottom: 18px; font-size: 29px; line-height: 1.14;
  }
  body.playful-site.academic-site:not(.home-page)
    :is(.hero-lead, .hero-description, .club-lead, .competition-hero > div > p:not(.kicker), .content-hero > p:not(.kicker), .page-hero > p:not(.kicker)) {
    font-size: 14px; line-height: 1.6;
  }
  body.playful-site.academic-site:not(.home-page) :is(.eyebrow, .kicker, .club-kicker, .contest-tag, .study-label) {
    font-size: 10.5px; line-height: 1.5; letter-spacing: .08em;
  }

  body.playful-site.academic-site:not(.home-page)
    :is(.section, .page-wrap, .content-wrap, .competition-section, .a-section, .club-section, .club-intro, .club-bridge, .club-closing, .trial) {
    padding-block: 38px;
  }
  body.playful-site.academic-site:not(.home-page)
    :is(.section, .page-wrap, .content-wrap, .competition-section, .trial) {
    padding-inline: 16px;
  }
  body.playful-site.academic-site:not(.home-page)
    :is(.page-intro h2, .section-heading h2, .contest-heading h2, .program-copy h2, .content-grid h2, .club-section h2, .club-intro h2, .club-bridge h2, .section-intro h2, .course-fit h2) {
    font-size: 22px; line-height: 1.22; letter-spacing: -.02em;
  }
  body.playful-site.academic-site:not(.home-page) main h3 { font-size: 17px; line-height: 1.3; }
  body.playful-site.academic-site:not(.home-page) main
    :is(p, li):not(.kicker):not(.eyebrow):not(.club-kicker):not(.contest-tag):not(.grade):not(.study-label) {
    font-size: 14px;
  }
  body.playful-site.academic-site:not(.home-page)
    :is(.program-card, .home-pathways .program-card, .info-card, .course-card, .contest-card, .stage-grid article, .pathway-cards > a, .content-grid article, .club-duo article, .assessment-card, .sample-card, .unit-detail, .trial-form, .inquiry-form) {
    padding: 18px;
  }
  body.playful-site.academic-site:not(.home-page)
    :is(.program-grid, .info-grid, .content-grid, .pathway-cards, .stage-grid, .contest-grid, .club-duo) {
    gap: 14px;
  }
  body.playful-site.academic-site:not(.home-page) :is(.course-container, .club-wrap, .a-container) {
    width: calc(100% - 32px);
  }
  body.playful-site.academic-site:not(.home-page) .course-path,
  body.playful-site.academic-site:not(.home-page) :is(.breadcrumb, .course-switch > p, .course-switch small) {
    font-size: 12px;
  }
  body.playful-site.academic-site:not(.home-page) .course-switch a {
    min-height: 44px; padding: 11px; font-size: 13px;
  }
  body.playful-site.academic-site:not(.home-page) .explorer-tabs button { font-size: 12px; }
  body.playful-site.academic-site:not(.home-page) .club-notebook { padding: 18px; }
  body.playful-site.academic-site:not(.home-page) .club-question { padding-block: 14px; font-size: 20px; }
  body.playful-site.academic-site:not(.home-page) .club-copy ul { columns: 1; }
  body.playful-site.academic-site:not(.home-page) .club-subnav { padding: 14px 16px; gap: 8px 16px; font-size: 11px; }
  body.playful-site.academic-site:not(.home-page) .contest-table { min-width: 520px; font-size: 12px; }
  body.playful-site.academic-site:not(.home-page) .contest-table :is(th, td) { padding: 12px 14px; }
  body.playful-site.academic-site:not(.home-page) .algebra-announcement {
    padding: 7px 12px; font-size: 11px; letter-spacing: .08em;
  }
  body.playful-site.academic-site:not(.home-page) .system-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-block: 24px;
  }
  body.playful-site.academic-site:not(.home-page) .system-flow > div {
    min-height: 78px; padding: 14px 10px; border: 1px solid #d5d1c8;
  }
  body.playful-site.academic-site:not(.home-page) .system-flow > div:last-child { grid-column: 1 / -1; }
  body.playful-site.academic-site:not(.home-page) .content-grid h2 { margin-bottom: 14px; }
  body.playful-site.academic-site:not(.home-page) :is(.report-panel, .system-panel) {
    margin-top: 32px; padding: 20px;
  }
  body.playful-site.academic-site:not(.home-page) .inquiry-card-head h2 { font-size: 22px; }
  body.playful-site.academic-site:not(.home-page) .inquiry-card-head { padding-bottom: 20px; }
  body.playful-site.academic-site:not(.home-page) .inquiry-section-heading { margin-block: 24px 16px; }
  body.playful-site.academic-site:not(.home-page) .inquiry-fields label { font-size: 13px; }
  body.playful-site.academic-site:not(.home-page) .inquiry-form legend { font-size: 18px; }
  body.playful-site.academic-site:not(.home-page) :is(.button, .club-button, .a-button, .pathway-primary) {
    min-height: 44px; font-size: 12px;
  }
  body.playful-site.academic-site:not(.home-page) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) {
    font-size: 16px;
  }
  body.playful-site.academic-site:not(.home-page) :is(.simple-footer, .site-footer, .club-footer, .course-footer) {
    padding: 26px 16px; font-size: 12px;
  }
}
