/* Route-local additions; hero reuses Chinese Programs V3 layout and tokens. */
.page-math-competitions main{color:#00269a}.math-crumb{padding-top:16px;padding-bottom:16px;font-size:14px}.math-crumb a,.math-detail a{color:#00269a}.page-math-competitions .cp-hero-copy{padding:28px 0}.page-math-competitions .cp-hero-copy>p{line-height:1.5;max-width:440px}.page-math-competitions .cp-photo{min-height:245px}.math-placeholder{min-height:200px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px;padding:24px;background:#eaf2ff;color:#00269a;border:1px dashed #7293bd;font-weight:800}.math-placeholder small{font-weight:400}.math-logo{min-height:150px;background:#fff}.math-section{padding-top:64px;padding-bottom:64px}.math-section h2{font-size:32px;line-height:1.15;margin:0 0 10px}.math-section>p,.math-section>.v3-container>p{margin-bottom:22px}.math-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:24px}.math-card{border-radius:18px;overflow:hidden;background:#f5f9ff;display:flex;flex-direction:column}.math-card>div:last-child{padding:24px;flex:1}.math-card h3,.math-row h3{margin:0 0 8px;font-size:21px}.math-card p{line-height:1.5;margin:0 0 18px}.math-tint{background:#f5f9ff}.math-row{display:grid;grid-template-columns:180px 1fr auto;gap:24px;align-items:center;border-bottom:1px solid #c7d7e8;padding:22px 0}.math-row time{font-weight:800}.math-row p{margin:4px 0}.math-closed{font-weight:800}.math-detail{max-width:1000px}.math-detail section{margin-bottom:42px}.math-detail section p{line-height:1.6}.math-empty{padding:20px 0}html{scroll-behavior:smooth}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}@media(max-width:900px){.math-grid{grid-template-columns:1fr}.math-row{grid-template-columns:1fr;gap:8px}.math-row .v3-button{justify-self:start}.math-section{padding-top:42px;padding-bottom:42px}.math-section h2{font-size:27px}.page-math-competitions .cp-photo{height:clamp(190px,54vw,350px)}}

.math-row[hidden],.math-empty[hidden]{display:none}

/* Consistent dimensions for each group of peer cards. */
.math-grid{grid-auto-rows:1fr;align-items:stretch}
.math-card{min-width:0;height:100%}
.math-card>.math-placeholder{height:auto;min-height:0;aspect-ratio:16 / 9;flex:none}
.math-card>.math-logo{aspect-ratio:16 / 7}
.math-card>div:last-child{display:flex;flex-direction:column;align-items:flex-start;width:100%;min-width:0;box-sizing:border-box}
.math-card .v3-text-link{margin-top:auto}
.math-row>time,.math-row>div{min-width:0}
.math-row>.v3-button,.math-row>.math-closed{width:190px;box-sizing:border-box;text-align:center;justify-content:center}
@media(max-width:900px){
 .math-grid{grid-auto-rows:1fr}
 .math-card>.math-logo{aspect-ratio:16 / 7}
 .math-row>.v3-button,.math-row>.math-closed{width:auto;min-width:190px;text-align:left}
}

/* Match the Other Programs hero dimensions and responsive proportions. */
.page-math-competitions .cp-hero-grid{grid-template-columns:54% 46%;min-height:270px;gap:0;padding-top:0;padding-bottom:0}
.page-math-competitions .cp-hero-copy{padding:35px 25px 40px 0}
.page-math-competitions .cp-hero h1{font-size:46px;line-height:1.12;margin-bottom:17px}
.page-math-competitions .cp-hero-copy>p:not(.cp-eyebrow){font-size:17px;line-height:1.5;max-width:600px}
.page-math-competitions .cp-photo{height:270px;min-height:0;width:auto;align-self:center;border-radius:18% 30% 24% 38% / 15% 55% 38% 65%}
@media(min-width:901px) and (max-width:1190px){.page-math-competitions .cp-hero h1{font-size:42px}}
@media(max-width:900px){
 .page-math-competitions .cp-hero-grid{grid-template-columns:1fr;gap:20px;padding-top:28px;padding-bottom:24px}
 .page-math-competitions .cp-hero-copy{padding:0}
 .page-math-competitions .cp-hero h1{font-size:38px;margin-bottom:14px}
 .page-math-competitions .cp-hero-copy>p:not(.cp-eyebrow){font-size:16px;line-height:1.6}
 .page-math-competitions .cp-photo{height:clamp(200px,52vw,340px);width:100%;border-radius:55px 35px 45px 35px}
}
@media(max-width:480px){.page-math-competitions .cp-hero h1{font-size:36px}}

@media(min-width:901px){
 .page-math-competitions .cp-hero-grid{height:270px}
 .page-math-competitions .cp-hero-copy{padding:8px 25px 8px 0}
 .page-math-competitions .cp-hero h1{font-size:32px;line-height:1.04;margin-bottom:10px}
 .page-math-competitions .cp-hero-copy>p:not(.cp-eyebrow){font-size:15px;line-height:1.35;margin-bottom:8px}
}

/* Keep the sections compact and the schedule easy to scan. */
.math-section{padding-top:56px;padding-bottom:56px}
.math-schedule{margin-top:24px}
.math-schedule + p{margin-top:24px;margin-bottom:0}
@media(min-width:901px){.page-math-competitions .cp-hero h1{font-size:38px}}
@media(max-width:900px){.math-section{padding-top:36px;padding-bottom:36px}.math-schedule{margin-top:16px}.math-row{padding:18px 0}}

/* Two image-led competition cards, aligned with the site's image-card proportions. */
.math-explore-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.math-explore-card>.math-placeholder{aspect-ratio:16 / 9}
.math-explore-card .math-subtitle{font-weight:800;margin-bottom:10px}
.math-explore-card .v3-text-link:hover{text-decoration:underline}
.math-highlights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:20px}
.math-highlights .math-placeholder{height:auto;min-height:0;aspect-ratio:1.7;border-radius:18px}
@media(max-width:900px){.math-explore-grid,.math-highlights{grid-template-columns:1fr}}

