/* ==========================================================================
   CASA NEXUS design system
   Editorial publication + African policy institute + evaluation consultancy.
   Warm ivory ground, deep forest green for high-contrast sections, near-black
   typography, muted terracotta and brass accents. One display serif, one
   text sans. Hairline rules, strong grid alignment, restrained shadow.
   ========================================================================== */

/* ---- Tokens ---- */
:root {
  --ivory:      #F8F5EE;
  --ivory-2:    #F1ECE2;
  --ivory-3:    #EAE3D6;
  --paper:      #FFFFFF;

  --ink:        #171A1B;
  --ink-2:      #3D4649;
  --ink-3:      #6B7579;

  --forest:     #123A2B;
  --forest-2:   #0C2A1F;
  --forest-3:   #1B4A38;

  --rust:       #B4471F;
  --rust-2:     #9A3B18;
  --brass:      #A9812F;
  --brass-2:    #C49A45;

  --line:       #E1DACC;
  --line-2:     #D2C9B7;
  --line-dark:  rgba(255, 255, 255, .16);
  --line-dark-2:rgba(255, 255, 255, .28);

  --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1280px;
  --gut: clamp(20px, 4.2vw, 52px);

  /* Section rhythm: generous, editorial. */
  --sec: clamp(56px, 7vw, 104px);
  --sec-tight: clamp(40px, 4.6vw, 64px);

  --shadow-card: 0 1px 2px rgba(23, 26, 27, .04), 0 10px 28px -20px rgba(23, 26, 27, .22);
  --shadow-lift: 0 2px 6px rgba(23, 26, 27, .06), 0 18px 40px -24px rgba(23, 26, 27, .30);

  --focus: var(--rust);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Dark sections need a focus ring that is visible against forest green. */
.on-dark :focus-visible { outline-color: var(--brass-2); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--forest); color: #fff;
  padding: 10px 16px; border-radius: 3px; font-size: 14px; font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -.012em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.15rem); line-height: 1.04; letter-spacing: -.022em; }
h2 { font-size: clamp(1.85rem, 3.1vw, 2.65rem); line-height: 1.1;  letter-spacing: -.018em; }
h3 { font-size: clamp(1.18rem, 1.5vw, 1.42rem); line-height: 1.22; }
h4 { font-size: 1.06rem; line-height: 1.3; }
p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

/* Small caps metadata label: the recurring editorial device of the system. */
.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 18px;
}
.eyebrow.brass { color: var(--brass); }
.on-dark .eyebrow { color: var(--brass-2); }

