/* Cambridge Cyber International — Public skin, WHITE canvas (ADR-009, user-ratified 2026-06-11)
   Palette: live-site violet/cyan/orange per GRAPHIC_CHARTER.md V4 Public Documents;
   canvas overridden from parchment to white for continuity with the live site. */

:root,
html[data-theme="live"] {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --text: #2C0264;
  --text-muted: #564E6E;
  --accent: #007CAD;        /* cyan-blue primary */
  --accent-deep: #00587A;   /* cyan text on parchment */
  --accent-soft: #DEF0F7;   /* soft cyan tint */
  --cta: #FF9900;           /* hot orange fills only */
  --cta-deep: #9C4A00;      /* orange CTA text */
  --danger: #AD1F1F;
  --ok: #157A46;
  --divider: #E2DBC8;
  --header-bg: rgba(44, 2, 100, 0.90); /* default skin: deep violet */
  /* Header text/accent — tokenised so a light skin can flip to dark text */
  --header-text: #FFFFFF;
  --header-text-soft: rgba(255,255,255,0.85);
  --header-text-faint: rgba(255,255,255,0.45);
  --header-accent: var(--cta);               /* hover / active / CTA in the bar */
  --header-intl: #A8D9F0;                    /* INTERNATIONAL line — light cyan on dark violet */
  --header-line: rgba(255,255,255,0.25);     /* dividers */
  --header-hover-bg: rgba(255,255,255,0.12); /* open-summary background */
  /* Primary button follows the active header colour (default = violet) */
  --btn-primary-bg: #2C0264;
  --btn-primary-bg-hover: #3D0A85;
  --btn-primary-text: #FFFFFF;

  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;

  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-serif: "IBM Plex Serif", Georgia, serif;

  --u: 8px;                 /* 8-pt base unit */
  --content-max: 1280px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

/* ── CyberBees animated hex overlay (sits above photo strip, below content) ─ */

/* ── Left strip: close-up bees/lavender, fixed, full page height ─────────── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 220px;
  height: 100vh;
  background-image: url('images/illustrations/illus-cyberbees-strip.png');
  background-size: cover;
  background-position: left top;
  background-repeat: no-repeat;
  opacity: 0.18;
  /* Start dissolving at 20% width, fully transparent by 75% — very gentle overlap */
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 20%, transparent 75%);
  mask-image: linear-gradient(to right, #000 0%, #000 20%, transparent 75%);
  z-index: 0;
  pointer-events: none;
}

