/* ==========================================================
   Mission X — main stylesheet

   Desktop sizes are written in "design units" (--u), measured
   from the 1024px-wide mockup. 1u = 1 mockup pixel, scaled to
   the screen width, so the layout keeps the mockup's exact
   proportions on any laptop/desktop. Below 880px the layout
   switches to tablet/phone rules at the bottom of this file.
   ========================================================== */
:root {
  --u: min(calc(100vw / 1024), 1.5px);

  --navy: #14245c;
  --navy-900: #0c1427;
  --orange: #f05a1a;
  --orange-600: #d94c10;
  --orange-50: #fff4ec;
  --orange-100: #fde6d6;
  --blue: #1d4ed8;
  --blue-50: #ecf2fe;
  --blue-100: #dbe6fb;
  --ink: #1f2a44;
  --muted: #4b5568;
  --line: #e8eaef;
  --bg: #f6f7f9;
  --white: #fff;
  --shadow: 0 2px 14px rgba(20, 36, 92, .05);

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-logo: "Montserrat", "Manrope", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--white);
  line-height: 1.4;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Cross-browser baseline (Safari, Chrome/Brave/Edge, Firefox) ---------- */
html {
  -webkit-text-size-adjust: 100%;   /* stop iPhone Safari enlarging text in landscape */
          text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
/* 100vw includes the scrollbar on Windows browsers; clip any 1–2px spill without breaking the sticky header */
body { overflow-x: hidden; }
@supports (overflow-x: clip) { body { overflow-x: clip; } }
/* Same font, colour and box model for form controls in every browser */
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; margin: 0; }
button { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { -webkit-appearance: none; -moz-appearance: none; appearance: none; border-radius: 0; }
input[type=search]::-webkit-search-decoration,
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
select::-ms-expand { display: none; }
input::placeholder { opacity: 1; }        /* Firefox fades placeholders by default */
address { font-style: normal; }
svg { display: inline-block; vertical-align: middle; overflow: visible; }
svg.icon { overflow: hidden; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 600; color: var(--navy); margin: 0; letter-spacing: -0.025em; }
p { margin: 0; }
.icon { flex-shrink: 0; }
.container {
  width: 100%;
  max-width: calc(1024 * var(--u));
  margin: 0 auto;
  padding: 0 calc(40 * var(--u));
}
.accent { color: var(--orange); }
.kicker {
  display: inline-block;
  font-size: calc(10 * var(--u)); font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--orange);
}
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: calc(10 * var(--u));
  height: calc(34 * var(--u)); padding: 0 calc(19 * var(--u));
  background: var(--orange); color: var(--white);
  font-family: var(--font); font-size: calc(12 * var(--u)); font-weight: 600; letter-spacing: 0;
  border: 1px solid var(--orange); border-radius: calc(3 * var(--u));
  cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn .icon { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.btn:hover { background: var(--orange-600); border-color: var(--orange-600); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(240, 90, 26, .25); }
.btn-outline { background: var(--white); color: var(--navy); border-color: #d6d9e1; }
.btn-outline:hover { background: var(--white); color: var(--orange); border-color: var(--orange); box-shadow: none; }
.btn-dark { background: var(--navy-900); border-color: var(--navy-900); }
.btn-dark:hover { background: #000; border-color: #000; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.btn-block { width: 100%; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: calc(1 * var(--u)); }
.logo-mark { height: calc(34 * var(--u)); width: auto; }
/* Footer: black logo shown as white on the dark background */
.logo-mark-light { filter: invert(1); mix-blend-mode: screen; }
.logo-text {
  font-family: var(--font-logo); font-weight: 800;
  font-size: calc(20 * var(--u)); letter-spacing: 0; line-height: 1;
  color: var(--navy);
}
.logo-text span { color: var(--orange); margin-left: .05em; }
.logo-light .logo-text { color: var(--white); }
/* "for UPSC" tagline sitting directly under the wordmark */
/* Absolutely placed so the wordmark keeps its original position */
.logo-words { position: relative; display: inline-flex; }
.logo-tag {
  position: absolute; right: 0; top: 100%; white-space: nowrap;
  font-family: var(--font-logo); font-weight: 600;
  font-size: calc(6 * var(--u)); letter-spacing: .12em; line-height: 1;
  margin: calc(2 * var(--u)) -.12em 0 0; color: var(--navy);
}
.logo-tag b { font-weight: 800; color: var(--orange); }
.logo-light .logo-tag { color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; height: calc(52 * var(--u)); }
.main-nav { display: flex; gap: calc(27 * var(--u)); margin-left: calc(100 * var(--u)); }
.main-nav a {
  position: relative; display: flex; align-items: center; height: calc(52 * var(--u));
  font-size: calc(10 * var(--u)); font-weight: 500; color: var(--ink);
  transition: color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--orange); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(14 * var(--u));
  height: 1.5px; background: var(--orange);
}
.nav-actions { display: flex; align-items: center; gap: calc(33 * var(--u)); margin-left: auto; }
.nav-actions .btn { height: calc(28 * var(--u)); padding: 0 calc(14 * var(--u)); gap: calc(7 * var(--u)); font-size: calc(11 * var(--u)); font-weight: 500; }
.nav-actions .btn .icon { width: calc(11 * var(--u)); height: calc(11 * var(--u)); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(288 * var(--u));
  padding: calc(37 * var(--u)) 0 calc(16 * var(--u));
  background-color: #fbf3e7;
  background-repeat: no-repeat; background-size: auto 100%; background-position: right center;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #fbf3e7 0%, #fbf3e7 41%, rgba(251, 243, 231, 0) 48%);
}
.hero .container { position: relative; }
.hero-copy { max-width: calc(390 * var(--u)); margin-left: calc(20 * var(--u)); }
.hero-copy .kicker { font-size: calc(11.5 * var(--u)); margin-bottom: calc(9 * var(--u)); }
.hero h1 {
  font-size: calc(50 * var(--u)); line-height: .94; font-weight: 600; letter-spacing: -0.028em;
  margin-bottom: calc(11 * var(--u));
}
.hero-copy p {
  font-size: calc(14 * var(--u)); line-height: 1.27; color: var(--ink); letter-spacing: 0;
  max-width: calc(372 * var(--u)); margin-bottom: calc(12 * var(--u));
}
.hero-actions { display: flex; flex-wrap: wrap; gap: calc(16 * var(--u)); }
.hero-actions .btn { min-width: calc(161 * var(--u)); font-size: calc(12 * var(--u)); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(180deg, #fbf3e7, var(--white)); padding: calc(56 * var(--u)) 0 calc(36 * var(--u)); }
.page-hero .container > * { margin-left: calc(20 * var(--u)); }
.page-hero .kicker { font-size: calc(11.5 * var(--u)); margin-bottom: calc(9 * var(--u)); }
.page-hero h1 { font-size: calc(42 * var(--u)); line-height: 1; letter-spacing: -0.03em; margin-bottom: calc(12 * var(--u)); }
.page-hero p { font-size: calc(14.5 * var(--u)); color: var(--muted); max-width: calc(520 * var(--u)); }

/* ---------- Programme cards ---------- */
.programmes { padding: calc(16 * var(--u)) 0 calc(11 * var(--u)); }
.programmes .container { padding: 0 calc(26 * var(--u)); display: grid; gap: calc(14 * var(--u)); }

.prog-card {
  display: grid;
  grid-template-columns: calc(263 * var(--u)) minmax(0, 1fr) calc(200 * var(--u));
  padding: calc(5 * var(--u)) calc(8 * var(--u)) calc(3 * var(--u)) calc(7 * var(--u));
  background: var(--white);
  border: 1px solid #eef0f4;
  border-radius: calc(6 * var(--u));
  box-shadow: var(--shadow);
}
.prog-media {
  position: relative;
  min-height: calc(364 * var(--u));
  border-radius: calc(4 * var(--u));
  background-color: #2a2622; background-size: cover; background-position: 72% center;   /* keeps the hand and pen in view */
}

.prog-body {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: calc(11 * var(--u)) 0 calc(11 * var(--u));
  margin: 0 calc(17 * var(--u)) 0 calc(24 * var(--u));
}
.prog-head { display: flex; gap: calc(17 * var(--u)); align-items: flex-start; margin-bottom: calc(10 * var(--u)); }
.prog-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: calc(65 * var(--u)); height: calc(65 * var(--u)); border-radius: 50%;
  background: #fde9dc; color: var(--orange);
}
.prog-icon svg { width: calc(38 * var(--u)); height: calc(38 * var(--u)); }
.prog-head h2 { font-size: calc(28 * var(--u)); line-height: 1.02; letter-spacing: -0.03em; margin-top: calc(9 * var(--u)); }
.prog-head .kicker { display: block; font-size: calc(9.5 * var(--u)); line-height: 1.35; margin-top: calc(7 * var(--u)); }
.pill {
  display: inline-flex; align-items: center; vertical-align: middle;
  height: calc(24 * var(--u)); margin-left: calc(10 * var(--u)); padding: 0 calc(13 * var(--u));
  font-size: calc(10 * var(--u)); font-weight: 600; letter-spacing: 0; line-height: 1;
  color: var(--orange); background: #fde8d8; border-radius: calc(4 * var(--u));
  position: relative; top: calc(-3 * var(--u));
}
.prog-desc {
  font-size: calc(12 * var(--u)); line-height: 1.33; color: var(--muted); letter-spacing: 0;
  max-width: calc(440 * var(--u)); margin-bottom: calc(14 * var(--u));
}

.chips {
  list-style: none; padding: 0; margin: 0 0 calc(14 * var(--u)); width: 100%;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(4.5 * var(--u)) calc(5 * var(--u));
}
.chips li {
  display: flex; align-items: center; gap: calc(8 * var(--u));
  min-height: calc(30 * var(--u)); padding: calc(4 * var(--u)) calc(5 * var(--u)) calc(4 * var(--u)) calc(10 * var(--u));
  font-size: calc(9 * var(--u)); font-weight: 500; color: var(--navy); line-height: 1.3; letter-spacing: -0.005em;
  background: var(--white); border: 1px solid var(--line); border-radius: calc(3 * var(--u));
}
.chips .icon { width: calc(13 * var(--u)); height: calc(13 * var(--u)); color: var(--orange); }

.note {
  display: flex; align-items: center; gap: calc(15 * var(--u)); width: 100%;
  min-height: calc(50 * var(--u)); padding: calc(8 * var(--u)) calc(17 * var(--u));
  margin-bottom: calc(9 * var(--u));
  background: var(--orange-50); border: 1px solid var(--orange-100); border-radius: calc(5 * var(--u));
}
.note > .icon { width: calc(22 * var(--u)); height: calc(22 * var(--u)); color: var(--orange); }
.note small { display: block; font-size: calc(8.5 * var(--u)); font-weight: 500; color: var(--orange); margin-bottom: calc(2 * var(--u)); }
.note strong { font-size: calc(11.5 * var(--u)); font-weight: 600; color: var(--navy); letter-spacing: 0; }
.prog-body > .btn { min-width: calc(168 * var(--u)); }

.prog-side {
  display: flex; flex-direction: column;
  margin: calc(7 * var(--u)) 0 calc(9 * var(--u));
  padding: calc(18 * var(--u)) calc(15 * var(--u)) calc(17 * var(--u)) calc(17 * var(--u));
  background: var(--bg); border-radius: calc(6 * var(--u));
}
.prog-side h3 { font-size: calc(17 * var(--u)); line-height: 1.18; letter-spacing: -0.035em; margin-bottom: calc(10 * var(--u)); }
.prog-side p { font-size: calc(11 * var(--u)); line-height: 1.36; color: var(--muted); letter-spacing: 0; }
.prog-side hr { border: 0; border-top: 1px solid #d9dde5; margin: calc(25 * var(--u)) 0 calc(20 * var(--u)); }
.prog-side blockquote {
  margin: 0; font-style: italic; color: var(--navy);
  font-size: calc(12.5 * var(--u)); line-height: 1.42; letter-spacing: 0;
}
.quote-mark {
  display: block; font-family: Georgia, "Times New Roman", serif; font-style: normal; font-weight: 700;
  font-size: calc(38 * var(--u)); line-height: .5; height: calc(16 * var(--u));
  color: var(--orange); margin-bottom: calc(14 * var(--u)); letter-spacing: -0.06em;
}

/* XSAT (blue) variant */
.prog-blue .prog-media { min-height: calc(424 * var(--u)); }
.prog-blue .prog-icon { background: var(--blue-50); color: var(--blue); }
.prog-blue .pill { color: var(--blue); background: #e2ebfd; }
.prog-blue .chips li { font-size: calc(8.5 * var(--u)); }
.prog-blue .chips .icon { color: var(--blue); }
.prog-blue .note { background: var(--blue-50); border-color: var(--blue-100); }
.prog-blue .note > .icon { color: var(--blue); }
.prog-blue .note small { color: var(--blue); }
.prog-blue .btn { background: var(--blue); border-color: var(--blue); min-width: calc(137 * var(--u)); }
.prog-blue .btn:hover { background: #1740b3; border-color: #1740b3; box-shadow: 0 6px 16px rgba(29, 78, 216, .25); }
.prog-blue .quote-mark { color: var(--blue); }
.prog-blue blockquote { font-style: normal; font-size: calc(13 * var(--u)); }
.areas { display: flex; flex-wrap: wrap; align-items: center; }
.areas strong { font-size: calc(10.5 * var(--u)); font-weight: 500; padding: 0 calc(19 * var(--u)); border-right: 1px solid #a9bbe6; line-height: 1.5; }
.areas strong:first-child { padding-left: 0; }
.areas strong:last-child { border-right: 0; }
.begins {
  display: flex; align-items: center; gap: calc(14 * var(--u));
  margin-top: auto; padding-left: calc(8 * var(--u)); color: var(--navy);
}
.begins .icon { width: calc(26 * var(--u)); height: calc(26 * var(--u)); }
.begins small { display: block; font-size: calc(9 * var(--u)); color: var(--muted); }
.begins strong { font-size: calc(11.5 * var(--u)); font-weight: 600; }

/* Coming soon card */
.prog-soon { grid-template-columns: calc(410 * var(--u)) minmax(0, 1fr); padding-right: calc(25 * var(--u)); }
.prog-soon .prog-media { min-height: calc(177 * var(--u)); background-position: left center; }
.prog-soon .prog-body { margin: 0 0 0 calc(28 * var(--u)); padding: calc(16 * var(--u)) 0 calc(14 * var(--u)); justify-content: center; }
.prog-soon .kicker { font-size: calc(9.5 * var(--u)); margin-bottom: calc(14 * var(--u)); }
.prog-soon h2 { font-size: calc(28 * var(--u)); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: calc(8 * var(--u)); }
.prog-soon .prog-desc { font-size: calc(12.5 * var(--u)); max-width: calc(420 * var(--u)); margin-bottom: calc(14 * var(--u)); }
.soon-row { display: flex; align-items: center; gap: calc(17 * var(--u)); width: 100%; }
.soon-row .note { margin: 0; flex: 1; min-height: calc(51 * var(--u)); padding: calc(8 * var(--u)) calc(14 * var(--u)); gap: calc(12 * var(--u)); }
.soon-row .note p { font-size: calc(9 * var(--u)); line-height: 1.45; color: var(--ink); }
.soon-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: calc(30 * var(--u)); height: calc(30 * var(--u)); border-radius: 50%;
  background: #ffe2d1; color: var(--orange);
}
.soon-icon .icon { width: calc(17 * var(--u)); height: calc(17 * var(--u)); }
.soon-row .btn { height: calc(37 * var(--u)); min-width: calc(143 * var(--u)); font-size: calc(11.5 * var(--u)); }

/* ---------- Generic sections (About / Contact) ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 8px; line-height: 1.1; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--orange); }

/* Alerts (forms) */
.alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #e9f8ef; color: #17663a; border: 1px solid #bfe8cf; }
.alert-error { background: #fdecec; color: #a12626; border: 1px solid #f6c7c7; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900); color: #c3c9d6;
  padding: calc(40 * var(--u)) 0 0;
  font-size: calc(10 * var(--u));
}
.footer-grid { display: grid; grid-template-columns: calc(227 * var(--u)) calc(180 * var(--u)) calc(240 * var(--u)) 1fr; padding-left: calc(53 * var(--u)) !important; }
.footer-grid > div + div { border-left: 1px solid rgba(255, 255, 255, .1); padding-left: calc(41 * var(--u)); }
.footer-brand { padding-top: calc(2 * var(--u)); }
.footer-brand .logo { gap: calc(1 * var(--u)); }
.footer-brand .logo-text { font-size: calc(15.5 * var(--u)); }
.footer-brand .logo-tag { font-size: calc(5 * var(--u)); }
.footer-brand p { margin: calc(14 * var(--u)) 0 calc(22 * var(--u)) 0; font-size: calc(9.5 * var(--u)); line-height: 1.3; }
.socials { display: flex; gap: calc(12 * var(--u)); }
.socials a { color: var(--white); transition: color .2s; }
.socials svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.socials a:hover { color: var(--orange); }
.footer-col h4 { color: var(--white); font-size: calc(9.5 * var(--u)); font-weight: 600; letter-spacing: 0; margin-bottom: calc(14 * var(--u)); }
.footer-col a { display: block; line-height: 1.4; margin-bottom: calc(9 * var(--u)); transition: color .2s; }
.footer-col a:hover { color: var(--orange); }
.footer-subscribe p { font-size: calc(9.5 * var(--u)); line-height: 1.38; margin-bottom: calc(16 * var(--u)); max-width: calc(200 * var(--u)); }
.subscribe-form { display: flex; max-width: calc(232 * var(--u)); }
.subscribe-form input[type=email] {
  flex: 1; min-width: 0; margin: 0;
  height: calc(32 * var(--u)); padding: 0 calc(13 * var(--u));
  border: 0; border-radius: calc(3 * var(--u)) 0 0 calc(3 * var(--u));
  font-family: var(--font); font-size: calc(9 * var(--u));
}
.subscribe-form input[type=email]:focus { box-shadow: none; }
.subscribe-form button {
  display: grid; place-items: center; width: calc(35 * var(--u));
  background: var(--orange); color: var(--white);
  border: 0; border-radius: 0 calc(3 * var(--u)) calc(3 * var(--u)) 0; cursor: pointer; transition: background .2s;
}
.subscribe-form button .icon { width: calc(14 * var(--u)); height: calc(14 * var(--u)); }
.subscribe-form button:hover { background: var(--orange-600); }
.sub-msg { color: #7ee2a8; margin: calc(-8 * var(--u)) 0 calc(8 * var(--u)) !important; }
.sub-err { color: #ff9b8a; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: calc(36 * var(--u)); padding: calc(16 * var(--u)) calc(51 * var(--u)) calc(16 * var(--u)) calc(53 * var(--u)) !important; border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: calc(10 * var(--u));
}

/* ==========================================================
   Tablet & phone (below 880px): readable fixed sizes
   ========================================================== */
@media (max-width: 879px) {
  :root { --u: 1px; }
  .container, .programmes .container { padding: 0 24px; }

  .nav-wrap { height: 64px; }
  .main-nav { margin-left: 32px; gap: 22px; }
  .main-nav a { height: 64px; font-size: 14px; }
  .main-nav a.active::after { bottom: 18px; }
  .nav-actions { gap: 14px; }
  .nav-actions .btn { min-width: 0; font-size: 13px; height: 34px; padding: 0 16px; gap: 8px; }
  .nav-actions .btn .icon { width: 13px; height: 13px; }
  .logo-mark { height: 34px; width: auto; }
  .logo-text { font-size: 19px; }
  .logo-tag { font-size: 6px; margin-top: 2px; }

  .btn { height: 44px; padding: 0 20px; font-size: 15px; }
  .btn .icon { width: 16px; height: 16px; }

  .hero { min-height: 0; padding: 56px 0; }
  .hero::before { background: linear-gradient(90deg, rgba(251, 243, 231, .97) 0%, rgba(251, 243, 231, .9) 55%, rgba(251, 243, 231, .2) 100%); }
  .hero-copy { margin-left: 0; max-width: 560px; }
  .hero-copy .kicker { font-size: 13px; margin-bottom: 12px; }
  .hero h1 { font-size: clamp(38px, 6vw, 52px); margin-bottom: 18px; }
  .hero-copy p { font-size: 17px; line-height: 1.45; max-width: 520px; margin-bottom: 26px; }
  .hero-actions .btn { min-width: 200px; font-size: 15px; }

  .page-hero { padding: 56px 0 36px; }
  .page-hero .container > * { margin-left: 0; }
  .page-hero .kicker { font-size: 13px; }
  .page-hero h1 { font-size: clamp(32px, 5vw, 44px); }
  .page-hero p { font-size: 17px; max-width: 560px; }

  .programmes { padding: 20px 0; }
  .programmes .container { gap: 20px; }
  .prog-card, .prog-soon {
    grid-template-columns: 260px minmax(0, 1fr);
    padding: 8px; border-radius: 10px;
  }
  .prog-media, .prog-blue .prog-media { min-height: 360px; border-radius: 6px; }
  .prog-body { margin: 0 12px 0 24px; padding: 16px 0; }
  .prog-head { gap: 16px; margin-bottom: 14px; }
  .prog-icon { width: 60px; height: 60px; }
  .prog-icon svg { width: 34px; height: 34px; }
  .prog-head .kicker, .prog-soon .kicker { font-size: 12px; }
  .prog-head h2, .prog-soon h2 { font-size: 30px; }
  .pill { height: 26px; font-size: 12px; padding: 0 12px; }
  .prog-desc, .prog-soon .prog-desc { font-size: 15px; line-height: 1.45; margin-bottom: 18px; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
  .chips li, .prog-blue .chips li { font-size: 13px; min-height: 40px; padding: 8px 12px; gap: 10px; }
  .chips .icon { width: 16px; height: 16px; }
  .note { padding: 14px 18px; margin-bottom: 12px; gap: 14px; }
  .note > .icon { width: 24px; height: 24px; }
  .note small { font-size: 12px; }
  .note strong { font-size: 15px; }
  .areas strong { font-size: 14px; padding: 0 14px; }
  .prog-side { grid-column: 1 / -1; margin: 8px 0 0; padding: 24px; }
  .prog-side h3 { font-size: 22px; }
  .prog-side p { font-size: 15px; line-height: 1.5; }
  .prog-side hr { margin: 22px 0; }
  .prog-side blockquote, .prog-blue blockquote { font-size: 16px; }
  .quote-mark { font-size: 44px; height: 20px; margin-bottom: 14px; }
  .begins { padding: 22px 0 0; gap: 12px; }
  .begins .icon { width: 28px; height: 28px; }
  .begins small { font-size: 12px; }
  .begins strong { font-size: 15px; }
  .prog-soon .prog-media { min-height: 220px; }
  .prog-soon .prog-body { margin: 0 12px 0 24px; padding: 16px 0; }
  .soon-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .soon-row .note p { font-size: 14px; }
  .soon-icon { width: 38px; height: 38px; }
  .soon-icon .icon { width: 20px; height: 20px; }
  .soon-row .btn { height: 44px; font-size: 15px; }

  .site-footer { padding-top: 56px; font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 32px; padding-left: 24px !important; }
  .footer-grid > div + div { border-left: 0; padding-left: 0; }
  .footer-brand .logo-text { font-size: 19px; }
  .footer-brand .logo-tag { font-size: 6px; }
  .footer-brand p { margin: 14px 0 22px; font-size: 14px; line-height: 1.5; }
  .socials { gap: 18px; }
  .socials svg { width: 20px; height: 20px; }
  .footer-col h4 { font-size: 15px; margin-bottom: 12px; }
  .footer-col a { line-height: 1.5; margin-bottom: 12px; }
  .footer-col h4 { margin-bottom: 16px; }
  .footer-subscribe p { font-size: 14px; max-width: none; }
  .subscribe-form { max-width: 380px; }
  .subscribe-form input[type=email] { height: 46px; font-size: 16px; padding: 0 14px; }
  .subscribe-form button { width: 50px; }
  .subscribe-form button .icon { width: 18px; height: 18px; }
  .footer-bottom { margin-top: 40px; padding: 20px 24px !important; font-size: 13px; border-top: 1px solid rgba(255, 255, 255, .08); }
}

@media (max-width: 879px) {
  .nav-wrap { justify-content: space-between; }
  .nav-actions .btn { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 10px; order: 3; margin-left: 6px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .25s; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .main-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0; padding: 8px 24px 20px;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .06);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { height: auto; padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .main-nav a.active::after { display: none; }

  .hero::before { background: linear-gradient(180deg, rgba(251, 243, 231, .97) 0%, rgba(251, 243, 231, .88) 100%); }

  .prog-card, .prog-soon { grid-template-columns: 1fr; }
  .prog-media, .prog-blue .prog-media { min-height: 0; aspect-ratio: 1 / 1; background-position: center 40%; }
  .prog-blue .prog-media { background-position: center bottom; }
  .prog-soon .prog-media { min-height: 0; aspect-ratio: 402 / 169; background-position: center; }
  .prog-body, .prog-soon .prog-body { margin: 0 12px; padding: 22px 0 16px; }
  .prog-side { margin: 4px 0 0; }


}

@media (max-width: 560px) {
  .container, .programmes .container { padding: 0 16px; }
  .main-nav { padding: 8px 16px 20px; }
  .logo-text { font-size: 18px; }
  .logo-tag { font-size: 6px; }
  .hero { padding: 44px 0; }
  .hero h1 { font-size: 38px; }
  .hero-copy p { font-size: 16px; }
  .hero-actions .btn { width: 100%; }
  .prog-head { gap: 14px; }
  .prog-icon { width: 52px; height: 52px; }
  .prog-icon svg { width: 30px; height: 30px; }
  .prog-head h2, .prog-soon h2 { font-size: 26px; }
  .pill { margin: 6px 0 2px; display: flex; width: fit-content; top: 0; }
  .chips { grid-template-columns: 1fr; }
  .areas strong { border: 0; padding: 0; margin-right: 14px; }

  .footer-grid { grid-template-columns: 1fr; padding-left: 16px !important; }
  .footer-bottom { flex-direction: column; padding: 20px 16px !important; }
}

/* ==========================================================
   Free Resources page (resources.php)
   Sizes measured from the resources mockup (931px wide → ×1.1 to design units)
   ========================================================== */
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.round-arrow {
  display: grid; place-items: center; flex-shrink: 0;
  width: calc(24 * var(--u)); height: calc(24 * var(--u)); border-radius: 50%;
  background: var(--white); color: var(--navy);
  box-shadow: 0 1px 4px rgba(20, 36, 92, .15);
}
.round-arrow .icon { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }

/* Hero */
.res-hero .kicker { font-size: calc(10.5 * var(--u)); letter-spacing: .08em; margin-bottom: calc(8 * var(--u)); }
.res-hero h1 { font-size: calc(42 * var(--u)); line-height: 1; margin-bottom: calc(12 * var(--u)); }
.res-lead { font-size: calc(15.5 * var(--u)); color: var(--ink); margin-bottom: calc(8 * var(--u)); letter-spacing: 0; }
.res-sub { font-size: calc(11.5 * var(--u)); line-height: 1.4; color: var(--muted); max-width: calc(410 * var(--u)); margin-bottom: calc(22 * var(--u)); }
.res-pillars { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: calc(33 * var(--u)); }
.res-pillars li { display: flex; align-items: center; gap: calc(12 * var(--u)); font-size: calc(10.5 * var(--u)); font-weight: 600; color: var(--navy); }
.res-pillars .icon { width: calc(24 * var(--u)); height: calc(24 * var(--u)); color: var(--orange); stroke-width: 1.8; }

/* Shared section bits */
.res-container { padding: 0 calc(57 * var(--u)); }
.res-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: calc(13 * var(--u)); }
.res-head h2 { font-size: calc(26.5 * var(--u)); line-height: 1.1; }
.res-head p { font-size: calc(10.5 * var(--u)); color: var(--ink); padding-bottom: calc(4 * var(--u)); }

/* Categories */
.res-categories { padding: calc(17 * var(--u)) 0 calc(18 * var(--u)); background: linear-gradient(180deg, #fff, #fbfbfc); }
.cat-grid { display: grid; grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr)); gap: calc(10 * var(--u)); }
.cat-card {
  position: relative; display: flex; flex-direction: column;
  min-height: calc(160 * var(--u)); padding: calc(13 * var(--u)) calc(12 * var(--u)) calc(38 * var(--u));
  background: var(--white); border: 1px solid #eceef3; border-radius: calc(6 * var(--u));
  box-shadow: 0 1px 6px rgba(20, 36, 92, .04);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20, 36, 92, .09); border-color: color-mix(in srgb, var(--c) 35%, #eceef3); }
.cat-icon { color: var(--c); margin-bottom: calc(10 * var(--u)); }
.cat-icon .icon { width: calc(28 * var(--u)); height: calc(28 * var(--u)); stroke-width: 1.8; }
.cat-card h3 { font-size: calc(14 * var(--u)); line-height: 1.15; margin-bottom: calc(5 * var(--u)); }
.cat-card p { font-size: calc(9.5 * var(--u)); line-height: 1.3; color: var(--muted); }
.cat-card .round-arrow { position: absolute; right: calc(12 * var(--u)); bottom: calc(12 * var(--u)); width: calc(26 * var(--u)); height: calc(26 * var(--u)); }

/* Library */
.res-library { padding: calc(26 * var(--u)) 0 calc(36 * var(--u)); background: #fcfcfd; }
.filter-bar {
  display: flex; align-items: center; gap: calc(8 * var(--u));
  padding: calc(5 * var(--u)) calc(6 * var(--u)); margin-bottom: calc(13 * var(--u));
  background: var(--white); border: 1px solid #eceef3; border-radius: calc(6 * var(--u));
}
.filter-bar .select { position: relative; display: block; width: calc(154 * var(--u)); margin: 0; }
.filter-bar select {
  width: 100%; height: calc(31 * var(--u)); margin: 0; padding: 0 calc(28 * var(--u)) 0 calc(14 * var(--u));
  font: inherit; font-size: calc(9 * var(--u)); color: var(--ink);
  background: var(--white); border: 1px solid #e6e8ee; border-radius: calc(4 * var(--u));
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.filter-bar .select .icon { position: absolute; right: calc(11 * var(--u)); top: 50%; transform: translateY(-50%); width: calc(12 * var(--u)); height: calc(12 * var(--u)); pointer-events: none; color: var(--muted); }
.filter-bar .search { position: relative; display: block; margin: 0 0 0 auto; width: calc(198 * var(--u)); }
.filter-bar .search .icon { position: absolute; left: calc(12 * var(--u)); top: 50%; transform: translateY(-50%); width: calc(12 * var(--u)); height: calc(12 * var(--u)); color: var(--muted); }
.filter-bar input[type=search] {
  width: 100%; height: calc(27 * var(--u)); margin: 0; padding: 0 calc(12 * var(--u)) 0 calc(32 * var(--u));
  font: inherit; font-size: calc(9 * var(--u)); border: 1px solid #eceef3; border-radius: 999px; background: var(--white);
}
.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 90, 26, .12); }

.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(20 * var(--u)); }
.res-card {
  display: flex; flex-direction: column;
  padding: calc(10 * var(--u)) calc(11 * var(--u)) calc(12 * var(--u));
  background: var(--white); border: 1px solid #eceef3; border-radius: calc(6 * var(--u));
  box-shadow: 0 1px 6px rgba(20, 36, 92, .04);
}
.res-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: calc(7 * var(--u)); }
.res-tag { display: inline-flex; align-items: center; gap: calc(7 * var(--u)); font-size: calc(8.5 * var(--u)); font-weight: 600; color: var(--c); }
.res-tag .icon { width: calc(15 * var(--u)); height: calc(15 * var(--u)); }
.res-meta time { font-size: calc(8.5 * var(--u)); color: var(--muted); }
.res-thumb { height: calc(77 * var(--u)); border-radius: calc(3 * var(--u)); background: #e9eaee center / cover no-repeat; margin-bottom: calc(12 * var(--u)); }
.res-card h3 { font-size: calc(14.5 * var(--u)); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: calc(8 * var(--u)); }
.res-card p { font-size: calc(10.5 * var(--u)); line-height: 1.42; color: var(--muted); margin-bottom: calc(12 * var(--u)); flex: 1; }
.res-actions { display: grid; grid-template-columns: calc(119 * var(--u)) 1fr; gap: calc(8 * var(--u)); }
.res-actions .btn { height: calc(26 * var(--u)); padding: 0 calc(10 * var(--u)); font-size: calc(9.5 * var(--u)); gap: calc(8 * var(--u)); }
.res-actions .btn .icon { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }



/* Resources page — tablet & phone */
@media (max-width: 879px) {
  .round-arrow { width: 28px; height: 28px; }
  .round-arrow .icon { width: 14px; height: 14px; }
  .res-hero .kicker { font-size: 13px; }
  .res-lead { font-size: 19px; }
  .res-sub { font-size: 15px; line-height: 1.5; max-width: 520px; }
  .res-pillars { gap: 24px; }
  .res-pillars li { font-size: 15px; gap: 10px; }
  .res-pillars .icon { width: 26px; height: 26px; }

  .res-container { padding: 0 24px; }
  .res-head { flex-wrap: wrap; margin-bottom: 18px; }
  .res-head h2 { font-size: 28px; }
  .res-head p { font-size: 15px; }
  .res-categories, .res-library { padding: 40px 0; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .cat-card { min-height: 0; padding: 18px 16px 52px; border-radius: 10px; }
  .cat-icon .icon { width: 30px; height: 30px; }
  .cat-card h3 { font-size: 17px; }
  .cat-card p { font-size: 13px; }
  .cat-card .round-arrow { right: 14px; bottom: 14px; width: 30px; height: 30px; }

  .filter-bar { flex-wrap: wrap; padding: 10px; gap: 10px; border-radius: 10px; }
  .filter-bar .select { width: calc(33.33% - 7px); }
  .filter-bar select { height: 42px; font-size: 16px; padding: 0 32px 0 12px; border-radius: 6px; }
  .filter-bar .select .icon { width: 14px; height: 14px; }
  .filter-bar .search { width: 100%; margin: 0; }
  .filter-bar .search .icon { width: 16px; height: 16px; left: 14px; }
  .filter-bar input[type=search] { height: 42px; font-size: 16px; padding-left: 38px; }
  .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .res-card { padding: 14px; border-radius: 10px; }
  .res-tag, .res-meta time { font-size: 13px; }
  .res-tag .icon { width: 17px; height: 17px; }
  .res-thumb { height: 130px; border-radius: 6px; }
  .res-card h3 { font-size: 18px; }
  .res-card p { font-size: 14px; line-height: 1.5; }
  .res-actions { grid-template-columns: 1fr 1.3fr; gap: 10px; }
  .res-actions .btn { height: 42px; font-size: 14px; }
  .res-actions .btn .icon { width: 15px; height: 15px; }
}
@media (max-width: 700px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-grid { grid-template-columns: 1fr; }
  .filter-bar .select { width: 100%; }
}
@media (max-width: 560px) {
  .res-container { padding: 0 16px; }
  .res-pillars { gap: 16px 22px; }
}

/* ==========================================================
   Home page (index.php)
   Measured from the home mockup (804px wide → ×1.274 to design units)
   ========================================================== */
.link-arrow { display: inline-flex; align-items: center; gap: calc(6 * var(--u)); font-size: calc(12 * var(--u)); font-weight: 600; color: var(--orange); }
.link-arrow .icon { width: calc(13 * var(--u)); height: calc(13 * var(--u)); transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }
.kicker-wide { letter-spacing: .3em; color: var(--navy); }

/* Hero */
.home-hero {
  /* Height-aware unit: the hero fills at most 90% of the screen below the header. */
  --uh: min(var(--u), calc((90vh - 52 * var(--u)) / 530));
  --uh: min(var(--u), calc((90svh - 52 * var(--u)) / 530));
}
.home-hero {
  max-width: calc(1024 * var(--u)); margin: 0 auto; padding: 0 calc(36 * var(--u));
}
.home-hero-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  height: calc(90vh - 52 * var(--u) - 18 * var(--uh));
  height: calc(90svh - 52 * var(--u) - 18 * var(--uh));
  min-height: calc(470 * var(--uh)); max-height: calc(520 * var(--u));
  margin: calc(12 * var(--uh)) 0 calc(6 * var(--uh));
  border-radius: calc(8 * var(--uh));
  background:
    radial-gradient(ellipse 60% 55% at 50% 0%, rgba(240, 90, 26, .10), transparent 70%),
    linear-gradient(180deg, #fdf8f1 0%, #fbf1e4 55%, #f7e6d2 100%);
  border: 1px solid #f3e6d6;
  color: var(--navy);
}
/* Heading, text and buttons sit in the vertical centre; the four points sit along the bottom. */
.home-hero-copy {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; padding: calc(24 * var(--uh)) calc(24 * var(--uh)) 0;
}
.home-hero-copy .kicker { font-size: calc(10 * var(--uh)); margin-bottom: calc(14 * var(--uh)); }
.home-hero-copy h1 { font-size: calc(46 * var(--uh)); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: calc(18 * var(--uh)); }
.home-hero-copy h1 .line { display: block; white-space: nowrap; }
/* Tagline under the headline, set much smaller like a sub-definition */
.home-hero-copy h1 .sub, .about-hero h1 .sub { display: block; font-size: .38em; font-weight: 600; letter-spacing: .01em; line-height: 1.3; margin-top: .55em; }
.home-hero-copy p { font-size: calc(14.5 * var(--uh)); line-height: 1.32; color: var(--ink); max-width: calc(470 * var(--uh)); margin: 0 auto calc(24 * var(--uh)); letter-spacing: 0; }
.home-hero-copy .hero-actions { gap: calc(15 * var(--uh)); justify-content: center; }
.home-hero-copy .btn { height: calc(42 * var(--uh)); min-width: calc(158 * var(--uh)); padding: 0 calc(21 * var(--uh)); font-size: calc(12 * var(--uh)); }
.home-hero-points {
  display: flex; justify-content: center; list-style: none; padding: calc(18 * var(--uh)) 0 0;
  margin: 0 calc(40 * var(--uh)) calc(28 * var(--uh)); border-top: 1px solid rgba(20, 36, 92, .1);
}
.home-hero-points li {
  display: flex; align-items: center; gap: calc(12 * var(--uh)); text-align: left;
  padding: 0 calc(26 * var(--uh)); border-left: 1px solid rgba(20, 36, 92, .15);
  font-size: calc(11.5 * var(--uh)); line-height: 1.2; font-weight: 600; color: var(--navy);
}
.home-hero-points li:first-child { border-left: 0; }
.home-hero-points .icon { width: calc(28 * var(--uh)); height: calc(28 * var(--uh)); stroke-width: 1.6; color: var(--orange); }

.home-hero-side .q-card {
  flex: 1 1 0; min-width: 0; min-height: calc(84 * var(--u));
  flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: calc(9 * var(--u));
  padding: calc(14 * var(--u)) calc(16 * var(--u)) calc(14 * var(--u)) calc(18 * var(--u));
}
.home-hero-side .q-card .round-arrow { position: absolute; top: calc(14 * var(--u)); right: calc(14 * var(--u)); }
.home-hero-side .q-card small { max-width: none; }
.home-hero-side .q-card > .icon { width: calc(36 * var(--u)); height: calc(36 * var(--u)); padding: calc(8 * var(--u)); }
.home-hero-side .q-card strong { font-size: calc(11.5 * var(--u)); }
.home-hero-side .q-card small { font-size: calc(9.5 * var(--u)); }
/* Cards row below the hero */
.home-hero-side { display: flex; align-items: stretch; gap: calc(12 * var(--u)); margin: calc(14 * var(--u)) 0 calc(4 * var(--u)); }
.home-script { flex-shrink: 0; align-self: center; width: calc(150 * var(--u)); height: auto; margin: 0 calc(4 * var(--u)); mix-blend-mode: multiply; filter: brightness(1.07) contrast(1.18); }
.q-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: calc(14 * var(--uh));
  min-height: calc(62 * var(--uh)); padding: 0 calc(14 * var(--uh)) 0 calc(18 * var(--uh));
  background: var(--white); border: 1px solid #e9ebf1; border-radius: calc(8 * var(--uh));
  box-shadow: 0 1px 2px rgba(20, 36, 92, .04), 0 6px 18px rgba(20, 36, 92, .07);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
/* Orange accent strip on the left edge */
.q-card::before {
  content: ""; position: absolute; left: 0; top: calc(14 * var(--uh)); bottom: calc(14 * var(--uh));
  width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); transition: top .2s, bottom .2s;
}
.q-card:hover { border-color: #f7c9b0; box-shadow: 0 2px 4px rgba(20, 36, 92, .05), 0 12px 28px rgba(240, 90, 26, .14); transform: translateY(-2px); }
.q-card:hover::before { top: 0; bottom: 0; }
.q-card > .icon {
  width: calc(42 * var(--uh)); height: calc(42 * var(--uh)); padding: calc(9 * var(--uh));
  border-radius: 50%; background: #fff1e8; color: var(--orange); stroke-width: 1.8;
  transition: background .2s, color .2s;
}
.q-card:hover > .icon { background: var(--orange); color: var(--white); }
.q-card:hover .round-arrow { background: var(--navy); color: var(--white); }
.q-card > span:not(.round-arrow) { flex: 1; }
.q-card strong { display: block; font-size: calc(11.5 * var(--uh)); font-weight: 600; color: var(--navy); margin-bottom: calc(5 * var(--uh)); }
.q-card small { display: block; font-size: calc(10 * var(--uh)); line-height: 1.4; color: var(--muted); max-width: calc(150 * var(--uh)); }
.q-card .round-arrow { width: calc(25 * var(--uh)); height: calc(25 * var(--uh)); }

/* Shared two-column section */
.home-sec { padding: calc(46 * var(--u)) 0 calc(33 * var(--u)); }
.home-sec > .container { padding: 0 calc(32 * var(--u)) 0 calc(38 * var(--u)); }
.home-split { display: grid; grid-template-columns: calc(280 * var(--u)) minmax(0, 1fr); gap: calc(18 * var(--u)); align-items: center; }
.home-intro .kicker { font-size: calc(10.8 * var(--u)); letter-spacing: .08em; margin-bottom: calc(10 * var(--u)); }
.home-intro h2 { font-size: calc(33 * var(--u)); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: calc(20 * var(--u)); }
.home-intro p { font-size: calc(13.4 * var(--u)); line-height: 1.5; color: var(--muted); margin-bottom: calc(20 * var(--u)); }
.home-intro .intro-lg { font-size: calc(15.3 * var(--u)); line-height: 1.4; margin-bottom: calc(22 * var(--u)); }
.home-intro .btn { height: calc(47 * var(--u)); min-width: calc(208 * var(--u)); font-size: calc(14 * var(--u)); }

/* Free resources */
.home-free { padding-top: calc(66 * var(--u)); }
.free-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(15 * var(--u)); }
.free-card {
  display: flex; flex-direction: column; min-height: calc(276 * var(--u));
  background: var(--white); border: 1px solid #eceef3; border-radius: calc(6 * var(--u)); overflow: hidden;
  box-shadow: 0 2px 10px rgba(20, 36, 92, .05);
  transition: transform .2s, box-shadow .2s;
}
.free-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 36, 92, .1); }
.free-img { display: block; height: calc(96 * var(--u)); background: #e9eaee center / cover no-repeat; }
.free-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: calc(18 * var(--u)) calc(16 * var(--u)) calc(18 * var(--u)); }
.free-body > .icon { width: calc(28 * var(--u)); height: calc(28 * var(--u)); color: var(--c); stroke-width: 1.8; margin-bottom: calc(13 * var(--u)); }
.free-body strong { font-size: calc(16 * var(--u)); font-weight: 600; color: var(--navy); letter-spacing: -0.02em; margin-bottom: calc(6 * var(--u)); }
.free-body small { font-size: calc(10.8 * var(--u)); line-height: 1.45; color: var(--muted); margin-bottom: calc(16 * var(--u)); }
.free-body .round-arrow { margin-top: auto; width: calc(28 * var(--u)); height: calc(28 * var(--u)); }

/* Programmes */
.home-progs { background: #fafafa; }
.home-progs .home-split { grid-template-columns: calc(344 * var(--u)) minmax(0, 1fr); gap: calc(13 * var(--u)); }
.hp-list { display: grid; gap: calc(15 * var(--u)); }
.hp-card {
  position: relative; isolation: isolate;
  display: flex; gap: calc(22 * var(--u)); align-items: flex-start;
  min-height: calc(159 * var(--u)); padding: calc(26 * var(--u)) calc(20 * var(--u)) calc(20 * var(--u)) calc(25 * var(--u));
  background: var(--white) right center / auto 100% no-repeat;
  border: 1px solid #eceef3; border-radius: calc(8 * var(--u)); overflow: hidden;
}
.hp-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #fff 0%, #fff 52%, rgba(255, 255, 255, 0) 66%); }
.hp-icon { color: var(--orange); width: calc(43 * var(--u)); height: calc(43 * var(--u)); flex-shrink: 0; margin-top: calc(-2 * var(--u)); }
.hp-icon svg { width: 100%; height: 100%; }
.hp-card h3 { display: flex; align-items: center; gap: calc(10 * var(--u)); font-size: calc(16.5 * var(--u)); letter-spacing: -0.02em; margin-bottom: calc(6 * var(--u)); }
.hp-card .pill { margin: 0; top: 0; height: calc(18 * var(--u)); padding: 0 calc(9 * var(--u)); font-size: calc(11 * var(--u)); }
.hp-card p { font-size: calc(12 * var(--u)); line-height: 1.5; color: var(--muted); max-width: calc(258 * var(--u)); margin-bottom: calc(10 * var(--u)); }
.hp-card p b { font-weight: 500; color: var(--navy); }
.hp-blue .hp-icon { color: var(--blue); }
.hp-blue .pill { color: var(--blue); background: #e2ebfd; }

/* Approach */
.home-approach { padding-top: calc(42 * var(--u)); padding-bottom: calc(36 * var(--u)); }
.home-approach .home-split { grid-template-columns: calc(380 * var(--u)) minmax(0, 1fr); gap: calc(22 * var(--u)); }
.approach-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(13 * var(--u)); }
.approach-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(12 * var(--u));
  min-height: calc(115 * var(--u)); padding: calc(10 * var(--u));
  background: var(--white); border: 1px solid #eceef3; border-radius: calc(6 * var(--u));
  box-shadow: 0 2px 10px rgba(20, 36, 92, .04); text-align: center;
}
.approach-card .icon { width: calc(33 * var(--u)); height: calc(33 * var(--u)); color: var(--c); stroke-width: 1.7; }
.approach-card span { font-size: calc(13.4 * var(--u)); line-height: 1.2; font-weight: 600; color: var(--navy); letter-spacing: 0; }

/* Think-beyond banner */
.tb-banner-wrap { padding: 0 calc(20 * var(--u)); max-width: calc(1024 * var(--u)); margin: 0 auto; }
.tb-banner {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(252 * var(--u)); border-radius: calc(8 * var(--u));
  background: linear-gradient(90deg, #120f0d 0%, #19140f 50%, #231b14 75%, #1a1511 100%);
  color: var(--white);
}
.tb-photo {
  position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(521 * var(--u)); width: calc(250 * var(--u));
  background: center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 25%, #000 75%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 25%, #000 75%, transparent 100%);
}
.tb-copy { padding: calc(36 * var(--u)) 0 calc(30 * var(--u)) calc(32 * var(--u)); max-width: calc(560 * var(--u)); }
.tb-copy .kicker { font-size: calc(10 * var(--u)); letter-spacing: .08em; margin-bottom: calc(10 * var(--u)); }
.tb-copy h2 { color: var(--white); font-size: calc(28 * var(--u)); line-height: 1.27; letter-spacing: -0.025em; margin-bottom: calc(12 * var(--u)); }
.tb-copy p { font-size: calc(12.7 * var(--u)); line-height: 1.45; color: rgba(255, 255, 255, .82); margin-bottom: calc(18 * var(--u)); }
.tb-copy .btn { height: calc(38 * var(--u)); min-width: calc(186 * var(--u)); font-size: calc(12 * var(--u)); }
.tb-quote {
  position: absolute; top: calc(70 * var(--u)); right: calc(36 * var(--u)); width: calc(160 * var(--u)); margin: 0;
  font-size: calc(14 * var(--u)); line-height: 1.35; color: var(--white); letter-spacing: 0;
}
.tb-quote::after { content: ""; display: block; width: calc(92 * var(--u)); height: 2px; margin-top: calc(26 * var(--u)); background: var(--orange); transform: rotate(-6deg); }

/* Testimonials */
.home-voices { padding-top: calc(32 * var(--u)); padding-bottom: calc(40 * var(--u)); }
.voices-split { grid-template-columns: calc(310 * var(--u)) minmax(0, 1fr) !important; gap: calc(8 * var(--u)) !important; }
.home-voices .home-intro h2 { font-size: calc(30.5 * var(--u)); margin-bottom: calc(14 * var(--u)); }
.home-voices .home-intro p { font-size: calc(12.7 * var(--u)); line-height: 1.45; max-width: calc(320 * var(--u)); margin: 0; }
.voices { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: calc(8 * var(--u)); }
.v-track { display: flex; gap: calc(13 * var(--u)); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px; }
.v-track::-webkit-scrollbar { display: none; }
.v-card {
  flex: 0 0 calc((100% - 2 * 13 * var(--u)) / 3); scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: space-between; gap: calc(14 * var(--u));
  min-height: calc(140 * var(--u)); margin: 0; padding: calc(15 * var(--u));
  background: var(--white); border: 1px solid #eceef3; border-radius: calc(6 * var(--u));
  box-shadow: 0 2px 10px rgba(20, 36, 92, .05);
}
.v-card blockquote { margin: 0; font-size: calc(10.8 * var(--u)); line-height: 1.45; color: var(--muted); }
/* Long testimonials are cut to 4 lines so every card keeps the same size */
.v-card blockquote { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.v-card figcaption { display: flex; align-items: center; gap: calc(12 * var(--u)); }
.v-avatar { display: grid; place-items: center; width: calc(33 * var(--u)); height: calc(33 * var(--u)); border-radius: 50%; background: #d6d9e0; color: #8a90a0; flex-shrink: 0; }
.v-avatar .icon { width: 60%; height: 60%; }
.v-card strong { display: block; font-size: calc(12 * var(--u)); color: var(--navy); font-weight: 600; }
.v-card small { display: block; font-size: calc(10 * var(--u)); color: var(--muted); }
.v-more {
  margin-left: auto; align-self: flex-end; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: calc(10 * var(--u)); font-weight: 600; color: var(--orange); white-space: nowrap;
}
.v-more:hover { text-decoration: underline; }
.v-more[hidden] { display: none; }
/* Full testimonial popup */
.v-dialog {
  width: min(calc(100% - 32px), 480px); margin: auto; padding: 28px 24px 22px; border: 0; border-radius: 12px;
  background: var(--white); box-shadow: 0 20px 50px rgba(11, 31, 68, .25);
}
.v-dialog::backdrop { background: rgba(11, 31, 68, .45); }
.v-dialog blockquote { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--ink); }
.v-dialog figcaption { display: flex; align-items: center; gap: 12px; }
.v-dialog strong { display: block; font-size: 15px; color: var(--navy); font-weight: 600; }
.v-dialog small { display: block; font-size: 13px; color: var(--muted); }
.v-close {
  position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; padding: 0; border: 0;
  background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer;
}
.v-close:hover { color: var(--orange); }
.v-nav {
  display: grid; place-items: center; width: calc(23 * var(--u)); height: calc(23 * var(--u));
  border-radius: 50%; border: 1px solid #e3e6ec; background: var(--white); color: var(--navy); cursor: pointer; padding: 0;
}
.v-nav .icon { width: 50%; height: 50%; }
.v-prev .icon { transform: rotate(180deg); }
.v-nav:hover { border-color: var(--orange); color: var(--orange); }
.v-dots { grid-column: 2; display: flex; justify-content: center; gap: calc(8 * var(--u)); margin-top: calc(10 * var(--u)); }
.v-dots button { width: calc(8 * var(--u)); height: calc(8 * var(--u)); padding: 0; border: 0; border-radius: 50%; background: #d3d6dd; cursor: pointer; }
.v-dots button.on { background: var(--orange); }

/* Home page — tablet & phone */
@media (max-width: 879px) {
  .link-arrow { font-size: 15px; gap: 8px; }
  .link-arrow .icon { width: 16px; height: 16px; }
  .home-hero { --uh: 1px; grid-template-columns: 1fr; padding: 0; gap: 0; }
  .home-hero-card { height: auto; max-height: none; min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); margin: 0; border-radius: 0; }
  .home-hero-copy { padding: 48px 24px 0; }
  .home-hero-copy h1 .line { white-space: nowrap; }
  .home-hero-copy .kicker { font-size: 11px; }
  .home-hero-copy h1 { font-size: min(52px, 7.2vw); }  /* sized so each line fits the screen */
  .home-hero-copy p { font-size: 16px; line-height: 1.5; max-width: 520px; }
  .home-hero-copy .btn { height: 46px; font-size: 15px; }
  .home-hero-points { margin: 32px 24px 28px; padding-top: 24px; flex-wrap: wrap; row-gap: 16px; }
  .home-hero-points li { font-size: 14px; padding: 0 14px; }
  .home-hero-points .icon { width: 28px; height: 28px; }
  .home-hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 24px; }
  .home-hero-side .q-card { max-height: none; flex-direction: row; align-items: center; padding: 12px 14px 12px 18px; gap: 12px; }
  .home-hero-side .q-card .round-arrow { position: static; }
  .home-hero-side .q-card > .icon { width: 44px; height: 44px; padding: 10px; }
  .home-hero-side .q-card strong { font-size: 15px; }
  .home-hero-side .q-card small { font-size: 13px; }
  .home-script { grid-column: 1 / -1; width: 220px; margin: 0 auto; }
  .q-card { min-height: 92px; gap: 12px; padding: 12px 14px; }
  .q-card > .icon { width: 44px; height: 44px; padding: 10px; }
  .q-card { padding-left: 18px; border-radius: 10px; }
  .q-card strong { font-size: 15px; }
  .q-card small { font-size: 13px; max-width: none; }
  .q-card .round-arrow { width: 28px; height: 28px; }

  .home-sec { padding: 48px 0; }
  .home-sec > .container { padding: 0 24px; }
  .home-split, .home-progs .home-split, .home-approach .home-split, .voices-split { grid-template-columns: 1fr !important; gap: 28px !important; }
  .home-intro .kicker { font-size: 12px; }
  .home-intro h2, .home-voices .home-intro h2 { font-size: 32px; }
  .home-intro p, .home-intro .intro-lg, .home-voices .home-intro p { font-size: 16px; line-height: 1.5; max-width: 560px; }
  .home-intro .btn { height: 46px; min-width: 0; font-size: 15px; }

  .free-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .free-card { min-height: 0; border-radius: 10px; }
  .free-img { height: 120px; }
  .free-body { padding: 18px 16px; }
  .free-body > .icon { width: 28px; height: 28px; }
  .free-body strong { font-size: 18px; }
  .free-body small { font-size: 14px; }
  .free-body .round-arrow { width: 30px; height: 30px; }

  .hp-card { min-height: 170px; padding: 22px 20px; gap: 16px; border-radius: 10px; }
  .hp-card::before { background: linear-gradient(90deg, #fff 0%, #fff 60%, rgba(255, 255, 255, .6) 100%); }
  .hp-icon { width: 40px; height: 40px; }
  .hp-card h3 { font-size: 19px; flex-wrap: wrap; }
  .hp-card .pill { height: 24px; font-size: 12px; }
  .hp-card p { font-size: 15px; max-width: 420px; }

  .approach-grid { gap: 12px; }
  .approach-card { min-height: 120px; gap: 12px; border-radius: 10px; }
  .approach-card .icon { width: 32px; height: 32px; }
  .approach-card span { font-size: 15px; }

  .tb-banner-wrap { padding: 0 24px; }
  .tb-banner { min-height: 0; border-radius: 12px; }
  .tb-photo { left: auto; right: 0; width: 55%; opacity: .55; }
  .tb-copy { padding: 36px 24px 24px; max-width: none; position: relative; }
  .tb-copy .kicker { font-size: 12px; }
  .tb-copy h2 { font-size: 28px; }
  .tb-copy p { font-size: 15px; }
  .tb-copy p br { display: none; }
  .tb-copy .btn { height: 46px; font-size: 15px; min-width: 0; }
  .tb-quote { position: relative; top: auto; right: auto; width: auto; padding: 0 24px 32px; font-size: 17px; }
  .tb-quote::after { width: 80px; margin-top: 16px; }

  .v-card { flex-basis: calc((100% - 13px) / 2); min-height: 176px; padding: 18px; border-radius: 10px; }
  .v-card blockquote { font-size: 14px; }
  .v-avatar { width: 38px; height: 38px; }
  .v-card strong { font-size: 15px; }
  .v-card small { font-size: 13px; }
  .v-more { font-size: 13px; }
  .v-nav { width: 34px; height: 34px; }
  .v-dots { gap: 10px; margin-top: 12px; }
  .v-dots button { width: 9px; height: 9px; }
}
@media (max-width: 560px) {
  .home-hero-copy { padding: 40px 16px 0; }
  .home-hero-copy .btn { width: 100%; }
  .home-hero-points { margin: 28px 16px 24px; justify-content: flex-start; }
  .home-hero-points li { flex: 0 0 50%; border: 0; padding: 0 0 0 8px; }
  .home-hero-side { grid-template-columns: 1fr; padding: 20px 16px; }
  .home-sec > .container { padding: 0 16px; }
  .free-grid { grid-template-columns: 1fr; }
  .approach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-banner-wrap { padding: 0 16px; }
  .v-card { flex-basis: 100%; }
  .voices { gap: 6px; }
}

/* ==========================================================
   About page (about.php) — measured from the 1024px About mockup (1px = 1u)
   ========================================================== */
.serif { font-family: var(--font); font-weight: 700; letter-spacing: -0.025em; }
.about-wrap { max-width: calc(1024 * var(--u)); margin: 0 auto; padding: 0 calc(52 * var(--u)); }
.about-text { padding-left: calc(31 * var(--u)); }
.about-text h2 { font-size: calc(32 * var(--u)); line-height: 1.1; margin-bottom: calc(14 * var(--u)); }
.about-text p { font-size: calc(13 * var(--u)); line-height: 1.38; color: var(--ink); margin-bottom: calc(12 * var(--u)); max-width: calc(452 * var(--u)); }

/* Hero */
.about-hero { min-height: calc(309 * var(--u)); padding: calc(44 * var(--u)) 0 calc(24 * var(--u)); background-color: #fcf3e4; }
.about-hero::before { background: linear-gradient(90deg, #fcf3e4 0%, #fcf3e4 41%, rgba(252, 243, 228, 0) 50%); }
.about-hero .hero-copy { margin-left: calc(43 * var(--u)); max-width: calc(380 * var(--u)); }
.about-hero .kicker { font-size: calc(11.5 * var(--u)); margin-bottom: calc(6 * var(--u)); }
.about-hero h1 { font-size: calc(46 * var(--u)); line-height: 1.02; font-weight: 600; letter-spacing: 0; margin-bottom: calc(14 * var(--u)); }
.about-hero .hero-copy p { font-size: calc(14 * var(--u)); line-height: 1.3; max-width: calc(345 * var(--u)); margin-bottom: calc(14 * var(--u)); }
.about-hero .btn { min-width: calc(116 * var(--u)); font-size: calc(12.5 * var(--u)); font-weight: 500; }

/* Story */
.about-story { padding: calc(40 * var(--u)) 0 calc(44 * var(--u)); text-align: center; }
.about-story h2 { font-size: calc(32 * var(--u)); line-height: 1.1; }
.about-story h2::after { content: ""; display: block; width: calc(40 * var(--u)); height: 3px; margin: calc(14 * var(--u)) auto calc(18 * var(--u)); background: var(--orange); border-radius: 2px; }
.about-story p { max-width: calc(580 * var(--u)); margin: 0 auto calc(12 * var(--u)); font-size: calc(14 * var(--u)); line-height: 1.6; color: var(--ink); }
.about-story p:last-child { margin-bottom: 0; }

/* We understand */
.about-understand { background: #faf8f5; padding: calc(18 * var(--u)) 0 calc(20 * var(--u)); }
.about-understand h2 { font-size: calc(26 * var(--u)); line-height: 1.1; padding-left: calc(31 * var(--u)); margin-bottom: calc(12 * var(--u)); }
.understand-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: calc(9 * var(--u)); }
.understand-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(12 * var(--u));
  min-height: calc(137 * var(--u)); padding: calc(10 * var(--u)) calc(14 * var(--u));
  background: var(--white); border: 1px solid #f1ede7; border-radius: calc(6 * var(--u));
  box-shadow: 0 2px 10px rgba(20, 36, 92, .04); text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.understand-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(240, 90, 26, .12); }
.u-icon { display: grid; place-items: center; width: calc(55 * var(--u)); height: calc(55 * var(--u)); border-radius: 50%; background: #fde9dc; color: var(--orange); flex-shrink: 0; }
.u-icon .icon { width: calc(26 * var(--u)); height: calc(26 * var(--u)); stroke-width: 1.7; }
.understand-card p { font-size: calc(11.5 * var(--u)); line-height: 1.32; font-weight: 600; color: var(--navy); letter-spacing: 0; }

/* Approach */
.about-approach { display: grid; grid-template-columns: calc(482 * var(--u)) minmax(0, 1fr); align-items: center; min-height: calc(185 * var(--u)); margin-top: calc(8 * var(--u)); max-width: calc(1024 * var(--u)); margin-left: auto; margin-right: auto; }
.approach-photo { align-self: stretch; min-height: calc(185 * var(--u)); background: center / cover no-repeat; }
.about-approach .about-text { padding: calc(12 * var(--u)) calc(52 * var(--u)) 0 calc(38 * var(--u)); }
.about-approach h2 { margin-bottom: calc(16 * var(--u)); }

/* Our team — centred cards; .is-compact / .is-smaller / .is-smallest (set by team size) make every card smaller */
.about-team { padding: calc(36 * var(--u)) 0 calc(28 * var(--u)); text-align: center; }
.about-team h2 { font-size: calc(32 * var(--u)); line-height: 1.1; }
.about-team h2::after { content: ""; display: block; width: calc(40 * var(--u)); height: 3px; margin: calc(14 * var(--u)) auto calc(24 * var(--u)); background: var(--orange); border-radius: 2px; }
.team-grid {
  --card: calc(196 * var(--u)); --gap-x: calc(24 * var(--u)); --gap-y: calc(24 * var(--u));
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap-y) var(--gap-x); margin: 0 auto;
  max-width: calc(var(--per-row, 4) * var(--card) + (var(--per-row, 4) - 1) * var(--gap-x));   /* --per-row (from about.php) balances the rows */
}
.team-card { width: var(--card); margin: 0; }
.team-card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: calc(10 * var(--u)); background: #eef0f4; box-shadow: 0 4px 14px rgba(20, 36, 92, .08); }
.team-card figcaption { margin-top: calc(10 * var(--u)); }
.team-card strong { display: block; font-size: calc(15 * var(--u)); line-height: 1.25; color: var(--navy); font-weight: 700; }
.team-card small { display: block; margin-top: calc(3 * var(--u)); font-size: calc(12 * var(--u)); line-height: 1.3; color: var(--orange); font-weight: 600; }
.team-grid.is-compact { --card: calc(148 * var(--u)); --gap-x: calc(16 * var(--u)); --gap-y: calc(20 * var(--u)); }
.is-compact .team-card img { border-radius: calc(8 * var(--u)); }
.is-compact .team-card strong { font-size: calc(13 * var(--u)); }
.is-compact .team-card small { font-size: calc(11 * var(--u)); }
.team-grid.is-smaller { --card: calc(124 * var(--u)); --gap-x: calc(14 * var(--u)); --gap-y: calc(18 * var(--u)); }
.is-smaller .team-card strong { font-size: calc(12 * var(--u)); }
.is-smaller .team-card small { font-size: calc(10.5 * var(--u)); }
.team-grid.is-smallest { --card: calc(106 * var(--u)); --gap-x: calc(12 * var(--u)); --gap-y: calc(16 * var(--u)); }
.is-smallest .team-card img { border-radius: calc(6 * var(--u)); }
.is-smallest .team-card strong { font-size: calc(11.5 * var(--u)); }
.is-smallest .team-card small { font-size: calc(10 * var(--u)); }

/* Purpose & philosophy */
.about-values { padding: calc(20 * var(--u)) 0 calc(8 * var(--u)); }
.values-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(24 * var(--u)); }
.value-card {
  display: flex; gap: calc(32 * var(--u)); align-items: flex-start;
  min-height: calc(165 * var(--u)); padding: calc(24 * var(--u)) calc(28 * var(--u)) calc(20 * var(--u)) calc(33 * var(--u));
  background: #fbfaf8; border: 1px solid #f1ede7; border-radius: calc(6 * var(--u));
}
.value-icon { width: calc(50 * var(--u)); height: calc(50 * var(--u)); color: var(--orange); flex-shrink: 0; }
.value-card .kicker { font-size: calc(9.5 * var(--u)); margin-bottom: calc(8 * var(--u)); }
.value-card h3 { font-size: calc(21 * var(--u)); line-height: 1.12; margin-bottom: calc(10 * var(--u)); }
.value-card p { font-size: calc(11.5 * var(--u)); line-height: 1.5; color: var(--muted); }

/* Quote band */
.about-quote { padding: calc(36 * var(--u)) 0 calc(52 * var(--u)); text-align: center; }
.about-quote figure { margin: 0 auto; }
.quote-glyph {
  display: block; height: calc(34 * var(--u));
  font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: calc(72 * var(--u)); line-height: .9; color: var(--orange);
}
.about-quote blockquote {
  margin: 0 auto; max-width: calc(600 * var(--u));
  font-size: calc(28 * var(--u)); line-height: 1.25; font-weight: 600; color: var(--navy);
}
.about-quote figcaption {
  display: inline-flex; align-items: center; gap: calc(12 * var(--u));
  margin-top: calc(20 * var(--u));
  font-size: calc(11 * var(--u)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange);
}
.about-quote figcaption::before, .about-quote figcaption::after { content: ""; width: calc(28 * var(--u)); height: 2px; background: currentColor; }

/* About — tablet & phone */
@media (max-width: 879px) {
  .about-wrap { padding: 0 24px; }
  .about-text { padding-left: 0; }
  .about-text h2 { font-size: 30px; }
  .about-text p { font-size: 16px; line-height: 1.55; max-width: 600px; }
  .about-hero { min-height: 0; padding: 52px 0; }
  .about-hero::before { background: linear-gradient(90deg, rgba(251, 244, 234, .97) 0%, rgba(251, 244, 234, .9) 60%, rgba(251, 244, 234, .3) 100%); }
  .about-hero .hero-copy { margin-left: 0; max-width: 560px; }
  .about-hero .kicker { font-size: 13px; }
  .about-hero h1 { font-size: clamp(38px, 7vw, 52px); }
  .about-hero .hero-copy p { font-size: 17px; line-height: 1.5; max-width: 520px; margin-bottom: 24px; }
  .about-hero .btn { font-size: 15px; }
  .about-story { padding: 48px 0; }
  .about-story h2 { font-size: 30px; }
  .about-story h2::after { width: 40px; margin: 14px auto 18px; }
  .about-story p { max-width: 560px; font-size: 16px; }
  .about-understand { padding: 40px 0; margin-top: 40px; }
  .about-understand h2 { font-size: 28px; padding-left: 0; margin-bottom: 18px; }
  .understand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .understand-card { min-height: 150px; padding: 18px 14px; border-radius: 10px; }
  .u-icon { width: 56px; height: 56px; }
  .u-icon .icon { width: 26px; height: 26px; }
  .understand-card p { font-size: 15px; }
  .about-approach { grid-template-columns: 1fr; margin-top: 0; }
  .approach-photo { min-height: 0; aspect-ratio: 481 / 183; }
  .about-approach .about-text { padding: 28px 24px 8px; }
  .about-values { padding: 24px 0 40px; }
  .values-grid { grid-template-columns: 1fr; gap: 16px; }
  .value-card { min-height: 0; gap: 20px; padding: 24px; border-radius: 10px; }
  .value-icon { width: 46px; height: 46px; }
  .value-card .kicker { font-size: 12px; }
  .value-card h3 { font-size: 22px; }
  .value-card p { font-size: 15px; }
  .about-quote { padding: 32px 0 56px; }
  .quote-glyph { height: 36px; font-size: 76px; }
  .about-quote blockquote { max-width: 560px; font-size: 26px; }
  .about-quote figcaption { margin-top: 18px; font-size: 13px; gap: 10px; }
  .about-quote figcaption::before, .about-quote figcaption::after { width: 24px; }
  .about-team { padding: 44px 0 32px; }
  .about-team h2 { font-size: 30px; }
  .about-team h2::after { margin: 14px auto 24px; }
  .team-grid { gap: 20px; max-width: none; }
  .team-card { width: min(190px, calc((100% - 3 * 20px) / 4)); }
  .team-card strong { font-size: 15px; }
  .team-card small { font-size: 13px; }
  .team-grid.is-compact { gap: 18px 14px; }
  .is-compact .team-card { width: calc((100% - 4 * 14px) / 5); }
  .is-compact .team-card strong { font-size: 13px; }
  .is-compact .team-card small { font-size: 12px; }
  .team-grid.is-smaller, .team-grid.is-smallest { gap: 16px 12px; }
  .is-smaller .team-card { width: calc((100% - 5 * 12px) / 6); }
  .is-smallest .team-card { width: calc((100% - 6 * 12px) / 7); }
  .is-smaller .team-card strong, .is-smallest .team-card strong { font-size: 12px; }
  .is-smaller .team-card small, .is-smallest .team-card small { font-size: 11px; }
}
@media (max-width: 560px) {
  .about-wrap { padding: 0 16px; }
  .team-grid { gap: 16px; }
  .team-card { width: min(200px, calc((100% - 16px) / 2)); }
  .team-grid.is-compact { gap: 16px 12px; }
  .is-compact .team-card { width: calc((100% - 2 * 12px) / 3); }
  .is-compact .team-card strong { font-size: 12px; }
  .is-compact .team-card small { font-size: 11px; }
  .team-grid.is-smaller, .team-grid.is-smallest { gap: 14px 10px; }
  .is-smaller .team-card, .is-smallest .team-card { width: calc((100% - 3 * 10px) / 4); }
  .is-smaller .team-card strong, .is-smallest .team-card strong { font-size: 11px; }
  .is-smaller .team-card small, .is-smallest .team-card small { font-size: 10px; }
  .understand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .understand-card:last-child { grid-column: 1 / -1; }
  .about-approach .about-text { padding: 24px 16px 8px; }
  .value-card { flex-direction: column; }
  .about-quote blockquote { font-size: 22px; }
}

/* ==========================================================
   Contact page (contact.php) — measured from the 1024px Contact mockup (1px = 1u)
   ========================================================== */
.tagline { display: block; font-size: calc(15 * var(--u)); font-weight: 500; color: var(--navy); }
.tagline::before { content: ""; display: block; width: calc(44 * var(--u)); height: 3px; margin-bottom: calc(18 * var(--u)); background: var(--orange); transform: rotate(-4deg); transform-origin: left; }

/* Hero */
.contact-hero { min-height: calc(308 * var(--u)); padding: calc(38 * var(--u)) 0 calc(24 * var(--u)); background-color: #fcf3e4; }
.contact-hero::before { background: linear-gradient(90deg, #fcf3e4 0%, #fcf3e4 42%, rgba(252, 243, 228, 0) 50%); }
.contact-hero .hero-copy { margin-left: calc(22 * var(--u)); max-width: calc(400 * var(--u)); }
.contact-hero .kicker { font-size: calc(11.5 * var(--u)); letter-spacing: .06em; margin-bottom: calc(4 * var(--u)); }
.contact-hero h1 { font-size: calc(46 * var(--u)); line-height: 1.04; font-weight: 600; letter-spacing: 0; margin-bottom: calc(16 * var(--u)); }
.contact-hero .hero-copy p { font-size: calc(14 * var(--u)); line-height: 1.43; color: var(--ink); max-width: calc(380 * var(--u)); margin-bottom: calc(16 * var(--u)); }

/* Shared */
.contact-wrap { max-width: calc(1024 * var(--u)); margin: 0 auto; padding: 0 calc(44 * var(--u)); }
.contact-main .kicker, .contact-visit .kicker { font-size: calc(11 * var(--u)); letter-spacing: .06em; margin-bottom: calc(6 * var(--u)); }
.card-sub { font-size: calc(13.5 * var(--u)); line-height: 1.48; color: var(--muted); }
.i-circle { display: grid; place-items: center; flex-shrink: 0; width: calc(52 * var(--u)); height: calc(52 * var(--u)); border-radius: 50%; background: #fde9dc; color: var(--orange); }
.i-circle .icon { width: calc(21 * var(--u)); height: calc(21 * var(--u)); stroke-width: 1.8; }

/* Form + info */
.contact-main { padding: calc(27 * var(--u)) 0 calc(17 * var(--u)); }
.contact-cols { display: grid; grid-template-columns: minmax(0, 1fr) calc(344 * var(--u)); gap: calc(16 * var(--u)); align-items: stretch; }
.form-card, .info-card { border-radius: calc(8 * var(--u)); border: 1px solid #f0ede8; }
.form-card { padding: calc(15 * var(--u)) calc(35 * var(--u)) calc(16 * var(--u)); background: var(--white); box-shadow: 0 2px 14px rgba(20, 36, 92, .04); }
.form-card h2, .info-card h2 { font-size: calc(30 * var(--u)); line-height: 1.1; margin-bottom: calc(8 * var(--u)); }
.form-card .card-sub { margin-bottom: calc(18 * var(--u)); }
.form-card .alert { margin-bottom: calc(14 * var(--u)); }
.field { display: block; margin-bottom: calc(18 * var(--u)); }
.field .label { display: block; font-size: calc(12 * var(--u)); font-weight: 600; color: var(--navy); margin-bottom: calc(8 * var(--u)); }
.field .label i { font-style: normal; color: var(--orange); }
.field .control { position: relative; display: flex; align-items: center; }
.field .control > .icon:first-child { position: absolute; left: calc(15 * var(--u)); width: calc(17 * var(--u)); height: calc(17 * var(--u)); color: #5b6478; pointer-events: none; stroke-width: 1.7; }
.field input, .field select {
  width: 100%; height: calc(38 * var(--u)); margin: 0; padding: 0 calc(40 * var(--u)) 0 calc(46 * var(--u));
  font-family: var(--font); font-size: calc(11.5 * var(--u)); color: var(--ink);
  background: var(--white); border: 1px solid #e3e6ec; border-radius: calc(6 * var(--u));
  appearance: none; -webkit-appearance: none; transition: border-color .2s, box-shadow .2s;
}
.field select { cursor: pointer; }
.field select:invalid { color: #8a90a0; }
.field input::placeholder { color: #8a90a0; }
.field input:focus, .field select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 90, 26, .12); }
.field .control > .icon:last-child:not(:first-child) { position: absolute; right: calc(16 * var(--u)); width: calc(13 * var(--u)); height: calc(13 * var(--u)); color: #5b6478; pointer-events: none; }
.field .prefix { position: absolute; right: calc(18 * var(--u)); font-size: calc(11.5 * var(--u)); color: #5b6478; pointer-events: none; }
.field .err { display: block; margin-top: calc(5 * var(--u)); font-size: calc(10.5 * var(--u)); color: #c62828; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #e57373; }
.field .label small { font-weight: 500; color: #8a90a0; }
.field textarea {
  width: 100%; min-height: calc(84 * var(--u)); margin: 0; padding: calc(10 * var(--u)) calc(14 * var(--u)) calc(10 * var(--u)) calc(46 * var(--u));
  font-family: var(--font); font-size: calc(11.5 * var(--u)); line-height: 1.5; color: var(--ink); resize: vertical;
  background: var(--white); border: 1px solid #e3e6ec; border-radius: calc(6 * var(--u)); transition: border-color .2s, box-shadow .2s;
}
.field textarea::placeholder { color: #8a90a0; }
.field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 90, 26, .12); }
.field-message .control { align-items: flex-start; }
.field-message .control > .icon:first-child { top: calc(12 * var(--u)); }
.form-card .btn { height: calc(42 * var(--u)); margin-top: calc(4 * var(--u)); font-size: calc(13.5 * var(--u)); font-weight: 500; border-radius: calc(5 * var(--u)); }
.form-card .btn .icon { width: calc(15 * var(--u)); height: calc(15 * var(--u)); }
.privacy { display: flex; gap: calc(12 * var(--u)); align-items: flex-start; margin-top: calc(14 * var(--u)); padding: 0 calc(6 * var(--u)); font-size: calc(11.5 * var(--u)); line-height: 1.4; color: #6b7385; }
.privacy .icon { width: calc(15 * var(--u)); height: calc(15 * var(--u)); margin-top: 1px; color: #9aa0ad; }

.info-card { padding: calc(28 * var(--u)) calc(28 * var(--u)) calc(20 * var(--u)) calc(30 * var(--u)); background: #faf8f5; }
.info-card .card-sub { margin-bottom: calc(14 * var(--u)); }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; align-items: center; gap: calc(18 * var(--u)); padding: calc(18 * var(--u)) 0; }
.info-list li + li { border-top: 1px solid #e8e3dc; }
.info-list strong { display: block; font-size: calc(11.5 * var(--u)); font-weight: 600; color: var(--navy); margin-bottom: calc(2 * var(--u)); }
.info-list a, .info-list address { display: block; font-size: calc(12.5 * var(--u)); line-height: 1.42; color: var(--navy); font-style: normal; overflow-wrap: anywhere; }
.info-list li:last-child strong { font-size: calc(11.5 * var(--u)); }
.info-list a:hover { color: var(--orange); }

/* Visit us */
.contact-visit { background: #f8f7f4; padding: calc(10 * var(--u)) 0 calc(28 * var(--u)); }
.visit-cols { display: grid; grid-template-columns: minmax(0, 1fr) calc(548 * var(--u)); gap: calc(24 * var(--u)); align-items: center; }
.visit-text { padding-left: calc(19 * var(--u)); }
.visit-text h2 { font-size: calc(30 * var(--u)); line-height: 1.1; margin-bottom: calc(10 * var(--u)); }
.visit-text p { font-size: calc(14.5 * var(--u)); line-height: 1.45; color: var(--ink); max-width: calc(345 * var(--u)); margin-bottom: calc(14 * var(--u)); }
.visit-address {
  display: flex; align-items: center; gap: calc(18 * var(--u));
  max-width: calc(347 * var(--u)); padding: calc(14 * var(--u)) calc(16 * var(--u));
  background: #fbfaf8; border: 1px solid #efebe5; border-radius: calc(6 * var(--u)); transition: border-color .2s, box-shadow .2s;
}
.visit-address:hover { border-color: #f7c9b0; box-shadow: 0 8px 20px rgba(240, 90, 26, .1); }
.visit-address .i-circle { width: calc(46 * var(--u)); height: calc(46 * var(--u)); }
.visit-address address { font-style: normal; font-size: calc(12.5 * var(--u)); line-height: 1.45; color: var(--navy); }
.map-box { position: relative; height: calc(240 * var(--u)); border-radius: calc(6 * var(--u)); overflow: hidden; background: #e9ecef; }
.map-box iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(.75) contrast(.95); }
.map-tag {
  position: absolute; left: 50%; top: 32%;
  display: flex; align-items: center; gap: calc(10 * var(--u));
  padding: calc(8 * var(--u)) calc(14 * var(--u)) calc(8 * var(--u)) calc(10 * var(--u));
  background: var(--white); border-radius: calc(6 * var(--u)); box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}
.map-tag .icon { width: calc(26 * var(--u)); height: calc(26 * var(--u)); color: var(--white); fill: var(--orange); stroke: var(--white); stroke-width: 1.6; }
.map-tag strong { display: block; font-size: calc(12 * var(--u)); font-weight: 600; color: var(--navy); }
.map-tag small { display: block; font-size: calc(11 * var(--u)); color: var(--ink); }


/* Contact — tablet & phone */
@media (max-width: 879px) {
  .tagline { font-size: 16px; }
  .tagline::before { width: 44px; margin-bottom: 14px; }
  .contact-hero { min-height: 0; padding: 52px 0; }
  .contact-hero::before { background: linear-gradient(90deg, rgba(252, 243, 228, .97) 0%, rgba(252, 243, 228, .9) 60%, rgba(252, 243, 228, .3) 100%); }
  .contact-hero .hero-copy { margin-left: 0; max-width: 560px; }
  .contact-hero .kicker { font-size: 13px; }
  .contact-hero h1 { font-size: clamp(38px, 7vw, 52px); }
  .contact-hero .hero-copy p { font-size: 17px; line-height: 1.5; max-width: 520px; margin-bottom: 22px; }
  .contact-wrap { padding: 0 24px; }
  .contact-main .kicker, .contact-visit .kicker { font-size: 12px; }
  .card-sub { font-size: 15px; }
  .i-circle { width: 50px; height: 50px; }
  .i-circle .icon { width: 22px; height: 22px; }
  .contact-main { padding: 32px 0; }
  .contact-cols { grid-template-columns: 1fr; gap: 20px; }
  .form-card, .info-card { border-radius: 12px; padding: 26px 22px; }
  .form-card h2, .info-card h2 { font-size: 28px; }
  .field { margin-bottom: 18px; }
  .field .label { font-size: 14px; }
  .field input, .field select { height: 48px; font-size: 16px; padding: 0 44px 0 44px; border-radius: 8px; }
  .field textarea { min-height: 110px; font-size: 16px; padding: 12px 14px 12px 44px; border-radius: 8px; }
  .field-message .control > .icon:first-child { top: 15px; }
  .field .control > .icon:first-child { left: 14px; width: 18px; height: 18px; }
  .field .control > .icon:last-child:not(:first-child) { width: 15px; height: 15px; }
  .field .prefix { font-size: 15px; }
  .field .err { font-size: 13px; }
  .form-card .btn { height: 50px; font-size: 16px; }
  .privacy { font-size: 13px; }
  .info-list strong, .info-list li:last-child strong { font-size: 14px; }
  .info-list a, .info-list address { font-size: 15px; }
  .contact-visit { padding: 36px 0; }
  .visit-cols { grid-template-columns: 1fr; gap: 22px; }
  .visit-text { padding-left: 0; }
  .visit-text h2 { font-size: 28px; }
  .visit-text p { font-size: 16px; max-width: 560px; }
  .visit-address { max-width: 460px; }
  .visit-address address { font-size: 14px; }
  .map-box { height: 300px; border-radius: 12px; }
  .map-tag strong { font-size: 14px; }
  .map-tag small { font-size: 13px; }
  .map-tag .icon { width: 26px; height: 26px; }
}
@media (max-width: 560px) {
  .contact-wrap { padding: 0 16px; }
  .map-tag { left: 50%; transform: translateX(-50%); }
}

/* ==========================================================
   Type scale — keeps description sizes consistent on every page.
   Change a value here and every matching description updates.
   ========================================================== */
:root {
  --fs-hero-p: calc(12.5 * var(--u));     /* paragraph under each page's main heading */
  --fs-section-p: calc(11.5 * var(--u)); /* description next to a section title */
  --fs-card-p: calc(11 * var(--u));      /* description inside a card */
}

/* Hero paragraphs */
.hero-copy p, .home-hero-copy p, .page-hero p,
.about-hero .hero-copy p, .contact-hero .hero-copy p,
.res-lead { font-size: var(--fs-hero-p); line-height: 1.45; }
.hero-copy .res-sub { font-size: var(--fs-section-p); line-height: 1.45; }

/* Section descriptions */
.home-intro p, .home-intro .intro-lg, .home-voices .home-intro p,
.tb-copy p, .about-text p, .card-sub, .visit-text p,
.prog-desc, .prog-soon .prog-desc {
  font-size: var(--fs-section-p); line-height: 1.5;
}

/* Card descriptions */
.free-body small, .res-card p, .hp-card p, .prog-side p, .value-card p,
.v-card blockquote, .q-card small, .home-hero-side .q-card small, .cat-card p {
  font-size: var(--fs-card-p); line-height: 1.5;
}

@media (max-width: 879px) {
  :root { --fs-hero-p: 15px; --fs-section-p: 15px; --fs-card-p: 14px; }
  .understand-card p { font-size: 14px; }
}

/* ==========================================================
   Centred page hero — Free Resources, Programmes, About, Contact.
   Light background (matches the home hero), content centred,
   each heading line kept on one line.
   ========================================================== */
.hero-center {
  display: flex; align-items: center; text-align: center;
  min-height: calc(290 * var(--u)); padding: calc(40 * var(--u)) 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(240, 90, 26, .10), transparent 70%),
    linear-gradient(180deg, #fdf8f1 0%, #fbf1e4 55%, #f7e6d2 100%);
}
.hero-center::before { display: none; }
.hero-center .hero-copy { max-width: calc(640 * var(--u)); margin: 0 auto; }
.hero-center .kicker { font-size: calc(10.5 * var(--u)); letter-spacing: .08em; margin-bottom: calc(10 * var(--u)); }
.hero-center h1 { font-size: calc(44 * var(--u)); line-height: 1.06; letter-spacing: -0.03em; margin-bottom: calc(14 * var(--u)); }
.hero-center h1 .line { display: block; white-space: nowrap; }
.hero-center .hero-copy p { margin-left: auto; margin-right: auto; max-width: calc(470 * var(--u)); }
.hero-center .hero-actions, .hero-center .res-pillars { justify-content: center; }
.hero-center .tagline::before { margin-left: auto; margin-right: auto; transform: none; }

@media (max-width: 879px) {
  .hero-center { min-height: 0; padding: 52px 0; }
  .hero-center .hero-copy { margin: 0 auto; max-width: 600px; }
  .hero-center .kicker { font-size: 13px; }
  .hero-center h1 { font-size: min(50px, 9.5vw); }  /* sized so each line fits the screen */
  .hero-center .hero-copy p { max-width: 520px; }
}

/* Frequency badge on the Free Resources category cards (Daily / Weekly / Monthly) */
.freq-badge {
  position: absolute; top: calc(12 * var(--u)); right: calc(10 * var(--u));
  padding: calc(3 * var(--u)) calc(7 * var(--u)); border-radius: 999px;
  font-size: calc(8 * var(--u)); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.2;
}
.freq-daily   { color: #c2410c; background: #ffedd5; }
.freq-weekly  { color: #1d4ed8; background: #dbeafe; }
.freq-monthly { color: #6d28d9; background: #ede9fe; }
@media (max-width: 879px) {
  .freq-badge { top: 14px; right: 12px; padding: 4px 9px; font-size: 11px; }
}

/* Programmes page — "Other Programmes" card: no photo, content centred */
.prog-soon {
  grid-template-columns: 1fr; text-align: center;
  padding: calc(30 * var(--u)) calc(32 * var(--u));
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(240, 90, 26, .07), transparent 70%),
    var(--white);
}
.prog-soon .prog-body { margin: 0 auto; padding: 0; align-items: center; max-width: calc(620 * var(--u)); }
.prog-soon .prog-desc { margin-left: auto; margin-right: auto; }
.prog-soon .soon-row { justify-content: center; }
.prog-soon .soon-row .note { text-align: left; }
@media (max-width: 879px) {
  .prog-soon { padding: 28px 20px; }
  .prog-soon .prog-body { margin: 0 auto; padding: 0; }
  .prog-soon .soon-row { align-items: stretch; }
}

/* Footer credit */
.dev-credit strong { color: var(--white); font-weight: 600; }
.dev-credit a { color: inherit; text-decoration: none; }
.dev-credit a:hover strong { color: var(--orange); }
@media (min-width: 880px) {
  .footer-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .footer-bottom > :last-child { justify-self: end; }
}

/* Home hero spans the full screen width like the other page heroes */
@media (min-width: 880px) {
  .home-hero { max-width: none; padding: 0; }
  .home-hero-card {
    margin: 0; border: 0; border-radius: 0; border-bottom: 1px solid #f3e6d6;
    height: calc(90vh - 52 * var(--u));
    height: calc(90svh - 52 * var(--u));
  }
  .home-hero-side { max-width: calc(1024 * var(--u)); margin: calc(14 * var(--u)) auto calc(4 * var(--u)); padding: 0 calc(36 * var(--u)); }
}

/* Same-size "Explore" buttons on every page */
.home-hero-copy .hero-actions .btn,
.hero-center .hero-actions .btn {
  height: calc(36 * var(--u)); min-width: calc(192 * var(--u)); padding: 0 calc(16 * var(--u));
  font-size: calc(11.5 * var(--u));
}
@media (max-width: 879px) {
  .home-hero-copy .hero-actions .btn, .hero-center .hero-actions .btn { height: 44px; min-width: 200px; font-size: 14px; }
}
@media (max-width: 560px) {
  .home-hero-copy .hero-actions .btn, .hero-center .hero-actions .btn { width: 100%; min-width: 0; }
}

/* Header: nav links centred on the page (logo left, button right) */
@media (min-width: 880px) {
  .nav-wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .main-nav { margin: 0; }
  .nav-actions { margin-left: 0; justify-self: end; }
}

/* Compact cards: home "Free Resources" cards and Free Resources category cards */
.free-card { min-height: 0; }
.free-img { height: calc(70 * var(--u)); }
.free-body { padding: calc(13 * var(--u)) calc(14 * var(--u)) calc(14 * var(--u)); }
.free-body > .icon { width: calc(24 * var(--u)); height: calc(24 * var(--u)); margin-bottom: calc(8 * var(--u)); }
.free-body strong { font-size: calc(14.5 * var(--u)); margin-bottom: calc(4 * var(--u)); }
.free-body small { margin-bottom: calc(10 * var(--u)); }
.free-body .round-arrow { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }

.cat-card { min-height: 0; padding: calc(11 * var(--u)) calc(11 * var(--u)) calc(34 * var(--u)); }
.cat-icon { margin-bottom: calc(7 * var(--u)); }
.cat-icon .icon { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.cat-card h3 { font-size: calc(12.5 * var(--u)); margin-bottom: calc(4 * var(--u)); }
.cat-card p { font-size: calc(10 * var(--u)); line-height: 1.4; }
.cat-card .round-arrow { width: calc(22 * var(--u)); height: calc(22 * var(--u)); right: calc(10 * var(--u)); bottom: calc(10 * var(--u)); }

@media (max-width: 879px) {
  .free-img { height: 100px; }
  .free-body { padding: 16px; }
  .free-body > .icon { width: 26px; height: 26px; }
  .free-body strong { font-size: 17px; }
  .free-body .round-arrow { width: 28px; height: 28px; }
  .cat-card { padding: 16px 14px 48px; }
  .cat-icon .icon { width: 26px; height: 26px; }
  .cat-card h3 { font-size: 16px; }
  .cat-card p { font-size: 13px; }
  .cat-card .round-arrow { width: 28px; height: 28px; right: 12px; bottom: 12px; }
}

/* Category frequency badges — refined status-tag style (overrides the earlier pill) */
.freq-badge {
  display: inline-flex; align-items: center; gap: calc(4 * var(--u));
  top: calc(13 * var(--u)); right: calc(11 * var(--u));
  padding: calc(2.5 * var(--u)) calc(7 * var(--u)) calc(2.5 * var(--u)) calc(6 * var(--u));
  border: 1px solid; border-radius: calc(4 * var(--u));
  font-size: calc(8 * var(--u)); font-weight: 600; letter-spacing: .01em; text-transform: none; line-height: 1.3;
}
.freq-badge::before { content: ""; width: calc(4.5 * var(--u)); height: calc(4.5 * var(--u)); border-radius: 50%; background: currentColor; flex-shrink: 0; }
.freq-daily   { color: #047857; background: #f0fdf7; border-color: #bbf0d6; }
.freq-weekly  { color: #1d4ed8; background: #f3f7ff; border-color: #cddcfb; }
.freq-monthly { color: #6d28d9; background: #f7f5ff; border-color: #dfd6fb; }
@media (max-width: 879px) {
  .freq-badge { top: 15px; right: 12px; gap: 5px; padding: 3px 9px 3px 8px; border-radius: 5px; font-size: 12px; }
  .freq-badge::before { width: 6px; height: 6px; }
}

/* ==========================================================
   Resource library — filters, results count, pages
   ========================================================== */
.filter-bar { flex-wrap: wrap; }
.filter-bar .select { width: calc(128 * var(--u)); }
.filter-bar .search { flex: 1; min-width: calc(160 * var(--u)); width: auto; }
.filter-bar .select.date input {
  width: 100%; height: calc(31 * var(--u)); padding: 0 calc(10 * var(--u));
  font-family: var(--font); font-size: calc(9 * var(--u)); color: var(--ink);
  background: var(--white); border: 1px solid #e6e8ee; border-radius: calc(4 * var(--u)); cursor: pointer;
}
.filter-bar .select.date input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 90, 26, .12); }
.filter-bar .select.date input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; }

.res-summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: calc(-2 * var(--u)) 0 calc(12 * var(--u)); font-size: calc(10 * var(--u)); color: var(--muted);
}
.res-summary strong { color: var(--navy); font-weight: 600; }
.clear-filters { font-weight: 600; color: var(--orange); }
.clear-filters:hover { text-decoration: underline; }

.res-empty {
  display: flex; flex-direction: column; align-items: center; gap: calc(12 * var(--u));
  padding: calc(40 * var(--u)) calc(20 * var(--u)); text-align: center;
  background: var(--white); border: 1px dashed #dfe2e8; border-radius: calc(6 * var(--u));
  font-size: calc(11.5 * var(--u)); color: var(--muted);
}
.res-empty .btn { height: calc(30 * var(--u)); font-size: calc(10 * var(--u)); }

.cat-count { display: block; margin-top: calc(6 * var(--u)); font-size: calc(9 * var(--u)); font-weight: 600; color: var(--c); }
.cat-card.is-active { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 8px 22px rgba(20, 36, 92, .08); }

.pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: calc(6 * var(--u)); margin-top: calc(22 * var(--u)); }
.pager a, .pg-gap {
  display: grid; place-items: center; min-width: calc(30 * var(--u)); height: calc(30 * var(--u)); padding: 0 calc(10 * var(--u));
  font-size: calc(10 * var(--u)); font-weight: 600; color: var(--navy); border-radius: calc(5 * var(--u));
}
.pager a { background: var(--white); border: 1px solid #e3e6ec; transition: border-color .2s, color .2s; }
.pager a:hover { border-color: var(--orange); color: var(--orange); }
.pager a.is-current { background: var(--orange); border-color: var(--orange); color: var(--white); }
.pg-gap { color: var(--muted); }

@media (max-width: 879px) {
  .filter-bar .select, .filter-bar .select.date { width: calc(50% - 5px); }
  .filter-bar .select.date input { height: 42px; font-size: 16px; padding: 0 12px; border-radius: 6px; }
  .filter-bar .search { flex-basis: 100%; min-width: 0; }
  .res-summary { font-size: 14px; margin: 0 0 14px; }
  .res-empty { font-size: 15px; padding: 36px 20px; border-radius: 10px; }
  .res-empty .btn { height: 42px; font-size: 15px; }
  .cat-count { font-size: 12px; margin-top: 8px; }
  .pager { gap: 8px; margin-top: 24px; }
  .pager a, .pg-gap { min-width: 40px; height: 40px; font-size: 14px; border-radius: 8px; }
}
@media (max-width: 560px) {
  .filter-bar .select, .filter-bar .select.date { width: 100%; }
}

/* File count sits beside the arrow on the bottom row, so it adds no height */
.cat-count { position: absolute; left: calc(11 * var(--u)); bottom: calc(10 * var(--u)); margin: 0; line-height: calc(22 * var(--u)); }
@media (max-width: 879px) {
  .cat-count { left: 14px; bottom: 12px; margin: 0; line-height: 28px; }
}

/* Library results fade briefly while new results load (no page reload) */
#lib-results { transition: opacity .15s ease; }
#lib-results.is-loading { opacity: .5; pointer-events: none; }