.lede {
  font-size: clamp(1.02rem, 1.2vw, 1.14rem);
  line-height: 1.66;
  color: var(--ink-2);
  max-width: 60ch;
}
.section-sub { color: var(--ink-2); margin: 10px 0 0; max-width: 62ch; }

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.section { padding: var(--sec) 0; }
.section-tight { padding: var(--sec-tight) 0; }
.section.alt { background: var(--ivory-2); }
.section.paper { background: var(--paper); }
.rule-top { border-top: 1px solid var(--line); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; margin-bottom: 36px;
}
.section-head .h { min-width: 0; }
.section-head h2 { margin: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-primary { background: var(--forest); color: #fff; border-color: var(--forest); }
.btn-primary:hover { background: var(--forest-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-brass { background: var(--brass); color: #fff; border-color: var(--brass); }
.btn-brass:hover { background: #96712a; }
.on-dark .btn-ghost { color: #fff; border-color: var(--line-dark-2); }
.on-dark .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Text link with a trailing arrow that nudges on hover. */
.arrow-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  color: var(--ink);
}
.arrow-link svg { width: 14px; height: 14px; transition: transform .16s ease; }
.arrow-link:hover svg { transform: translateX(3px); }
.arrow-link.rust { color: var(--rust); }
.on-dark .arrow-link { color: #fff; }
@media (prefers-reduced-motion: reduce) { .arrow-link:hover svg { transform: none; } }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 245, 238, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px);
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: block; }
.brand-name {
  font-family: var(--serif); font-size: 19px; font-weight: 500;
  letter-spacing: .055em; line-height: 1; color: var(--ink);
}
.brand-tag {
  display: block; margin-top: 5px;
  font-size: 8.2px; font-weight: 600; letter-spacing: .175em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}

.primary-nav { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 28px); margin-left: auto; }
.primary-nav a {
  position: relative;
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink-2);
  padding: 6px 0; white-space: nowrap;
  transition: color .14s ease;
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.primary-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--rust);
}

.header-tools { display: flex; align-items: center; gap: 12px; flex: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  background: none; border: 1px solid transparent; border-radius: 2px; cursor: pointer;
  color: var(--ink-2);
}
.icon-btn:hover { color: var(--ink); background: var(--ivory-3); }
.icon-btn svg { width: 19px; height: 19px; }
.header-cta { padding: 12px 20px; font-size: 13.5px; }
.nav-toggle { display: none; }
/* The drawer CTA is a duplicate of .header-cta; it only appears once the drawer does. */
.primary-nav .drawer-cta { display: none; }

/* Drawer, below the desktop breakpoint. */
@media (max-width: 1080px) {
  .primary-nav {
    position: fixed; inset: 74px 0 auto; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ivory); border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 24px;
    max-height: calc(100vh - 74px); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    box-shadow: var(--shadow-lift);
  }
  .primary-nav.open { transform: none; opacity: 1; visibility: visible; }
  .primary-nav a {
    font-family: var(--serif); font-size: 21px; font-weight: 500;
    padding: 15px 0; border-bottom: 1px solid var(--line);
  }
  .primary-nav a[aria-current="page"]::after { display: none; }
  .primary-nav a[aria-current="page"] { color: var(--rust); }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .primary-nav .drawer-cta {
    display: inline-flex;
    font-family: var(--sans); font-size: 14.5px; margin-top: 20px;
    border: 0; justify-content: center; color: #fff;
  }
}
@media (max-width: 560px) {
  .brand-tag { display: none; }
  .header-bar { height: 66px; }
  .primary-nav { inset-block-start: 66px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { border-bottom: 1px solid var(--line); overflow-x: clip; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: stretch;
}
.hero-copy { padding: clamp(40px, 5vw, 76px) clamp(28px, 4vw, 64px) clamp(34px, 4vw, 54px) 0; }
.hero h1 { margin: 0 0 24px; }
.hero .lede { max-width: 52ch; }

/* Right column bleeds past the container to the viewport edge, as in the
   reference render. The clip on .hero absorbs the scrollbar difference. */
.hero-media {
  position: relative; min-height: 420px; overflow: hidden;
  margin-right: calc(-1 * (var(--gut) + max(0px, (100vw - var(--wrap)) / 2)));
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(12, 42, 31, .34) 0%, rgba(12, 42, 31, .06) 34%, rgba(12, 42, 31, .42) 100%);
}
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 38%; }
.hero-statement {
  position: absolute; z-index: 2; right: clamp(18px, 3vw, 40px); bottom: clamp(24px, 4vw, 54px);
  max-width: 250px; text-align: right; color: #fff;
}
.hero-statement ul { list-style: none; margin: 0 0 16px; padding: 0; }
.hero-statement li {
  font-size: 12.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  line-height: 2.05; text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
}
.hero-statement .statement-rule { width: 46px; height: 1px; background: var(--brass-2); margin: 0 0 16px auto; }
.hero-statement p {
  font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.42;
  margin: 0; text-shadow: 0 1px 14px rgba(0, 0, 0, .55);
}

/* Evidence strip: verified figures only. */
.evidence {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0; margin-top: clamp(30px, 3.4vw, 44px);
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.evidence-item { padding-right: 20px; }
.evidence-item + .evidence-item { padding-left: 20px; border-left: 1px solid var(--line); }
.evidence-item b {
  display: block; font-family: var(--serif); font-size: clamp(1.55rem, 2.1vw, 1.95rem);
  font-weight: 500; line-height: 1; letter-spacing: -.02em;
}
.evidence-item b sup { font-size: .5em; font-weight: 500; top: -.75em; margin-left: 1px; }
.evidence-item span { display: block; margin-top: 9px; font-size: 12.8px; line-height: 1.48; color: var(--ink-2); }
.evidence-item small { display: block; margin-top: 8px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: clamp(32px, 6vw, 48px) 0 34px; }
  .hero-media { min-height: 360px; margin: 0 calc(-1 * var(--gut)); order: -1; }
  .hero-media { margin-right: calc(-1 * var(--gut)); margin-left: calc(-1 * var(--gut)); }
  .hero-media::after { background: linear-gradient(to top, rgba(12, 42, 31, .55), rgba(12, 42, 31, .1)); }
  .hero-statement { right: var(--gut); left: var(--gut); max-width: none; }
}
@media (max-width: 620px) {
  .evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .evidence-item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .evidence-item:nth-child(n+3) { padding-top: 24px; border-top: 1px solid var(--line); }
}

/* ==========================================================================
   Capability strip
   ========================================================================== */
.capabilities { background: var(--ivory-2); border-bottom: 1px solid var(--line); }
.cap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cap {
  display: block; text-decoration: none;
  padding: clamp(24px, 2.6vw, 34px) clamp(18px, 2vw, 30px);
  transition: background .16s ease;
}
.cap + .cap { border-left: 1px solid var(--line); }
.cap:hover { background: var(--ivory-3); }
.cap-num { font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--rust); }
.cap-icon { width: 26px; height: 26px; margin: 0 0 14px; color: var(--forest); }
.cap h3 { font-size: 1.12rem; margin: 0 0 7px; }
.cap p { font-size: 13.4px; line-height: 1.5; color: var(--ink-2); margin: 0 0 14px; }
.cap .arrow-link { font-size: 12.5px; color: var(--ink-2); }
.cap:hover .arrow-link { color: var(--rust); }
@media (max-width: 860px) {
  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap:nth-child(odd) { border-left: 0; }
  .cap:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap { border-left: 0 !important; }
  .cap + .cap { border-top: 1px solid var(--line); }
}

