:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a2233;
  --muted: #5b6478;
  --accent: #1d3a8f;
  --accent-contrast: #ffffff;
  --border: #e1e3ea;
  --warn-bg: #faeab4;
  --warn-border: #9c7016;
  --warn-text: #5c4405;
  --info-bg: #dbe6f7;
  --info-border: #3a63ad;
  --info-text: #16305c;
  --max: 68rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10131c;
    --surface: #181c28;
    --text: #e8eaf0;
    --muted: #9aa3b5;
    --accent: #6d8fe8;
    --accent-contrast: #0c1424;
    --border: #2a2f3e;
    --warn-bg: #3d3018;
    --warn-border: #8a7233;
    --warn-text: #f2dda2;
    --info-bg: #182742;
    --info-border: #3d5f9c;
    --info-text: #b7cbf2;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-left: auto; }
.site-header nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.35rem 0.7rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--text); background: var(--bg); }
.site-header nav a[aria-current] { color: var(--accent); font-weight: 600; }

main { padding: 2rem 1.25rem 4rem; }

/* Hero + stats */
.hero { padding: 2rem 0 1rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin: 0 0 0.5rem; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 46rem; }
.stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 2rem; }
.stats a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1.1rem;
  text-decoration: none;
  color: var(--muted);
}
.stats a strong { color: var(--text); font-size: 1.3rem; margin-right: 0.35rem; }
.stats a:hover { border-color: var(--accent); }

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: var(--text);
}
.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; line-height: 1.35; }
.card p { margin: 0.25rem 0 0; font-size: 0.92rem; color: var(--muted); }
.card .meta { color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.card .badge {
  display: inline-block;
  border: 1px solid;
  border-radius: 999px;
  padding: 0.05rem 0.6rem;
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.card .badge-warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }
.card .badge-info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }

/* Standing notice — a course closing to new enrolments or not yet launched,
   and anything else a reader has to see before the facts around it. "warn" is
   something being taken away; "info" is something not available yet. */
.callout {
  border: 1px solid;
  border-left-width: 4px;
  border-radius: 0.75rem;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
}
.callout-warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }
.callout-info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.callout p { margin: 0.6rem 0 0; font-size: 0.95rem; }
.callout .callout-title { margin: 0; font-weight: 700; font-size: 1rem; }
.callout .small { color: inherit; opacity: 0.8; }
.callout a { color: inherit; }

/* Provenance block on the home page: where the data comes from. Quieter than
   a callout — it's reassurance, not a warning. */
.trust {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.trust p { margin: 0 0 0.8rem; }
.trust p:last-child { margin-bottom: 0; }

/* A provider's own claim about its T Level offer, quoted from its website by
   the enrichment pipeline (scripts/enrich-provider-tlevels.mjs). Boxed like a
   quote, not a fact — kept visually distinct from .facts, which is DfE data. */
.provider-claim {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
  background: var(--surface);
}
.provider-claim p { margin: 0.5rem 0; }
.provider-claim p:first-child { margin-top: 0; }
.provider-claim blockquote {
  border-left: 3px solid var(--accent);
  margin: 0.75rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--muted);
  font-style: italic;
}

/* Deliberately visually distinct from .provider-claim above — dashed, not
   solid, and no accent-coloured elements — this is one anonymous forum
   post, a full trust tier below either the DfE data or a provider's own
   website, and it should read that way at a glance, not just in the small
   print. */
.community-mention {
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
}
.community-mention p { margin: 0.5rem 0; }
.community-mention p:first-child { margin-top: 0; font-style: italic; }

/* Highest-trust of the three tiers — a solid accent-coloured left border
   (stronger than .provider-claim's plain border) for DfE-vetted, consented,
   real-name content. */
.case-study {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0.75rem;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
  background: var(--surface);
}
.case-study p { margin: 0.5rem 0; }
.case-study p:first-child { margin-top: 0; }
.case-study blockquote {
  margin: 0.75rem 0;
  padding: 0;
  font-size: 1.05rem;
}
.case-study cite {
  display: block;
  margin-top: 0.4rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Consent banner. Bottom-docked rather than a modal overlay: it must not trap
   focus or block reading, and the ICO's guidance is satisfied by giving reject
   the same prominence as accept — which here means literally the same styling,
   not a greyed-out secondary. */
.cc {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgb(0 0 0 / 0.08);
}
.cc[hidden] { display: none; }
.cc-inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
}
.cc-inner p { margin: 0; font-size: 0.9rem; flex: 1 1 22rem; }
.cc-inner p:first-child { flex: 0 0 auto; }
.cc-actions { display: flex; gap: 0.6rem; flex: 0 0 auto; }
.cc-actions button {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 1.4rem;
  border-radius: 0.5rem;
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
}
.cc-actions button:hover { background: var(--accent); color: var(--surface); }
.cc-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Detail pages */
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
}
.facts div { margin: 0; }
.facts dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.facts dd { margin: 0.1rem 0 0; font-weight: 600; }

/* Article prose */
.prose { max-width: 44rem; }
.prose h1 { line-height: 1.25; letter-spacing: -0.02em; }
.prose h2 { margin-top: 2rem; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--muted);
}
.prose code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.9em;
}
.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.prose th,
.prose td {
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.prose th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.prose td + td, .prose th + th { text-align: right; white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose ul { padding-left: 1.25rem; }
.prose ul li { margin-bottom: 0.5rem; }

.small { font-size: 0.85rem; color: var(--muted); }

/* Primary action link */
a.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
}
a.button:hover { opacity: 0.9; }
.meta-line { color: var(--muted); margin-top: -0.5rem; font-size: 0.95rem; }

/* Chips (career roles, specialisms, regions) */
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 1.5rem; }
.chips li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.9rem;
}
.chips li a { text-decoration: none; }
.chips li:has(a):hover { border-color: var(--accent); }

/* Count badges on headings/summaries */
.count {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
  vertical-align: middle;
}

/* Collapsible core-content / specialism lists */
details.ksb {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  margin: 0.75rem 0;
  padding: 0;
}
details.ksb summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.8rem 1.2rem;
  list-style-position: inside;
}
details.ksb[open] summary { border-bottom: 1px solid var(--border); }
details.ksb ul { margin: 0.75rem 0; padding: 0 1.25rem 0.5rem 2.5rem; }
details.ksb li { margin-bottom: 0.5rem; font-size: 0.95rem; }

/* Ad slots. min-height reserves the space before the ad arrives: without it the
   article jumps down when the unit fills, which is both a Core Web Vitals hit
   and the main cause of accidental clicks. Keep the label — an ad that reads as
   editorial is an AdSense policy problem. Inert today (ADSENSE.publisherId is
   blank), kept ready for when it isn't. */
.ad {
  display: block;
  margin: 2rem 0;
  padding: 0;
  max-width: 44rem;
  min-height: 280px;
  overflow: hidden;
  clear: both;
}
.ad-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.ad .adsbygoogle { display: block; width: 100%; }
@media (max-width: 30rem) {
  .ad { min-height: 250px; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0.75rem 0;
}
.legal-nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.legal-nav a:hover { color: var(--accent); text-decoration: underline; }