/* ── Top-right field: per-page CyberBees illustration ───────────────────── */
/* Shared geometry + fade — image swapped per page via data-page            */
body::after {
  content: '';
  position: absolute;
  top: 48px; left: 0;
  width: 100%;
  height: 420px;
  background-image: url('images/illustrations/illus-page-home.jpg');
  background-size: cover;
  background-position: right 25%;
  opacity: 0.85;
  /* Bottom: fade starts at 20%, fully gone by 70% — half the previous white gap
     Left safe-zone: transparent 0→45%, dissolve 45→62%, opaque 62→100% */
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 20%, transparent 70%),
    linear-gradient(to right,  transparent 0%, transparent 45%, #000 62%, #000 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 20%, transparent 70%),
    linear-gradient(to right,  transparent 0%, transparent 45%, #000 62%, #000 100%);
  mask-composite: intersect;
  z-index: 0;
  pointer-events: none;
}

/* Per-page image swaps — data-page is ON body so selector is body[data-page="x"]::after */
body[data-page="platform"]::after {
  background-image: url('images/illustrations/Platform_1.png');
  background-size: cover;
  background-position: right center;
  top: 0;
  height: 520px;
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 40%, transparent 85%),
    linear-gradient(to right, transparent 0%, transparent 35%, #000 55%, #000 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 40%, transparent 85%),
    linear-gradient(to right, transparent 0%, transparent 35%, #000 55%, #000 100%);
  mask-composite: intersect;
}
body[data-page="services"]::after {
  background-image: url('images/illustrations/illus-page-services.jpg');
}
body[data-page="company"]::after {
  background-image: url('images/illustrations/illus-page-company.jpg');
}
body[data-page="products"]::after {
  background-image: url('images/illustrations/illus-page-platform.jpg');
}
body[data-page="roadmap"]::after,
body[data-page="legal"]::after {
  opacity: 0.55;
}
body[data-page="blog"]::after {
  background-image: url('images/illustrations/Hornet_2.jpg');
  background-size: cover;
  background-position: calc(100% + 200px) center;
  opacity: 0.72;
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 20%, transparent 70%),
    linear-gradient(to right, transparent 0%, transparent 40%, #000 65%, #000 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 20%, transparent 70%),
    linear-gradient(to right, transparent 0%, transparent 40%, #000 65%, #000 100%);
  mask-composite: intersect;
}
/* Blog-post photo hero — suppress site-wide body::after so the photo hero owns the top zone */
body[data-page="blog-post"]::after {
  display: none;
}
body[data-page="blog-post"]::before {
  display: none;
}

/* ── Photo hero (used by post.njk when illustration_photo is set) ───────── */
.hero-photo {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  background: #FFFFFF;
  z-index: 1;
}
.hero-photo__img {
  position: absolute;
  right: 0; top: 0;
  width: 65%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  -webkit-mask-image: linear-gradient(to right,
    transparent 0%, rgba(0,0,0,0) 2%,
    rgba(0,0,0,0.3) 18%, rgba(0,0,0,0.85) 36%, #000 52%);
  mask-image: linear-gradient(to right,
    transparent 0%, rgba(0,0,0,0) 2%,
    rgba(0,0,0,0.3) 18%, rgba(0,0,0,0.85) 36%, #000 52%);
}
.hero-photo__text {
  position: absolute;
  top: 0; left: 0;
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 calc(var(--u) * 4) 0 calc(var(--u) * 4);
  z-index: 2;
}
.hero-photo__text h1 {
  max-width: 16ch;
  margin: calc(var(--u) * 1) 0 calc(var(--u) * 2);
  font-size: clamp(1.6rem, 2.6vw, 2.5rem);
  line-height: 1.15;
}
.hero-photo__text .sub {
  max-width: 38ch;
  margin-bottom: calc(var(--u) * 1.5);
  font-size: 1rem;
}
.hero-photo__text .post-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}
@media (max-width: 768px) {
  .hero-photo { height: auto; min-height: 400px; }
  .hero-photo__img { width: 100%; opacity: 0.12; }
  .hero-photo__text { position: relative; width: 100%; height: auto; padding: calc(var(--u)*6) calc(var(--u)*3); }
}

/* ── Bio table — used in heat-ball post ────────────────────────────────── */
.bio-table {
  width: 100%;
  border-collapse: collapse;
  margin: calc(var(--u) * 4) 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.bio-table th {
  background: var(--text);
  color: #FFFFFF;
  padding: calc(var(--u) * 1.25) calc(var(--u) * 2);
  text-align: left;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bio-table td {
  padding: calc(var(--u) * 1.25) calc(var(--u) * 2);
  border-bottom: 1px solid var(--divider);
  color: var(--text);
  vertical-align: top;
  line-height: 1.5;
}
.bio-table tr:nth-child(even) td { background: var(--bg); }
.bio-table .ok   { color: var(--ok);     font-weight: 500; }
.bio-table .warn { color: var(--danger); font-weight: 500; }

/* ── Mapping cards ──────────────────────────────────────────────────────── */
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--u) * 2);
  margin: calc(var(--u) * 4) 0;
}
.map-card {
  padding: calc(var(--u) * 3);
  border-radius: var(--r-md);
  border-top: 2.5px solid var(--accent);
  background: var(--bg);
}
.map-card--amber { border-top-color: var(--cta-deep); }
.mc-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: calc(var(--u) * 0.75);
}
.map-card--amber .mc-label { color: var(--cta-deep); }
.mc-term {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: calc(var(--u) * 0.75);
}
.mc-def {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}
@media (max-width: 640px) { .map-grid { grid-template-columns: 1fr; } }
body[data-page="contact"]::after {
  background-image: url('images/illustrations/illus-page-contact.jpg');
  background-size: cover;
  background-position: center center;
  left: auto;
  right: 0;
  width: 747px;
  opacity: 0.85;
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 20%, transparent 70%),
    linear-gradient(to right,  transparent 0%, transparent 5%, #000 20%, #000 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 20%, transparent 70%),
    linear-gradient(to right,  transparent 0%, transparent 5%, #000 20%, #000 100%);
  mask-composite: intersect;
}

body {
  position: relative;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  /* Subtle hexagonal dot-grid watermark across entire page — very faint brand texture */
  background-image:
    radial-gradient(circle, rgba(0,124,173,0.07) 1px, transparent 1px),
    radial-gradient(circle, rgba(0,124,173,0.04) 1px, transparent 1px);
  background-size: 40px 40px, 80px 80px;
  background-position: 0 0, 20px 20px;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 calc(var(--u) * 3);
}

/* Header */
.site-header {
  border-bottom: none;
  background: var(--header-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 4);
  min-height: calc(var(--u) * 6);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--header-text);
  white-space: nowrap;
}
.brand-bee {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
  display: block;
}
.brand-text {
  display: grid;
  row-gap: 2px;
}
.brand-link,
.brand-link:visited { color: inherit; text-decoration: none; display: block; }
.brand-link:hover,
.brand-link[aria-current="page"] { color: var(--header-accent); }
.brand-intl {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--header-intl);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1;
}
.brand-intl details.brand-theme { display: inline-block; vertical-align: baseline; }
.brand-intl .brand-o { color: inherit; font-size: inherit; letter-spacing: 0; }
.nav-home {
  display: inline-flex;
  align-items: center;
  color: var(--header-text-faint);
  transition: color 0.2s ease;
}
.nav-home.is-home,
.nav-home:hover {
  color: var(--header-accent);
}
.nav {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 3);
  margin-left: auto;
  flex-wrap: wrap;
}
.nav a {
  color: var(--header-text-soft);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.nav a:hover { color: var(--header-accent); }
.nav a[aria-current="page"] {
  color: var(--header-accent);
}

/* Nav items & dropdowns */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
}
.nav-chevron {
  font-size: 0.65em;
  opacity: 0.6;
  vertical-align: middle;
  margin-left: 2px;
}
.nav-trigger {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: default;
  color: var(--header-text-soft);
  font-family: var(--font-sans);
  font-size: inherit;
  font-weight: 500;
  white-space: nowrap;
  line-height: inherit;
  display: inline-flex;
  align-items: center;
}
.nav-trigger[aria-current="page"] { color: var(--header-accent); }
.nav-dropdown:hover .nav-trigger { color: var(--header-accent); }

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  transform: none;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  list-style: none;
  margin: 0;
  padding: calc(var(--u) * 1) 0;
  min-width: 200px;
  z-index: 100;
}
/* Invisible bridge above menu — keeps hover alive while moving from trigger to menu */
.nav-menu::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
}
.nav-menu li { margin: 0; }
.nav-menu a {
  display: block;
  padding: calc(var(--u) * 1) calc(var(--u) * 2);
  color: var(--text);
  font-weight: 400;
  font-size: 0.9rem;
  border-bottom: none !important;
}
.nav-menu a:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu {
  display: block;
}

/* Lang switcher — right-aligned, separated */
.nav-divider {
  width: 1px;
  height: 1.2em;
  background: var(--header-line);
  margin: 0 calc(var(--u) * 1);
}
.nav-lang {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

/* Typography */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 calc(var(--u) * 2);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 calc(var(--u) * 2); }
a { color: var(--accent-deep); }
a:hover { color: var(--cta-deep); }
.muted { color: var(--text-muted); }
code, .mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cta-deep);
  margin: 0 0 var(--u);
}