/* ==========================================================================
   Dark band (Sovereign AI on the homepage, page heroes elsewhere)
   ========================================================================== */
.band-dark {
  position: relative; overflow: hidden;
  background: var(--forest-2); color: #fff;
}
.band-dark h1, .band-dark h2, .band-dark h3, .band-dark h4 { color: #fff; }
.band-dark p { color: rgba(255, 255, 255, .82); }
.band-bg { position: absolute; inset: 0; z-index: 0; }
.band-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.band-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, var(--forest-2) 4%, rgba(12, 42, 31, .93) 42%, rgba(12, 42, 31, .74) 100%);
}
.band-inner { position: relative; z-index: 1; }

.sovereign-grid {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 4vw, 64px); align-items: center;
  padding: var(--sec) 0;
}
.sovereign-copy .lede { color: rgba(255, 255, 255, .82); max-width: 46ch; }

/* Interface preview. Non-numeric by design: no fabricated national figures. */
.console {
  background: rgba(8, 28, 21, .78);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 4px;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .9);
  overflow: hidden;
}
.console-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.console-head b { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.console-head span { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.console-body { display: grid; grid-template-columns: 178px minmax(0, 1fr) 190px; min-height: 250px; }
.console-nav { border-right: 1px solid rgba(255, 255, 255, .1); padding: 12px; }
.console-nav li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.8px; color: rgba(255, 255, 255, .72);
  padding: 8px 9px; border-radius: 3px;
}
.console-nav ul { list-style: none; margin: 0; padding: 0; }
.console-nav li.on { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.console-nav .dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .28); flex: none; }
.console-nav li.on .dot { background: var(--brass-2); }
.console-map { position: relative; display: grid; place-items: center; padding: 18px; }
.console-map img, .console-map svg { width: 100%; max-width: 230px; opacity: .9; }
.console-map figcaption {
  position: absolute; bottom: 10px; left: 0; right: 0; text-align: center;
  font-size: 9.6px; letter-spacing: .11em; text-transform: uppercase; color: rgba(255, 255, 255, .5);
}
.console-side { border-left: 1px solid rgba(255, 255, 255, .1); padding: 14px 16px; }
.console-side h4, .console-side .card-label { font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin: 0 0 12px; }
.console-side dl { margin: 0; }
.console-side dt { font-size: 12px; color: rgba(255, 255, 255, .85); }
.console-side dd { margin: 3px 0 13px; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.console-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 20px; border-top: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .22);
}
.console-foot .note { font-size: 10.6px; letter-spacing: .05em; color: rgba(255, 255, 255, .62); }
.badge {
  display: inline-block; padding: 4px 9px; border-radius: 2px;
  font-size: 9.6px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
}
.badge-brass { background: rgba(196, 154, 69, .18); color: var(--brass-2); border: 1px solid rgba(196, 154, 69, .42); }
.badge-live { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }

