/* ==========================================================================
   Client corrections, 16 Nov 2026 — shared styles for:
     .dph        compact page header (Current Affairs, Downloads, Blog, Quiz,
                 What's New): the listing opens straight away
     .di-cover   front covers, with a branded cover when none is uploaded
     .cx-        cover cards (Current Affairs, What's New), month chips, pager
     .pl-cover   front covers on the Downloads rows
     .hres-/.hmo home: Quiz, Current Affairs and Downloads cards; motion band
     .hr-board--light  the results figures: white ground, blue numbers
     .hg-fig     GTO figure labels 6.1 / 6.2
     .mou-card--logo   MoU school logos (no photographs)
     .shell-ticker--news  What's New in the strip under the header
   Mobile first; nothing here needs JavaScript. Loaded on every page
   (includes/header.php), after shell-plus.css.
   ========================================================================== */
:root {
  --cx-navy: #0b2140;
  --cx-navy-900: #08172f;
  --cx-blue: #1550a8;
  --cx-blue-600: #1d5fc4;
  --cx-gold: #c9a043;
  --cx-ink: #0f1d33;
  --cx-ink-2: #45556b;
  --cx-line: #dfe5ee;
  --cx-tint: #f3f6fb;
  --cx-radius: 10px;
}

/* --- Compact page header ---------------------------------------------------- */
.dph {
  position: relative; isolation: isolate;
  padding: calc(4.5rem + 1.75rem) 0 1.5rem;
  background: linear-gradient(180deg, #06111f 0%, var(--cx-navy-900) 70%, #0a1d39 100%);
  color: #fff;
}
.shell-header.has-ticker ~ main .dph { padding-top: calc(4.5rem + 3.3rem + 1.5rem); }
@media (min-width: 768px) {
  .dph { padding-bottom: 1.85rem; }
  .shell-header.has-ticker ~ main .dph { padding-top: calc(4.5rem + 3.75rem + 1.75rem); }
}
.dph::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--cx-gold), transparent 70%); }
.dph-inner { display: grid; gap: 0.6rem; }
.dph-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.dph-title { margin: 0; font-family: var(--font-display, Manrope, sans-serif); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.6rem); color: #fff; }
.dph-meta { margin: 0; font-size: 0.85rem; font-weight: 700; color: #f2d58a; }
.dph-lead { margin: 0; max-width: 46rem; font-size: 0.98rem; line-height: 1.55; color: #c9d6e6; }
.dph + .dx-section, .dph + section { padding-top: clamp(1.25rem, 3vw, 2rem); }

/* --- Covers ------------------------------------------------------------------ */
.di-cover { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; background: var(--cx-navy); }
.di-cover picture { display: block; width: 100%; height: 100%; }
.di-cover img.di-cover-img, .di-cover picture img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.di-cover--brand {
  display: grid; align-content: center; justify-items: center; gap: 0.35rem; padding: 1rem; text-align: center; color: #fff;
  background:
    radial-gradient(120% 90% at 85% 0%, rgb(201 160 67 / 0.28), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgb(29 95 196 / 0.45), transparent 60%),
    linear-gradient(160deg, #0d2a52 0%, var(--cx-navy-900) 100%);
}
.di-cover-crest { width: 3rem; height: 3rem; opacity: 0.95; }
.di-cover-kind { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #f2d58a; }
.di-cover-title { font-family: var(--font-display, Manrope, sans-serif); font-weight: 800; font-size: 0.95rem; line-height: 1.25; max-width: 18rem; }

/* --- Cover cards (Current Affairs, What's New) ---------------------------------- */
.cx-months { display: flex; gap: 0.5rem; margin: 0 0 1rem; padding: 0 0 0.35rem; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cx-month {
  flex: none; display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0.45rem 0.95rem; border-radius: 999px;
  border: 1px solid var(--cx-line); background: #fff; color: var(--cx-blue); font-size: 0.86rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.cx-month:hover { border-color: var(--cx-blue); }
.cx-month[aria-current="true"] { background: var(--cx-blue); border-color: var(--cx-blue); color: #fff; }
.cx-month:focus-visible { outline: 3px solid var(--cx-gold); outline-offset: 2px; }
.cx-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .cx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; } }
@media (min-width: 1024px) { .cx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; } }
@media (min-width: 1280px) { .cx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cx-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); overflow: hidden; background: #fff; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.cx-card:hover { box-shadow: 0 16px 34px -22px rgb(11 33 64 / 0.55); transform: translateY(-2px); }
.cx-card:hover .di-cover-img, .cx-card:hover .di-cover picture img { transform: scale(1.03); }
.cx-card-media { display: block; aspect-ratio: 16 / 10; }
.cx-card-body { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; padding: 0.95rem 1rem 1rem; }
.cx-card-kicker { margin: 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cx-blue); }
.cx-card-title { margin: 0; font-family: var(--font-display, Manrope, sans-serif); font-size: 1.05rem; font-weight: 800; line-height: 1.3; color: var(--cx-ink); }
.cx-card-title a { color: inherit; text-decoration: none; }
.cx-card-title a:hover { color: var(--cx-blue); text-decoration: underline; text-underline-offset: 3px; }
.cx-card-text { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--cx-ink-2); }
.cx-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: auto 0 0; padding-top: 0.6rem; border-top: 1px solid var(--cx-line); font-size: 0.8rem; color: var(--cx-ink-2); }
.cx-card-go { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.5rem; font-weight: 800; color: var(--cx-blue); text-decoration: none; }
.cx-card-go:hover { text-decoration: underline; text-underline-offset: 3px; }
.dx-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1.75rem; }