/* Buttons */
.btn-cta,
.btn-primary,
.btn-ghost {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: calc(var(--u) * 1.5) calc(var(--u) * 3);
  border-radius: var(--r-md);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-cta { background: var(--cta); color: #2C0264; }
.btn-cta:hover { background: var(--cta-deep); color: #FFFFFF; }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn-primary:hover { background: var(--btn-primary-bg-hover); color: var(--btn-primary-text); }
.btn-ghost { color: var(--accent-deep); border-color: var(--accent-deep); background: transparent; }
.btn-ghost:hover { color: var(--cta-deep); border-color: var(--cta-deep); }

/* Sections and cards */
.section { padding: calc(var(--u) * 6) 0; position: relative; }
/* Full-width tint band (PH-6 T-6.7): section bg spans the viewport while the
   inner .container stays at 1280 — gives wide (office-browser) screens rhythm
   so the content no longer reads as a narrow column floating in white. */
/* Tint band = panel whose edges line up exactly with the cards/bands above and
   below, at every width. Transparent side borders reproduce the container's
   content inset, and background-clip keeps the parchment off them, so the panel
   edge sits on the content edge rather than 24px into the gutter. */
.section--tint > .container,
main > .section:nth-of-type(odd) > .container {
  background: #F4F1E8;
  background-clip: padding-box;
  border-left: calc(var(--u) * 3) solid transparent;
  border-right: calc(var(--u) * 3) solid transparent;
  border-radius: var(--r-lg);
  padding: calc(var(--u) * 5) calc(var(--u) * 4);   /* 4-sided inset for everything inside the panel */
}
@media (max-width: 640px) {
  .section--tint > .container,
  main > .section:nth-of-type(odd) > .container {
    border-left-width: calc(var(--u) * 2.5);
    border-right-width: calc(var(--u) * 2.5);
    padding: calc(var(--u) * 4) calc(var(--u) * 2.5);
  }
}
/* Mobile hardening (PH-6 T-6.7): header stacks, sections tighten, no h-scroll */
html { overflow-x: hidden; }
@media (max-width: 640px) {
  body::before { display: none; }            /* 747px decorative strip overflowed narrow viewports */
  .site-header .container { flex-wrap: wrap; gap: calc(var(--u) * 2); }
  .nav { width: 100%; margin-left: 0; gap: calc(var(--u) * 2); }
  .section { padding-top: calc(var(--u) * 4); padding-bottom: calc(var(--u) * 4); }
  .container { padding-left: calc(var(--u) * 2.5); padding-right: calc(var(--u) * 2.5); }
}
/* Framework page: key-obligations list with monoline dash markers (PH-6 T-6.2) */
.fw-obligations { list-style: none; padding: 0; margin: 0; max-width: 64ch; }
.fw-obligations li { position: relative; padding-left: calc(var(--u) * 3); margin-bottom: calc(var(--u) * 1.5); }
.fw-obligations li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: calc(var(--u) * 1.5); height: 2px; background: var(--accent); }
.hero + .section { padding-top: calc(var(--u) * 4); }
.section + .section {
  border-top: none;
}
/* Cyan gradient divider between sections instead of flat border */
.section + .section::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  opacity: 0.25;
}

.hero {
  display: block;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.hero .container {
  width: 100%;
  padding-top: calc(var(--u) * 5);
  padding-bottom: calc(var(--u) * 3);
}
/* Hero background handled by body::after (top-right field, site-wide) */
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 18ch; }
.hero .sub { max-width: 60ch; font-size: 1.125rem; color: var(--text-muted); }

/* ── Per-page hero illustrations ───────────────────────────────────────── */
/* Default (home) already set above as hero-bees-hud.jpg */

[data-page="platform"] .hero::before {
  background-image: url('images/illustrations/Platform_1.png');
  background-size: cover;
  background-position: right top;
  -webkit-mask-image: none;
  mask-image: none;
}
[data-page="services"] .hero::before {
  background-image: url('images/illustrations/illus-services-faded.png');
  background-size: auto 100%;
  background-position: calc(100% - 2%) center;
  -webkit-mask-image: none;
  mask-image: none;
}
/* Company: bees-in-flight portrait strip, right-anchored, all-sides fade */
[data-page="company"] .hero::before {
  background-image: url('images/illustrations/illus-about-strip.png');
  background-size: auto 100%;
  /* Offset 2% from right so the baked right-fade is visible inside the viewport */
  background-position: calc(100% - 2%) center;
  /* Left fade only — top/bottom/right fades are baked into the PNG alpha channel */
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 50%, transparent 78%);
  mask-image: linear-gradient(to left, #000 0%, #000 50%, transparent 78%);
}
/* Services: HUD meadow block, right-anchored */
[data-page="services"] .hero::before {
  background-image: url('images/illustrations/illus-services.png');
  background-size: 54% auto;
  background-position: right center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: calc(var(--u) * 3);
}
.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-top: 2px solid transparent;
  border-radius: var(--r-md);
  padding: calc(var(--u) * 3);
  box-shadow: 0 1px 3px rgba(44, 2, 100, 0.06);
  transition: border-top-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent), rgba(255,153,0,0.6));
  opacity: 0;
  transition: opacity 0.2s;
}
.card:hover { box-shadow: 0 4px 16px rgba(44, 2, 100, 0.1); transform: translateY(-2px); }
.card:hover::after { opacity: 1; }
.card h3 { margin-top: 0; }

/* ── Stretched link — entire card is clickable ──────────────────────────
   Any <a> that is a direct or shallow child of .card gets an ::after
   pseudo-element that covers the full card surface. The card already has
   position:relative so the overlay stacks correctly.
   Text links inside the card body (other than the primary h3 link) must
   have position:relative and z-index:1 to sit above the overlay.        */
.card h3 a,
.card > a:only-child {
  text-decoration: none;
  color: inherit;
}
.card h3 a::after,
.card > a:only-child::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* blog-card already wraps everything in one <a> — no extra rule needed */
.blog-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* Hover state driven by the card, not the link */
.card:has(h3 a:hover),
.card:has(> a:only-child:hover) {
  box-shadow: 0 4px 16px rgba(44, 2, 100, 0.1);
  transform: translateY(-2px);
}
.card h3 a:hover { color: var(--accent); }

/* ── Card inline SVG illustrations (mutualised) ──────────────────────────────
   Each card contains a <span class="card-icon"> wrapping an inline <svg>.
   CSS controls position, sizing, colour transitions, and glow.
   At rest: transparent fill, ghostly violet stroke, soft glow.
   On .card:hover: stroke → cyan (#007CAD), accent elements → orange (#FF9900).
   SVG elements use two semantic classes:
     .ci-primary  — main structural shape (shield body, globe, etc.)
     .ci-accent   — secondary / highlight elements (stars, pulse, check…)
   ─────────────────────────────────────────────────────────────────────────── */
.card-icon {
  position: absolute;
  top: calc(var(--u) * 1.5);
  right: calc(var(--u) * 1.5);
  width: 56px;
  height: 56px;
  pointer-events: none;
  display: block;
}

