/* =============================================================================
   BR-UK AI Tools & Resources Repository
   Visual system for a clean, academic, trustworthy research-tools site.
   ============================================================================= */

:root {
  /* Teal scale anchored to the verified BR-UK brand primary rgb(0,114,136) = #007288
     Sampled from the live Usher Institute / BR-UK site on 2026-04-22. */
  --teal-900: #00384a;
  --teal-800: #005268;
  --teal-700: #007288;  /* primary — brand match */
  --teal-600: #008ba3;
  --teal-500: #1ea6bd;
  --teal-300: #7fcfdc;
  --teal-200: #b9e5ed;
  --teal-100: #d9eff3;
  --teal-50:  #eff7f9;

  --ink-900: #0f1b1d;
  --ink-700: #2c3f43;
  --ink-500: #4f6569;
  --ink-400: #7a8c90;
  --ink-300: #b8c4c7;
  --ink-200: #dfe6e7;
  --ink-100: #eef2f3;
  --ink-50:  #f7f9fa;
  --white:   #ffffff;

  --amber-600: #c97b1c;
  --amber-100: #fdebd1;
  --rose-600:  #b4455a;
  --rose-100:  #fde0e6;

  --shadow-sm: 0 1px 2px rgba(5, 62, 67, 0.06), 0 1px 3px rgba(5, 62, 67, 0.08);
  --shadow-md: 0 4px 8px rgba(5, 62, 67, 0.06), 0 2px 4px rgba(5, 62, 67, 0.06);
  --shadow-lg: 0 14px 30px rgba(5, 62, 67, 0.10), 0 4px 8px rgba(5, 62, 67, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 22px;

  --content-max: 1180px;
  --reading-max: 760px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif Pro", Georgia, "Times New Roman", serif;
}

/* ----- Reset + base ----- */
*, *::before, *::after { box-sizing: border-box; }
/* Keep anchor targets clear of the sticky brand and navigation rows. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 9rem; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s ease; }
a:hover { color: var(--teal-900); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3, h4 { color: var(--ink-900); letter-spacing: -0.01em; line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 3.2vw + 1rem, 3rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2rem); font-weight: 700; margin-top: 2.4em; }
h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.8em; color: var(--teal-800); }
h4 { font-size: 1.05rem; font-weight: 600; margin-top: 1.4em; }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 600; color: var(--ink-900); }
blockquote {
  margin: 1.6em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--teal-500);
  background: var(--teal-50);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--ink-700);
  font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; font-style: normal; margin-top: 0.6em; color: var(--ink-500); font-size: 0.9em; }

code {
  background: var(--ink-100);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  font-size: 0.92em;
  color: var(--teal-800);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

hr {
  border: 0;
  height: 1px;
  background: var(--ink-200);
  margin: 2.5em 0;
}

/* ----- Skip link (accessibility) ----- */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--teal-900); color: var(--white);
  padding: .7em 1.2em; border-radius: var(--radius-md);
  z-index: 1000; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ----- Header / navigation ----- */
.site-header {
  background: var(--white);
  border-top: 3px solid var(--teal-700);
  border-bottom: 1px solid var(--ink-200);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand toggle" "nav nav";
  align-items: center;
  column-gap: 1rem;
}
.brand {
  grid-area: brand;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding-bottom: 1rem;
  text-decoration: none;
  color: var(--ink-900);
}
.brand:hover { text-decoration: none; color: var(--teal-700); }
.brand__mark-img {
  width: 44px; height: 44px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  line-height: 1.25;
}
.brand__name { font-weight: 700; font-size: 1.22rem; letter-spacing: -0.025em; }
.brand__tag { font-size: 0.78rem; color: var(--ink-500); }

.nav {
  grid-area: nav;
  display: flex;
  gap: 0.25rem;
  align-items: center;
  border-top: 1px solid var(--ink-200);
}
.nav a {
  color: var(--ink-500);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 0.85rem 0.55rem 0.7rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.nav a:hover { color: var(--teal-700); background: var(--teal-50); }
.nav a.is-active { color: var(--teal-800); border-bottom-color: var(--teal-700); font-weight: 600; }
.nav a:focus-visible { outline: 2px solid var(--teal-600); outline-offset: -2px; }

.nav-toggle {
  grid-area: toggle;
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  padding: 0;
  color: var(--teal-700);
  cursor: pointer;
}
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: var(--teal-50); border-color: var(--teal-200); }
.nav-toggle:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 3px; }
.nav-toggle__close, .nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