/* --- Downloads: front covers on the rows ---------------------------------------- */
.pl-row--cover { align-items: stretch; }
.pl-cover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; flex: none; }
.pl-cover-ext { position: absolute; left: 0.5rem; bottom: 0.5rem; padding: 0.15rem 0.45rem; border-radius: 4px; background: rgb(8 23 47 / 0.85); color: #fff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; }
.pl-cover .di-cover-title { font-size: 0.85rem; }
@media (min-width: 768px) {
  .pl-row.pl-row--cover { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: 1.1rem; }
  .pl-cover { aspect-ratio: 3 / 4; height: 100%; max-height: 11rem; }
  .pl-cover .di-cover-crest { width: 2rem; height: 2rem; }
  .pl-cover .di-cover-title { display: none; }
  .pl-row--cover .pl-actions { grid-column: auto; align-self: center; }
}
@media (max-width: 767px) {
  .pl-row.pl-row--cover { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.85rem; padding: 1rem; }
  .pl-row--cover .pl-actions { grid-column: auto; }
  .pl-row--cover .pl-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .pl-row--cover .pl-actions .dx-btn { flex: 1 1 8rem; justify-content: center; min-height: 2.75rem; }
}

/* --- Home: Quiz, Current Affairs, Downloads ---------------------------------------- */
.hres { padding: clamp(3.5rem, 8vw, 6rem) 0 0; background: #fff; }
.hres-head { max-width: 44rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.hres-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .hres-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; } }
.hres-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); overflow: hidden; background: #fff; }
.hres-media { display: block; aspect-ratio: 16 / 10; }
.hres-body { display: flex; flex-direction: column; gap: 0.45rem; flex: 1; padding: 1rem 1.1rem 1.15rem; }
.hres-kind { margin: 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-gold); }
.hres-title { margin: 0; font-family: var(--font-display, Manrope, sans-serif); font-size: 1.12rem; font-weight: 800; line-height: 1.3; color: var(--cx-ink); }
.hres-title a { color: inherit; text-decoration: none; }
.hres-text { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--cx-ink-2); }
.hres-cta {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; min-height: 2.9rem;
  padding: 0.65rem 0.9rem 0.65rem 1rem; border-radius: 8px; background: var(--cx-blue); color: #fff; font-weight: 800; font-size: 0.95rem; text-decoration: none;
  transition: background-color 0.2s ease;
}
.hres-cta:hover { background: var(--cx-navy); }
.hres-cta:focus-visible { outline: 3px solid var(--cx-gold); outline-offset: 2px; }
.hres-arrow { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: rgb(255 255 255 / 0.16); transition: transform 0.2s ease; }
.hres-cta:hover .hres-arrow { transform: translateX(3px); }