.card-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Rest state — solid, clearly visible */
.card-icon .ci-primary {
  fill: none;
  stroke: #6B21C8;
  color: #6B21C8;        /* currentColor for text elements */
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s ease, fill 0.25s ease, color 0.25s ease, filter 0.25s ease;
}
/* Text elements use fill not stroke */
.card-icon text.ci-primary {
  fill: #6B21C8;
  stroke: none;
}

.card-icon .ci-accent {
  fill: #6B21C8;
  stroke: #6B21C8;
  filter: drop-shadow(0 0 2px rgba(44, 2, 100, 0.10));
  transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
}

/* Hover state — cyan primary, orange accent */
.card:hover .card-icon .ci-primary {
  stroke: var(--accent);
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(0, 124, 173, 0.55));
}
.card:hover .card-icon text.ci-primary {
  fill: var(--accent);
  stroke: none;
}

.card:hover .card-icon .ci-accent {
  fill: var(--cta);                    /* #FF9900 orange — polygons */
  stroke: var(--cta);                  /* #FF9900 orange — lines/paths */
  filter: drop-shadow(0 0 5px rgba(255, 153, 0, 0.6));
}

/* FR/LPM tricolore RF — swap ghost outline for filled tricolore on hover */
.card-icon .rf-hover { display: none; }
.card-icon .rf-rest  { display: block; }
.card:hover .card-icon .rf-hover { display: block; }
.card:hover .card-icon .rf-rest  { display: none; }
/* CA/OSFI flag — filled shapes, override stroke-based ci-primary/ci-accent system */
.card[data-icon="ca-osfi"] .card-icon .ci-primary {
  fill: #6B21C8;
  stroke: none;
  filter: none;
}
.card[data-icon="ca-osfi"] .card-icon .ci-accent {
  fill: #6B21C8;
  stroke: none;
  filter: none;
}
.card[data-icon="ca-osfi"]:hover .card-icon .ci-primary {
  fill: #d52b1e;
  stroke: none;
  filter: drop-shadow(0 0 6px rgba(213, 43, 30, 0.5));
}
.card[data-icon="ca-osfi"]:hover .card-icon .ci-accent {
  fill: #d52b1e;
  stroke: none;
  filter: drop-shadow(0 0 5px rgba(213, 43, 30, 0.5));
}