/* Use the Other Programs card unchanged; size the labeled substitute to its photo slot. */
#explore-competitions .op-photo-placeholder{width:100%;height:100%;min-height:224px;box-sizing:border-box;padding:8px;font-size:13px;overflow-wrap:anywhere}
@media(max-width:900px){#explore-competitions .op-photo-placeholder{min-height:210px}}
@media(max-width:600px){#explore-competitions .op-photo-placeholder{min-height:0;font-size:12px}}

.page-math-competitions .math-landing-photo img{object-position:center 60%}

/* Landing page competition list. Detail-page schedules retain their existing layout. */
.math-upcoming-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,220px) auto;align-items:center;gap:20px;padding:16px 0;border-bottom:1px solid #c7d7e8}
.math-upcoming-row h3{font-size:17px;line-height:1.35;margin:0;min-width:0}
.math-upcoming-row time{font-size:15px}
.math-upcoming-row .v3-button{min-height:38px;padding:7px 17px;font-size:13px;white-space:nowrap}
.math-upcoming-row[hidden]{display:none}
@media(max-width:600px){.math-upcoming-row{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}.math-upcoming-row h3{grid-column:1}.math-upcoming-row time{grid-column:1;grid-row:2}.math-upcoming-row .v3-button{grid-column:2;grid-row:1 / 3}}

/* Compact header for competition detail pages. */
.math-detail-header{background:#fffcf5;padding:24px 0 28px}
.math-detail-header h1{font-size:32px;line-height:1.15;letter-spacing:-.04em;margin:0 0 10px}
.math-detail-header p:not(.cp-eyebrow){max-width:720px;line-height:1.5;margin:0 0 12px}
@media(max-width:600px){.math-detail-header{padding:20px 0 24px}.math-detail-header h1{font-size:28px}}