@media (max-width: 1000px) {
  .sovereign-grid { grid-template-columns: 1fr; gap: 36px; }
  .console-body { grid-template-columns: 160px minmax(0, 1fr); }
  .console-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
  .console-side dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
}
@media (max-width: 560px) {
  /* Purpose-built mobile composition rather than a shrunken dashboard. */
  .console-body { grid-template-columns: 1fr; }
  .console-nav { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .console-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
  .console-map { min-height: 190px; }
}

/* ==========================================================================
   Cards: publications and insights
   ========================================================================== */
.card-grid { display: grid; gap: clamp(18px, 1.8vw, 24px); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.pub-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; text-decoration: none;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.pub-card:hover { box-shadow: var(--shadow-lift); border-color: var(--line-2); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .pub-card:hover { transform: none; } }
.pub-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--ivory-3); }
.pub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pub-body { padding: 18px 20px 0; flex: 1; }
.pub-cat { font-size: 10.4px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--rust); }
.pub-card h3 { font-size: 1.06rem; line-height: 1.24; margin: 9px 0 7px; }
.pub-card .pub-sub { font-size: 13px; line-height: 1.48; color: var(--ink-2); margin: 0 0 16px; }
.pub-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 20px; margin-top: auto; border-top: 1px solid var(--line);
  font-size: 11.6px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.pub-foot svg { width: 16px; height: 16px; color: var(--ink-2); }