/* ── IN/DPDP Indian flag — 4 semantic classes ──────────────────────────── */
.card[data-icon="in-dpdp"] .card-icon .ci-saffron    { fill: #6B21C8; stroke: none; transition: fill 0.25s; }
.card[data-icon="in-dpdp"] .card-icon .ci-white-band { fill: #6B21C8; stroke: none; opacity: 0.35; transition: fill 0.25s, opacity 0.25s; }
.card[data-icon="in-dpdp"] .card-icon .ci-green      { fill: #6B21C8; stroke: none; transition: fill 0.25s; }
.card[data-icon="in-dpdp"] .card-icon .ci-chakra     { fill: none; stroke: #6B21C8; transition: stroke 0.25s; }

.card[data-icon="in-dpdp"]:hover .card-icon .ci-saffron    { fill: #FF9933; }
.card[data-icon="in-dpdp"]:hover .card-icon .ci-white-band { fill: #FFFFFF; opacity: 1; }
.card[data-icon="in-dpdp"]:hover .card-icon .ci-green      { fill: #138808; }
.card[data-icon="in-dpdp"]:hover .card-icon .ci-chakra     { stroke: #000080; filter: none; }

/* ── FR/LPM Vauban ravelins ─────────────────────────────────────────────── */
.card-icon .ci-ravelin {
  stroke: #6B21C8;
  stroke-width: 0.56;
  stroke-linecap: round;
  opacity: 0.75;
  filter: drop-shadow(0 0 1px rgba(107, 33, 200, 0.6));
  transition: stroke 0.25s, opacity 0.25s, filter 0.25s;
}
.card:hover .card-icon .ci-ravelin {
  stroke: #2C0264;
  opacity: 1;
  filter: drop-shadow(0 0 2.5px rgba(44, 2, 100, 0.5));
}

/* ── FR/LPM tricolor fill + RF letters ─────────────────────────────────── */
.card[data-icon="fr-lpm"] .card-icon .fr-blue,
.card[data-icon="fr-lpm"] .card-icon .fr-white,
.card[data-icon="fr-lpm"] .card-icon .fr-red {
  fill: #6B21C8;
  transition: fill 0.3s ease, opacity 0.3s ease;
}
/* fr-white at rest: solid violet, same as fr-blue/fr-red */
.card[data-icon="fr-lpm"] .card-icon .fr-letters {
  fill: #007CAD;
  transition: fill 0.3s ease, opacity 0.3s ease;
}
/* Hover — real tricolore, RF vanishes */
.card[data-icon="fr-lpm"]:hover .card-icon .fr-blue    { fill: #002395; opacity: 1; }
.card[data-icon="fr-lpm"]:hover .card-icon .fr-white   { fill: #FFFFFF;  opacity: 1; }
.card[data-icon="fr-lpm"]:hover .card-icon .fr-red     { fill: #ED2939;  opacity: 1; }
.card[data-icon="fr-lpm"]:hover .card-icon .fr-letters { opacity: 0; }
/* Keep star outline violet on hover (not cyan) */
.card[data-icon="fr-lpm"]:hover .card-icon .ci-primary {
  stroke: #2C0264;
  filter: drop-shadow(0 0 5px rgba(44, 2, 100, 0.3));
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--u) * 3);
}
.stat {
  background: linear-gradient(135deg, #fff 60%, rgba(255,153,0,0.06) 100%);
  border: 1px solid rgba(255,153,0,0.2);
  border-radius: var(--r-md);
  padding: calc(var(--u) * 3);
  font-family: var(--font-mono);
  box-shadow: 0 1px 6px rgba(44, 2, 100, 0.07);
  position: relative;
  overflow: hidden;
}
/* Amber radial accent in corner of each stat card */
.stat::after {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,153,0,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.stat strong { display: block; font-size: 1.5rem; color: var(--accent-deep); }

.band {
  background: linear-gradient(120deg, var(--accent-soft) 0%, rgba(255,255,255,0.6) 100%);
  border-radius: var(--r-lg);
  padding: calc(var(--u) * 4);
  border-left: 3px solid var(--accent);
  position: relative;
  overflow: hidden;
}
/* Faint large circle motif in band — like a HUD ring */
.band::before {
  content: '';
  position: absolute;
  right: -60px; top: 50%;
  transform: translateY(-50%);
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 1px solid rgba(0,124,173,0.15);
  pointer-events: none;
}
.band::after {
  content: '';
  position: absolute;
  right: -30px; top: 50%;
  transform: translateY(-50%);
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(0,124,173,0.1);
  pointer-events: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--divider);
  margin-top: calc(var(--u) * 8);
  padding: calc(var(--u) * 6) 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.site-footer a { color: var(--accent-deep); }

@media (max-width: 720px) {
  h1 { font-size: 1.875rem; }
  .hero { padding-top: calc(var(--u) * 6); }
}

/* Blog post typography */
.post-meta { color: var(--text-muted); font-size: 0.875rem; }
.post-hero {
  margin: 0;
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.post-hero img { display: block; width: 100%; height: auto; }
.post-body { max-width: 72ch; }
/* ── Blog post column alignment (PH-6 T-6.7) ──────────────────────────────
   Hero, media and trailing sections share the body's reading column so the
   title no longer floats far left of the text. */
/* Content left-aligned within the 1280 measure; right side free for illustrations */
body[data-page="blog-post"] article .container { max-width: var(--content-max); }
body[data-page="blog-post"] .post-body,
body[data-page="blog-post"] .band,
body[data-page="blog-post"] .pull { max-width: 72ch; margin-left: 0; margin-right: auto; }
body[data-page="blog-post"] .hero-photo__text { left: 0; right: 0; width: 100%; max-width: var(--content-max); margin: 0 auto; }
.post-body .lede {
  font-size: 1.25rem;
  color: var(--text);
  border-left: 3px solid var(--cta);
  padding-left: calc(var(--u) * 2);
}
.post-body h2 {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cta-deep);
  margin-top: calc(var(--u) * 5);
}

/* ── Post body markdown tables ─────────────────────────────────────────── */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: calc(var(--u) * 4) 0;
  font-size: 0.875rem;
  font-family: var(--font-sans);
}
.post-body table thead tr {
  background: var(--text);
  color: #fff;
}
.post-body table th {
  padding: calc(var(--u) * 1.5) calc(var(--u) * 2);
  text-align: left;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.post-body table td {
  padding: calc(var(--u) * 1.25) calc(var(--u) * 2);
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
  line-height: 1.5;
  color: var(--text);
}
.post-body table tr:nth-child(even) td {
  background: var(--bg);
}
.post-body table tr:hover td {
  background: var(--accent-soft, #DEF0F7);
}

/* ── Blog listing cards with thumbnail ─────────────────────────────────── */
.blog-card {
  padding: 0;
  overflow: hidden;
}
.blog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.blog-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}
.blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(0.7) brightness(0.95);
  transition: filter 0.3s ease, transform 0.3s ease;
}
.blog-card:hover .blog-card__thumb img {
  filter: saturate(1) brightness(1);
  transform: scale(1.03);
}
.blog-card__body {
  padding: calc(var(--u) * 2.5);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card__body h3 {
  margin-top: calc(var(--u) * 0.5);
  color: var(--text);
}
.blog-card__link:hover .blog-card__body h3 {
  color: var(--accent);
}
blockquote.pull {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--accent-deep);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  margin: 0;
  padding: calc(var(--u) * 4) 0;
}
.card .thumb {
  margin: calc(var(--u) * -3) calc(var(--u) * -3) calc(var(--u) * 2);
  border-bottom: 1px solid var(--divider);
}
.card .thumb img { display: block; width: 100%; height: auto; border-radius: var(--r-md) var(--r-md) 0 0; }

/* Language selector: globe + flag menu */
details.lang { position: relative; }
details.lang summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: var(--u);
  cursor: pointer;
  color: var(--header-text-soft);
  font-weight: 500;
  font-size: 0.875rem;
  padding: calc(var(--u) * 0.5) var(--u);
  border-radius: var(--r-md);
}
details.lang summary::-webkit-details-marker { display: none; }
details.lang summary::marker { display: none; content: ""; }
.lang-menu li { list-style: none; margin: 0; }
details.lang summary:hover { color: var(--header-accent); }
details.lang[open] summary { background: var(--header-hover-bg); }
.lang-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin: 0;
  padding: calc(var(--u) * 1.5) var(--u) var(--u);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  box-shadow: 0 2px 8px rgba(44, 2, 100, 0.08);
  min-width: calc(var(--u) * 14);
  z-index: 10;
}
.lang-menu li a {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1.5);
  padding: var(--u) calc(var(--u) * 1.5);
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
}
.lang-menu li a:hover { background: var(--accent-soft); color: var(--accent-deep); }
.lang-menu li a[aria-current="true"] {
  color: var(--accent-deep);
  font-weight: 600;
}
.lang-menu .flag { font-size: 1.125rem; line-height: 1; }

/* ── Theme skins (header-colour family + dark) ──────────────────────────────
   Selected via data-skin on <html>; persisted in localStorage (cci-skin).
   Header-colour skins keep the white parchment canvas and only repaint the
   menu bar. The dark skin flips page tokens to a deep slate (no pure black,
   per the graphic charter's no-black-canvas rule). */
html[data-skin="violet"] {
  --header-bg: rgba(44, 2, 100, 0.90);
  --btn-primary-bg: #2C0264;
  --btn-primary-bg-hover: #3D0A85;
  --btn-primary-text: #FFFFFF;
}
html[data-skin="lavender"] {           /* light skin: lavender bar, dark text */
  --header-bg: #E9E2F3;
  --header-text: #2C0264;
  --header-text-soft: #4A3D63;
  --header-text-faint: #8579A0;
  --header-accent: #9C4A00;            /* dark orange — readable on the light bar */
  --header-intl: #005F87;              /* deep cyan — readable on lavender */
  --header-line: rgba(44, 2, 100, 0.18);
  --header-hover-bg: rgba(44, 2, 100, 0.08);
  --btn-primary-bg: #2C0264;           /* violet button carries the brand on the light bar */
  --btn-primary-bg-hover: #3D0A85;
  --btn-primary-text: #FFFFFF;
}
html[data-skin="deep-cyan"] {          /* charter --accent-deep */
  --header-bg: #00587A;
  --header-intl: #DEF0F7;              /* soft cyan — readable on deep-cyan bar */
  --btn-primary-bg: #00587A;
  --btn-primary-bg-hover: #003D54;
  --btn-primary-text: #FFFFFF;
}
html[data-skin="cyan"] {               /* charter --accent */
  --header-bg: #007CAD;
  --header-intl: #FFFFFF;              /* white — readable on cyan bar */
  --btn-primary-bg: #007CAD;
  --btn-primary-bg-hover: #00587A;
  --btn-primary-text: #FFFFFF;
}

html[data-skin="dark"] {
  --bg: #14181F;            /* deep slate ink — not black */
  --surface: #1F2632;
  --text: #ECEAF2;
  --text-muted: #A9B0BE;
  --accent: #3FA9D4;        /* lighter cyan for links on dark */
  --accent-deep: #7FCBE8;
  --accent-soft: #1B3A48;
  --cta: #FF9900;
  --cta-deep: #FFB84D;
  --danger: #E06A5C;
  --ok: #4FB07A;
  --divider: #2C3340;
  --header-bg: #0E2330;     /* deep teal-navy bar */
  --header-intl: #7FCBE8;              /* mid cyan — readable on dark navy bar */
  --btn-primary-bg: #3FA9D4;
  --btn-primary-bg-hover: #67BEDF;
  --btn-primary-text: #0E2330;
}
/* Override the inline ADR-009 white canvas only for the dark skin */
html[data-skin="dark"] { background: var(--bg); }
html[data-skin="dark"] body { background: var(--bg); }
/* Calm the photographic page illustrations behind dark content */
html[data-skin="dark"] body::after { opacity: 0.10; }

/* ── Theme picker easter egg: ◐ replaces the "o" in "International" ──────────
   The glyph is the same size and colour as the wordmark, so it reads as a
   letter until hovered; clicking it opens the five-skin menu. */
details.brand-theme {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
}
details.brand-theme > summary {
  list-style: none;
  display: inline;
  cursor: pointer;
  color: inherit;                 /* camouflaged as a letter of the wordmark */
}
details.brand-theme > summary::-webkit-details-marker { display: none; }
details.brand-theme > summary::marker { display: none; content: ""; }
.brand-o { color: inherit; }   /* ø is a real letter — matches the wordmark exactly */
details.brand-theme > summary:hover .brand-o { color: var(--header-accent); }
.theme-menu {
  position: absolute;
  left: 0;
  top: 100%;
  margin: 0;
  padding: calc(var(--u) * 1.5) var(--u) var(--u);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  box-shadow: 0 2px 8px rgba(44, 2, 100, 0.08);
  min-width: calc(var(--u) * 20);
  z-index: 10;
}
.theme-menu li { list-style: none; margin: 0; }
.theme-menu li button {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1.5);
  width: 100%;
  padding: var(--u) calc(var(--u) * 1.5);
  border: none;
  background: none;
  border-radius: var(--r-sm);
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.875rem;
}
.theme-menu li button:hover { background: var(--accent-soft); color: var(--accent-deep); }
.theme-menu li button[aria-current="true"] { color: var(--accent-deep); font-weight: 600; }
.theme-menu .sw {
  width: calc(var(--u) * 2);
  height: calc(var(--u) * 2);
  border-radius: var(--r-sm);
  border: 1px solid var(--divider);
  flex: 0 0 auto;
}

/* ── Blog index: tag bar + timeline ─────────────────────────────────────── */
.blog-tags-section { padding-bottom: 0; }

.blog-tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--u) * 1);
  margin-top: calc(var(--u) * 1.5);
}

.blog-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 0.75);
  padding: calc(var(--u) * 0.5) calc(var(--u) * 1.5);
  border-radius: var(--r-md);
  border: 1px solid var(--divider);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.blog-tag-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.blog-tag-pill--all {
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 600;
}
/* Non-clickable framework pills (no matching framework page) — no hover affordance */
.blog-tag-pill--static { cursor: default; }
.blog-tag-pill--static:hover { border-color: var(--divider); background: var(--surface); color: var(--text); }
/* Linked framework pills carry a trailing arrow to signal click-through */
.blog-tag-pill--link::after { content: '→'; font-size: 0.9em; opacity: 0.7; }

/* Product feature rows — alternating text / media cells (PH-6 T-6.4) */
.feature-row__grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: calc(var(--u) * 5);
  align-items: center;
}
.feature-row--reverse .feature-row__media { order: -1; }
.feature-row__media { margin: 0; }
.feature-row__media img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--divider);
  display: block;
}
.feature-row__text h2 { margin-top: 0; }
@media (max-width: 720px) {
  .feature-row__grid { grid-template-columns: 1fr; gap: calc(var(--u) * 3); }
  .feature-row--reverse .feature-row__media { order: 0; }
}

