.subject-page main:has(>.maths-hero){padding-top:0}

.maths-hero{
  position:relative;
  isolation:isolate;
  display:grid;
  align-items:center;
  min-height:clamp(560px,46vw,730px);
  padding:calc(var(--top-bar-height) + 44px) var(--space-gutter) 68px;
  background:var(--brand-shell);
  color:var(--brand-ink);
}
.maths-hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:var(--subject-hero-fade);
  pointer-events:none;
}
.maths-hero-photo{
  position:absolute;
  inset:0;
  z-index:-2;
  width:100%;
  overflow:hidden;
}
.maths-hero-photo picture{display:block;width:100%;height:100%}
.maths-hero-photo .subject-hero-image{
  display:block;width:100%;height:100%;object-fit:cover;object-position:52% 68%;
}
.maths-hero-content{
  width:min(36vw,490px);
  margin-left:max(0px,calc((100vw - var(--content-width)) / 2 - var(--space-gutter)));
}
.maths-hero h1,.maths-wrap h2{
  margin:0;color:var(--brand-ink);font-family:var(--font-display);font-weight:var(--weight-heading);
}
.maths-hero h1{font-size:clamp(48px,5.4vw,84px);line-height:1.08;letter-spacing:-.045em}
.maths-stages{
  display:flex;flex-wrap:wrap;align-items:center;gap:0 clamp(12px,1.2vw,20px);
  min-width:0;border:0;padding:0;margin:10px 0 14px;color:var(--brand-ink);
  font:600 clamp(14px,1.1vw,17px)/1.4 var(--font-body);
}
.maths-stages label{position:relative;display:inline-flex;align-items:center;min-height:44px;cursor:pointer}
.maths-stages label span{
  border-bottom:1px solid var(--brand-border);padding-block:2px;color:inherit;
}
.maths-stages label:hover span,.maths-stages input:checked+span{border-color:var(--brand-ink);color:var(--brand-ink)}
.maths-stages input:checked+span{box-shadow:0 1px var(--brand-ink)}
.maths-stages input:focus-visible+span{outline:2px solid var(--brand-focus);outline-offset:4px}
.maths-stage-overview,.maths-stage-note{
  max-width:36ch;margin:0;color:var(--brand-ink);
  font:400 clamp(18px,1.42vw,22px)/1.55 var(--font-body);
}
.maths-stages>p{order:1;flex:0 0 100%;margin-top:8px;max-width:none;text-wrap:pretty}
.maths-stage-note,.maths-stages:has(:checked) .maths-stage-overview{display:none}
.maths-stages label:has(:checked)+.maths-stage-note{display:block}
.subject-level-label{margin:16px 0 12px;font-weight:600}
.maths-hero h1{overflow-wrap:break-word}
.maths-reviews-heading p{margin:12px 0 0}
.maths-hero .hero-first-question{margin-top:30px}
.maths-hero .hero-first-question-controls{grid-template-columns:minmax(0,1fr) auto}
.maths-hero .hero-enquiry-continue{width:auto}
.maths-wrap{
  width:min(var(--content-width),calc(100% - 2 * var(--space-gutter)));
  margin-inline:auto;
}
.maths-wrap h2,.maths-reviews h2{
  font:var(--weight-heading) clamp(32px,3.2vw,48px)/1.14 var(--font-display);
  letter-spacing:-.035em;text-wrap:balance;
}
.maths-approach{
  padding-block:var(--space-section);
  background:var(--brand-sage);
}
.maths-approach .maths-wrap{
  display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:var(--space-columns);
}
.maths-approach h2{max-width:13ch}
.maths-copy p{
  max-width:58ch;margin:0 0 16px;color:var(--brand-ink);
  font:400 clamp(17px,1.3vw,19px)/1.7 var(--font-body);
}
.maths-copy p:last-child{margin-bottom:0}
.maths-tutors{padding-block:var(--space-section);background:var(--brand-shell)}
.maths-tutors h2{margin-bottom:32px}
.maths-profiles{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:26px 30px;margin:0;padding:0;
}
@media (max-width:1000px){
  .maths-hero-content{width:min(44vw,490px)}
  .maths-profiles{column-gap:20px}
}
@media (max-width:760px){
  .maths-hero{display:flex;flex-direction:column;align-items:stretch;min-height:auto;padding:0}
  .maths-hero::after{display:none}
  .maths-hero-photo{
    position:relative;inset:auto;z-index:auto;width:100%;height:clamp(265px,70vw,425px);
    -webkit-mask-image:linear-gradient(to bottom,#000 89%,transparent);
    mask-image:linear-gradient(to bottom,#000 89%,transparent);
  }
  .maths-hero-photo .subject-hero-image{object-position:50% 65%}
  .maths-hero-content{width:auto;margin:0;padding:20px var(--space-gutter) 40px}
  .maths-hero h1{font-size:clamp(42px,7.3vw,54px)}
  .maths-stages{margin:3px 0 6px}
  .maths-hero .hero-first-question{margin-top:20px}
  .maths-approach .maths-wrap{grid-template-columns:1fr;gap:20px}
  .maths-approach h2{max-width:none}
  .maths-profiles{grid-template-columns:1fr;gap:18px}
  .maths-tutors h2{margin-bottom:24px}
}
