:root {
  --brand: #437594;
  --brand-dark: #2f566f;
  --tint: #86acc6;
  --wash: rgba(134, 172, 198, 0.18);
  --ink: #1c2123;
  --text: #39433f;
  --muted: #717a76;
  --paper: #f4f1e8;
  --white: #fff;
  --slate950: #0f1213;
  --line: rgba(28, 33, 35, 0.12);
  --shadow: 0 16px 40px rgba(28, 33, 35, 0.12), 0 4px 10px rgba(28, 33, 35, 0.06);
  --body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --display: "Gabarito", "Trebuchet MS", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  --brand: #5e90b3;
  --brand-dark: #a9c6dc;
  --wash: rgba(134, 172, 198, 0.16);
  --ink: #f4f1e8;
  --text: #d8ddd9;
  --muted: #aab2af;
  --paper: #16191a;
  --white: #1e2324;
  --line: rgba(244, 241, 232, 0.15);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.32), 0 4px 10px rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--paper) url("/assets/decor/chalk-light-page.png") center / cover fixed;
  font-family: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] body { background-image: url("/assets/decor/chalkboard.png"); }
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
header.top { position: sticky; top: 0; z-index: 60; margin-top: 0; padding: 22px 24px 0; }
.topbar {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(116px, 1fr) auto minmax(116px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.logo { grid-column: 1; justify-self: start; }
.logo img { height: 26px; width: auto; }
.spacer, .sp { flex: 1; }
.nav { display: contents; }
.nav-primary { grid-column: 2; display: flex; align-items: center; justify-self: center; gap: 4px; }
.nav-actions { grid-column: 3; display: flex; align-items: center; justify-self: end; gap: 4px; }
.nav a, .nav-dropdown__toggle {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"], .nav-dropdown__toggle:hover, .nav-dropdown:focus-within .nav-dropdown__toggle, .nav-dropdown.open .nav-dropdown__toggle { background: var(--wash); color: var(--ink); }
.nav-dropdown { position: relative; }
.nav-dropdown__toggle { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.nav-dropdown__chevron { font-size: 16px; line-height: 1; transition: transform 160ms ease; }
.nav-dropdown:hover .nav-dropdown__chevron, .nav-dropdown:focus-within .nav-dropdown__chevron, .nav-dropdown.open .nav-dropdown__chevron { transform: rotate(180deg); }
.nav-dropdown__menu { position: absolute; top: calc(100% + 10px); left: 0; display: grid; min-width: 208px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(-5px); transition: opacity 150ms ease, transform 150ms ease; }
.nav-dropdown__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-dropdown:hover .nav-dropdown__menu, .nav-dropdown:focus-within .nav-dropdown__menu, .nav-dropdown.open .nav-dropdown__menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-dropdown__menu a { padding: 10px 12px; border-radius: 10px; white-space: nowrap; }
.themebtn, .menubtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 8px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}
.themebtn:hover, .themebtn:focus-visible, .menubtn:hover, .menubtn:focus-visible { background: var(--wash); }
.menubtn { display: none; grid-column: 3; justify-self: end; font-size: 22px; line-height: 1; }
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  color: #fff;
  background: var(--brand);
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.cta:hover, .cta:focus-visible { background: var(--brand-dark); }
.nav .cta { white-space: nowrap; }
.eyebrow, .category {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--brand-dark);
  background: var(--wash);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}
.resources-hero { padding: 112px 0 54px; text-align: center; }
.resources-hero h1 {
  max-width: 760px;
  margin: 18px auto 14px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.resources-hero p { max-width: 660px; margin: 0 auto; color: var(--muted); font-size: clamp(17px, 2vw, 20px); }
.resource-grid, .programme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; padding-bottom: 96px; }
.resource-card, .programme-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 5px 18px rgba(28, 33, 35, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.resource-card:hover, .programme-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.resource-card__image { display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--wash); }
.resource-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.resource-card:hover .resource-card__image img { transform: scale(1.025); }
.resource-card__body { padding: 24px; }
.resource-card h2 { margin: 15px 0 10px; color: var(--ink); font-family: var(--display); font-size: 27px; line-height: 1.08; }
.resource-card h2 a { text-decoration: none; }
.resource-card p { margin: 0; color: var(--muted); font-size: 15px; }
.programme-card { padding: 28px; }
.programme-card h2 { margin: 18px 0 10px; color: var(--ink); font-family: var(--display); font-size: 30px; line-height: 1.08; }
.programme-card p { margin: 0; color: var(--muted); }
.read-more { display: inline-flex; gap: 8px; margin-top: 20px; color: var(--brand-dark); font-weight: 700; text-decoration: none; }
.article-shell { max-width: 920px; padding-top: 70px; padding-bottom: 96px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 38px; color: var(--muted); font-size: 14px; font-weight: 700; }
.breadcrumbs a { color: var(--brand-dark); text-decoration: none; }
.breadcrumbs span[aria-current="page"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.article-header { padding: clamp(32px, 7vw, 70px) clamp(24px, 8vw, 84px) 34px; }
.article-header h1 {
  margin: 18px 0 20px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.article-deck { max-width: 700px; margin: 0 0 18px; color: var(--text); font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; }
.article-header time { color: var(--muted); font-size: 14px; font-weight: 600; }
.hero-frame { margin: 0 clamp(18px, 4vw, 42px); overflow: hidden; border-radius: 28px; background: var(--wash); box-shadow: 0 8px 26px rgba(28, 33, 35, 0.13); }
.hero-frame img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.article-body { max-width: 760px; margin: 0 auto; padding: clamp(38px, 7vw, 70px) clamp(24px, 6vw, 58px) 76px; font-size: 17px; }
.article-body p { margin: 0 0 1.35em; }
.article-body h2 { margin: 2.1em 0 0.7em; color: var(--ink); font-family: var(--display); font-size: clamp(29px, 4vw, 40px); line-height: 1.1; }
.article-body h3 { margin: 1.7em 0 0.45em; color: var(--ink); font-family: var(--display); font-size: 23px; line-height: 1.15; }
.article-body ol { padding-left: 1.5rem; }
.article-body li { padding-left: 0.4rem; }
.article-body blockquote { margin: 42px 0; padding: 28px 30px; border-left: 5px solid var(--tint); border-radius: 0 22px 22px 0; background: var(--wash); }
.article-body blockquote p { margin: 0 0 8px; color: var(--ink); font-family: var(--display); font-size: 27px; font-weight: 700; line-height: 1.2; }
.article-body blockquote cite { color: var(--muted); font-size: 14px; }
.article-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 32px; padding: 32px 36px; border-radius: 28px; color: #fff; background: #1c2123; box-shadow: var(--shadow); }
.article-cta h2 { margin: 10px 0 6px; color: #fff; font-family: var(--display); font-size: clamp(27px, 4vw, 38px); line-height: 1.05; }
.article-cta p { margin: 0; color: #d8ddd9; }
.article-cta .eyebrow { color: #bdd8ea; background: rgba(134, 172, 198, 0.18); }
.article-cta .cta { flex: 0 0 auto; color: #15191a; background: var(--tint); }
.foot { margin-top: 50px; border-top: 1px solid var(--line); background: var(--white); }
.footin { display: flex; align-items: center; gap: 24px; min-height: 130px; color: var(--muted); font-size: 13px; }
.footin img { width: 116px; height: auto; }
.footin a { color: inherit; text-decoration: underline; }
.footnav { display: flex; align-items: center; gap: 14px; }
.legal { padding: 0 0 34px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.legal p { margin: 0 0 8px; }
a:focus-visible { outline: 3px solid var(--tint); outline-offset: 3px; }

@media (max-width: 1060px) {
  header.top { position: relative; top: 0; padding-inline: 14px; }
  .topbar { position: relative; display: flex; }
  .logo { grid-column: auto; }
  .menubtn { display: inline-flex; margin-left: auto; }
  .nav { position: absolute; top: calc(100% + 12px); right: 0; left: 0; z-index: 70; display: none; flex-direction: column; align-items: stretch; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-primary, .nav-actions { display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: 100%; }
  .nav-actions { margin-top: 3px; }
  .nav a, .nav-dropdown__toggle { width: 100%; padding: 12px 16px; border-radius: 12px; font-size: 15.5px; text-align: left; }
  .nav-dropdown__toggle { justify-content: space-between; }
  .nav-dropdown__menu { position: static; display: none; min-width: 0; margin: 3px 0 0; padding: 4px 0 0 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; opacity: 1; pointer-events: auto; transform: none; }
  .nav-dropdown__menu::before { display: none; }
  .nav-dropdown:hover .nav-dropdown__menu, .nav-dropdown:focus-within .nav-dropdown__menu { display: none; }
  .nav-dropdown.open .nav-dropdown__menu { display: grid; }
  .nav-dropdown__menu a { padding: 10px 12px; font-size: 14px; }
  .nav .themebtn { align-self: flex-start; }
  .nav .cta { display: block; margin-top: 4px; padding: 12px 18px; text-align: center; }
  .resources-hero { padding-top: 80px; }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 28px, 1120px); }
  .article-shell { padding-top: 42px; }
  .article { border-radius: 26px; }
  .article-header h1 { font-size: clamp(38px, 13vw, 54px); }
  .hero-frame { border-radius: 20px; }
  .article-body { font-size: 16px; }
  .article-body ol { padding-left: 1.15rem; }
  .article-cta { align-items: flex-start; flex-direction: column; padding: 28px 24px; }
  .footin { align-items: flex-start; flex-direction: column; gap: 10px; padding: 36px 0; }
  .footin .sp { display: none; }
}