@media (max-width: 1160px) {
  html { scroll-padding-top: 7rem; }
  .site-header__inner { padding: 1rem 1.5rem; }
  .brand { padding-bottom: 0; }
  .nav-toggle { display: grid; }
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 0.5rem;
    margin-top: 1rem;
    max-height: calc(100dvh - 7rem);
    overflow-y: auto;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.8rem 0.75rem; border: 0; border-radius: var(--radius-sm); }
  .nav a.is-active { background: var(--teal-50); }
}
@media (max-width: 560px) {
  .site-header__inner { padding: 0.85rem 1rem; column-gap: 0.75rem; }
  .brand { gap: 0.6rem; }
  .brand__mark-img { width: 34px; height: 34px; }
  .brand__name { font-size: 1rem; }
  .brand__tag { font-size: 0.69rem; }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 500px at 90% -10%, rgba(125, 210, 216, 0.45), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(19, 154, 164, 0.22), transparent 60%),
    linear-gradient(180deg, var(--teal-50) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--ink-200);
}
.hero__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3.5rem;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--teal-200);
  color: var(--teal-800);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.2rem;
}
.hero__eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 999px;
  background: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(19,154,164,0.15);
}
.hero h1 { max-width: 24ch; margin-bottom: 0.5em; }
.hero__lede {
  font-size: 1.18rem; color: var(--ink-700); max-width: 62ch; line-height: 1.6;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary {
  background: var(--teal-700);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--teal-800); color: var(--white); text-decoration: none; box-shadow: var(--shadow-md); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--teal-800);
  border-color: var(--teal-300);
}
.btn--ghost:hover { background: var(--teal-50); color: var(--teal-900); text-decoration: none; }

/* ----- Main layout ----- */
main { min-height: 60vh; }
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.container--narrow { max-width: var(--reading-max); }

/* ----- Breadcrumb ----- */
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--ink-500);
  padding: 1rem 0 0;
  margin-bottom: 0.5rem;
}
.breadcrumb a { color: var(--ink-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--teal-700); text-decoration: underline; }
.breadcrumb__sep { color: var(--ink-300); }
.breadcrumb__current { color: var(--ink-700); font-weight: 500; }

/* ----- Section number badge ----- */
.section-badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--teal-100);
  color: var(--teal-800);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ----- Home: section cards ----- */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.3rem;
  margin: 2rem 0;
}
.section-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem 1.8rem;
  text-decoration: none;
  color: var(--ink-900);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.section-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--teal-700), var(--teal-500));
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform .25s ease;
}
.section-card:hover {
  border-color: var(--teal-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  text-decoration: none;
}
.section-card:hover::before { transform: scaleX(1); }
.section-card__num {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-700);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--ink-900);
  line-height: 1.3;
}
.section-card__desc {
  font-size: 0.95rem;
  color: var(--ink-700);
  line-height: 1.55;
  margin: 0 0 1rem;
  flex: 1;
}
.section-card__meta {
  font-size: 0.82rem;
  color: var(--ink-500);
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 500;
}
.section-card__meta::after {
  content: "→";
  color: var(--teal-700);
  transition: transform .15s ease;
  font-size: 1.1em;
}
.section-card:hover .section-card__meta::after { transform: translateX(4px); }

/* ----- Sub-page list (used on section overview pages) ----- */
.subpage-list {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.subpage-list a {
  display: block;
  padding: 1.1rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-left: 4px solid var(--teal-500);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink-900);
  font-weight: 600;
  line-height: 1.4;
  transition: all .15s ease;
}
.subpage-list a:hover {
  border-left-color: var(--teal-700);
  box-shadow: var(--shadow-md);
  background: var(--teal-50);
  text-decoration: none;
  transform: translateX(3px);
}
.subpage-list a::after {
  content: " →";
  color: var(--teal-700);
  opacity: 0.7;
}
.subpage-list a span {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-500);
  margin-top: 0.3rem;
}
.subpage-nested {
  list-style: none;
  padding: 0.4rem 0 0.1rem 1rem;
  margin: 0.5rem 0 0;
  border-left: 2px dashed var(--teal-200);
}
.subpage-nested li { margin-bottom: 0.3rem; }
.subpage-nested a {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border: none;
  background: transparent;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--teal-800);
  border-radius: 4px;
}
.subpage-nested a:hover {
  background: var(--teal-50);
  transform: none;
  box-shadow: none;
  color: var(--teal-900);
}
.subpage-nested a::after { content: none; }
.subpage-nested a em {
  color: var(--ink-500);
  font-style: normal;
  font-weight: 400;
  font-size: 0.86rem;
}

