/* Primary (/curriculum/best-primary-school-selangor/) only: linked after pages.css by the page's front matter
   "css": ["p-curriculum--best-primary-school-selangor"]. AEO package Phase 3, 18 Nov 2026 (author a1; round-2 rework
   w2b). Tokens from style.css. */

/* phase2-lessons 10: each FAQ question is an h3 inside its summary; it looks exactly like the summary did */
.faq-item summary h3 { flex: 1; margin: 0; font: inherit; color: inherit; letter-spacing: inherit; }

/* the banner: on a phone the crop keeps her face and writing hand (Design 6); the wash under the crumbs and kicker is
   deep enough for 4.5:1 at 390, 768 and 1440 (round 2, measured with PIL on fresh screenshots) */
.phero .crumbs li:last-child { color: rgba(251, 248, 242, .8); }
.phero::before {
  background: linear-gradient(to top, rgba(7, 39, 36, .95) 0%, rgba(7, 39, 36, .7) 40%, rgba(7, 39, 36, .5) 66%, rgba(7, 39, 36, .62) 100%),
              linear-gradient(90deg, rgba(7, 39, 36, .84) 0%, rgba(7, 39, 36, .62) 46%, rgba(7, 39, 36, .12) 76%, transparent 90%);
}
@media (max-width: 760px) {
  .phero__img img { object-position: 29% 50%; }
  .phero::before { background: linear-gradient(to top, rgba(7, 39, 36, .96) 0%, rgba(7, 39, 36, .84) 55%, rgba(7, 39, 36, .8) 80%, rgba(7, 39, 36, .68) 100%); }
}

/* the twelve subject tiles in their four groups, each group's label (gold) and what children do above its tiles:
   6 columns at 1440 (3 + 3, then 2 + 4), one group a row below 1181px, two tiles a row on a phone (Design 4) */
.sgroups { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(36px, 4vw, 52px) 16px; }
.sgroup { display: flex; flex-direction: column; }
.sgroup--2 { grid-column: span 2; }
.sgroup--3 { grid-column: span 3; }
.sgroup--4 { grid-column: span 4; }
.sgroup__label { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 700 12.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); }
.sgroup__label::before { content: ""; width: 28px; height: 2px; background: var(--gold); flex: none; }
.sgroup__what { margin: 0 0 18px; max-width: 46ch; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.sgroup .subjects { margin-top: auto; }
.sgroup--2 .subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sgroup--3 .subjects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sgroup--4 .subjects { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) {
  .sgroups { grid-template-columns: minmax(0, 1fr); }
  .sgroup--2, .sgroup--3, .sgroup--4 { grid-column: auto; }
  .sgroup .subjects, .sgroup--2 .subjects, .sgroup--3 .subjects { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sgroup .subjects, .sgroup--2 .subjects, .sgroup--3 .subjects, .sgroup--4 .subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the Checkpoint chapter: a tall photo of a pupil at work and Cambridge's own note under it fill the column beside the
   four steps (no empty gutter, Design 1) */
#checkpoint .duo__text .steps { margin-top: 30px; }
.cp-side { display: grid; gap: 24px; }
.cp-side .duo__img img { aspect-ratio: 4 / 5; object-position: 50% 40%; }
.cp-note { background: var(--paper); }
.cp-note p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }

/* a photo with its own short caption under it (the campus, from its photo folder) */
.duo__cap { margin: 0; }
.duo__cap figcaption { margin-top: 12px; font: 600 12.5px/1.4 var(--sans); letter-spacing: .04em; color: var(--muted); }
.sec--pine .duo__cap figcaption { color: rgba(251, 248, 242, .78); }

/* "beyond the textbook": a link inside a named tick stays readable */
.ticks--named a { color: var(--pine); font-weight: 600; }

/* parents' words: three cards of one height in one row (Design 8), one column on a phone */
.reviews--even { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.reviews--even .review { margin: 0; display: flex; flex-direction: column; justify-content: space-between; }
@media (max-width: 960px) { .reviews--even { grid-template-columns: minmax(0, 1fr); } }

/* the FAQ head carries the visit lines (the tour below is the one close, Design 3) */
.faq__head p + p { margin-top: 14px; }

/* the gallery captions: a deeper band under the gold campus labels over white tables and bright rooms (Design 9) */
.g figcaption { padding-top: 56px; background: linear-gradient(to top, rgba(7, 39, 36, .94) 0%, rgba(7, 39, 36, .8) 55%, transparent 100%); }

/* the ESL card: the crop shows the two students' faces and their work, not the tops of their heads (Design 5) */
.next a[href="/best-esl-programme-in-selangor/"] img { object-position: 50% 90%; }

/* No empty cell beside a group's last tile (19 Nov 2026, with the speed pass; the render check's "dead cell" at
   360-1180 px): where a group does not fill its row, its last tile runs two columns wide.
   4 columns (761-1180 px): a three-tile group's last tile fills to the row's height beside its two squares; the
   two-tile group's tiles are both 2:1. 2 columns (phones): a three-tile group's last tile is a 2:1 row of its own. */
@media (min-width: 761px) and (max-width: 1180px) {
  .sgroup--3 .subject:last-child { grid-column: span 2; display: flex; flex-direction: column; }
  .sgroup--3 .subject:last-child img { flex: 1 1 0; min-height: 0; aspect-ratio: auto; }
  .sgroup--2 .subject { grid-column: span 2; }
  .sgroup--2 .subject img { aspect-ratio: 2 / 1; }
}
@media (max-width: 760px) {
  .sgroup--3 .subject:last-child { grid-column: span 2; }
  .sgroup--3 .subject:last-child img { aspect-ratio: 2 / 1; }
}