/* Cookie notice (PH-6 T-6.9) — informational only; the site sets no cookies */
.cookie-note {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 2);
  padding: calc(var(--u) * 1.5) calc(var(--u) * 3);
  background: var(--surface);
  border-top: 1px solid var(--divider);
  box-shadow: 0 -2px 12px rgba(44, 2, 100, 0.06);
}
.cookie-note[hidden] { display: none; }
.cookie-note__text { margin: 0; font-size: 0.875rem; color: var(--text); }
.cookie-note__text a { color: var(--accent-deep); }
.cookie-note__btn {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: calc(var(--u) * 0.75) calc(var(--u) * 2);
  border: 1px solid var(--accent-deep);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--accent-deep);
  cursor: pointer;
}
.cookie-note__btn:hover { background: var(--accent-soft); }

/* Contact form (PH-6 T-6.3) */
.contact-form { max-width: 56ch; }
.contact-field { display: block; margin-bottom: calc(var(--u) * 3); }
.contact-field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--u);
}
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  padding: calc(var(--u) * 1.5) calc(var(--u) * 2);
}
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form textarea { resize: vertical; line-height: 1.5; }
.contact-note { margin-top: calc(var(--u) * 2); font-size: 0.8125rem; }
.blog-tag-count {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: var(--r-sm);
  padding: 0 calc(var(--u) * 0.5);
  font-size: 0.75rem;
  min-width: 1.4em;
  text-align: center;
}

.blog-year-group { margin-bottom: calc(var(--u) * 6); }

.blog-year-heading {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--divider);
  padding-bottom: calc(var(--u) * 1);
  margin-bottom: calc(var(--u) * 3);
}

.blog-tag-section { border-top: 2px solid var(--divider); }
.blog-tag-heading {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 0.5);
  margin-bottom: calc(var(--u) * 3);
}
.blog-tag-heading .eyebrow { margin: 0; }

