
/* ==========================================================================
   anaesthesia.ng homepage
   Colours (three only): ink, paper, accent
   Type scale: 14 / 16 / 20 / 28 / 40 / 56
   Spacing: 8-point grid
   ========================================================================== */

:root {
  --ink: #0F161C;
  --paper: #EBEFF2;
  --accent: #0A5A62;

  --soft: #0F161C; /* secondary text; refined below where color-mix is supported */

  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 16px;
}

@supports (color: color-mix(in srgb, red, blue)) {
  :root { --soft: color-mix(in srgb, var(--ink) 82%, var(--paper)); }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/24px var(--body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a {
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 3px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.on-dark :focus-visible,
.on-accent :focus-visible { outline-color: var(--paper); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 8px; top: -80px; z-index: 30;
  padding: 16px 24px; background: var(--ink); color: var(--paper);
  font-weight: 600;
}
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

section[id] { scroll-margin-top: 96px; }

/* Shared pieces ---------------------------------------------------------- */

.go {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 4px;
}
.go::after { content: "\2192"; content: "\2192" / ""; margin-left: 8px; }
.on-dark .go, .on-accent .go { color: var(--paper); }

.btn {
  display: inline-flex; align-items: center; min-height: 56px; padding: 0 24px;
  background: var(--accent); color: var(--paper);
  border: 2px solid var(--accent); border-radius: 0;
  font: 600 16px/24px var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink); border-color: var(--ink); text-decoration: none; }

.section { padding-block: 64px; }

.section-head {
  display: grid; gap: 16px;
  padding-top: 24px; margin-bottom: 40px;
  border-top: 2px solid currentColor;
}
h2 { font: 600 28px/36px var(--display); letter-spacing: -0.01em; }
.section-head p { max-width: 56ch; }

.on-dark   { background: var(--ink);    color: var(--paper); --soft: var(--paper); }
.on-accent { background: var(--accent); color: var(--paper); --soft: var(--paper); }
@supports (color: color-mix(in srgb, red, blue)) {
  .on-dark   { --soft: color-mix(in srgb, var(--paper) 80%, var(--ink)); }
  .on-accent { --soft: color-mix(in srgb, var(--paper) 92%, var(--accent)); }
}

/* 1. Header -------------------------------------------------------------- */

.site-header { background: var(--paper); border-bottom: 2px solid var(--ink); }

.header-grid { display: grid; gap: 16px; padding-block: 16px; }

.wordmark {
  justify-self: start;
  font: 600 28px/32px var(--display);
  letter-spacing: -0.015em;
  text-decoration: none;
}
.wordmark span { color: var(--accent); }

.search { display: flex; width: 100%; max-width: 720px; }
.search input {
  flex: 1; min-width: 0; height: 56px; padding: 0 16px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-right: 0; border-radius: 0;
  font: 400 16px/24px var(--body);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--soft); opacity: 1; }
.search input:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.search button {
  height: 56px; padding: 0 24px;
  background: var(--accent); color: var(--paper);
  border: 2px solid var(--accent); border-radius: 0;
  font: 600 16px/24px var(--body); cursor: pointer;
}
.search button:hover { background: var(--ink); border-color: var(--ink); }

/* Navigation: fixed to the bottom edge on phones (thumb reach) */
.site-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--ink);
}
.site-nav ul { display: grid; grid-template-columns: repeat(6, 1fr); }
.site-nav a {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 4px;
  color: var(--paper); font-size: 14px; line-height: 24px; font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { background: var(--accent); }
.site-nav a:focus-visible { outline: 3px solid var(--paper); outline-offset: -6px; }

/* 2. Hero ---------------------------------------------------------------- */

.hero { padding-top: 48px; }
.hero-grid { display: grid; gap: 32px; }
.hero h1 {
  max-width: 18ch;
  font: 600 40px/48px var(--display);
  letter-spacing: -0.02em;
}
.lede { font-size: 20px; line-height: 28px; max-width: 48ch; }
.hero-copy > p + p { margin-top: 16px; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 32px; }
.starts { margin-top: 32px; font-size: 14px; line-height: 24px; }
.starts p { font-weight: 600; margin-bottom: 8px; }
.starts ul { display: flex; flex-wrap: wrap; gap: 0 24px; }

.trace { display: block; width: 100%; height: 80px; margin-top: 64px; }
.trace path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: miter; }
.trace line { stroke: var(--ink); stroke-width: 1; }

