/* Parent guide: the mynah sits beside examples and the next step. */
html { scroll-behavior: auto; }
.nav__inner { gap: 18px; }
.nav .nav__cta { display: inline-flex; flex: 0 0 auto; white-space: nowrap; min-height: 44px; }
.nav__links { margin-inline: auto; }
.guide-kicker, .workbook__caption {
  color: #675326; font: 500 12px/1.45 var(--mono); text-transform: uppercase; letter-spacing: .065em;
}
.mascot { display: block; height: auto; }
.guide-hero { border-bottom: 1px solid var(--frame); background-color: #fff7dc; }
.guide-hero__grid {
  display: grid; gap: 30px; align-items: center; padding-block: clamp(34px, 5.4vw, 80px);
}
.guide-hero h1 { max-width: 14ch; margin: 12px 0 16px; font: 650 clamp(40px, 5.9vw, 78px)/.99 var(--sans); letter-spacing: -.06em; text-wrap: balance; }
.guide-lead, .section-intro { max-width: 51ch; color: var(--ink-2); font: 400 clamp(17px, 1.45vw, 20px)/1.5 var(--sans); }
.guide-actions { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; margin-top: 23px; }
.guide-actions .btn, .guide-invite .btn { min-height: 48px; padding: 12px 22px; }
.text-link, .card-action { color: var(--mark); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.text-link:hover { color: var(--ink); }
.workbook { position: relative; isolation: isolate; min-width: 0; width: min(100%, 408px); margin: 0 auto; padding: 0 6px 7px 0; }
.workbook__sun {
  display: flex; align-items: end; justify-content: center; position: relative; height: clamp(114px, 14vw, 170px);
}
.workbook__sun::before {
  content: ''; position: absolute; z-index: -1; bottom: 0; width: clamp(120px, 17vw, 194px); height: 91%;
  background: #ffda40; border-radius: 100vw 100vw 0 0;
}
.workbook__sun .mascot { width: auto; height: 94%; max-width: 90%; object-fit: contain; object-position: bottom; }
.workbook__page {
  position: relative; padding: clamp(16px, 2.2vw, 28px); background: var(--paper-2); border: 1.5px solid var(--ink);
  border-radius: 5px 16px 5px 5px; box-shadow: 4px 4px 0 #e8cb71;
}
.workbook__caption { color: var(--ink-2); font-size: 11px; }
.workbook__math { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .3em; margin: 10px 0; font: 500 clamp(22px, 2.3vw, 33px)/1.24 var(--sans); letter-spacing: -.045em; }
.workbook__answer { color: var(--mark); }
.workbook__page > p { border-top: 1px solid var(--frame); padding-top: 10px; font-size: 15px; line-height: 1.45; }
.guide-section { padding-block: clamp(35px, 5vw, 72px); }
.guide-section--tint { background: #f4f0e7; }
.guide-section h2 { max-width: 29ch; font: 600 clamp(28px, 3.3vw, 44px)/1.08 var(--sans); letter-spacing: -.045em; text-wrap: balance; }
.section-intro { margin-top: 10px; }
.route-cards, .reading-list { padding: 0; list-style: none; }
.route-cards, .person-grid, .session-grid { display: grid; gap: 12px; margin-top: 24px; }
.route-cards li { min-width: 0; }
.route-cards a, .person-card, .session-choice {
  display: block; position: relative; height: 100%; padding: 22px; border: 1px solid var(--frame); border-radius: 12px;
  background: var(--paper-2); color: var(--ink); text-decoration: none;
}
.route-cards a { padding-right: 46px; }
.route-cards a:hover, .person-card:hover, .reading-list a:hover { background: #fff7dc; border-color: #b58c24; }
.route-cards h3, .person-card h3, .session-choice h3, .reading-list h3 {
  font: 600 23px/1.18 var(--sans); letter-spacing: -.035em; margin: 5px 0;
}
.route-cards p, .person-card p:not(.guide-kicker), .session-choice p:not(.guide-kicker), .reading-list p { color: var(--ink-2); line-height: 1.5; }
.route-arrow { position: absolute; right: 18px; top: 20px; color: var(--mark); font-size: 24px; }
.guide-section .lesson-photos { margin-block: 22px 16px; }
.guide-section .lesson-photos__frame { border-radius: 10px; }
.guide-section .lesson-photos figcaption { min-height: auto; border: 0; padding: 10px 0; line-height: 1.4; }
.person-card { display: grid; grid-template-columns: minmax(68px, 30%) minmax(0, 1fr); align-items: center; gap: 18px; }
.person-card > img { display: block; width: 100%; aspect-ratio: 4/5; height: auto; object-fit: cover; border-radius: 8px; }
.card-action { display: inline-block; margin-top: 12px; }
.visit-grid { display: grid; gap: 28px; align-items: start; }
.visit-grid h2 + p, .mynah-aside h2 + p, .guide-section h2 + .guide-lead { margin-top: 12px; }
.visit-grid p, .visit-grid address, .mynah-aside p { line-height: 1.55; max-width: 52ch; }
.visit-grid address { margin-top: 12px; font-style: normal; }
.visit-grid > div > .text-link, .mynah-aside .text-link { display: inline-block; margin-top: 13px; }
.guide-facts { margin-top: 16px; }
.guide-facts > div { display: grid; grid-template-columns: minmax(78px, 26%) 1fr; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--frame); }
.guide-facts dt { font-weight: 600; }
.guide-facts dd { margin: 0; line-height: 1.5; }
.guide-faq { border-top: 1px solid var(--frame); }
h2 + .guide-faq { margin-top: 20px; }
.guide-faq details, .result-details { border-bottom: 1px solid var(--frame); }
.guide-faq summary, .result-details summary, .article-jump summary { cursor: pointer; padding: 15px 0; font-weight: 600; }
.guide-faq summary::marker, .result-details summary::marker { color: var(--mark); }
.guide-faq details p, .guide-faq details ul { margin: 0 0 16px; font-size: 16px; line-height: 1.55; }
.guide-faq details ul { padding-left: 22px; }
.guide-invite { display: grid; grid-template-columns: 80px minmax(0,1fr); align-items: center; gap: 14px 18px; border-radius: 14px; padding: clamp(20px, 3.4vw, 48px); background: #ffe78d; }
.guide-invite .mascot { width: 100%; }
.guide-invite h2 { font-size: clamp(25px, 2.85vw, 38px); }
.guide-invite p { max-width: 55ch; margin-top: 8px; line-height: 1.5; }
.guide-invite .btn { grid-column: 1/-1; justify-self: start; }
.guide-ending { padding-block: clamp(28px, 4.5vw, 60px); }
.session-choice { display: flex; flex-direction: column; align-items: start; gap: 10px; }
.session-choice h3 { font-size: 29px; margin: 0; }
.session-choice .text-link { margin-top: auto; padding-top: 8px; }
.guide-portrait { position: relative; width: min(75%, 275px); margin: 0 auto; }
.guide-portrait > img:first-child { display: block; width: 100%; height: auto; border-radius: 9px 45px 9px 9px; }
.guide-portrait .mascot { position: absolute; width: 28%; bottom: -3px; right: -12%; }
.guide-illustration { display: grid; place-items: center; }
.guide-illustration .mascot { max-height: 225px; max-width: 80%; width: auto; }
.mynah-aside { display: flex; align-items: center; gap: 24px; }
.mynah-aside .mascot { width: clamp(74px, 12vw, 145px); }
.result-details { max-width: 68ch; margin-top: 16px; }
.result-details .tutor-result { margin-bottom: 20px; }
.reading-list { margin-top: 20px; }
.reading-list a { display: flex; justify-content: space-between; gap: 16px; align-items: center; color: var(--ink); padding: 15px 4px; border-bottom: 1px solid var(--frame); text-decoration: none; }
.reading-list a > span { color: var(--mark); }
.reading-list h3 { font-size: 20px; }
.article-jump { margin-block: 16px 24px; border-block: 1px solid var(--frame); }
.article-jump summary { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.article-jump summary::after { content: '+'; color: var(--mark); margin-left: auto; font-size: 21px; }
.article-jump[open] summary::after { content: '−'; }
.article-jump summary .mascot { width: 44px; }
.article-jump ul { margin: 0 0 16px; padding-left: 22px; }
.privacy-shortcuts { display: flex; gap: 10px 22px; flex-wrap: wrap; margin: 16px 0; }
@media (min-width: 600px) {
  .route-cards, .session-grid, .person-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-grid:has(> :only-child) { grid-template-columns: minmax(0, 570px); }
  .guide-invite { grid-template-columns: 95px minmax(0,1fr) auto; }
  .guide-invite .btn { grid-column: auto; }
}
@media (min-width: 760px) {
  .guide-hero__grid { grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); gap: clamp(28px,5vw,84px); }
  .visit-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px,7vw,96px); }
  .visit-grid > .guide-facts { margin-top: 0; }
}
@media (max-width: 1023px) {
  .nav__inner { gap: 8px; }
  .nav__inner .nav__cta { margin-left: auto; font-size: 14px; padding: 9px 12px; }
  .nav__inner .wordmark img { width: clamp(108px, 32vw, 166px); }
  .nav__toggle { width: 35px; margin: 0; }
}
@media (max-width: 599px) {
  .guide-hero__grid { gap: 18px; }
  .guide-hero h1 { font-size: clamp(38px, 9vw, 48px); }
  .workbook { width: min(100%, 340px); }
  .workbook__sun { height: 90px; }
  .workbook__sun::before { width: 115px; }
  .guide-illustration .mascot { max-height: 100px; }
  .guide-section .lesson-photos { grid-template-columns: 1fr; gap: 12px; }
  .guide-section .lesson-photos__item { grid-column: auto; display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 14px; }
  .guide-section .lesson-photos__frame { width: 86px; aspect-ratio: 1.3; }
  .guide-kicker { font-size: 11px; }
  .person-card, .session-choice, .route-cards a { padding: 16px; }
  .route-cards a { padding-right: 39px; }
  .guide-invite { grid-template-columns: 56px 1fr; }
}
.workbook__math--steps { flex-direction: column; }

.chooser-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.chooser-title .mascot { width: clamp(48px, 6vw, 78px); }
.enq__media .mascot { width: min(85%, 210px); margin: auto; }
.enq__actions [hidden] { display: none; }

/* A continuous picture story with one shared ribbon length. */
.m4-studio { background: #fff7dc; padding: clamp(26px, 4vw, 56px) 0 clamp(34px, 4.5vw, 66px); border-bottom: 1px solid var(--frame); }
.m4-studio__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 28%); align-items: center; gap: 24px; }
.m4-studio h1 { margin: 10px 0 16px; font: 650 clamp(42px, 5.7vw, 76px)/1 var(--sans); letter-spacing: -.06em; }
.m4-question { max-width: 40ch; color: var(--ink-2); font: 400 clamp(17px, 1.8vw, 23px)/1.45 var(--sans); }
.m4-question strong { color: var(--ink); font-weight: 550; }
.m4-reel { position: relative; margin: 0; padding-top: 70px; width: min(100%, 285px); justify-self: center; }
.m4-reel .mascot { position: absolute; width: 49%; top: 17px; left: 36%; transform: rotate(3deg); }
.m4-reel svg { display: block; width: 100%; }
.m4-reel figcaption { text-align: center; margin-top: -6px; font: 500 14px/1.3 var(--mono); }
.m4-length { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 0; margin: 20px 0 15px; border: 0; }
.m4-length[hidden] { display: none; }
.m4-length legend { float: left; padding: 0; font-size: 15px; font-weight: 600; }
.m4-length > div { display: flex; background: var(--paper-2); border: 1px solid #bcad8b; border-radius: 9px; padding: 2px; }
.m4-length label { position: relative; cursor: pointer; }
.m4-length input, .m4-accessible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.m4-length label span { display: grid; place-items: center; min-height: 40px; padding: 0 10px; font: 500 13px/1.2 var(--mono); border-radius: 6px; }
.m4-length input:checked + span { color: var(--paper-2); background: var(--ink); }
.m4-length input:focus-visible + span { outline: 3px solid var(--mark); outline-offset: 2px; }
.m4-frames { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 20px 0 0; padding: 0; }
.m4-frames li { display: flex; flex-direction: column; min-width: 0; padding: 16px 14px 14px; border: 1px solid #c7bda7; border-radius: 5px 15px 5px 5px; background: #fffdf7; box-shadow: 2px 3px 0 #e8dbae; }
.m4-frames h2 { display: flex; align-items: center; gap: 8px; font: 600 clamp(18px, 1.8vw, 23px)/1.16 var(--sans); letter-spacing: -.04em; }
.m4-frames h2 span { display: grid; place-items: center; width: 23px; height: 23px; flex-shrink: 0; border-radius: 50%; color: var(--ink); background: #ffe18a; font: 600 12px/1 var(--mono); }
.m4-frames li > p { margin: auto 0 0; padding-top: 10px; border-top: 1px solid #dfd8c6; color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.m4-scene { display: block; width: 100%; margin: 8px auto; }
.m4-full, .m4-extra, .m4-scissors { stroke: #342d22; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.m4-full { fill: #ffd34d; }
.m4-extra { fill: #f4aa97; }
.m4-dash { stroke: #8b6854; stroke-width: 1.5; stroke-dasharray: 3 3; }
.m4-arrow, .m4-tick { fill: none; stroke: var(--mark); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.m4-tick { stroke-width: 3.2; }
.m4-digit, .m4-equation, .m4-check-maths, .m4-factor { font: 500 16px var(--mono); fill: var(--ink); }
.m4-digit, .m4-equation { text-anchor: middle; }
.m4-equation, .m4-factor { fill: var(--mark); }
.m4-check-maths { font-size: 16px; }
.m4-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.m4-mini a { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; min-width: 0; padding: 8px; border: 1px solid var(--frame); border-radius: 9px; background: var(--paper-2); color: var(--ink); font-weight: 600; text-decoration: none; }
.m4-mini a:hover, .m4-mini a:focus-visible { border-color: var(--mark); }
.m4-mini img { display: block; width: 52px; height: auto; }
@media (max-width: 999px) { .m4-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); } .m4-scene { max-width: 260px; } }
@media (max-width: 640px) {
  .m4-studio__head { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .m4-studio h1 { font-size: clamp(39px, 8vw, 52px); margin-block: 8px 12px; }
  .m4-reel { width: 180px; padding-top: 32px; }
  .m4-reel .mascot { width: 43%; left: 38%; top: 7px; }
  .m4-reel figcaption { font-size: 12px; }
  .m4-length { flex-wrap: wrap; gap: 6px 10px; margin-top: 14px; }
  .m4-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m4-mini img { width: 38px; }
}
@media (max-width: 520px) {
  .m4-frames { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .m4-frames li { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); column-gap: 6px; align-items: center; padding: 12px; }
  .m4-frames li h2 { display: block; align-self: end; font-size: 18px; }
  .m4-frames h2 span { margin-bottom: 6px; }
  .m4-frames li > p { align-self: start; margin: 4px 0 0; border: 0; padding: 0; font-size: 14px; }
  .m4-scene { grid-column: 2; grid-row: 1 / 3; margin: 0; }
}
@media (max-width: 360px) {
  .m4-frames li { display: flex; align-items: stretch; }
  .m4-frames li h2 { display: flex; align-self: stretch; }
  .m4-frames h2 span { margin: 0; }
  .m4-frames li > p { align-self: stretch; }
  .m4-mini a { font-size: 14px; }
}

.guide-section .guide-kicker + h2 { margin-top: 8px; }
.m4-values-heading { font: 600 22px/1.15 var(--sans); letter-spacing: -.035em; }
.m4-dimensions { margin: 0; }
.m4-dimensions > div { border-bottom: 1px solid var(--frame); padding: 11px 0; }
.m4-dimensions > div:first-child { padding-top: 0; }
.m4-dimensions dt { font-weight: 600; }
.m4-dimensions dd { margin: 3px 0 0; line-height: 1.48; color: var(--ink-2); }
.m4-values { margin: 15px 0 0; padding-left: 19px; }
.m4-values li { margin-bottom: 9px; line-height: 1.48; }
.m4-values li::marker { color: var(--mark); }
#values p + p { margin-top: 10px; }

/* Homepage tutors: three matching cards. Photo on top, same parts in the same order,
   key fact and link pinned to the bottom so every card lines up. */
.person-fact { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--frame); font-size: 15px; line-height: 1.45; color: var(--ink) !important; }
.person-fact span { display: block; margin-bottom: 4px; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
@media (min-width: 600px) {
  .person-grid--team { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 860px) {
  /* Each card spans the same six shared rows (photo, role, name, bio, fact, link),
     so every divider, label and link lines up across the cards. */
  .person-grid--team { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; column-gap: 16px; row-gap: 0; }
  .person-grid--team .person-card { display: grid; grid-row: span 6; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); align-items: start; row-gap: 8px; }
  .person-grid--team .person-card > div { display: contents; }
  .person-grid--team .person-card > img { aspect-ratio: 1 / 1; object-position: center 20%; margin-bottom: 8px; }
  .person-grid--team .person-fact { align-self: stretch; }
  .person-grid--team .card-action { margin-top: 4px; }
  /* Class pages: cards without a key fact use five rows, and a pair sits two across. */
  .person-grid--team .person-card:not(:has(.person-fact)) { grid-row: span 5; }
  .person-grid--team:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
}
@media (max-width: 859px) {
  .person-grid--team .person-card { align-items: start; }
  .person-grid--team .person-card > div { display: flex; flex-direction: column; gap: 8px; }
}
.person-grid--team .person-card > div > * { margin: 0; }

/* Profile pages: space consecutive paragraphs and the numbered "how" rows the same way everywhere. */
.guide-hero__copy .guide-lead + .body-l, .guide-hero__copy .body-l + .body-l { margin-top: 14px; }
.visit-grid p + p, .guide-section .guide-lead + p { margin-top: 12px; }
.guide-section .how { margin-top: clamp(28px, 3.2vw, 44px); }
.guide-section h2 + .how, .guide-section .guide-lead + .how { margin-top: clamp(28px, 3.2vw, 44px); }