/* Insight card: image left, text right. */
.insight-card {
  display: grid; grid-template-columns: 128px minmax(0, 1fr);
  background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; text-decoration: none;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.insight-card:hover { box-shadow: var(--shadow-lift); border-color: var(--line-2); }
.insight-card .thumb { background: var(--ivory-3); }
.insight-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.insight-card .body { padding: 18px 20px; display: flex; flex-direction: column; gap: 9px; }
.tag {
  display: inline-block; align-self: flex-start;
  padding: 4px 8px; background: var(--ivory-2); border: 1px solid var(--line);
  font-size: 9.8px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.insight-card h3 { font-size: 1.02rem; line-height: 1.28; margin: 0; }
.insight-card time { font-size: 11.8px; color: var(--ink-3); margin-top: auto; }

@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 620px)  {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .insight-card { grid-template-columns: 104px minmax(0, 1fr); }
}

/* ---- Filters ---- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.filter {
  padding: 9px 16px; background: transparent;
  border: 1px solid var(--line-2); border-radius: 2px;
  font-size: 12.6px; font-weight: 500; cursor: pointer; color: var(--ink-2);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.no-match { padding: 28px 0; color: var(--ink-3); }

/* ==========================================================================
   Final CTA
   ========================================================================== */
.cta-band { position: relative; overflow: hidden; background: var(--forest-2); }
.cta-band .band-bg img { opacity: .5; }
.cta-band .band-bg::after { background: linear-gradient(95deg, rgba(12, 42, 31, .9) 0%, rgba(12, 42, 31, .62) 55%, rgba(12, 42, 31, .5) 100%); }
.cta-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: clamp(46px, 5.4vw, 76px) 0;
  color: #fff;
}
.cta-inner h2 { color: #fff; margin: 0 0 12px; }
.cta-inner p { color: rgba(255, 255, 255, .85); margin: 0; max-width: 46ch; }

/* ---- Partners (built, hidden until verified) ---- */
.partners { border-top: 1px solid var(--line); background: var(--paper); }
.partners-inner { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; padding: 26px 0; }
.partners-logos { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.partners-logos img { max-height: 40px; width: auto; filter: grayscale(1); opacity: .8; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--forest-2); color: rgba(255, 255, 255, .78); padding: clamp(44px, 5vw, 68px) 0 26px; }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3vw, 48px);
}
.footer-brand .brand-name, .footer-brand .brand-tag { color: #fff; }
.footer-brand .brand-tag { color: rgba(255, 255, 255, .55); }
.footer-brand p { font-size: 13.4px; line-height: 1.6; color: rgba(255, 255, 255, .7); margin: 20px 0 0; max-width: 30ch; }
.footer-col h4, .footer-col .card-label {
  font-family: var(--sans); font-size: 10.8px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: #fff; margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 13.4px; text-decoration: none; color: rgba(255, 255, 255, .74); }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-note { font-size: 12.4px; color: rgba(255, 255, 255, .55); line-height: 1.55; }
.footer-bottom {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: clamp(34px, 4vw, 54px); padding-top: 22px;
  border-top: 1px solid var(--line-dark);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.2px; }
.footer-legal a { color: rgba(255, 255, 255, .6); text-decoration: none; }
.footer-legal a:hover { color: #fff; }
.footer-copy { font-size: 12.2px; color: rgba(255, 255, 255, .6); }
.footer-closing {
  font-family: var(--serif); font-style: italic; font-size: 15px;
  color: var(--brass-2); text-align: right;
}
.footer-closing::after { content: ""; display: block; width: 54px; height: 1px; background: var(--brass); margin: 10px 0 0 auto; }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-closing, .footer-closing::after { text-align: left; margin-left: 0; }
}
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Interior pages
   ========================================================================== */
.page-head { padding: clamp(40px, 4.6vw, 72px) 0 clamp(30px, 3.4vw, 48px); border-bottom: 1px solid var(--line); }
.page-head.dark { border-bottom: 0; }
.breadcrumbs { font-size: 12.2px; color: var(--ink-3); margin: 0 0 20px; }
.breadcrumbs a { text-decoration: none; color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--rust); }
.on-dark .breadcrumbs, .on-dark .breadcrumbs a { color: rgba(255, 255, 255, .6); }

.prose { max-width: 70ch; }
.prose h2 { margin: clamp(38px, 4vw, 56px) 0 16px; }
.prose h3 { margin: 32px 0 12px; }
.prose p, .prose li { font-size: 1.02rem; line-height: 1.72; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1.1em; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--rust); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote {
  margin: 30px 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--brass);
  font-family: var(--serif); font-size: 1.22rem; line-height: 1.48; font-style: italic; color: var(--ink);
}
.prose figure { margin: 34px 0; }
.prose figcaption { font-size: 12.4px; color: var(--ink-3); margin-top: 10px; }

/* Two-column editorial layout: body plus a metadata rail. */
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 4vw, 64px); align-items: start; }
.rail { position: sticky; top: 100px; }
.rail-card { background: var(--paper); border: 1px solid var(--line); padding: 22px; border-radius: 2px; }
.rail-card + .rail-card { margin-top: 16px; }
.rail-card h4, .rail-card .card-label { font-family: var(--sans); font-size: 10.6px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px; }
.rail-card dl { margin: 0; font-size: 13.2px; }
.rail-card dt { font-size: 10.4px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }
.rail-card dt:first-child { margin-top: 0; }
.rail-card dd { margin: 3px 0 0; color: var(--ink); }
.rail-card .citation { font-size: 12.2px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 960px) {
  .doc-grid { grid-template-columns: 1fr; }
  .rail { position: static; }
}

