/* Shared, resolution-independent presentation; loaded after page themes. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Size each logo on one axis; keep its own intrinsic artwork proportions. */
body .brand .brand-logo { width: auto; aspect-ratio: auto; object-fit: contain; flex-shrink: 0; image-rendering: auto; }
body .brand-footer .brand-logo { width: 160px; height: auto; max-height: none; }
body .institution-mark img { width: auto; height: auto; max-width: 100%; max-height: 66px; aspect-ratio: auto; object-fit: contain; flex-shrink: 0; }
body.playful-site.academic-site {
  --clarity-font: 'DM Sans', 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
  --muted: #425467;
  font-family: var(--clarity-font);
  line-height: 1.65;
}
body.playful-site.academic-site :is(button, input, select, textarea) { font-family: var(--clarity-font); }
body.playful-site.academic-site :is(h1, h2, h3, .hero .home-hero-title, .home-pathways .program-card h3, .content-grid h2, .hero-editorial h1) {
  font-family: var(--clarity-font);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.22;
  text-wrap: balance;
  overflow-wrap: break-word;
}
body.playful-site.academic-site :is(h3, .home-pathways .program-card h3) { font-weight: 700; letter-spacing: -.015em; line-height: 1.35; }
body.playful-site.academic-site .hero .home-hero-title { font-size: clamp(2rem, 3.2vw, 3rem); }
body.playful-site.academic-site :is(.hero-lead, .hero-description, .content-hero > p:not(.kicker), .page-hero > p:not(.kicker)) {
  font-size: 1.125rem;
  line-height: 1.75;
  max-width: 65ch;
}
body.playful-site.academic-site :is(.info-card p, .info-card li, .program-card > p:not(.grade), .program-card li, .home-pathways .program-card > p:not(.grade), .home-pathways .program-card li, .content-grid p, .content-grid li) {
  font-size: 1rem;
  line-height: 1.7;
  color: #364c61;
}
body.playful-site.academic-site :is(.pathway-step, .pathway-secondary, .home-pathways .grade, .home-pathways .grade span, .hero-footnote, .study-label, .paper-top, .paper-flow, .study-next small) {
  font-size: .875rem;
  line-height: 1.55;
}
body.playful-site.academic-site :is(.eyebrow, .kicker, .pathway-step, .study-label) { letter-spacing: .08em; }
body.playful-site.academic-site :is(.pathway-primary, .algebra-hero .hero-editorial .a-button) { font-size: 1rem; }
body.playful-site.academic-site :is(.footer-main > div:not(:first-child), .footer-bottom, .simple-footer) { color: #425467; }

/* Flat CSS surfaces and borders stay sharp at any display scale. */
body.playful-site.academic-site :is(.hero, .page-hero, .content-hero, .science-hero, .school-hero, .course-hero, .store-hero, .competition-hero, .algebra-hero, .club-hero) {
  background: #e7eef1;
}
body.playful-site.academic-site :is(.program-card, .home-pathways .program-card, .book-card, .story-grid blockquote, .info-card, .content-grid article, .pathway-cards > a, .v2-program-grid > a, .v2-five > article, .course-card, .level-pathway article, .two-column-details article, .club-duo article, .stage-grid article, .contest-card, .sample-card, .assessment-card, .schedule-card, .account-stats article, .admin-area-grid > a, .overview article, .catalog-card, .lesson-card, .problem-card, .club-notebook) {
  background: var(--academic-card-base, #f5f8fc);
  border: 1px solid var(--academic-card-edge, #bccbd5);
  border-top: 3px solid var(--academic-card-accent, #405d72);
  border-radius: 6px;
  box-shadow: none;
  transform: none;
  transition: border-color .15s ease;
}
body.playful-site.academic-site :is(.program-card, .home-pathways .program-card, .book-card, .story-grid blockquote, .info-card, .content-grid article, .pathway-cards > a, .v2-program-grid > a, .v2-five > article, .course-card, .level-pathway article, .two-column-details article, .club-duo article, .stage-grid article, .contest-card, .sample-card, .assessment-card, .schedule-card, .account-stats article, .admin-area-grid > a, .overview article, .catalog-card, .lesson-card, .problem-card, .club-notebook):hover {
  transform: none;
  box-shadow: none;
  border-color: var(--academic-card-accent, #405d72);
}
body.playful-site.academic-site :is(.pathway-symbol, .v2-five b, .study-paper, .hero-study, .worked-example, .unit-detail, .panel, .login-card, .registration-card, .trial-form, .inquiry-form) {
  box-shadow: none;
  transform: none;
}
.pathway-symbol svg { display: block; width: 28px; height: 28px; }
@media (min-width: 1001px) {
  body.playful-site.academic-site .home-pathways .program-card h3 { min-height: calc(2.7em + 19px); }
}
body.playful-site.academic-site :is(.graph-row, .competition-map) svg { max-width: 100%; height: auto; }
body.playful-site.academic-site :is(.problem-card h2, math, .math-expression) { font-family: 'Cambria Math', 'STIX Two Math', Georgia, serif; }
body.playful-site.academic-site :is(.hero-copy, .hero-visual, .page-intro > *, .section-heading > *, .content-grid > *, .program-grid > *, .info-grid > *) { min-width: 0; }
body.playful-site.academic-site .content-wrap { width: 100%; min-width: 0; }
body.playful-site.academic-site :is(.content-grid, .info-grid, .program-grid) { gap: 24px; }
body.playful-site.academic-site :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { font-size: 1rem; }
body.playful-site.academic-site :is(.button, .club-button, .a-button, .pathway-primary) { min-height: 44px; }
body.playful-site.academic-site :is(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid #28699a; outline-offset: 3px; }
/* Keep anchored sections below the homepage's sticky navigation. */
body.playful-site.academic-site .site-header ~ main[id],
body.playful-site.academic-site .site-header ~ main [id] { scroll-margin-top: 132px; }
@media (max-width: 760px) {
  body.playful-site.academic-site .explorer-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    overflow: visible;
  }
  body.playful-site.academic-site .explorer-tabs button {
    min-width: 0;
    min-height: 48px;
    padding: 10px 4px;
    white-space: normal;
    line-height: 1.45;
  }
}
@media (max-width: 1100px) {
  body.playful-site.academic-site .site-header .main-nav {
    max-height: calc(100dvh - 160px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  body.playful-site.academic-site .site-header .main-nav:not(.open) { visibility: hidden; pointer-events: none; }
  body.playful-site.academic-site .site-header .main-nav.open { visibility: visible; pointer-events: auto; z-index: 1; box-shadow: none; }
  body.playful-site.academic-site .site-header .main-nav a { font-size: 1rem; min-height: 44px; }
  body.playful-site.academic-site .menu-toggle { min-width: 44px; min-height: 44px; }
}
@media (max-width: 620px) {
  body.playful-site.academic-site .site-header ~ main[id],
  body.playful-site.academic-site .site-header ~ main [id] { scroll-margin-top: 116px; }
  body.playful-site.academic-site .home-hero-title .hero-title-phrase { white-space: normal; }
  body.playful-site.academic-site :is(.content-grid, .info-grid, .program-grid) { gap: 20px; }
  body.playful-site.academic-site :is(.simple-footer, .footer-bottom) { flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 480px) {
  body.playful-site.academic-site .assessment-grid { grid-template-columns: minmax(0, 1fr); }
  body.playful-site.academic-site .assessment-grid article { min-width: 0; border-right: 1px solid var(--line); }
  body.playful-site.academic-site .system-panel { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  body.playful-site.academic-site *, body.playful-site.academic-site *::before, body.playful-site.academic-site *::after { transition: none; animation: none; scroll-behavior: auto; }
}
@media print {
  body.playful-site.academic-site { background: #fff; color: #182f4d; }
  body.playful-site.academic-site :is(.site-header, .simple-header, .club-header, .algebra-header, .course-header) { position: static; }
  body.playful-site.academic-site :is(.program-card, .info-card, .content-grid article) { break-inside: avoid; }
}