/* ── Blog year index ─────────────────────────────────────────────────────── */
.blog-year-index {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 1);
  margin-top: calc(var(--u) * 2);
}
.blog-year-card {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 3);
  padding: calc(var(--u) * 2) calc(var(--u) * 3);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.blog-year-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,124,173,0.08);
  color: var(--text);
}
.blog-year-label {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  min-width: 4rem;
}
.blog-year-count {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}
.blog-year-arrow {
  color: var(--accent);
  font-size: 1rem;
}

/* ── Blog pagination nav ─────────────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1);
  margin-top: calc(var(--u) * 5);
  flex-wrap: wrap;
}
.blog-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(var(--u) * 4);
  padding: calc(var(--u) * 0.75) calc(var(--u) * 1.5);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.blog-page-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.blog-page-btn--current {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  cursor: default;
}

/* ── Product page ─────────────────────────────────────────────────────────── */
.product-body {
  max-width: 720px;
}
.product-body h2 {
  margin-top: calc(var(--u) * 5);
  margin-bottom: calc(var(--u) * 2);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
.product-body p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: calc(var(--u) * 2);
}
.product-status-badge {
  display: inline-block;
  padding: calc(var(--u) * 0.5) calc(var(--u) * 2);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
}
.product-status-badge--dev {
  border-color: #9C5B0B;
  color: #9C5B0B;
}

/* ── Clickable card ───────────────────────────────────────────────────────── */
a.card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.card--link h3,
a.card--link:hover h3 {
  text-decoration: none;
}

/* ── Product illustration grid ───────────────────────────────────────────── */
.product-illus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--u) * 3);
  align-items: start;
}
.product-illus-grid--single {
  grid-template-columns: 1fr;
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
}
.product-illus {
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  overflow: hidden;
  background: transparent;
  padding: calc(var(--u) * 2);
}
.product-illus img {
  display: block;
  width: 100%;
  height: auto;
}
.eyebrow--small {
  font-size: 0.7rem;
  margin-top: calc(var(--u) * 1);
  margin-bottom: 0;
  text-align: center;
  color: var(--text-muted);
}
@media (max-width: 720px) {
  .product-illus-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Product hero background ─────────────────────────────────────────────── */
.hero--has-bg {
  position: relative;
  overflow: hidden;
}
.hero--has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center right;
  opacity: 0.12;
  pointer-events: none;
}
.hero--has-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 30%, transparent 70%, var(--bg) 100%),
              linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
  pointer-events: none;
}
.hero--has-bg .container {
  position: relative;
  z-index: 1;
}

/* ── Product page side strip ─────────────────────────────────────────────── */
/* Scoped to the body-text section only: top-aligns with h1 of body,
   bottom-aligns with last paragraph — does not bleed into pills/cards/band. */
.product-body-strip {
  position: relative;
  overflow: hidden;
}
.product-body-strip::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 350px;
  height: 100%;
  background-image: var(--side-strip);
  background-size: cover;
  background-position: center left;
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, transparent 90%);
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, transparent 90%);
}
@media (max-width: 900px) {
  .product-body-strip::after {
    display: none;
  }
}

/* ── Product page full-bleed body background ─────────────────────────────── */
/* Covers the entire content section incl. left+right margins, behind text.   */
.product-body-bg {
  position: relative;
}
.product-body-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--body-bg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 6%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 6%);
}
.product-body-bg .container {
  position: relative;
  z-index: 1;
}

/* ── Product page LEC watermark ───────────────────────────────────────────── */
/* Finance_LEC chart floated right, top-aligned with first paragraph, behind body text.
   Transparent enough to keep prose legible; right-edge anchored. */
.product-body-lec {
  position: relative;
  overflow: hidden;
}
.product-lec-watermark {
  position: absolute;
  top: 0;
  right: 0;
  transform: none;
  width: 420px;
  max-width: 50%;
  height: auto;
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.9) 0%, transparent 85%);
  mask-image: linear-gradient(to left, rgba(0,0,0,0.9) 0%, transparent 85%);
}
.product-lec-watermark--bottom {
  top: auto;
  bottom: 0;
  right: 0;
}
.product-body-lec .container {
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .product-lec-watermark {
    display: none;
  }
}

/* ── IN/RBI – RBI Seal (<image> asset; filter on .card-icon for reliable hover) */
/* Rest: convert dark seal paths → CCI violet + subtle glow for thin-line boost */
.card[data-icon="rbi-cscf"] .card-icon {
  filter: sepia(1) hue-rotate(248deg) saturate(6) brightness(0.72)
          drop-shadow(0 0 1.5px #6B21C8);
  transition: filter 0.3s ease;
}
/* Hover: warm saffron-gold — clearly distinct, Indian cultural palette */
.card[data-icon="rbi-cscf"]:hover .card-icon {
  filter: sepia(1) hue-rotate(320deg) saturate(5) brightness(0.75)
          drop-shadow(0 0 2px rgba(218,161,85,0.6));
}

/* ── UXI-O1: Skip to main content ────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: #2C0264;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

/* ── UXI-O1: focus-visible rings (keyboard nav) ──────────────────────────── */
:focus-visible {
  outline: 3px solid #007CAD;
  outline-offset: 3px;
  border-radius: 2px;
}
/* Suppress mouse-click outline while keeping keyboard ring */
:focus:not(:focus-visible) { outline: none; }

/* Tighter ring inside the header (dark bg) */
.site-header :focus-visible {
  outline-color: #A8D9F0;
}

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

/* ── GRA-E1: Dark theme card legibility ──────────────────────────────────── */
html[data-skin="dark"] .card {
  background: var(--surface);
  border-top-color: #3FA9D4;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  color: var(--text);
}
html[data-skin="dark"] .card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
html[data-skin="dark"] .card p,
html[data-skin="dark"] .card h3 { color: var(--text); }
html[data-skin="dark"] .stat { color: var(--text-muted); }
html[data-skin="dark"] .stat strong { color: var(--text); }

/* ── NAR-B2: Aspirational identity line ─────────────────────────────────────── */
.identity {
  margin-top: calc(var(--u) * 2);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ── NAR-E3: CTA trio ───────────────────────────────────────────────────────── */
.cta-trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: calc(var(--u) * 3);
  margin-top: calc(var(--u) * 3);
}
.cta-item {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 1.5);
}
.cta-item .btn-ghost {
  align-self: flex-start;
  margin-top: auto;
}
.cta-item__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cta-deep);
  margin: 0;
}