/* Figure blocks for scores and key numbers. */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.figures .fig { background: var(--paper); padding: 22px; }
.figures b { display: block; font-family: var(--serif); font-size: 1.85rem; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.figures span { display: block; margin-top: 10px; font-size: 13px; line-height: 1.48; color: var(--ink-2); }
.figures small { display: block; margin-top: 9px; font-size: 10.4px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }

/* Grouped list, used by Evaluation Services. */
.group { border-top: 1px solid var(--line); padding: clamp(28px, 3vw, 42px) 0; }
.group-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); }
.group h3 { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rust); margin: 0; }
.group .group-note { font-size: 13.2px; color: var(--ink-3); margin-top: 12px; max-width: 30ch; }
.service-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px 30px; }
.service h4 { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; margin: 0 0 6px; }
.service p { font-size: 13.4px; line-height: 1.52; color: var(--ink-2); margin: 0; }
@media (max-width: 800px) { .group-grid { grid-template-columns: 1fr; gap: 20px; } }

/* Numbered stage list. */
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stage { background: var(--paper); padding: 24px; }
.stage-num { font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--rust); }
.stage h4, .stage h3 { font-family: var(--serif); font-size: 1.14rem; font-weight: 500; margin: 12px 0 8px; }
.stage p { font-size: 13.4px; line-height: 1.52; color: var(--ink-2); margin: 0; }

/* Sector list. */
.sector-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 34px; }
.sector { padding: 22px 0; border-top: 1px solid var(--line); }
.sector h4, .sector h3 { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; margin: 0 0 7px; }
.sector p { font-size: 13.4px; line-height: 1.52; color: var(--ink-2); margin: 0; }
.sector .arrow-link { margin-top: 10px; font-size: 12.2px; }

/* Status chips for Sovereign AI modules. */
.chip { display: inline-block; padding: 4px 9px; border-radius: 2px; font-size: 9.8px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.chip-proto { background: rgba(169, 129, 47, .14); color: #8a6a22; border: 1px solid rgba(169, 129, 47, .4); }
.chip-dev { background: rgba(180, 71, 31, .1); color: var(--rust-2); border: 1px solid rgba(180, 71, 31, .3); }
.chip-planned { background: var(--ivory-2); color: var(--ink-3); border: 1px solid var(--line-2); }
.on-dark .chip-proto { background: rgba(196, 154, 69, .18); color: var(--brass-2); border-color: rgba(196, 154, 69, .45); }
.on-dark .chip-dev, .on-dark .chip-planned { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .72); border-color: rgba(255, 255, 255, .22); }

.module-card { background: var(--paper); border: 1px solid var(--line); padding: 24px; border-radius: 2px; }
.module-card .head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.module-card h3 { font-size: 1.14rem; margin: 0; }
.module-card p { font-size: 13.4px; line-height: 1.54; color: var(--ink-2); margin: 0; }
.module-card ul { margin: 14px 0 0; padding-left: 18px; }
.module-card li { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin-bottom: 6px; }

/* Callout for integrity notes. */
.note-box {
  background: var(--ivory-2); border: 1px solid var(--line); border-left: 3px solid var(--brass);
  padding: 20px 22px; margin: 28px 0; border-radius: 2px;
}
.note-box p { font-size: 13.6px; line-height: 1.58; color: var(--ink-2); margin: 0; }
.note-box h4, .note-box .card-label { font-family: var(--sans); font-size: 10.8px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 9px; }
.on-dark .note-box { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); border-left-color: var(--brass-2); }
.on-dark .note-box p { color: rgba(255, 255, 255, .8); }