/* ----- Research stage navigation ----- */
.research-stage-list {
  --stage-padding: 1.25rem;
  --stage-marker: 2.75rem;
  --stage-marker-half: 1.375rem;
  position: relative;
  display: grid;
  grid-auto-rows: 1fr;
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 2rem;
}
.research-stage-list::before {
  content: "";
  position: absolute;
  top: 3rem;
  bottom: 3rem;
  left: calc(var(--stage-padding) + var(--stage-marker-half) + 1px);
  border-left: 1px solid var(--teal-200);
}
.research-stage-list > li { position: relative; margin: 0; }
.stage-card {
  display: grid;
  grid-template-columns: var(--stage-marker) minmax(0, 1fr) 2rem;
  grid-template-areas: "number body arrow";
  align-items: center;
  gap: 1.15rem;
  height: 100%;
  padding: var(--stage-padding);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink-900);
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.stage-card__number {
  grid-area: number;
  display: grid;
  place-items: center;
  width: var(--stage-marker);
  height: var(--stage-marker);
  border: 1px solid var(--teal-200);
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-800);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stage-card__body { grid-area: body; min-width: 0; }
.stage-card__title {
  margin: 0 0 0.35rem;
  color: var(--ink-900);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
}
.stage-card__description { margin: 0; color: var(--ink-500); font-size: 0.92rem; line-height: 1.55; }
.stage-card__arrow {
  grid-area: arrow;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-700);
  transition: color .18s ease, background-color .18s ease;
}
.stage-card:hover, .stage-card:focus-visible {
  border-color: var(--teal-300);
  background: var(--teal-50);
  color: var(--ink-900);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.stage-card:hover .stage-card__arrow, .stage-card:focus-visible .stage-card__arrow {
  background: var(--teal-700);
  color: var(--white);
}
.stage-card:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 4px; border-radius: var(--radius-lg); }
@media (max-width: 560px) {
  .research-stage-list { --stage-padding: 1rem; --stage-marker: 2.25rem; --stage-marker-half: 1.125rem; }
  .stage-card { grid-template-areas: "number . arrow" "body body body"; gap: 0.85rem; }
  .stage-card__title { font-size: 1.05rem; }
}

/* ----- Prose content sections ----- */
.prose {
  max-width: var(--reading-max);
  font-size: 1.02rem;
}
.prose h2:first-of-type { margin-top: 1.8em; }
.prose ul li, .prose ol li { line-height: 1.6; }
.prose a { word-break: break-word; }

