/* APEN Pathways — Axiom Professional Education Network
   Brand tokens follow the live apenpathways.org identity (navy + gold, Playfair Display + Inter). */

:root {
  --navy: #1b365a;
  --navy-deep: #0f2440;
  --navy-soft: #34567f;
  --gold: #c7923d;
  --gold-deep: #8f6420;
  --gold-soft: #f4e6cc;
  --paper: #f7f8fa;
  --white: #ffffff;
  --ink: #132439;
  --slate: #56677c;
  --line: #dce3ec;

  /* Portal A — module colours from the ACDEG preschool cube */
  --sun: #f2bd45;
  --sun-soft: #fdf1d3;
  --leaf: #2e7d50;
  --leaf-soft: #ddf1e4;
  --sky: #2f72b8;
  --sky-soft: #dceafa;
  --hibiscus: #c2432a;
  --hibiscus-soft: #fbe2da;
  --peach: #fbead3;

  /* Portal B */
  --parch: #f2eee6;
  --ballot: #2d6a4f;
  --term: #0d1b2c;

  --sdg4: #c5192d;
  --sdg5: #d9301b;
  --sdg16: #00689d;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 22px;
  --shadow: 0 1px 2px rgba(19, 36, 57, .06), 0 8px 24px rgba(19, 36, 57, .07);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy-deep); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-family: var(--sans); font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--slate); max-width: 62ch; }