/* Article header and body. */
.article-head { max-width: 46ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; font-size: 12.8px; color: var(--ink-3); }
.article-meta b { color: var(--ink); font-weight: 600; }
.article-hero { margin: clamp(28px, 3.4vw, 44px) 0 0; }
.article-hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.article-hero figcaption { font-size: 11.8px; color: var(--ink-3); margin-top: 10px; }
.drop p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-size: 3.4em; line-height: .84;
  padding: 4px 10px 0 0; color: var(--ink);
}

/* Profile block: monogram in place of an unverified portrait. */
.profile { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.monogram {
  display: grid; place-items: center; aspect-ratio: 1;
  background: var(--forest); color: #fff; border-radius: 2px;
  font-family: var(--serif); font-size: 3.4rem; letter-spacing: .02em;
}
@media (max-width: 700px) { .profile { grid-template-columns: 1fr; } .monogram { max-width: 150px; } }

/* ---- Forms ---- */
.form-card { background: var(--paper); border: 1px solid var(--line); padding: clamp(22px, 2.6vw, 34px); border-radius: 2px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12.4px; font-weight: 600; letter-spacing: .04em; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 15px;
  background: var(--ivory); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 2px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--forest); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.field-hidden { position: absolute; left: -9999px; }
.form-foot { font-size: 12.4px; color: var(--ink-3); margin-top: 14px; }

/* ---- Search overlay ---- */
.search-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(23, 26, 27, .55); backdrop-filter: blur(3px);
  display: none; padding: clamp(40px, 8vh, 110px) var(--gut) 40px;
}
.search-overlay[open], .search-overlay.open { display: block; }
.search-panel {
  max-width: 760px; margin: 0 auto;
  background: var(--ivory); border: 1px solid var(--line-2); border-radius: 3px;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .6); overflow: hidden;
}
.search-top { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.search-top svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.search-top input { flex: 1; border: 0; background: none; font: inherit; font-size: 18px; padding: 6px 0; }
.search-top input:focus { outline: none; }
.search-top kbd {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .06em; color: var(--ink-3);
  border: 1px solid var(--line-2); border-radius: 3px; padding: 3px 7px;
}
.search-results { max-height: min(56vh, 480px); overflow-y: auto; }
.search-results a { display: block; padding: 15px 20px; text-decoration: none; border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a:focus { background: var(--ivory-2); }
.search-results .r-kind { font-size: 9.8px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--rust); }
.search-results .r-title { font-family: var(--serif); font-size: 1.04rem; margin: 5px 0 4px; }
.search-results .r-sub { font-size: 12.8px; color: var(--ink-2); }
.search-empty { padding: 28px 20px; color: var(--ink-3); font-size: 14px; }
.search-foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 11.8px; color: var(--ink-3); background: var(--ivory-2); }

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none; } }

/* ---- Utilities ---- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.max-60 { max-width: 60ch; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

@media print {
  .site-header, .site-footer, .cta-band, .search-overlay, .btn-row { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Console centre panel: indicator names only, no figures. */
.console-main { padding: 15px 18px; }
.console-main h4, .console-main .card-label,
.console-side h4, .console-side .card-label { font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin: 0 0 12px; }
.ind-list { list-style: none; margin: 0; padding: 0; }
.ind-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.4px; color: rgba(255, 255, 255, .86);
  padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, .13);
}
.ind-list li::before {
  content: ""; width: 14px; height: 1px; background: var(--brass-2); flex: none;
}
.ind-list li:last-child { border-bottom: 0; }
@media (max-width: 1000px) { .console-main { border-bottom: 1px solid rgba(255, 255, 255, .1); } }

/* Full-bleed image strip under an interior page head. */
.page-hero-img { overflow: hidden; background: var(--ivory-3); }
.page-hero-img img { width: 100%; }
.page-hero-img figure { margin: 0; }

/* Card labels: small-caps metadata labels that sit outside the heading outline. */
.card-label { font-family: var(--sans); font-size: 10.6px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px; }
.on-dark .card-label { color: rgba(255, 255, 255, .55); }
.on-dark .note-box h4, .on-dark .note-box .card-label { color: rgba(255, 255, 255, .62); }