/* ----- Callout boxes ----- */
.callout {
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  margin: 1.8rem 0;
  border-left: 4px solid;
  background: var(--teal-50);
  border-color: var(--teal-600);
}
.callout h4 {
  margin: 0 0 0.35em;
  color: var(--teal-800);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.callout p:last-child { margin-bottom: 0; }
.callout--caution { background: var(--amber-100); border-color: var(--amber-600); }
.callout--caution h4 { color: #8a5111; }
.callout--warning { background: var(--rose-100); border-color: var(--rose-600); }
.callout--warning h4 { color: #86253a; }

/* ----- Section 2 resources ----- */
.resource-panel {
  margin: 1.8rem 0;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid var(--teal-200);
  border-top: 4px solid var(--teal-600);
  border-radius: var(--radius-md);
  background: var(--white);
}
.resource-panel > h2:first-child { margin-top: 0; }
.resource-panel > :last-child { margin-bottom: 0; }
.resource-panel--statement blockquote {
  padding: clamp(0.8rem, 2vw, 1.4rem);
  font-style: normal;
}
.resource-panel--statement blockquote > h3:first-child { margin-top: 0; }
.publisher-links { list-style: none; padding: 0; }
.publisher-links li { display: flex; margin: 0; }
.publisher-links .btn {
  width: 100%;
  min-height: 4rem;
  border-radius: var(--radius-md);
  background: var(--teal-50);
}
.publisher-links .btn:hover { background: var(--teal-100); }
.decision-aid { margin: 1.8rem 0 1rem; }
.decision-aid img { width: 100%; }
.decision-aid figcaption {
  margin-top: 1rem;
  color: var(--ink-700);
  font-size: 0.9rem;
}
.decision-aid-text {
  padding: 1rem 1.2rem;
  border: 1px solid var(--teal-200);
  border-radius: var(--radius-md);
  background: var(--teal-50);
}
.decision-aid-text summary { cursor: pointer; font-weight: 600; color: var(--teal-800); }
.decision-aid-text summary:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 4px; }
.decision-aid-text dt { font-weight: 600; }
.decision-aid-text dd { margin: 0.25rem 0 1rem; }
.decision-aid-text dl:last-child, .decision-aid-text dd:last-child { margin-bottom: 0; }

/* ----- Tool grid ----- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 2rem;
}
.tool-card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.3rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tool-card:hover { border-color: var(--teal-300); box-shadow: var(--shadow-sm); }
.tool-card__name {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--teal-800);
  margin: 0 0 0.35rem;
  display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
}
.tool-card__tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-500);
  background: var(--ink-100);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.tool-card__desc {
  font-size: 0.9rem;
  color: var(--ink-700);
  margin: 0.3rem 0 0.6rem;
  line-height: 1.5;
}
.tool-card a.tool-card__link {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.tool-card a.tool-card__link::after { content: " ↗"; }

/* ----- Reference list ----- */
.references {
  font-size: 0.9rem;
  color: var(--ink-700);
  border-top: 1px solid var(--ink-200);
  padding-top: 1.3rem;
  margin-top: 2rem;
}
.references h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
  margin-top: 0;
}
.references ol { padding-left: 1.4rem; }
.references li { margin-bottom: 0.9em; line-height: 1.55; }

/* ----- Data table ----- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0 2rem;
  font-size: 0.95rem;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--ink-100);
  vertical-align: top;
}
.data-table thead th {
  background: var(--teal-50);
  color: var(--teal-900);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--ink-50); }

/* ----- Prev/next pager ----- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-200);
}
.pager a {
  display: block;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--ink-200);
  text-decoration: none;
  transition: all .15s ease;
  color: var(--ink-900);
}
.pager a:hover { border-color: var(--teal-300); background: var(--teal-50); text-decoration: none; }
.pager__label {
  font-size: 0.78rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.pager__title { font-weight: 600; color: var(--teal-800); }
.pager__next { text-align: right; }
.pager__next .pager__title::after { content: " →"; }
.pager__prev .pager__title::before { content: "← "; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } }

/* ----- Audience strip (home) ----- */
.audience {
  background: var(--ink-50);
  border-top: 1px solid var(--ink-200);
  border-bottom: 1px solid var(--ink-200);
  padding: 3rem 0;
}
.audience__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}
.audience__item h3 {
  margin-top: 0;
  color: var(--teal-800);
  font-size: 1.05rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.audience__item p { font-size: 0.95rem; color: var(--ink-700); margin: 0; }
.audience__icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--teal-100);
  color: var(--teal-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* ----- Quick nav (in-page anchors) ----- */
.quicknav {
  background: var(--teal-50);
  border: 1px solid var(--teal-200);
  border-radius: var(--radius-md);
  padding: 1rem 1.3rem;
  margin: 1.4rem 0 2rem;
}
.quicknav h4 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: var(--teal-800);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.quicknav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex; flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.quicknav li { margin: 0; }
.quicknav a { font-size: 0.93rem; }

/* ----- Footer ----- */
.site-footer {
  background: var(--teal-900);
  color: var(--teal-100);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}
.site-footer a { color: var(--teal-200); }
.site-footer a:hover { color: var(--white); }
.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 720px) { .site-footer__inner { grid-template-columns: 1fr; gap: 1.5rem; } }
.site-footer h4 {
  color: var(--white);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.55rem; font-size: 0.92rem; }
.site-footer p { font-size: 0.92rem; color: var(--teal-200); line-height: 1.6; }
.site-footer__bottom {
  max-width: var(--content-max);
  margin: 2rem auto 0;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: var(--teal-200);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
}

/* ----- External link indicator (subtle) ----- */
.prose a[href^="http"]:not([href*="github.io"]):not(.no-ext)::after {
  content: "";
  display: inline-block;
  width: 0.6em; height: 0.6em;
  margin-left: 0.25em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M7 17L17 7M17 7H7M17 7V17'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M7 17L17 7M17 7H7M17 7V17'/></svg>") center / contain no-repeat;
  opacity: 0.6;
}

/* ----- Print ----- */
@media print {
  .site-header, .site-footer, .pager, .nav-toggle, .hero__actions { display: none; }
  body { color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