.small { font-size: .9rem; color: var(--slate); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-s); z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--slate); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 54px; width: auto; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; font: 600 .95rem var(--sans); color: var(--navy); cursor: pointer; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.site-nav a {
  display: block; padding: 10px 12px; white-space: nowrap; text-decoration: none; color: var(--ink);
  font-weight: 500; font-size: .97rem; border-radius: var(--radius-s); position: relative;
}
.site-nav a:hover { color: var(--navy); background: var(--paper); }
.site-nav a[aria-current="page"] { color: var(--navy); font-weight: 700; }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--gold);
}
.page-preschool .site-nav a[aria-current="page"]::after { background: var(--leaf); }
.site-nav .nav-cta a { background: var(--navy); color: #fff; margin-left: 8px; }
.site-nav .nav-cta a:hover { background: var(--navy-deep); color: #fff; }
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; }
  .site-nav a[aria-current="page"]::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; }
  .site-nav .nav-cta a { margin: 8px 0 0; text-align: center; }
  .brand img { height: 44px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 10px; font: 600 1rem/1.2 var(--sans);
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #d8a556; color: var(--navy-deep); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }
.btn-hibiscus { background: var(--hibiscus); color: #fff; }
.btn-hibiscus:hover { background: #b23c20; color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--navy-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Generic bits ---------- */
.tag {
  display: inline-block; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--gold-soft); color: #7a5617;
}
.tag-ece { background: var(--leaf-soft); color: #1f6b41; }
.tag-acdeg { background: #e1e8f2; color: var(--navy); }
.tag-shared { background: #ece8f6; color: #4f3f86; }
.tag-both { background: var(--gold-soft); color: #7a5617; }
.cmd { font-family: var(--mono); font-size: .92em; background: #eef2f7; color: var(--navy-deep); padding: 2px 7px; border-radius: 5px; white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.82); padding: 64px 0 28px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid h4 { color: #fff; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-logo { height: 60px; width: auto; margin-bottom: 18px; }
.footer-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: .88rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================================================
   HOME
   ========================================================= */
.home-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 72px); background: #fff; border-bottom: 1px solid var(--line); }
.home-hero h1 { max-width: 15ch; }
.home-hero .lede { margin-bottom: 40px; }

/* The education ladder: where APEN sits around the Maputo 2023 materials */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 8px; position: relative; }
.ladder::before {
  content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 31px; height: 4px; background: linear-gradient(90deg, var(--leaf), var(--line) 30%, var(--line) 70%, var(--navy)); border-radius: 2px;
}
.rung { position: relative; text-align: center; padding: 0 10px; }
.rung .dot {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
  background: #fff; border: 4px solid var(--line); font: 700 1.05rem var(--serif); color: var(--slate); position: relative; z-index: 1;
}
.rung .rung-t { font: 700 1.15rem/1.2 var(--serif); color: var(--navy-deep); margin: 0 0 4px; }
.rung p { font-size: .92rem; color: var(--slate); margin: 0 auto; max-width: 24ch; }
.rung.apen .dot { border-color: currentColor; color: #fff; }
.rung.apen-a .dot { background: var(--leaf); border-color: var(--leaf); }
.rung.apen-b .dot { background: var(--navy); border-color: var(--navy); }
.rung .who { display: inline-block; margin-top: 10px; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.rung.apen-a .who { background: var(--leaf-soft); color: #1f6b41; }
.rung.apen-b .who { background: #e1e8f2; color: var(--navy); }
.rung.au .who { background: var(--paper); color: var(--slate); border: 1px solid var(--line); }
@media (max-width: 720px) {
  .ladder { grid-template-columns: 1fr; gap: 18px; }
  .ladder::before { left: 32px; right: auto; top: 20px; bottom: 20px; width: 4px; height: auto; background: linear-gradient(180deg, var(--leaf), var(--line) 30%, var(--line) 70%, var(--navy)); }
  .rung { display: grid; grid-template-columns: 66px 1fr; gap: 0 18px; text-align: left; padding: 0; }
  .rung .dot { grid-row: span 3; margin: 0; }
  .rung p { margin: 0; max-width: none; }
  .rung .who { justify-self: start; }
}

.portals { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.portal {
  border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; position: relative;
}
.portal-media { aspect-ratio: 16 / 9; overflow: hidden; position: relative; }
.portal-media img { width: 100%; height: 100%; object-fit: cover; }
.portal-body { padding: 30px 32px 34px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.portal-body h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 0; }
.portal-label { font-weight: 700; font-size: .9rem; }
.portal-facts { list-style: none; padding: 0; margin: 8px 0 18px; display: grid; gap: 8px; }
.portal-facts li { display: grid; grid-template-columns: 4.2rem 1fr; gap: 12px; align-items: baseline; }
.portal-facts .cmd { font-size: .8rem; margin-right: 4px; display: inline-block; margin-top: 4px; }
.portal-facts strong { font-family: var(--serif); font-size: 1.35rem; min-width: 2.2ch; }
.portal .btn { align-self: flex-start; margin-top: auto; }
.portal-a { background: var(--peach); }
.portal-a .portal-label { color: #1f6b41; }
.portal-a .portal-facts strong { color: #a83a22; }
.portal-b { background: var(--navy-deep); color: rgba(255,255,255,.86); }
.portal-b h3 { color: #fff; }
.portal-b .portal-label { color: var(--gold); }
.portal-b .portal-facts strong { color: var(--gold); }
.portal-b .portal-media { background: radial-gradient(circle at 70% 40%, #2b4c78, var(--navy-deep) 70%); display: grid; place-items: center; }
.portal-b .portal-media svg { height: 92%; width: auto; }
@media (max-width: 860px) { .portals { grid-template-columns: 1fr; } }

.archive-teaser { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.teaser-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
.big-count { font: 700 clamp(4rem, 9vw, 6.5rem)/1 var(--serif); color: var(--gold-deep); margin-bottom: 8px; }
@media (max-width: 860px) { .teaser-grid { grid-template-columns: 1fr; gap: 24px; } }

.founder { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.founder blockquote { margin: 0; font: 500 clamp(1.25rem, 2.2vw, 1.6rem)/1.45 var(--serif); color: var(--navy-deep); position: relative; padding-top: 44px; }
.founder blockquote::before { content: "\201C"; position: absolute; top: -18px; left: -4px; font: 700 5.5rem/1 var(--serif); color: var(--gold); }
.founder cite { display: block; margin-top: 16px; font: 600 1rem var(--sans); font-style: normal; color: var(--slate); }
.contact-card { background: #fff; border-radius: var(--radius-l); padding: 32px; box-shadow: var(--shadow); }
.contact-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.contact-card li { display: flex; gap: 12px; align-items: center; }
.contact-card svg { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; }
@media (max-width: 860px) { .founder { grid-template-columns: 1fr; gap: 32px; } }

/* =========================================================
   PORTAL HEROES
   ========================================================= */
.hero-a { background: linear-gradient(100deg, var(--peach) 0%, var(--peach) 46%, #f6dcb6 100%); overflow: hidden; }
.hero-a .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; min-height: 560px; padding-top: 48px; padding-bottom: 48px; }
.hero-a h1 { color: var(--navy-deep); }
.hero-a .lede { color: #3d4a5a; }
.hero-a-media { position: relative; }
.hero-a-media img { border-radius: var(--radius-l); box-shadow: 0 2px 6px rgba(19, 36, 57, .1), 0 24px 48px rgba(19, 36, 57, .16); width: 100%; aspect-ratio: 530 / 490; object-fit: cover; }
@media (max-width: 900px) { .hero-a .wrap { grid-template-columns: 1fr; min-height: 0; } }

.hero-b { background: var(--navy-deep); color: rgba(255,255,255,.86); overflow: hidden; position: relative; }
.hero-b::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 45%, rgba(199,146,61,.18), transparent 46%); pointer-events: none; }
.hero-b .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; min-height: 560px; padding-top: 48px; padding-bottom: 48px; position: relative; z-index: 1; }
.hero-b h1 { color: #fff; }
.hero-b .lede { color: rgba(255,255,255,.78); }
@media (max-width: 900px) { .hero-b .wrap { grid-template-columns: 1fr; min-height: 0; } }

/* Hexagon of the six ACDEG clusters */
.hexmap { width: 100%; max-width: 480px; margin: 0 auto; }
.hexmap text { font-family: var(--sans); }
.hexmap a { cursor: pointer; }
.hexmap a:focus-visible { outline: none; }
.hexmap a:focus-visible circle, .hexmap a:hover circle { stroke: var(--gold); stroke-width: 3; }

/* ---------- SDG band ---------- */
.sdg-band { background: #fff; }
.sdg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.sdg-grid.three { grid-template-columns: repeat(3, 1fr); }
.sdg-card { border-radius: var(--radius-m); overflow: hidden; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; }
.sdg-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.sdg-card .body { padding: 18px 20px 22px; }
.sdg-card h3 { font-size: 1.15rem; margin: 10px 0 6px; }
.sdg-card p { font-size: .94rem; color: var(--slate); margin: 0; }
.sdg-badge { display: inline-flex; align-items: center; gap: 10px; font: 700 .85rem var(--sans); color: var(--ink); }
.sdg-badge b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; color: #fff; font-size: 1.05rem; }
.sdg-badge .g4 { background: var(--sdg4); }
.sdg-badge .g5 { background: var(--sdg5); }
.sdg-badge .g16 { background: var(--sdg16); }
.sdg-badge .au { background: var(--ballot); font-size: .7rem; }
@media (max-width: 1000px) { .sdg-grid, .sdg-grid.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .sdg-grid, .sdg-grid.three { grid-template-columns: 1fr; } }

/* ---------- Four-pillar navigator (the 4-column framework) ---------- */
.pillars { position: sticky; top: 76px; z-index: 40; background: rgba(247, 248, 250, .97); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.pillars ol { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--wrap); display: grid; grid-template-columns: repeat(4, 1fr); }
.pillars a { display: flex; gap: 12px; align-items: center; padding: 14px 12px; text-decoration: none; color: var(--slate); font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; height: 100%; }
.pillars a b { font: 700 1.3rem var(--serif); color: #7d8ea3; transition: color .2s; }
.pillars a:hover, .pillars a.active { color: var(--navy-deep); }
.pillars a.active { border-bottom-color: var(--pc, var(--gold)); }
.pillars a.active b, .pillars a:hover b { color: var(--pc, var(--gold)); }
@media (max-width: 760px) {
  .pillars { top: 68px; }
  .pillars ol { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 6px; }
  .pillars a { flex-direction: column; gap: 0; padding: 8px 4px; font-size: .74rem; text-align: center; line-height: 1.2; }
}

.pillar { scroll-margin-top: 150px; }
.pillar-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: clamp(28px, 4vw, 44px); max-width: 860px; }
.pillar-num { font: 700 clamp(3rem, 6vw, 4.5rem)/.9 var(--serif); color: var(--pc, var(--gold-deep)); flex-shrink: 0; }
.pillar-head p { color: var(--slate); margin: 0; }

/* ---------- Column 1 (Portal A): 3D curriculum cube ---------- */
.cube-layout { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.cube-stage { perspective: 1100px; display: grid; justify-items: center; gap: 22px; user-select: none; }
.cube {
  --s: min(78vw, 300px);
  --spin: 0deg;
  width: var(--s); height: var(--s); position: relative; transform-style: preserve-3d;
  transform: translateZ(calc(var(--s) / -2)) rotateX(-16deg) rotateY(calc(var(--ry, 0deg) + var(--spin) - 28deg));
  margin: 28px 0 40px;
  transition: transform .6s cubic-bezier(.16, 1, .3, 1); cursor: grab; touch-action: pan-y;
}
.cube.dragging { transition: none; cursor: grabbing; }
.face {
  position: absolute; inset: 0; border-radius: 6px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05), 0 18px 40px rgba(19,36,57,.16);
}
.face .face-n { position: absolute; top: 14px; right: 18px; font: 700 2.6rem/1 var(--serif); opacity: .75; }
.face h3 { font-size: 1.55rem; margin: 0; color: inherit; }
.face .face-focus { font-size: .9rem; margin: 0; }
.face .face-icon { width: 56px; height: 56px; }
.face-1 { background: #fbe7b0; color: #5e4105; transform: rotateY(0deg) translateZ(calc(var(--s) / 2)); }
.face-2 { background: #c9e8d4; color: #134a2a; transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.face-3 { background: #c8def5; color: #153a61; transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.face-4 { background: #f7cfc3; color: #6e2210; transform: rotateY(270deg) translateZ(calc(var(--s) / 2)); }
.cube-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cube-controls button {
  border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font: 600 .88rem var(--sans); color: var(--slate); cursor: pointer;
}
.cube-controls button[aria-selected="true"] { color: #fff; border-color: var(--mc); background: var(--mc); }
.cube-hint { font-size: .85rem; color: var(--slate); margin: 0; }

.module-panel { background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.module-panel[hidden] { display: none; }
.module-panel .mp-img { aspect-ratio: 21 / 9; object-fit: cover; width: 100%; }
.module-panel .mp-body { padding: 28px 30px 32px; }
.module-panel h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.module-panel .focus { color: var(--slate); }
.units { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.units li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 14px 16px; border-radius: var(--radius-m); background: var(--paper); }
.units .u { font: 700 .82rem var(--sans); color: #fff; background: var(--mc); border-radius: 6px; padding: 4px 8px; white-space: nowrap; }
.units strong { display: block; }
.units span.d { color: var(--slate); font-size: .94rem; }

/* CPA note — required by Dr Mostapha under Numeracy in the curriculum column */
.cpa { margin-top: 18px; border: 2px dashed var(--leaf); border-radius: var(--radius-m); padding: 18px 20px; background: #f6fbf8; }
.cpa h4 { margin: 0 0 6px; color: #17532f; }
.cpa p { margin: 0 0 14px; font-size: .95rem; }
.cpa-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cpa-step { background: #fff; border-radius: 10px; padding: 12px; text-align: center; border: 1px solid var(--leaf-soft); }
.cpa-step .vis { height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cpa-step b { display: block; font-size: .92rem; color: #17532f; }
.cpa-step span { font-size: .8rem; color: var(--slate); }
.seed { width: 16px; height: 20px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #8a5a2b; box-shadow: inset -3px -3px 0 rgba(0,0,0,.18); }
.pdot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--leaf); }
.abs { font: 700 2rem var(--serif); color: var(--leaf); }
@media (max-width: 900px) { .cube-layout { grid-template-columns: 1fr; } }

/* ---------- Column 2 (Portal A): thematic pedagogy ---------- */
.pedagogy { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.pedagogy-note { background: var(--navy-deep); color: rgba(255,255,255,.88); border-radius: var(--radius-l); padding: 32px; position: sticky; top: 160px; }
.pedagogy-note p.q { font: 500 1.3rem/1.5 var(--serif); color: #fff; margin-bottom: 20px; }
.pedagogy-note img { border-radius: var(--radius-m); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.tabs { display: inline-flex; background: #e9edf3; border-radius: 999px; padding: 5px; margin-bottom: 22px; }
.tabs button { border: 0; background: transparent; padding: 10px 20px; border-radius: 999px; font: 600 .95rem var(--sans); color: var(--slate); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--navy-deep); box-shadow: 0 2px 6px rgba(19,36,57,.12); }
.tabpanel[hidden] { display: none; }
.week { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.week li { display: grid; grid-template-columns: 120px 1fr; align-items: center; background: #fff; border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); }
.week .day { align-self: stretch; display: grid; place-items: center; font: 700 1rem var(--serif); color: #fff; padding: 14px 8px; }
.week .act { padding: 14px 18px; }
.week li:nth-child(1) .day { background: var(--navy); }
.week li:nth-child(2) .day { background: var(--leaf); }
.week li:nth-child(3) .day { background: var(--gold); }
.week li:nth-child(4) .day { background: var(--hibiscus); }
.week li:nth-child(5) .day { background: #6b4aa0; }
.week-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 18px; font-size: .95rem; color: var(--slate); }
.week-meta strong { color: var(--ink); }
.flow { list-style: none; margin: 0; padding: 0; counter-reset: flow; display: grid; gap: 14px; }
.flow > li { background: #fff; border-radius: var(--radius-m); border: 1px solid var(--line); padding: 18px 20px 18px 74px; position: relative; counter-increment: flow; }
.flow > li::before { content: counter(flow); position: absolute; left: 18px; top: 16px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: #5a3e05; font: 700 1.1rem var(--serif); }
.flow > li:not(:last-child)::after { content: ""; position: absolute; left: 37px; top: 58px; bottom: -16px; width: 2px; background: var(--sun-soft); }
.flow h3 { margin: 0 0 2px; font: 700 1rem var(--sans); color: var(--navy-deep); }
.flow time { font-size: .85rem; font-weight: 600; color: var(--hibiscus); }
.flow ul { margin: 8px 0 0; padding-left: 18px; color: #3b4a5c; font-size: .95rem; }
.flow ul li { margin-bottom: 4px; }
@media (max-width: 900px) { .pedagogy { grid-template-columns: 1fr; } .pedagogy-note { position: static; } }
@media (max-width: 480px) { .week li { grid-template-columns: 90px 1fr; } }

/* ---------- Column 3: AI–human campus ---------- */
.col3-intro { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; margin-bottom: 40px; }
.vision { font: 500 clamp(1.3rem, 2.4vw, 1.75rem)/1.4 var(--serif); color: var(--navy-deep); margin: 0; }
.split { margin: 0 0 36px; }
.split-bar { display: flex; height: 78px; border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow); }
.split-bar .ai { flex: 70; background: linear-gradient(135deg, var(--sky), #2a5fa0); color: #fff; padding: 14px 20px; display: flex; flex-direction: column; justify-content: center; }
.split-bar .hu { flex: 30; background: linear-gradient(135deg, #e88a3d, var(--hibiscus)); color: #fff; padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; }
.split-bar b { font: 700 1.6rem/1 var(--serif); }
.split-bar span { font-size: .88rem; opacity: .95; }
.split-detail { display: grid; grid-template-columns: 70fr 30fr; gap: 16px; margin-top: 16px; }
.split-detail div { background: #fff; border-radius: var(--radius-m); padding: 20px 22px; border: 1px solid var(--line); }
.split-detail ul { margin: 0; padding-left: 18px; }
.split-detail li { margin-bottom: 6px; font-size: .96rem; }
@media (max-width: 760px) { .col3-intro, .split-detail { grid-template-columns: 1fr; } }

.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 36px 0; }
.why div { padding: 22px; border-radius: var(--radius-m); background: #fff; border: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.why svg { width: 40px; height: 40px; color: var(--gold-deep); }
.why p { margin: 0; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }

/* RAG demo (Portal A) */
.rag-demo { background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.rag-top { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fafbfd; font-weight: 600; font-size: .92rem; color: var(--slate); }
.rag-top i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.rag-body { padding: 24px; }
.prompt-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.prompt-choices button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 14px; font: 500 .9rem var(--sans); color: var(--ink); cursor: pointer; text-align: left; }
.prompt-choices button[aria-pressed="true"] { border-color: var(--sky); background: var(--sky-soft); color: #173f69; font-weight: 600; }
.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1.25fr; gap: 12px; align-items: stretch; }
.stage { border-radius: var(--radius-m); padding: 18px; background: var(--paper); border: 1px solid var(--line); }
.stage h4 { font-size: .9rem; margin: 0 0 8px; color: var(--slate); }
.stage .content { font-size: .95rem; }
.stage.live { border-color: var(--sky); background: var(--sky-soft); }
.stage.done { border-color: var(--leaf); background: #f3faf6; }
.arrow { display: grid; place-items: center; color: var(--slate); }
.arrow svg { width: 26px; height: 26px; }
.lesson-out ol { margin: 6px 0 0; padding-left: 18px; font-size: .92rem; }
.lesson-out li { margin-bottom: 4px; }
@media (max-width: 900px) { .pipeline { grid-template-columns: 1fr; } .arrow svg { transform: rotate(90deg); } }

.commands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.commands div { background: #fff; border-radius: var(--radius-m); padding: 18px; border: 1px solid var(--line); }
.commands .cmd { display: inline-block; margin-bottom: 8px; font-size: .95rem; }
.commands p { margin: 0; font-size: .92rem; color: var(--slate); }
@media (max-width: 900px) { .commands { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .commands { grid-template-columns: 1fr; } }

.funders { margin-top: 48px; background: var(--navy-deep); color: rgba(255,255,255,.85); border-radius: var(--radius-l); padding: clamp(28px, 5vw, 52px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.funders h3 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.funders .budget { font: 700 clamp(2.4rem, 5vw, 3.4rem)/1 var(--serif); color: var(--gold); }
.phases { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.phases li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; font-size: .94rem; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.12); }
.phases b { color: var(--gold); font-weight: 600; }
@media (max-width: 860px) { .funders { grid-template-columns: 1fr; } }

/* ---------- Research hubs (Column 4 + archive page) ---------- */
.hub-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; align-items: center; }
.search { flex: 1 1 320px; position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--slate); }
.search input { width: 100%; padding: 14px 16px 14px 44px; border-radius: 10px; border: 1.5px solid var(--line); font: 1rem var(--sans); background: #fff; color: var(--ink); }
.search input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(27,54,90,.15); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font: 600 .86rem var(--sans); color: var(--slate); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pubs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pub { background: #fff; border-radius: var(--radius-m); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.pub .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .82rem; color: var(--slate); }
.pub h3 { font-size: 1.12rem; line-height: 1.3; margin: 0; }
.pub p { font-size: .93rem; color: var(--slate); margin: 0; }
.pub a.doi { margin-top: auto; font-weight: 600; font-size: .92rem; display: inline-flex; gap: 6px; align-items: center; }
.pub a.doi svg { width: 15px; height: 15px; }
.pubs-empty { grid-column: 1 / -1; padding: 28px; text-align: center; background: #fff; border-radius: var(--radius-m); border: 1px dashed var(--line); color: var(--slate); }
.hub-foot { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
@media (max-width: 1000px) { .pubs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .pubs { grid-template-columns: 1fr; } }

/* =========================================================
   PORTAL B (Tertiary)
   ========================================================= */
.page-tertiary .section.alt { background: var(--parch); }
.semester-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 26px; }
.semester-tabs button { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 16px 20px; text-align: left; cursor: pointer; font: 600 1rem var(--sans); color: var(--slate); }
.semester-tabs button small { display: block; font-weight: 500; font-size: .86rem; margin-top: 2px; }
.semester-tabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.semester-tabs button[aria-selected="true"] small { color: rgba(255,255,255,.8); }
.terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.term { background: #fff; border-radius: var(--radius-m); border: 1px solid var(--line); overflow: hidden; }
.term > button { width: 100%; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 20px; background: #fafbfd; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.term > button .tn { color: var(--gold-deep); }
.term > button .tt { font: 700 1.15rem/1.3 var(--serif); color: var(--navy-deep); }
.term > button svg { width: 22px; height: 22px; flex-shrink: 0; transition: transform .2s; color: var(--slate); margin-top: 4px; }
.term > button[aria-expanded="false"] svg { transform: rotate(-90deg); }
.term .term-body { padding: 18px 20px 20px; }
.term .term-body[hidden] { display: none; }
.term ul { margin: 0 0 14px; padding-left: 18px; }
.term li { margin-bottom: 8px; }
.cluster-chip { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 600; color: var(--ballot); background: #e3efe8; border-radius: 999px; padding: 4px 10px; }
.sem-focus { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 20px 16px 56px; margin-top: 22px; font-size: .96rem; position: relative; }
.sem-focus svg { position: absolute; left: 18px; top: 16px; width: 24px; height: 24px; color: var(--gold-deep); }
@media (max-width: 900px) { .terms { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .semester-tabs { grid-template-columns: 1fr; } }

.methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.method { background: #fff; border-radius: var(--radius-m); padding: 24px; border: 1px solid var(--line); }
.method svg { width: 44px; height: 44px; color: var(--navy); margin-bottom: 14px; }
.method h3 { font-size: 1.15rem; }
.method p { font-size: .94rem; color: var(--slate); margin: 0; }
@media (max-width: 1000px) { .methods { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .methods { grid-template-columns: 1fr; } }

.t-model { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 4vw, 52px); align-items: start; }
.ring-wrap { display: flex; gap: 22px; align-items: center; margin-bottom: 22px; }
.ring { width: 130px; height: 130px; border-radius: 50%; background: conic-gradient(var(--navy) 0 70%, var(--gold) 70% 100%); display: grid; place-items: center; flex-shrink: 0; }
.ring::after { content: "70 / 30"; width: 84px; height: 84px; border-radius: 50%; background: var(--parch); display: grid; place-items: center; font: 700 1.1rem var(--serif); color: var(--navy-deep); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.legend li { padding-left: 20px; position: relative; font-size: .96rem; }
.legend li::before { content: ""; position: absolute; left: 0; top: 7px; width: 11px; height: 11px; border-radius: 3px; background: var(--navy); }
.legend li.h::before { background: var(--gold); }

.terminal { background: var(--term); border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 24px 48px rgba(13,27,44,.35); color: #d6e2f0; font-family: var(--mono); font-size: .9rem; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #15283f; color: #94a8c0; font-family: var(--sans); font-size: .85rem; font-weight: 600; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.term-bar span { margin-left: 10px; }
.term-screen { padding: 18px; min-height: 290px; max-height: 420px; overflow-y: auto; line-height: 1.6; white-space: pre-wrap; }
.term-screen .u { color: #f5c46a; }
.term-screen .s { color: #7fd1a6; }
.term-screen .k { color: #8ab4ff; }
.term-screen .dim { color: #6f8399; }
.term-input { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid #1d3550; align-items: center; }
.term-input label { color: #f5c46a; }
.term-input input { flex: 1; background: transparent; border: 0; color: #fff; font: inherit; padding: 6px 0; min-width: 0; }
.term-input input:focus { outline: none; }
.term-input:focus-within { box-shadow: inset 0 0 0 2px var(--gold); }
.term-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.term-quick button { font: 600 .86rem var(--mono); border: 1px solid var(--line); background: #fff; color: var(--navy-deep); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.term-quick button:hover { border-color: var(--navy); }
@media (max-width: 900px) { .t-model { grid-template-columns: 1fr; } }

.streams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.stream { background: #fff; border-radius: var(--radius-m); padding: 24px; border: 1px solid var(--line); }
.stream .cmd { background: var(--navy); color: #fff; }
.stream:nth-child(2) .cmd { background: var(--gold); color: var(--navy-deep); }
.stream:nth-child(3) .cmd { background: var(--ballot); color: #fff; }
.stream .sl { font-weight: 700; font-size: .85rem; color: var(--slate); }
.stream h3 { font-size: 1.2rem; margin: 6px 0 10px; }
.stream p { font-size: .94rem; color: var(--slate); }
@media (max-width: 900px) { .streams { grid-template-columns: 1fr; } }

.placement { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 40px; background: #fff; border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line); }
.placement > div { padding: 26px 28px; }
.placement > div + div { border-left: 1px solid var(--line); }
.placement h4 { font-family: var(--serif); font-size: 1.15rem; color: var(--navy-deep); }
.placement p { font-size: .95rem; color: var(--slate); margin: 0; }
@media (max-width: 900px) { .placement { grid-template-columns: 1fr; } .placement > div + div { border-left: 0; border-top: 1px solid var(--line); } }

.funders.b { background: var(--navy); }

/* =========================================================
   ARCHIVE + ACCESS pages
   ========================================================= */
.page-hero { background: #fff; border-bottom: 1px solid var(--line); padding: clamp(44px, 6vw, 80px) 0 clamp(36px, 5vw, 56px); }
.ns-explainer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.ns { border-radius: var(--radius-m); padding: 18px 20px; border: 1px solid var(--line); background: var(--paper); }
.ns code { font-family: var(--mono); font-weight: 700; color: var(--navy-deep); }
.ns p { margin: 6px 0 0; font-size: .92rem; color: var(--slate); }
@media (max-width: 760px) { .ns-explainer { grid-template-columns: 1fr; } }
.count-line { font-size: .95rem; color: var(--slate); margin: 0 0 16px; }

.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.role { background: #fff; border-radius: var(--radius-l); border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; }
.role h3 { margin-bottom: 4px; }
.role .who { color: var(--slate); font-size: .95rem; }
.role ul { padding-left: 18px; margin: 12px 0 22px; font-size: .95rem; }
.role li { margin-bottom: 6px; }
.role .btn { margin-top: auto; align-self: flex-start; }
.role h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); display: flex; gap: 12px; align-items: center; }
.role h2 svg { width: 26px; height: 26px; color: var(--gold-deep); flex-shrink: 0; }
@media (max-width: 900px) { .roles { grid-template-columns: 1fr; } }

/* =========================================================
   POLISH — browser surfaces & interaction states
   ========================================================= */
::selection { background: var(--gold-soft); color: var(--navy-deep); }
html { scrollbar-color: #b9c5d4 var(--paper); }
input, textarea { caret-color: var(--gold-deep); }
.terminal input { caret-color: #f5c46a; }
.btn:active { transform: translateY(1px); }
.chips button, .prompt-choices button, .cube-controls button, .tabs button, .semester-tabs button, .term-quick button {
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.chips button:hover, .prompt-choices button:hover, .cube-controls button:hover, .term-quick button:hover { border-color: var(--navy-soft); color: var(--navy-deep); }
.cube-controls button[aria-selected="true"]:hover, .chips button[aria-pressed="true"]:hover { color: #fff; border-color: var(--mc, var(--navy)); }
.semester-tabs button:hover:not([aria-selected="true"]) { border-color: var(--navy-soft); color: var(--navy-deep); }
.term > button:hover { background: #f1f4f8; }
.portal { transition: box-shadow .25s cubic-bezier(.16,1,.3,1); }
.portal .portal-media img { transition: transform .6s cubic-bezier(.16,1,.3,1); }
.portal:hover { box-shadow: 0 2px 4px rgba(19,36,57,.08), 0 22px 44px rgba(19,36,57,.16); }
.portal:hover .portal-media img { transform: scale(1.035); }
.portal-a:hover { color: var(--ink); }
.portal-b:hover { color: rgba(255,255,255,.86); }
.portal:hover .btn-hibiscus { background: #b23c20; }
.portal:hover .btn-gold { background: #d8a556; }
.portal:focus-visible { outline-offset: 6px; border-radius: var(--radius-l); }
.pub { transition: border-color .15s, box-shadow .15s; }
.pub:hover { border-color: #c4cfdc; box-shadow: 0 8px 22px rgba(19,36,57,.08); }
.pub a.doi svg { transition: transform .15s; }
.pub a.doi:hover svg { transform: translate(2px, -2px); }

/* =========================================================
   MOTION
   Every default is the finished, visible state. JS adds .motion-ok to
   <html> only when the visitor has not asked for reduced motion.
   ========================================================= */
@keyframes draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fill-from-blank { from { background: #fff; color: var(--slate); border-color: var(--line); } }
@keyframes ring-pop { 0% { box-shadow: 0 0 0 0 rgba(58,152,98,.45); } 100% { box-shadow: 0 0 0 18px rgba(58,152,98,0); } }
@keyframes ring-pop-b { 0% { box-shadow: 0 0 0 0 rgba(27,54,90,.4); } 100% { box-shadow: 0 0 0 18px rgba(27,54,90,0); } }

/* 1 — Home ladder: the line travels preschool → university; the two APEN stops fill last */
.motion-ok .ladder::before { transform-origin: left center; animation: draw-x 1.5s cubic-bezier(.65,0,.35,1) .25s both; }
.motion-ok .rung > * { animation: rise-in .5s cubic-bezier(.16,1,.3,1) both; }
.motion-ok .rung:nth-child(1) > * { animation-delay: .2s; }
.motion-ok .rung:nth-child(2) > * { animation-delay: .6s; }
.motion-ok .rung:nth-child(3) > * { animation-delay: 1s; }
.motion-ok .rung:nth-child(4) > * { animation-delay: 1.4s; }
.motion-ok .rung.apen-a > .dot { animation: rise-in .5s cubic-bezier(.16,1,.3,1) .2s both, fill-from-blank .6s ease 1.8s both, ring-pop .9s ease-out 2.4s; }
.motion-ok .rung.apen-b > .dot { animation: rise-in .5s cubic-bezier(.16,1,.3,1) 1.4s both, fill-from-blank .6s ease 2s both, ring-pop-b .9s ease-out 2.6s; }
@media (max-width: 720px) { .motion-ok .ladder::before { transform-origin: center top; animation-name: draw-y; } }

/* 2 — CPA sequence: seeds, then dots, then the numeral */
.cpa-step { transition: border-color .3s, box-shadow .3s; }
.cpa-step.on { border-color: var(--leaf); box-shadow: 0 6px 16px rgba(58,152,98,.18); }
.cpa .seed, .cpa .pdot, .cpa .abs { transition: opacity .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1); }
.cpa.playing .seed, .cpa.playing .pdot, .cpa.playing .abs { opacity: 0; transform: translateY(-8px) scale(.6); }
.cpa.playing .seed.in, .cpa.playing .pdot.in, .cpa.playing .abs.in { opacity: 1; transform: none; }
.cpa-replay { margin-top: 12px; background: none; border: 0; padding: 4px 0; font: 600 .88rem var(--sans); color: #17532f; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.cpa-replay svg { width: 16px; height: 16px; }

/* 4 — RAG request travelling between stages */
.arrow { position: relative; }
.arrow .packet { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 4px rgba(61,132,204,.2); top: 50%; left: 50%; margin: -6px 0 0 -6px; opacity: 0; pointer-events: none; }
.arrow.go .packet { animation: packet-x .6s cubic-bezier(.65,0,.35,1); }
@keyframes packet-x { 0% { opacity: 0; transform: translateX(-26px); } 20%, 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(26px); } }
@media (max-width: 900px) { .arrow.go .packet { animation-name: packet-y; } }
@keyframes packet-y { 0% { opacity: 0; transform: translateY(-18px); } 20%, 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(18px); } }

/* 5 — 70/30 bar and ring fill when first seen */
.split-bar { clip-path: inset(0 0 0 0 round 12px); }
.motion-ok .split-bar { transition: clip-path 1.1s cubic-bezier(.65,0,.35,1); }
.motion-ok .split-bar.pre { clip-path: inset(0 100% 0 0 round 12px); }
@property --p { syntax: "<percentage>"; inherits: false; initial-value: 70%; }
.ring { background: conic-gradient(var(--navy) 0 var(--p), var(--gold) var(--p) 100%); }
.motion-ok .ring { transition: --p 1.2s cubic-bezier(.65,0,.35,1); }
.motion-ok .ring.pre { --p: 0%; }

/* 6 — Hexagon: lit spokes and a caption naming the term */
.hexmap .spoke { stroke: #c7923d; stroke-width: 1.5; opacity: .45; transition: opacity .2s, stroke-width .2s; }
.hexmap .spoke.lit { opacity: 1; stroke-width: 4; }
.hexmap a circle { transition: fill .2s, stroke .2s; }
.hexmap a.lit circle, .hexmap a:hover circle, .hexmap a:focus-visible circle { fill: #26497a; stroke: var(--gold); stroke-width: 3; }
.hex-caption { min-height: 3.4em; text-align: center; color: rgba(255,255,255,.8); font-size: .95rem; margin: 4px auto 0; max-width: 36ch; position: relative; z-index: 1; }
.hex-caption strong { color: #fff; display: block; font-family: var(--serif); font-size: 1.1rem; }
@keyframes term-flash { 0% { box-shadow: 0 0 0 0 rgba(199,146,61,0); } 25% { box-shadow: 0 0 0 4px rgba(199,146,61,.5); } 100% { box-shadow: 0 0 0 0 rgba(199,146,61,0); } }
.term.flash { animation: term-flash 1.6s ease-out; }

/* Tertiary hero art: Africa network behind the hexagon */
.hero-b-art { position: relative; display: grid; justify-items: center; }
.africa { position: absolute; left: 50%; top: 48%; width: 112%; height: auto; transform: translate(-50%, -50%); z-index: 0; pointer-events: none; }
.africa .land { fill: rgba(255,255,255,.035); stroke: rgba(199,146,61,.4); stroke-width: 1.2; stroke-linejoin: round; }
.africa .edge { stroke: rgba(199,146,61,.26); stroke-width: 1; fill: none; }
.africa .pulse { stroke: #f0c27a; stroke-width: 2.2; fill: none; stroke-linecap: round; opacity: 0; }
.africa .city { fill: #c7923d; }
.motion-ok .africa.live .pulse { animation: pulse-run 7s linear infinite; }
@keyframes pulse-run { 0% { stroke-dashoffset: 0; opacity: 0; } 3% { opacity: 1; } 20% { opacity: 1; } 24%, 100% { stroke-dashoffset: -1; opacity: 0; } }
.hero-b-art .hexmap { position: relative; z-index: 1; width: 86%; }

/* 7 — Terminal caret */
.term-screen .caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: #f5c46a; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .term-screen .caret { animation: none; }
}

/* Tertiary skill streams: live scenario line and named command toggles */
.stream .scenario { font-size: .9rem; color: var(--ink); background: var(--parch); border-radius: 8px; padding: 10px 12px; }
.term-quick button span { display: block; font: 500 .78rem var(--sans); color: var(--slate); margin-top: 2px; }

/* =========================================================
   LANGUAGE SWITCHER
   ========================================================= */
.site-header .wrap { justify-content: flex-start; }
.brand { margin-right: auto; }
.site-nav { order: 1; }
.lang { order: 2; position: relative; margin-left: 8px; }
.nav-toggle { order: 3; margin-left: 8px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff;
  font: 600 .9rem var(--sans); color: var(--navy); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.lang-btn:hover { border-color: var(--navy-soft); background: var(--paper); }
.lang-btn svg { width: 18px; height: 18px; }
.lang-btn .chev { width: 14px; height: 14px; transition: transform .2s; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; z-index: 60;
  list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-m); box-shadow: 0 2px 6px rgba(19,36,57,.08), 0 16px 32px rgba(19,36,57,.14);
}
.lang-menu[hidden] { display: none; }
.lang-menu a {
  display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-size: .96rem;
}
.lang-menu a small { color: var(--slate); font-weight: 600; font-size: .8rem; }
.lang-menu a:hover { background: var(--paper); color: var(--navy-deep); }
.lang-menu a[aria-current="true"] { background: var(--gold-soft); color: var(--navy-deep); font-weight: 600; }
.motion-ok .lang-menu:not([hidden]) { animation: rise-in .18s cubic-bezier(.16,1,.3,1); }
@media (max-width: 960px) { .lang-btn { height: 38px; padding: 0 10px; } }

/* Longer translated labels in the cluster hexagon */
html:not([lang^="en"]) .hexmap a text { font-size: 10.5px; }

@media (max-width: 1180px) { .site-nav a { white-space: normal; } }
@media (max-width: 420px) { .brand img { height: 36px; } .lang-btn { padding: 0 8px; gap: 4px; } .nav-toggle { padding: 8px 10px; } }