/* 3. Entry points -------------------------------------------------------- */

.entries { border-top: 2px solid var(--ink); }
.entry { padding: 32px 0; border-top: 1px solid var(--ink); }
.entry:first-child { border-top: 0; }
.entry h3 { font: 600 28px/36px var(--display); letter-spacing: -0.01em; margin-bottom: 16px; }
.entry p { margin-bottom: 24px; max-width: 36ch; }

/* 4. Featured articles --------------------------------------------------- */

.featured { display: grid; gap: 40px; }
.side { display: grid; gap: 40px; align-content: start; }

.meta {
  display: flex; flex-wrap: wrap; gap: 0 16px; margin-bottom: 8px;
  font-size: 14px; line-height: 24px;
}
.meta .cat { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.meta time { color: var(--soft); }

.article h3 { font: 600 20px/28px var(--display); letter-spacing: -0.005em; margin-bottom: 8px; }
.article h3 a { text-decoration: none; }
.article h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.side .article { padding-top: 24px; border-top: 1px solid var(--ink); }

.lead { padding-top: 24px; border-top: 4px solid var(--accent); }
.lead h3 { font-size: 28px; line-height: 36px; margin-bottom: 16px; }
.lead p { font-size: 20px; line-height: 28px; max-width: 40ch; margin-bottom: 24px; }

/* 5. Examination routes -------------------------------------------------- */

.route { display: grid; gap: 16px; padding: 32px 0; border-top: 1px solid currentColor; }
.route:last-child { border-bottom: 1px solid currentColor; }
.route h3 { font: 600 28px/36px var(--display); letter-spacing: -0.01em; }
.route .full { margin-top: 8px; font-size: 14px; line-height: 24px; color: var(--soft); }

/* 6. Emerging capabilities ---------------------------------------------- */

.caps { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.cap { padding: 24px 0; border-top: 1px solid var(--ink); }
.cap:first-child { border-top: 0; }
.cap h3 { font: 600 20px/28px var(--display); margin-bottom: 8px; }
.cap p { font-size: 14px; line-height: 24px; color: var(--soft); max-width: 32ch; }
.tag {
  display: inline-flex; align-items: center; margin-top: 16px; padding: 0 8px;
  border: 1px solid var(--ink); border-radius: 0;
  font-size: 14px; line-height: 24px; font-weight: 600;
}
.tag::before { content: ""; width: 8px; height: 8px; margin-right: 8px; background: var(--accent); }

/* 7. Trust --------------------------------------------------------------- */

.trust-grid { display: grid; gap: 40px; padding-top: 24px; border-top: 2px solid currentColor; }
.trust-copy p { font-size: 20px; line-height: 28px; max-width: 36ch; margin: 16px 0 24px; }
.trust-list > div { padding: 16px 0 24px; border-top: 1px solid currentColor; }
.trust-list > div:last-child { border-bottom: 1px solid currentColor; }
.trust-list dt { font-weight: 600; margin-bottom: 8px; }
.trust-list dd { max-width: 52ch; }

/* 8. Footer -------------------------------------------------------------- */

.site-footer { padding-block: 64px 48px; }
.footer-grid { display: grid; gap: 32px; }
.site-footer .wordmark { display: inline-block; margin-bottom: 16px; }
.footer-about { max-width: 44ch; }
.footer-links { display: grid; gap: 8px; font-weight: 600; }
.footer-links a { display: inline-block; padding: 8px 0; }
.footer-note {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ink);
  font-size: 14px; line-height: 24px; color: var(--soft); max-width: 72ch;
}

/* Tablet ----------------------------------------------------------------- */

@media (min-width: 768px) {
  :root { --gutter: 24px; }

  .entries { display: grid; grid-template-columns: repeat(3, 1fr); }
  .entry { padding: 40px 24px 48px; border-top: 0; border-left: 1px solid var(--ink); }
  .entry:first-child { padding-left: 0; border-left: 0; }

  .caps { display: grid; grid-template-columns: repeat(2, 1fr); }
  .cap { padding: 24px; border-left: 1px solid var(--ink); }
  .cap:nth-child(odd) { padding-left: 0; border-left: 0; }
  .cap:nth-child(2) { border-top: 0; }

  .footer-grid { grid-template-columns: 6fr 3fr 3fr; }
  .footer-links { grid-column: 2 / 4; grid-template-columns: 1fr 1fr; align-content: start; }
}

/* Desktop ---------------------------------------------------------------- */

@media (min-width: 960px) {
  :root { --gutter: 40px; }

  body { padding-bottom: 0; }

  h2 { font-size: 40px; line-height: 48px; }
  .section { padding-block: 96px; }
  .section-head { grid-template-columns: 5fr 7fr; gap: 40px; align-items: start; }
  .section-head p { padding-top: 8px; }

  .site-header { position: sticky; top: 0; z-index: 20; }
  .header-grid { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 40px; }
  .search { max-width: none; }

  .site-nav { position: static; padding: 0; background: none; }
  .site-nav ul { display: flex; gap: 32px; }
  .site-nav a { min-height: 56px; padding: 0; color: var(--ink); font-size: 16px; }
  .site-nav a:hover { background: none; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
  .site-nav a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
  .site-nav .nav-search { display: none; }

  .hero { padding-top: 96px; }
  .hero-grid { grid-template-columns: 7fr 5fr; gap: 64px; align-items: end; }
  .hero h1 { font-size: 56px; line-height: 64px; }
  .trace { margin-top: 96px; }

  .entry { padding: 48px 40px 56px; }
  .entry:first-child { padding-left: 0; }

  .featured { grid-template-columns: 7fr 5fr; gap: 64px; }
  .lead h3 { font-size: 40px; line-height: 48px; }
  .side .article h3 { font-size: 28px; line-height: 36px; }

  .route { grid-template-columns: 4fr 5fr 3fr; gap: 40px; align-items: start; padding: 40px 0; }
  .route h3 { font-size: 40px; line-height: 48px; }
  .route .go { justify-self: end; }

  .caps { grid-template-columns: repeat(4, 1fr); }
  .cap, .cap:nth-child(odd) { padding: 24px; border-top: 0; border-left: 1px solid var(--ink); }
  .cap:first-child { padding-left: 0; border-left: 0; }

  .trust-grid { grid-template-columns: 5fr 7fr; gap: 64px; }

  .footer-grid { grid-template-columns: 6fr 6fr; }
  .footer-links { grid-column: auto; grid-template-columns: repeat(4, auto); justify-content: end; gap: 8px 40px; }
}

/* ---------- interior pages ---------- */

.page-wrap { padding-block: 8px 64px; }
@media (min-width: 960px) { .page-wrap { padding-block: 16px 96px; } }

.breadcrumb { padding: 16px 0 8px; font-size: 14px; line-height: 24px; color: var(--soft); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumb a { color: inherit; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

.prose { padding-top: 16px; max-width: 70ch; }
.prose h1 { font: 600 40px/48px var(--display); letter-spacing: -0.02em; margin: 0 0 24px; }
.prose h2 { font: 600 28px/36px var(--display); letter-spacing: -0.01em; margin: 40px 0 16px; }
.prose h3 { font: 600 20px/28px var(--display); margin: 32px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul { list-style: disc; padding-left: 24px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); }
.prose blockquote { margin: 0 0 16px; padding-left: 16px; border-left: 4px solid var(--accent); }
.prose code { font: 400 14px/24px ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose table { border-collapse: collapse; margin: 0 0 16px; width: 100%; }
.prose th, .prose td { border: 1px solid var(--ink); padding: 8px 12px; text-align: left; }
@media (min-width: 960px) { .prose h1 { font-size: 48px; line-height: 56px; } }

.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0 0 32px; font-size: 14px; line-height: 24px; color: var(--soft); }
.byline .tag { margin-top: 0; }

.post-group { margin: 0 0 48px; }
.post-group h2 { font: 600 28px/36px var(--display); letter-spacing: -0.01em; padding-top: 24px; border-top: 2px solid var(--ink); margin-bottom: 8px; }
.post-list { margin: 0; padding: 0; list-style: none; }
.post-row { display: grid; gap: 4px; padding: 24px 0; border-bottom: 1px solid var(--ink); }
.post-row > a { font: 600 20px/28px var(--display); text-decoration: none; }
.post-row > a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.post-meta { font-size: 14px; line-height: 24px; color: var(--soft); }
.post-row p { margin: 0; max-width: 60ch; }

.related { margin-top: 64px; padding-top: 24px; border-top: 2px solid var(--ink); }
.related h2 { font: 600 28px/36px var(--display); letter-spacing: -0.01em; margin-bottom: 16px; }
.related ul { margin: 0; padding: 0; list-style: none; }
.related li { padding: 8px 0; }

.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 24px 0 48px; }
.card { border: 2px solid var(--ink); padding: 24px; text-decoration: none; color: inherit; }
.card h3 { font: 600 20px/28px var(--display); margin: 0; }
.card:hover { border-color: var(--accent); }
.cat-grid .card { min-height: 56px; display: flex; align-items: center; }

.search-wrap { max-width: 720px; }
.search-form { display: flex; margin: 24px 0 40px; }
.search-form input { flex: 1; min-width: 0; height: 56px; padding: 0 16px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-right: 0; border-radius: 0; font: 400 16px/24px var(--body); -webkit-appearance: none; appearance: none; }
.search-form input:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.search-form button { height: 56px; padding: 0 24px; background: var(--accent); color: var(--paper); border: 2px solid var(--accent); border-radius: 0; font: 600 16px/24px var(--body); cursor: pointer; }
.search-form button:hover { background: var(--ink); border-color: var(--ink); }
#results .post-row { border-top: 1px solid var(--ink); }

.demo-banner { background: var(--accent); color: var(--paper); padding: 16px 40px; font-size: 14px; line-height: 24px; }
.demo-banner strong { font-weight: 600; }

/* ---- Opportunity board v0 ---- */
.opp-filters { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 20px; }
.opp-filters label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.opp-filters select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); background: var(--paper); font: inherit; }
.opp-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.opp-card { position: relative; padding: 20px; display: block; }
.opp-card h3 { margin: 0 0 6px; }
.opp-badge { display: inline-block; background: var(--accent); color: var(--paper); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 2px; letter-spacing: .04em; text-transform: uppercase; }
.opp-empty { border: 2px dashed var(--line); padding: 40px 24px; text-align: center; margin: 8px 0 24px; }
.opp-trust { border-left: 4px solid var(--accent); background: var(--paper); padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.opp-meta li { margin-bottom: 6px; }
.opp-apply { margin: 20px 0 0; }
.vacancy-form { display: block; margin: 24px 0; }
.vacancy-form .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 14px; }
.vacancy-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.vacancy-form input:not([type="checkbox"]):not([type="hidden"]), .vacancy-form select, .vacancy-form textarea { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); background: var(--paper); font: inherit; font-weight: 400; }
.vacancy-form textarea { min-height: 160px; resize: vertical; }
.vacancy-form .consent { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; margin: 14px 0; }
.vacancy-form .consent input { width: 20px; height: 20px; margin-top: 2px; }
.vacancy-form .consent a { font-weight: 600; }
.vacancy-form button[type="submit"] { min-height: 48px; padding: 0 28px; background: var(--ink); color: var(--paper); border: none; font: inherit; font-weight: 600; cursor: pointer; }
.vacancy-form button[type="submit"]:disabled { opacity: .6; cursor: progress; }
.hp-wrap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.hp-field { display: none; }
.form-error { color: #8a1c1c; font-weight: 600; }
