/* 全站最终设计规范：统一正文、标题、控件及内容容器；数学排版保留独立字体。 */
:root { --focus-ring:#17456f; --space-unit:0.5rem; --control-radius:0.4rem; }
/* 字体尺寸仅在这里集中覆盖历史页面规则，避免页面之间各自缩放。 */
:root {
  --site-font:"DM Sans", "Segoe UI", Arial, sans-serif;
  --site-body:16px; --site-h1:44px; --site-h2:30px; --site-h3:21px;
  --site-gutter:32px; --site-section:64px; --site-gap:24px; --site-width:1180px;
}
body.playful-site.academic-site { font-family:var(--site-font); font-size:var(--site-body); line-height:1.7; }
body.playful-site.academic-site :is(h1,h2,h3,h4,p,a,li,label,button,input,select,textarea,small,summary,strong,b,legend,blockquote) { font-family:var(--site-font)!important; }
body.playful-site.academic-site h1 { font-size:var(--site-h1)!important; line-height:1.2!important; letter-spacing:-.025em!important; font-weight:700!important; }
body.playful-site.academic-site h2 { font-size:var(--site-h2)!important; line-height:1.3!important; letter-spacing:-.02em!important; font-weight:700!important; }
body.playful-site.academic-site h3 { font-size:var(--site-h3)!important; line-height:1.4!important; letter-spacing:-.01em!important; font-weight:700!important; }
body.playful-site.academic-site :is(.content-grid > article,.info-card,.unit-sidebar) h2 { font-size:var(--site-h3)!important; line-height:1.4!important; }
body.playful-site.academic-site header nav a { font-size:14px; line-height:1.5; }
body.playful-site.academic-site main :is(p,li):not(.eyebrow,.kicker,.a-eyebrow,.problem-label,.problem-note,.study-label,.inline-error,.inquiry-privacy,.inquiry-mail-status,.static-inquiry-label) {
  font-size:var(--site-body)!important; line-height:1.7!important;
}
body.playful-site.academic-site :is(.eyebrow,.kicker,.a-eyebrow,.static-inquiry-label) { font-size:12px!important; line-height:1.5!important; letter-spacing:.06em!important; }
body.playful-site.academic-site :is(.button,.a-button) { min-height:48px; font-size:14px!important; line-height:1.5!important; padding:12px 18px; font-weight:700; border-radius:6px; white-space:normal; text-align:center; }
body.playful-site.academic-site :is(input,select,textarea) { font-size:16px!important; line-height:1.5; }
/* 两门 Algebra 课程共用控件字号，避免平板样式将标签缩得过小。 */
body.playful-site.academic-site.algebra-course-page :is(.explorer-tabs > button,.unit-list > button,.preview-note,.skill-tags span,.text-action) { font-size:14px!important; line-height:1.5!important; }
body.playful-site.academic-site.algebra-course-page .unit-list > button span { font-size:inherit; }
body.playful-site.academic-site.algebra-course-page .course-switch small { font-size:12px; line-height:1.5; }
body.playful-site.academic-site :is(h1,h2,h3,h4) { word-break:normal; overflow-wrap:normal; }
body.playful-site.academic-site :is(.content-wrap,.page-wrap) {
  max-width:calc(var(--site-width) + 2 * var(--site-gutter));
  margin-inline:auto; padding-inline:var(--site-gutter);
}
body.playful-site.academic-site :is(.a-container,.course-container) {
  width:min(var(--site-width),calc(100% - 2 * var(--site-gutter))); margin-inline:auto;
}
body.playful-site.academic-site :is(.content-hero,.page-hero,.competition-hero) {
  padding-inline:max(var(--site-gutter),calc((100% - var(--site-width))/2));
  padding-block:var(--site-section);
}
body.playful-site.academic-site :is(.content-grid,.info-grid,.course-pair,.assessment-grid) { gap:var(--site-gap); }
body.playful-site.academic-site :is(.content-grid > article,.info-card,.course-card,.assessment-card) { padding:var(--site-gap); min-width:0; }
@media(max-width:1100px) {
  :root { --site-h1:36px; --site-h2:27px; --site-h3:20px; --site-gutter:24px; --site-section:48px; --site-gap:20px; }
}
@media(max-width:620px) {
  :root { --site-h1:28px; --site-h2:22px; --site-h3:18px; --site-gutter:16px; --site-section:36px; --site-gap:16px; }
  body.playful-site.academic-site :is(.content-grid,.info-grid,.course-pair,.assessment-grid) { grid-template-columns:minmax(0,1fr); }
}
:focus-visible { outline:3px solid var(--focus-ring); outline-offset:4px; }
/* 测评卡片的小标签与标题采用固定节奏，不继承旧版大段标题留白。 */
body.playful-site.academic-site.algebra-page .assessment-mark { display:block; font-family:var(--site-font); font-size:12px; line-height:1.5; letter-spacing:.06em; }
body.playful-site.academic-site.algebra-page .assessment-mark + h3 { margin:10px 0 12px; max-width:none; }
body.playful-site.academic-site.algebra-page .assessment-mark ~ p { margin:0 0 20px; }
body.playful-site.academic-site.algebra-page .assessment-mark ~ a { font-size:14px; line-height:1.5; }
.direction-icon { display:inline-block; width:1em; height:1em; vertical-align:-.12em; flex-shrink:0; }
/* 页脚品牌与课程名作为完整单元排列，手机上下分层，不留下悬空分隔符。 */
body.playful-site.academic-site .course-footer-brand { display:inline-flex; align-items:center; gap:16px; max-width:100%; font-size:16px; line-height:1.5; }
body.playful-site.academic-site .course-footer-brand > span { padding:0; color:inherit; white-space:nowrap; }
body.playful-site.academic-site .course-footer-brand .footer-course { border-left:1px solid #a29477; padding-left:16px; font-size:14px; font-weight:500; }
@media(max-width:620px) {
  body.playful-site.academic-site .course-footer-brand { flex-direction:column; align-items:flex-start; gap:4px; }
  body.playful-site.academic-site .course-footer-brand .footer-course { border-left:0; padding-left:0; }
}
/* 宽屏已显示完整导航时，不再同时显示折叠菜单按钮。 */
@media(min-width:1101px) {
  body.playful-site.academic-site.home-page .site-header .menu-toggle { display:none; }
}
/* 课程卡片按内容撑高，详情展开或系统字号变化时不挤压正文。 */
body.playful-site.academic-site.home-page .home-pathways .program-card > * { flex-shrink:0; }
body.playful-site.academic-site.home-page .home-pathways .pathway-details { margin-block:12px; }
body.playful-site.academic-site.home-page .home-pathways .pathway-primary { min-height:48px; height:auto; max-height:none; font-size:14px; white-space:normal; }
body.playful-site.academic-site.home-page .home-pathways .pathway-primary svg { flex:0 0 20px; width:20px; height:20px; }
/* SVG 避免 iOS 将斜箭头显示为彩色表情；固定图标宽度，文字独立换行。 */
body.playful-site.academic-site .study-next { display:flex; align-items:center; gap:12px; }
body.playful-site.academic-site .study-next .next-icon { flex:0 0 32px; width:32px; height:32px; display:grid; place-items:center; }
body.playful-site.academic-site .study-next .next-icon svg { display:block; width:20px; height:20px; }
body.playful-site.academic-site .study-next > span:last-child { flex:1; min-width:0; }
body.playful-site.academic-site .study-next small { display:block; font-size:12px!important; line-height:1.5; letter-spacing:.06em; margin-bottom:6px; }
body.playful-site.academic-site .study-next strong { display:block; font-size:16px!important; line-height:1.5; }
.skip-link { position:fixed; top:8px; left:8px; z-index:9999; padding:12px 18px; background:#fff; color:#112f4d; border:2px solid currentColor; transform:translateY(-150%); }
.skip-link:focus { transform:translateY(0); }
main:focus { outline:none; }
/* 步骤名称是完整单词；所有屏幕尺寸都禁止在词中间拆行。 */
body.playful-site.academic-site.home-page .v2-five h3 {
  white-space:nowrap;
  word-break:normal;
  overflow-wrap:normal;
  hyphens:none;
}
.site-contact { max-width:1120px; margin:40px auto; padding:28px; border-top:1px solid #cbd5df; color:#1b3449; }
.site-contact h2 { margin:0 0 12px; font-size:clamp(1.4rem,3vw,2rem); }
.site-contact p { color:#42576a; line-height:1.65; }
.site-contact a:not(.button), .contact-email { text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
.site-contact-actions { display:flex; flex-wrap:wrap; align-items:center; gap:20px; }
/* Paired program CTAs share one exact rail at every responsive breakpoint. */
body.playful-site.academic-site .content-wrap > :is(.system-panel,.site-contact) {
  box-sizing:border-box;
  width:100%;
  max-width:none;
  margin-inline:0;
  padding:44px;
}
body.playful-site.academic-site .content-wrap > .system-panel > .button,
body.playful-site.academic-site .content-wrap > .site-contact .site-contact-actions > .button {
  box-sizing:border-box;
  width:min(260px,100%);
  min-height:60px;
  justify-content:space-between;
  padding-inline:22px;
}
.form-trap { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.inquiry-mail-status { overflow-wrap:anywhere; }
.inquiry-mail-status[data-state=error] { color:#9b2226; padding:12px; background:#fff3f2; border-left:3px solid currentColor; }
.inquiry-mail-status[data-state=success] { color:#15583b; padding:12px; background:#eef9f2; border-left:3px solid currentColor; }
button:disabled { cursor:default; opacity:0.7; }
.simple-footer .contact-email { font-size:0.875rem; }
@media(max-width:620px) {
  .site-contact { margin:24px 16px; padding:24px 8px; }
  body.playful-site.academic-site .content-wrap > :is(.system-panel,.site-contact) { padding:20px; }
  input,select,textarea { font-size:16px; }
  button,.button,.mobile-nav-toggle,.menu-toggle { min-height:44px; }
  .simple-footer { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto!important; }
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  .reveal { opacity:1!important; transform:none!important; }
}
@media print { .skip-link,.site-contact-actions { display:none; } }

/* 手机动效仅用透明度和位移，不改变布局尺寸；减少动态效果时完全停用。 */
@keyframes mobile-content-enter {
  from { opacity:0.35; translate:0 16px; }
  to { opacity:1; translate:0 0; }
}
@keyframes mobile-menu-enter {
  from { opacity:0; translate:0 -8px; }
  to { opacity:1; translate:0 0; }
}
@media screen and (max-width:620px) and (prefers-reduced-motion:no-preference) {
  body.playful-site.academic-site .mobile-enter {
    animation:mobile-content-enter 620ms cubic-bezier(.22,1,.36,1) var(--mobile-enter-delay,0ms) both;
  }
  body.playful-site.academic-site :is(.main-nav.open, .mobile-nav-open, #algebra-nav.is-open) {
    animation:mobile-menu-enter 240ms ease-out both;
  }
  body.playful-site.academic-site :is(.button,.menu-toggle,.mobile-nav-toggle) {
    transition:scale 150ms ease;
  }
  body.playful-site.academic-site :is(.button,.menu-toggle,.mobile-nav-toggle):active { scale:0.97; }
}

/* Keep preparation text readable on the light subject-color cards. */
body.playful-site.academic-site.competition-page .preparation-grid > article {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  padding: 24px;
  gap: 16px;
}
body.playful-site.academic-site.competition-page .preparation-grid > article > * {
  grid-column: 1;
  grid-row: auto;
}
body.playful-site.academic-site.competition-page .preparation-grid > article > span {
  color: var(--card-accent);
  border-color: var(--card-border);
}
body.playful-site.academic-site.competition-page .preparation-grid > article > p {
  color: #445b6d;
  font-size: 16px;
  line-height: 1.6;
}
@media (max-width: 700px) {
  body.playful-site.academic-site.competition-page .preparation-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

:is(.programs-page,.home-page) .service-process {
  margin:clamp(40px,6vw,76px) 0;
  padding:clamp(24px,4vw,48px);
  border:1px solid #d1dce1;
  border-top:5px solid #a45130;
  background:linear-gradient(145deg,#f8fafb 0%,#f2f6f7 100%);
}
/* 首页的区块是通栏的，而这是一张带边框的面板；把它收进 --max 内容轨，
   让它的左右边缘与上下相邻区块对齐，而不是顶到浏览器边上。 */
.home-page .service-process {
  box-sizing:border-box;
  width:min(100% - 56px, 1180px);
  margin-inline:auto;
}
:is(.programs-page,.home-page) .service-process-heading {
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);
  align-items:end;
  gap:clamp(20px,4vw,56px);
  margin-bottom:32px;
}
:is(.programs-page,.home-page) .service-process-heading h2 { max-width:720px;margin:8px 0 0;font-size:clamp(30px,4vw,46px);line-height:1.1;letter-spacing:-.035em; }
:is(.programs-page,.home-page) .service-process-heading>p { max-width:460px;margin:0;color:#42596a;font-size:16px;line-height:1.7; }
:is(.programs-page,.home-page) .service-process-steps {
  display:grid;
  /* 三列；每个阶段必须凑满 3 张卡，否则末尾会留下孤儿卡和整片空白。
     行间距留 40px 供阶段标签绝对定位使用。
     Three columns; each phase must contain exactly 3 cards or the last one is orphaned.
     The 40px row gap is the space the absolutely positioned phase labels sit in. */
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:40px 16px;
  margin:0;
  padding:12px 0 0;
  list-style:none;
  counter-reset:service-step;
}
:is(.programs-page,.home-page) .service-process-steps li {
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  /* 第三行（正文）吸收多余空间，让绿色小结框统一沉到卡片底部对齐。
     The third row (body copy) absorbs slack so every outcome box lines up at the card foot. */
  grid-template-rows:auto auto 1fr auto;
  gap:8px 14px;
  position:relative;
  min-width:0;
  min-height:270px;
  padding:22px 20px 18px;
  border:1px solid #d2dde1;
  border-radius:4px;
  background:#fff;
  box-shadow:0 8px 22px #17364d0a;
  counter-increment:service-step;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
:is(.programs-page,.home-page) .service-process-steps li:hover { transform:translateY(-3px);border-color:#9cb5bb;box-shadow:0 13px 30px #17364d14; }
/* 阶段标签必须领起整行，否则会出现在行中间的卡片上方。
   标签用绝对定位挂在卡片上方的行间距里，卡片本身不能有外边距，
   否则同一行的卡片会比邻居低一截。 */
:is(.programs-page,.home-page) .service-process-steps li[data-phase] { grid-column:1; }
:is(.programs-page,.home-page) .service-process-steps li[data-phase]::after {
  position:absolute;
  top:-20px;
  left:0;
  color:#8b472c;
  content:attr(data-phase);
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
:is(.programs-page,.home-page) .service-process-steps li::before {
  grid-row:1/span 2;
  display:grid;
  width:42px;
  height:42px;
  place-items:center;
  border-radius:50%;
  background:#f7eee9;
  content:counter(service-step,decimal-leading-zero);
  color:#a45130;
  font-size:14px;
  font-weight:800;
  letter-spacing:.02em;
}
:is(.programs-page,.home-page) .service-process-steps h3 {
  align-self:center;
  min-height:42px;
  margin:0;
  color:#1b3449;
  font-size:18px;
  line-height:1.3;
}
:is(.programs-page,.home-page) .service-process-steps p {
  grid-column:1/-1;
  margin:5px 0 0;
  color:#42596a;
  font-size:14px;
  line-height:1.7;
}
:is(.programs-page,.home-page) .service-process-outcome {
  grid-column:1/-1;
  display:grid;
  gap:4px;
  margin-top:7px;
  padding:13px 14px;
  border-left:3px solid #76a59e;
  background:#f0f6f4;
}
:is(.programs-page,.home-page) .service-process-outcome strong {
  color:#1f5b52;
  font-size:10px;
  letter-spacing:.1em;
  text-transform:uppercase;
}
:is(.programs-page,.home-page) .service-process-outcome span { color:#294b4a;font-size:13px;line-height:1.5; }
:is(.programs-page,.home-page) .service-process-feedback {
  margin:24px 0 0;
  padding:17px 20px;
  border:1px solid #d6e3df;
  background:#eaf3f0;
  color:#294b4a;
  font-size:14px;
  line-height:1.6;
}
@media(max-width:900px) {
  :is(.programs-page,.home-page) .service-process-heading {
    grid-template-columns:minmax(0,1fr);
    gap:8px;
  }
  :is(.programs-page,.home-page) .service-process-steps li { min-height:290px;padding:19px 16px 16px; }
}
@media(max-width:760px) {
  :is(.programs-page,.home-page) .service-process-steps {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  :is(.programs-page,.home-page) .service-process-steps li { min-height:260px; }
  /* 每个阶段固定 3 张卡，两列时让第三张铺满整行，避免右侧留空。
     Phases hold 3 cards each; in the two-column layout the third spans the full row
     so no gap is left on the right. */
  :is(.programs-page,.home-page) .service-process-steps li[data-phase]+li+li { grid-column:1/-1; }
}
@media(max-width:620px) {
  :is(.programs-page,.home-page) .service-process {
    margin-inline:-8px;
    padding:24px 16px;
  }
  /* 课程页的面板靠 content-wrap 的内边距吸收这 8px 负边距；首页没有那层内边距，
     沿用负值会把面板推出屏幕左侧，所以首页仍旧居中。 */
  body.home-page .service-process { margin-inline:auto; }
  :is(.programs-page,.home-page) .service-process-heading { margin-bottom:25px; }
  :is(.programs-page,.home-page) .service-process-heading h2 { font-size:32px; }
  :is(.programs-page,.home-page) .service-process-heading>p { font-size:15px; }
  :is(.programs-page,.home-page) .service-process-steps {
    grid-template-columns:minmax(0,1fr);
    gap:24px;
  }
  :is(.programs-page,.home-page) .service-process-steps li {
    min-height:0;
    padding:19px 16px 16px;
  }
  :is(.programs-page,.home-page) .service-process-steps li[data-phase] { margin-top:8px; }
  :is(.programs-page,.home-page) .service-process-feedback { margin-top:22px;padding:14px; }
}

/* AP, IB and competition cards share a restrained subject-color system. */
body.playful-site.academic-site:is(.ap-page,.ib-page)
  .content-grid.subject-pair > article,
body.playful-site.academic-site.competition-page
  :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article) {
  --card-accent:#356f97;
  --card-border:#bfd2df;
  --card-surface:#eaf2f7;
  position:relative;
  overflow:hidden;
  border:1px solid var(--card-border);
  border-top:5px solid var(--card-accent);
  background:linear-gradient(145deg,var(--card-surface) 0%,#fff 74%);
  box-shadow:0 12px 30px rgba(23,50,77,.07);
  transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease;
}
body.playful-site.academic-site:is(.ap-page,.ib-page)
  .content-grid.subject-pair > article::after,
body.playful-site.academic-site.competition-page
  :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article)::after {
  content:"";
  position:absolute;
  z-index:0;
  width:118px;
  height:118px;
  top:-76px;
  right:-52px;
  border:20px solid color-mix(in srgb,var(--card-accent) 12%,transparent);
  border-radius:50%;
  pointer-events:none;
  transition:transform .4s ease;
}
body.playful-site.academic-site:is(.ap-page,.ib-page)
  .content-grid.subject-pair > article > *,
body.playful-site.academic-site.competition-page
  :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article) > * {
  position:relative;
  z-index:1;
}
body.playful-site.academic-site:is(.ap-page,.ib-page)
  .content-grid.subject-pair > article:first-child {
  --card-accent:#326f9c;
  --card-border:#bad1e0;
  --card-surface:#e7f1f7;
}
body.playful-site.academic-site.ap-page
  .content-grid.subject-pair > article:last-child {
  --card-accent:#51795e;
  --card-border:#bfd3c4;
  --card-surface:#ebf3ec;
}
body.playful-site.academic-site.ib-page
  .content-grid.subject-pair > article:first-child {
  --card-accent:#4d6297;
  --card-border:#c5cce1;
  --card-surface:#eef0f8;
}
body.playful-site.academic-site.ib-page
  .content-grid.subject-pair > article:last-child {
  --card-accent:#397a76;
  --card-border:#bad5d2;
  --card-surface:#e7f3f1;
}
body.playful-site.academic-site:is(.ap-page,.ib-page)
  .content-grid.subject-pair > article h2 {
  color:var(--card-accent);
}
body.playful-site.academic-site.competition-page
  :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article):nth-child(3n+1) {
  --card-accent:#346f99;
  --card-border:#bfd3e0;
  --card-surface:#e9f2f7;
}
body.playful-site.academic-site.competition-page
  :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article):nth-child(3n+2) {
  --card-accent:#55795f;
  --card-border:#c2d4c5;
  --card-surface:#edf4ed;
}
body.playful-site.academic-site.competition-page
  :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article):nth-child(3n) {
  --card-accent:#9a6535;
  --card-border:#dcc9b4;
  --card-surface:#f7efe5;
}
body.playful-site.academic-site.competition-page
  :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article)
  :is(.contest-tag,h3,h4,a) {
  color:var(--card-accent);
}
body.playful-site.academic-site.competition-page
  :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article):focus-within {
  outline:3px solid var(--card-accent);
  outline-offset:4px;
}
@media (hover:hover) and (pointer:fine) {
  body.playful-site.academic-site:is(.ap-page,.ib-page)
    .content-grid.subject-pair > article:hover,
  body.playful-site.academic-site.competition-page
    :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article):hover {
    transform:translateY(-6px);
    border-color:var(--card-accent);
    box-shadow:0 20px 40px rgba(23,50,77,.14);
  }
  body.playful-site.academic-site:is(.ap-page,.ib-page)
    .content-grid.subject-pair > article:hover::after,
  body.playful-site.academic-site.competition-page
    :is(.stage-grid > article,.contest-card,.organizer-intro,.cms-contests > article,.preparation-grid > article):hover::after {
    transform:translate(-7px,7px) scale(1.08);
  }
}
@keyframes curriculum-card-enter {
  from { opacity:0; transform:translateY(16px); }
  to { opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion:no-preference) {
  body.playful-site.academic-site:is(.ap-page,.ib-page)
    .content-grid.subject-pair > article,
  body.playful-site.academic-site.competition-page
    .stage-grid > article {
    animation:curriculum-card-enter .56s cubic-bezier(.2,.75,.25,1) both;
  }
  body.playful-site.academic-site:is(.ap-page,.ib-page)
    .content-grid.subject-pair > article:nth-child(2),
  body.playful-site.academic-site.competition-page
    .stage-grid > article:nth-child(2) { animation-delay:.08s; }
  body.playful-site.academic-site.competition-page
    .stage-grid > article:nth-child(3) { animation-delay:.16s; }
}

/* Standardized-test cards retain their equal-height grid with distinct colors. */
body.playful-site.academic-site.test-preparation-page
  .test-preparation-cards > article {
  --card-accent:#356f97;
  --card-border:#bfd2df;
  --card-surface:#eaf2f7;
  position:relative;
  overflow:hidden;
  border:1px solid var(--card-border);
  border-top:5px solid var(--card-accent);
  background:linear-gradient(145deg,var(--card-surface) 0%,#fff 74%);
  box-shadow:0 12px 30px rgba(23,50,77,.07);
  transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease;
}
body.playful-site.academic-site.test-preparation-page
  .test-preparation-cards > article:nth-child(1) {
  --card-accent:#356f97;
  --card-border:#a9c9dc;
  --card-surface:#dcecf6;
}
body.playful-site.academic-site.test-preparation-page
  .test-preparation-cards > article:nth-child(2) {
  --card-accent:#50785e;
  --card-border:#accbb4;
  --card-surface:#e0efe3;
}
body.playful-site.academic-site.test-preparation-page
  .test-preparation-cards > article:nth-child(3) {
  --card-accent:#946231;
  --card-border:#d6b994;
  --card-surface:#f3e4d2;
}
body.playful-site.academic-site.test-preparation-page
  .test-preparation-cards > article::after {
  content:"";
  position:absolute;
  z-index:0;
  width:118px;
  height:118px;
  top:-76px;
  right:-52px;
  border:20px solid color-mix(in srgb,var(--card-accent) 12%,transparent);
  border-radius:50%;
  pointer-events:none;
  transition:transform .4s ease;
}
body.playful-site.academic-site.test-preparation-page
  .test-preparation-cards > article > * {
  position:relative;
  z-index:1;
}
body.playful-site.academic-site.test-preparation-page
  .test-preparation-cards > article h2 {
  color:var(--card-accent);
}
body.playful-site.academic-site.test-preparation-page
  .test-preparation-cards > article > .button {
  background:var(--card-accent);
  border-color:var(--card-accent);
}
body.playful-site.academic-site.test-preparation-page
  .test-preparation-cards > article:focus-within {
  outline:3px solid var(--card-accent);
  outline-offset:4px;
}
@media (hover:hover) and (pointer:fine) {
  body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article:hover {
    transform:translateY(-6px);
    border-color:var(--card-accent);
    box-shadow:0 20px 40px rgba(23,50,77,.14);
  }
  body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article:hover::after {
    transform:translate(-7px,7px) scale(1.08);
  }
  body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article > .button:hover {
    filter:brightness(.9);
  }
}
@media (prefers-reduced-motion:no-preference) {
  body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article {
    animation:curriculum-card-enter .56s cubic-bezier(.2,.75,.25,1) both;
  }
  body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article:nth-child(2) { animation-delay:.08s; }
  body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article:nth-child(3) { animation-delay:.16s; }
}

/* General Programs uses the same subject language as the homepage. */
body.playful-site.academic-site.programs-page
  .content-grid.subject-pair > article {
  --card-accent:#356f97;
  --card-border:#a9c9dc;
  --card-surface:#dcecf6;
  position:relative;
  overflow:hidden;
  border:1px solid var(--card-border);
  border-top:5px solid var(--card-accent);
  background:linear-gradient(145deg,var(--card-surface) 0%,#f8fbfd 82%);
  box-shadow:0 12px 30px rgba(23,50,77,.08);
  transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease;
}
body.playful-site.academic-site.programs-page
  .content-grid.subject-pair > article:nth-child(2) {
  --card-accent:#50785e;
  --card-border:#accbb4;
  --card-surface:#e0efe3;
}
body.playful-site.academic-site.programs-page
  .content-grid.subject-pair > article::after {
  content:"";
  position:absolute;
  z-index:0;
  width:118px;
  height:118px;
  top:-76px;
  right:-52px;
  border:20px solid color-mix(in srgb,var(--card-accent) 14%,transparent);
  border-radius:50%;
  pointer-events:none;
  transition:transform .4s ease;
}
body.playful-site.academic-site.programs-page
  .content-grid.subject-pair > article > * {
  position:relative;
  z-index:1;
}
body.playful-site.academic-site.programs-page
  .content-grid.subject-pair > article h2 {
  color:var(--card-accent);
}
body.playful-site.academic-site.programs-page
  .content-grid.subject-pair > article > .button {
  background:var(--card-accent);
  border-color:var(--card-accent);
}
body.playful-site.academic-site.programs-page
  .content-grid.subject-pair > article:focus-within {
  outline:3px solid var(--card-accent);
  outline-offset:4px;
}
@media (hover:hover) and (pointer:fine) {
  body.playful-site.academic-site.programs-page
    .content-grid.subject-pair > article:hover {
    transform:translateY(-6px);
    border-color:var(--card-accent);
    box-shadow:0 20px 40px rgba(23,50,77,.15);
  }
  body.playful-site.academic-site.programs-page
    .content-grid.subject-pair > article:hover::after {
    transform:translate(-7px,7px) scale(1.08);
  }
  body.playful-site.academic-site.programs-page
    .content-grid.subject-pair > article > .button:hover {
    filter:brightness(.9);
  }
}
@media (prefers-reduced-motion:no-preference) {
  body.playful-site.academic-site.programs-page
    .content-grid.subject-pair > article {
    animation:curriculum-card-enter .56s cubic-bezier(.2,.75,.25,1) both;
  }
  body.playful-site.academic-site.programs-page
    .content-grid.subject-pair > article:nth-child(2) { animation-delay:.08s; }
}

@media (min-width:700px) and (max-width:1100px) {
  body.playful-site.academic-site.test-preparation-page .test-preparation-cards,
  body.playful-site.academic-site.programs-page .content-grid.subject-pair,
  body.playful-site.academic-site.competition-page :is(.stage-grid,.contest-grid),
  html.ipad-portrait body.playful-site.academic-site.test-preparation-page .test-preparation-cards,
  html.ipad-portrait body.playful-site.academic-site.programs-page .content-grid.subject-pair,
  html.ipad-portrait body.playful-site.academic-site.competition-page :is(.stage-grid,.contest-grid) {
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-auto-rows:auto;
    gap:var(--site-gap);
  }
  body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article:last-child:nth-child(odd),
  body.playful-site.academic-site.competition-page
    :is(.stage-grid,.contest-grid) > article:last-child:nth-child(odd),
  html.ipad-portrait body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article:last-child:nth-child(odd),
  html.ipad-portrait body.playful-site.academic-site.competition-page
    :is(.stage-grid,.contest-grid) > article:last-child:nth-child(odd) {
    grid-column:auto;
  }
  html.ipad-portrait body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article,
  html.ipad-portrait body.playful-site.academic-site.test-preparation-page
    .test-preparation-cards > article:last-child:nth-child(odd) {
    display:flex;
    flex-direction:column;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto;
    gap:12px;
    height:auto;
    min-height:0;
  }
}