/* The motion band under the downloads: a quiet line of what is practised here. */
.hmo { position: relative; margin-top: clamp(2.5rem, 5vw, 4rem); padding: 1.05rem 0; overflow: hidden; background: var(--cx-navy-900); }
.hmo-line { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--cx-gold), #5b8fe0, var(--cx-gold), transparent); background-size: 200% 100%; animation: hmo-sweep 6s linear infinite; }
.hmo-track { display: flex; width: max-content; animation: hmo-run 38s linear infinite; }
.hmo-list { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }
.hmo-list li { display: inline-flex; align-items: center; gap: 1.25rem; padding: 0 1.25rem; font-family: var(--font-display, Manrope, sans-serif); font-weight: 800; font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.25rem); color: #fff; white-space: nowrap; letter-spacing: 0.01em; }
.hmo-list li::after { content: ""; width: 0.45rem; height: 0.45rem; transform: rotate(45deg); background: var(--cx-gold); }
@keyframes hmo-run { to { transform: translateX(-50%); } }
@keyframes hmo-sweep { to { background-position: -200% 0; } }

/* --- Results figures: white ground, blue numbers ------------------------------------ */
.hr-board.hr-board--light {
  background: #fff; color: var(--cx-blue); border: 1px solid var(--cx-line); border-radius: var(--cx-radius);
  box-shadow: 0 18px 40px -30px rgb(11 33 64 / 0.45); padding: clamp(1.1rem, 2.6vw, 2rem);
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem;
}
@media (min-width: 900px) { .hr-board.hr-board--light { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hr-board.hr-board--light::after { display: none; }
.hr-board.hr-board--light li { border-left: 3px solid var(--cx-blue); padding-left: 0.85rem; min-width: 0; }
.hr-board.hr-board--light strong { background: none; -webkit-text-fill-color: currentColor; -webkit-background-clip: initial; background-clip: initial; color: var(--cx-blue); font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.6rem); overflow-wrap: anywhere; }
.hr-board.hr-board--light span { color: var(--cx-navy); font-weight: 700; }

/* --- GTO figure labels -------------------------------------------------------------- */
.hg-fig { position: relative; margin: 0; width: 100%; height: 100%; }
.hg-fig-label {
  position: absolute; left: 0.6rem; bottom: 0.6rem; display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.3rem 0.6rem 0.3rem 0.35rem; border-radius: 6px; background: rgb(8 23 47 / 0.86); color: #fff; font-size: 0.78rem; font-weight: 700;
}
.hg-fig-no { padding: 0.1rem 0.4rem; border-radius: 4px; background: var(--cx-gold); color: var(--cx-navy-900); font-weight: 800; font-variant-numeric: tabular-nums; }

/* --- MoU school logos ----------------------------------------------------------------- */
.mou-card--logo .mou-card-logo { background: #fff; padding: 1.25rem; display: grid; place-items: center; border-bottom: 1px solid var(--cx-line); }
.mou-card--logo .mou-card-logo img { width: auto; height: auto; max-width: 70%; max-height: 100%; object-fit: contain; }
.mou-card-crest { gap: 0.4rem; background: linear-gradient(160deg, #0d2a52, var(--cx-navy-900)); }
.mou-card-crest span { font-family: var(--font-display, Manrope, sans-serif); font-weight: 800; font-size: 1.4rem; letter-spacing: 0.06em; color: #f2d58a; }

/* --- What's New in the strip -------------------------------------------------------------- */
.shell-ticker-chip { flex: none; padding: 0.12rem 0.5rem; border-radius: 4px; background: rgb(201 160 67 / 0.18); color: #f2d58a; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

/* --- Footer: addresses open the map ------------------------------------------------------- */
.shell-footer-map { color: inherit; text-decoration: none; }
.shell-footer-map:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .hmo-track, .hmo-line { animation: none; }
  .hmo { overflow-x: auto; }
  .cx-card, .di-cover-img, .hres-arrow { transition: none; }
}