/* ── UXI-J1: FAQ accordion ──────────────────────────────────────────────────── */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--divider);
  margin-top: calc(var(--u) * 3);
}
.faq__item {
  border-bottom: 1px solid var(--divider);
}
.faq__item > summary {
  list-style: none;
  cursor: pointer;
  padding: calc(var(--u) * 2) 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: calc(var(--u) * 2);
  user-select: none;
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.2s;
}
.faq__item[open] > summary::after {
  transform: rotate(45deg);
}
.faq__item > p {
  padding: 0 0 calc(var(--u) * 2.5) 0;
  color: var(--text-muted);
  max-width: 72ch;
  line-height: 1.65;
  margin: 0;
}
@media (prefers-reduced-motion: reduce) {
  .faq__item > summary::after { transition: none; }
}

/* ── Product page illustrations — DORA-MAST ────────────────────────────────── */
body[data-page="dora-mast"]::before {
  background-image: url('images/illustrations/illus-dora-mast-vstrip.png');
}
body[data-page="dora-mast"]::after {
  background-image: url('images/illustrations/1834_DORA_2.png');
  background-size: cover;
  background-position: right 30%;
  top: 0;
  height: 480px;
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 30%, transparent 75%),
    linear-gradient(to right, transparent 0%, transparent 42%, #000 62%, #000 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 30%, transparent 75%),
    linear-gradient(to right, transparent 0%, transparent 42%, #000 62%, #000 100%);
  mask-composite: intersect;
}

/* ── Product page illustrations — cVaR ─────────────────────────────────────── */
body[data-page="cvar"]::before {
  background-image: url('images/illustrations/illus-cvar-vstrip.png');
}
body[data-page="cvar"]::after {
  background-image: url('images/illustrations/illus-cvar-vstrip.png');
  background-size: cover;
  background-position: right center;
  top: 0;
  height: 480px;
  opacity: 0.55;
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 25%, transparent 70%),
    linear-gradient(to right, transparent 0%, transparent 45%, #000 65%, #000 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 25%, transparent 70%),
    linear-gradient(to right, transparent 0%, transparent 45%, #000 65%, #000 100%);
  mask-composite: intersect;
}

/* ── Chart figures (LEC / MLEC SVGs) ───────────────────────────────────────── */
.chart-figure {
  margin: calc(var(--u) * 4) 0;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
  padding: calc(var(--u) * 3);
  overflow: hidden;
}
.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
}
.chart-figure figcaption {
  margin-top: calc(var(--u) * 1.5);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Visually hidden (screen-reader only) ───────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Japanese locale: add Noto Sans JP to the font stack ─────────────────────── */
:lang(ja) {
  --font-sans: 'IBM Plex Sans', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-serif: 'IBM Plex Serif', 'Noto Serif JP', serif;
  line-height: 1.85;
  word-break: break-all;
}
:lang(ja) body, :lang(ja) p, :lang(ja) li { font-family: var(--font-sans); }

/* ── Arabic locale: right-to-left layout overrides ──────────────────────────── */
:lang(ar) {
  --font-sans: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Segoe UI', 'Arial', sans-serif;
  font-size: 1.05em;
  line-height: 1.8;
}
:lang(ar) body, :lang(ar) p, :lang(ar) li { font-family: var(--font-sans); }

/* Nav: reverse flex order for RTL */
:lang(ar) .nav { flex-direction: row-reverse; }
:lang(ar) .nav-chevron { margin-right: 0.3em; margin-left: 0; }
:lang(ar) .lang { margin-left: 0; margin-right: auto; }

/* Header brand: reverse for RTL */
:lang(ar) .brand { flex-direction: row-reverse; }

/* Hero and section text: right-aligned */
:lang(ar) .hero, :lang(ar) .section { text-align: right; }
:lang(ar) .eyebrow { text-align: right; }

/* Cards: right-align text */
:lang(ar) .card { text-align: right; }

/* Stat row: RTL */
:lang(ar) .stat-row { direction: rtl; }

/* Band: right-to-left */
:lang(ar) .band { text-align: right; direction: rtl; }

/* Feature rows: flip alternating image/text direction */
:lang(ar) .feature-row { direction: rtl; }

/* Footer: right-align */
:lang(ar) .site-footer .container { text-align: right; direction: rtl; }

/* Cookie note: RTL */
:lang(ar) .cookie-note { direction: rtl; text-align: right; }

/* Side strip: flip to left for RTL */
:lang(ar) .product-body-strip::after {
  right: auto;
  left: 0;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, transparent 90%);
  mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, transparent 90%);
}

/* LEC watermark: flip for RTL */
:lang(ar) .product-lec-watermark {
  right: auto;
  left: 0;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.9) 0%, transparent 85%);
  mask-image: linear-gradient(to right, rgba(0,0,0,0.9) 0%, transparent 85%);
}

/* ── Wave 2: Korean font stack ─────────────────────────────────── */
:lang(ko) {
  --font-sans: 'IBM Plex Sans', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  line-height: 1.8;
  word-break: keep-all;
}

/* Skip link: right side for RTL */
:lang(ar) .skip-link { left: auto; right: 1rem; }

/* Related products list: RTL */
:lang(ar) .related-list { direction: rtl; }

/* Framework tag list: RTL */
:lang(ar) .product-frameworks { direction: rtl; text-align: right; }

/* CTA trio: RTL */
:lang(ar) .cta-trio { direction: rtl; }
:lang(ar) .cta-item { text-align: right; }
:lang(ar) .cta-item .btn-ghost { align-self: flex-end; }

/* Forms: RTL */
:lang(ar) .contact-form, :lang(ar) select, :lang(ar) textarea { direction: rtl; text-align: right; }

/* FAQ: RTL */
:lang(ar) .faq__item > summary { direction: rtl; }
:lang(ar) .faq__item > summary::after { margin-left: 0; margin-right: auto; }

/* ── Wave 3: Traditional Chinese and Hindi font stacks ─────────── */
:lang(zh-tw) {
  --font-sans: 'IBM Plex Sans', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  line-height: 1.8;
  word-break: break-all;
}
:lang(hi) {
  --font-sans: 'Noto Sans Devanagari', 'IBM Plex Sans', sans-serif;
  line-height: 1.9;
}
