/* ═══════════════════════════════════════════════════════════════
   Property of JIL Sovereign Technologies, Inc. (DE).
   All Rights Reserved. 2025-2026 Patent Pending.
   Author: Jeffrey Mendonca (TX) (7265)
   File:   apps/central-portal/public/assets/jil-doc-standard.css
   Repo:   jammer-x/jil-sovereign-full-go-live
   Version: 2026.04.20-fonts-locked
   ═══════════════════════════════════════════════════════════════
   JIL DOC STANDARD V16 - Clean institutional styling for /docs pages
   Shared CSS: link from <head> instead of embedding per-page.
   ═══════════════════════════════════════════════════════════════ */

/* Font stack - matches /assets/jil-v14.css so doc pages share identity
   with site pages. Browser dedupes the @import if v14 also loaded. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&display=swap');

/* --- Variables (aligned with CSS brand guidance) --- */
:root {
  --bg:          #FFFFFF;
  --text:        #0F172A;
  --text-body:   #334155;
  --muted:       #64748B;
  --line:        #CBD5E1;
  --border:      #CBD5E1;
  --gold:        #C9A227;
  --accent:      #2563EB;
  --accent-dark: #1D4ED8;
  --surface:     #F0F2F5;
  --shadow:      0 8px 24px rgba(16,42,67,.08);
  --glow:        none;
  --navy:        #102A43;
  --navy-mid:    #0F172A;
  --navy-light:  #334155;
  --gold-light:  #E4C35A;
  --white:       #FFFFFF;
  --off-white:   #F0F2F5;
  --gray-100:    #F0F2F5;
  --gray-300:    #CBD5E1;
  --gray-500:    #64748B;
  --gray-700:    #334155;
}

/* --- Dark Mode Variable Overrides (doc-optimized) ----------------
   jil-tokens.css defines dark vars, but :root above loads second
   and overwrites them with light values. This block re-declares
   dark-appropriate values for long-form reading. Gold is reserved
   for accents/badges only - not muted text.
   ---------------------------------------------------------------- */
[data-theme="sovereign-dark"] {
  --bg:          #0F1419;
  --text:        #E2E8F0;
  --text-body:   #CBD5E1;
  --muted:       #8B9DB5;
  --line:        rgba(255, 255, 255, 0.08);
  --border:      rgba(255, 255, 255, 0.10);
  --gold:        #D4AF37;
  --accent:      #60A5FA;
  --accent-dark: #3B82F6;
  --surface:     #1A2332;
  --shadow:      0 8px 24px rgba(0, 0, 0, 0.4);
  --glow:        0 0 30px rgba(212, 175, 55, 0.12);
  --navy:        #0F172A;
  --navy-mid:    #1E293B;
  --navy-light:  #CBD5E1;
  --gold-light:  rgba(212, 175, 55, 0.25);
  --white:       #1A2332;
  --off-white:   #1E293B;
  --gray-100:    #1E293B;
  --gray-300:    rgba(255, 255, 255, 0.14);
  --gray-500:    #8B9DB5;
  --gray-700:    #CBD5E1;
  --code-bg:     #0D1117;
  --code-text:   #E6EDF3;
}

/* --- Reset & Base --- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  padding-top: 64px;
  font-family: 'DM Sans', 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-body, var(--text));
  line-height: 1.72;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Canonical font rule (locked) ───────────────────────────────
   DM Serif Display: hero h1 + top-level doc h1 only (institutional gravitas)
   DM Sans:         body, h2, h3, h4, all other prose
   DM Mono:         code, monospace pills
   This mirrors /assets/jil-v14.css so doc pages and site pages share identity. */
.hero h1,
.doc-title,
h1.doc-title,
body > h1:first-of-type,
.page-wrapper > h1:first-of-type,
.pw > h1:first-of-type,
.wrap > h1:first-of-type,
.container > h1:first-of-type {
  font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}
h2, h3, h4, h5, h6,
p, li, dt, dd, td, th, blockquote, figcaption, input, button, select, textarea {
  font-family: 'DM Sans', 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
code, kbd, pre, samp, .mono, [class*="-mono"] {
  font-family: 'DM Mono', 'IBM Plex Mono', 'Menlo', 'SF Mono', 'Courier New', monospace;
}

/* --- Page Wrapper (all variants) ---
   2026-04-30: width refit from 1280px / 64px to 1200px / 2rem (32px) so
   doc pages share the SAME container shell as v2-nav (jil-header.css:60),
   .v2-container (jil-v2.css:93), and .pillars-main .v2-container. JIL
   logo + marketing + pillars + the 49 legacy doc pages all sit on a
   single vertical grid column. */
.page-wrapper, .pw, .wrap, .container { max-width: 1200px; margin: 0 auto; padding: 0 2rem 60px; }

/* --- Fallback body margins for pages without a wrapper div --- */
body > section,
body > div:not(.page-wrapper):not(.pw):not(.wrap):not(.container):not([id="siteHeader"]):not(.jil-breadcrumb),
body > h1, body > h2, body > h3, body > p, body > ul, body > ol, body > table,
body > .callout, body > .grid-2, body > .grid-3, body > .grid-4,
body > .table-wrap, body > .stat-box, body > .card {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}
@media (max-width: 768px) {
  .page-wrapper, .pw, .wrap, .container { padding: 0 24px 40px !important; }
  body > section,
  body > div:not(.page-wrapper):not(.pw):not(.wrap):not(.container):not([id="siteHeader"]):not(.jil-breadcrumb),
  body > h1, body > h2, body > h3, body > p, body > ul, body > ol, body > table,
  body > .callout, body > .grid-2, body > .grid-3, body > .grid-4,
  body > .table-wrap, body > .stat-box, body > .card {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* --- Hero (aligned with jil-v14.css 4-level hierarchy) --- */
.hero { text-align: left; padding: 3rem 0 2rem; position: relative; }
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 80px; height: 2px;
  background: var(--gold);
}
.hero-badge,
.badge {
  display: inline-block;
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
  border: 1px solid rgba(212,175,55,0.25);
  padding: 6px 18px; border-radius: 20px; margin-bottom: 1rem;
  background: rgba(212,175,55,0.06);
}
.hero h1 {
  font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(2rem, 3.75vw, 3.25rem);
  color: var(--text);
  font-weight: 300; line-height: 1.1; margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--gold); }
.hero h1 em {
  font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-style: italic;
  font-weight: 400;
  color: var(--crimson, #9B1C1F);
}
.hero-sub {
  font-size: 1.0625rem; color: var(--text-body, var(--text)); font-weight: 400;
  /* Was max-width: 680px - caused paragraphs to wrap halfway across the
     1200px container, looking like an indent rather than full-width copy.
     Now flow to the container edge; readability maintained because the
     parent .container already caps at 1200px. */
  max-width: none; margin: 0 0 1.5rem;
}
.hero-meta,
.meta {
  font-size: 0.6875rem; color: var(--muted); letter-spacing: 1px;
}

/* --- Sections --- */
section { padding: 34px 0; }
section + section { border-top: 1px solid var(--line); }

/* Eyebrow / title pattern */
.section-eyebrow {
  font-size: 0.75rem; font-weight: 600; color: var(--label-eyebrow, var(--gold));
  text-transform: uppercase; letter-spacing: 2.5px; margin-bottom: 0.8rem;
}
.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 500; color: var(--text);
  margin-bottom: 1rem; line-height: 1.2;
  letter-spacing: -0.015em;
}
.section-desc {
  font-size: 1.0625rem; color: var(--text-body, var(--text));
  /* Was max-width: 680px - caused half-page wrapping. Lift the cap so
     paragraphs flow to the container edge. */
  max-width: none; margin-bottom: 1.5rem;
}

/* --- Typography (aligned with 4-level hierarchy) --- */
h2 {
  font-size: 1.375rem; color: var(--text); font-weight: 500;
  margin-bottom: 1rem; line-height: 1.25;
}
h2 .num, h2 .n {
  color: var(--gold);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  display: block; margin-bottom: 0.5rem;
}
h3 { font-size: 1.125rem; font-weight: 600; color: var(--text); margin: 2rem 0 0.75rem; }
h4 { font-size: 1rem; font-weight: 600; color: var(--text); margin: 1.5rem 0 0.75rem; }
p  { margin-bottom: 18px; color: var(--text); }
ul, ol { margin: 0 0 18px 24px; color: var(--text); }
li { margin-bottom: 8px; }
/* Default link treatment — gold, no underline by default, underline on hover.
   Per founder direction 2026-05-10 ("too many links are formatted incorrectly").
   Most doc/legacy pages had inline style="color:var(--gold);text-decoration:underline;"
   creating inconsistency; this CSS takes over so inline styles are redundant.
   For an explicit blue accent link, use class="accent-link". */
/* Use --label-eyebrow (AA-safe darker gold #7C5F18 on light backgrounds)
   instead of bare --gold (#C9A227 which only hits 3.0:1 on white).
   The token resolves to a brighter gold on dark themes. This preserves
   the canonical "gold links by default" brand while passing WCAG AA.
   Fix 2026-05-14: small eyebrow text inside <a class="cap-card"> was
   inheriting #C9A227 and failing AA at 2.16-2.42:1 contrast. */
a  { color: var(--label-eyebrow, var(--gold)); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--label-eyebrow, var(--gold)); text-decoration: underline; }
a:visited { color: var(--label-eyebrow, var(--gold)); }
a.accent-link { color: var(--accent); text-decoration: underline; }
a.accent-link:hover { color: var(--label-eyebrow, var(--gold)); }

/* Explicit higher-specificity override for eyebrow-style children of
   card containers. Even though the a {} rule above sets --label-eyebrow
   on links, some pages have inline <style> rules with raw --gold on
   .eyebrow that win by source-order. This 2-class selector beats any
   single-class override and guarantees AA contrast. Fix 2026-05-14. */
.cap-card .eyebrow,
.card .eyebrow,
.input-card .eyebrow,
.cap-card .label,
.card .label,
.input-card .label,
.cap-card .section-marker,
.card .section-marker {
  color: var(--label-eyebrow, var(--gold)) !important;
}

/* --- Gold buttons (canonical) ---
   JIL brand rule: never blue text on a gold button. Always dark navy on gold.
   These selectors carry tag+class specificity (0,0,1,1) so they reliably override
   the bare `a` rule above for any anchor element that visually renders as a button. */
a.cta-primary, a.btn-gold, a.btn-primary, a.cta-gold,
.cta-primary, .btn-gold, .btn-primary, .cta-gold {
  background: var(--gold, #B8973A);
  color: #0F172A !important;
  text-decoration: none !important;
  border: 1px solid var(--gold, #B8973A);
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
a.cta-primary:hover, a.btn-gold:hover, a.btn-primary:hover, a.cta-gold:hover,
.cta-primary:hover, .btn-gold:hover, .btn-primary:hover, .cta-gold:hover {
  background: #D4B154;
  color: #0F172A !important;
  text-decoration: none !important;
}
a.cta-secondary, a.btn-outline-gold, .cta-secondary, .btn-outline-gold {
  background: transparent;
  color: var(--gold, #B8973A) !important;
  border: 1px solid var(--gold, #B8973A);
  text-decoration: none !important;
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
a.cta-secondary:hover, a.btn-outline-gold:hover, .cta-secondary:hover, .btn-outline-gold:hover {
  background: rgba(184,151,58,0.08);
  color: var(--gold, #B8973A) !important;
  text-decoration: none !important;
}

/* --- Code --- */
code {
  font-family: 'SF Mono', 'Menlo', monospace; font-size: 13px;
  background: var(--off-white); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 4px; color: var(--text);
}
pre {
  background: var(--off-white); color: var(--text);
  padding: 20px; border-radius: 8px; overflow-x: auto;
  margin: 20px 0; font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 13px; line-height: 1.6;
  border: 1px solid var(--border);
}
pre code { background: none; border: none; padding: 0; color: inherit; }

/* --- Callouts --- */
.callout, .co {
  background: rgba(42,107,255,0.04); border-left: 3px solid var(--accent);
  padding: 24px 28px; border-radius: 0 8px 8px 0;
  margin: 28px 0; font-size: 15px; line-height: 1.8;
}
.callout strong, .co strong { color: var(--accent); }
.callout.gold, .co.gold { background: rgba(212,175,55,0.06); border-left-color: var(--gold); }
.callout.gold strong, .co.gold strong { color: var(--gold); }

/* --- Tables --- */
.table-wrap, .tw {
  overflow-x: auto; margin: 24px 0; border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  background: var(--off-white); color: var(--text); font-weight: 600;
  text-align: left; padding: 14px 16px;
  font-size: 12px; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap;
}
tbody td {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  vertical-align: top; background: var(--white);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--off-white); }
td.label, td.l { font-weight: 600; color: var(--text); white-space: nowrap; }

/* --- Cards / Grids --- */
.grid-2, .cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }

.cap-card, .input-card, .card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px;
  box-shadow: var(--shadow);
}
/* Card typography. h4 was 14px, which read as small-print on /hipaa
   "Ava on CoreWeave is a no-PHI path. Tier 2/3 PHI runs in JIL's enclave."
   and similar h4-headed callouts. Bumped to 17px for h4 (sub-section
   heading weight) and 15.5px for body p (readable card copy). Applied
   site-wide so every .card / .cap-card / .input-card lands on the same
   readable scale - no more 14px small-print h4s. */
.cap-card h4, .input-card h4, .card h4 { font-size: 17px; line-height: 1.35; color: var(--text-heading, var(--text)); margin-bottom: 10px; font-weight: 600; }
.cap-card p, .input-card p, .card p   { font-size: 15.5px; line-height: 1.6; margin-bottom: 0; color: var(--text-body, var(--text)); }

.stat-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px; text-align: center;
}
.stat-box .stat-value {
  font-size: 2rem; font-weight: 300; color: var(--text);
}
.stat-box .stat-label {
  font-size: 0.8rem; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600;
}

/* --- Phases / Steps --- */
.phases { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.phase-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 24px;
  box-shadow: var(--shadow);
}
.pha
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--label-eyebrow, var(--gold)); margin-bottom: 6px;
; margin-bottom: 6px;
}
.phase-card .phase-time { font-size: 13px; color: var(--text-body, var(--text)); margin-bottom: 12px; }
.phase-card h4 { font-size: 16px; color: var(--text); margin-bottom: 10px; }
.phase-card p  { font-size: 14px; margin-bottom: 0; color: var(--text-body, var(--text)); }

/* --- Override Items --- */
.override-list { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.override-item {
  flex: 1; min-width: 140px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; text-align: center;
  box-shadow: var(--shadow);
}
.override-item .icon { font-size: 24px; margin-bottom: 6px; }
.override-item h4 { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.override-item p  { font-size: 12px; color: var(--text-body, var(--text)); margin-bottom: 0; }

/* --- Chat Bubbles --- */
.chat-demo { margin: 24px 0; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 80%; padding: 16px 20px; border-radius: 16px; font-size: 14px; line-height: 1.7; }
.bubble-agent {
  background: rgba(42,107,255,0.04); border: 1px solid rgba(42,107,255,0.12);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.bubble-agent .bubble-label {
  font-size: 10px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.bubble-user {
  background: var(--surface); border: 1px solid var(--border);
  align-self: flex-end; border-bottom-right-radius: 4px; color:
  font-size: 10px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--label-eyebrow, var(--gold)); margin-bottom: 6px;
se; color: var(--gold); margin-bottom: 6px;
}

/* --- Q&A --- */
.question {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px 24px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.question .q-num { font-size: 12px; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.question .q-title { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.question .q-detail { font-size: 14px; color: var(--text-body, var(--text)); margin-bottom: 0; }

/* --- Next Steps --- */
.next-steps { list-style: none; padding: 0; margin: 20px 0; }
.next-steps li {
  padding: 12px 0 12px 20px; border-left: 2px solid var(--gold);
  margin-bottom: 8px; margin-left: 8px;
}
.next-steps li strong { color: var(--text); }

/* --- Scenarios --- */
.scenario {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 24px; margin-bottom: 16px;
}
.scenario h4 { color: var(--text); margin-bottom: 12px; }
.sce color: var(--label-eyebrow, var(--gold)); font-weight: 600;  14px; }
.scenario .label { color: var(--gold); font-weight: 600; }
.scenario .val { color: var(--text-body, var(--text)); }
.scenario .result {
  margin-top: 12px; padding: 12px; border-radius: 6px;
  background: rgba(42,107,255,0.04); font-weight: 600; color: var(--accent);
}

/* --- Flow Grid --- */
.flow-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px;
  align-items: center; margin: 24px 0;
}
.flow-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px;
}
.flow-box h4 { color: var(--text); margin-bottom: 8px; }
.flow-box p  { color: var(--muted); margin-bottom: 0; font-size: 14px; }
.flow-arrow { font-size: 24px; color: var(--gold); text-align: center; }

/* --- Doc Footer (legacy) --- */
.doc-footer {
  text-align: center; padding: 48px 0;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.doc-footer .logo-text {
  font-size: 20px; color: var(--text); margin-bottom: 8px; font-weight: 500;
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero { animation: fadeUp .6s ease-out; }

/* --- Print --- */
@media print {
  body { background: #fff; color: #000; padding-top: 0; }
  .hero { padding: 28px 0 20px; }
  .hero h1 { color: #1C1C1E; }
  h2 { color: #1C1C1E; }
  h3, h4 { color: #1C1C1E; }
  h2 .num, h2 .n, .hero-badge, .badge, .phase-card .phase-label, .question .q-num, code { color: #1C1C1E; }
  pre { background: #f0f0f0; color: #333; }
  a { color: #1C1C1E; }
  .doc-footer .logo-text { color: #1C1C1E; }
  .callout, .co { background: #f8f8f8; border-left-color: #1C1C1E; }
  table thead th { background: #f0f0f0; color: #1C1C1E; }
  tbody td { background: #fff; }
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .phases { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); text-align: center; }
}
@media (max-width: 768px) {
  .page-wrapper, .pw, .wrap { padding: 0 24px 40px; }
  body { padding-top: 56px; }
  .hero { padding: 34px 0 26px; }
  .hero h1 { font-size: clamp(1.5rem, 5vw, 2.25rem); }
  h2 { font-size: clamp(1.25rem, 3.5vw, 1.75rem); }
  h3 { font-size: 1.125rem; }
  .grid-2, .cap-grid, .input-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .override-list { flex-direction: column; }
  .override-item { min-width: 0; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Force inline-style grids to stack on mobile */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(5"],
  [style*="grid-template-columns: repeat(5"] {
    grid-template-columns: 1fr !important;
  }
  /* Stack flex rows to columns on mobile */
  [style*="display:flex"][style*="gap"],
  [style*="display: flex"][style*="gap"] {
    flex-direction: column !important;
  }
}
@media (max-width: 480px) {
  .page-wrapper, .pw, .wrap { padding: 0 16px 40px; }
  body { padding-top: 52px; }
  .hero { padding: 28px 0 20px; }
  .hero h1 { font-size: 1.375rem; }
  h2 { font-size: 1.125rem; }
  .callout { padding: 1rem; }
  .stat-box { padding: 1rem; }
  .card { padding: 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE OVERRIDES (sovereign-dark)
   [data-theme] prefix gives higher specificity than bare selectors
   in per-page inline <style> blocks, ensuring dark mode wins.
   ═══════════════════════════════════════════════════════════════ */

/* --- Body / Base --- */
[data-theme="sovereign-dark"] body {
  background: #0F1419;
  color: #CBD5E1;
}

/* --- Typography --- */
[data-theme="sovereign-dark"] h1,
[data-theme="sovereign-dark"] h2,
[data-theme="sovereign-dark"] h3,
[data-theme="sovereign-dark"] h4 {
  color: #E2E8F0;
}
[data-theme="sovereign-dark"] p,
[data-theme="sovereign-dark"] li {
  color: #CBD5E1;
}
[data-theme="sovereign-dark"] .hero-sub,
[data-theme="sovereign-dark"] .section-desc {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .hero-meta,
[data-theme="sovereign-dark"] .meta {
  color: #8B9DB5;
}

/* --- Code --- */
[data-theme="sovereign-dark"] code {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
  color: #E6EDF3;
}
[data-theme="sovereign-dark"] pre {
  background: #0D1117;
  color: #E6EDF3;
  border-color: rgba(255, 255, 255, 0.10);
}
[data-theme="sovereign-dark"] pre code {
  background: none;
  border: none;
  color: inherit;
}

/* --- Tables --- */
[data-theme="sovereign-dark"] .table-wrap,
[data-theme="sovereign-dark"] .tw {
  background: #0F1419;
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
[data-theme="sovereign-dark"] table {
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="sovereign-dark"] thead th {
  background: #1E293B;
  color: #E2E8F0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
[data-theme="sovereign-dark"] th,
[data-theme="sovereign-dark"] td {
  border-color: rgba(255, 255, 255, 0.06);
}
[data-theme="sovereign-dark"] tbody td {
  background: #0F1419;
  color: #CBD5E1;
}
[data-theme="sovereign-dark"] tbody tr:hover td {
  background: #1A2332;
}
[data-theme="sovereign-dark"] tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}
[data-theme="sovereign-dark"] td.label,
[data-theme="sovereign-dark"] td.l {
  color: #E2E8F0;
}

/* --- Cards & Surfaces --- */
[data-theme="sovereign-dark"] .cap-card,
[data-theme="sovereign-dark"] .input-card,
[data-theme="sovereign-dark"] .card {
  background: #1A2332;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
[data-theme="sovereign-dark"] .cap-card h4,
[data-theme="sovereign-dark"] .input-card h4,
[data-theme="sovereign-dark"] .card h4 {
  color: #E2E8F0;
}
[data-theme="sovereign-dark"] .cap-card p,
[data-theme="sovereign-dark"] .input-card p,
[data-theme="sovereign-dark"] .card p {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .stat-box {
  background: #1A2332;
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="sovereign-dark"] .stat-box .stat-value {
  color: #E2E8F0;
}
[data-theme="sovereign-dark"] .stat-box .stat-label {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .phase-card {
  background: #1A2332;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
[data-theme="sovereign-dark"] .phase-card h4 {
  color: #E2E8F0;
}
[data-theme="sovereign-dark"] .phase-card .phase-time {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .phase-card p {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .override-item {
  background: #1A2332;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
[data-theme="sovereign-dark"] .override-item h4 {
  color: #E2E8F0;
}
[data-theme="sovereign-dark"] .override-item p {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .question {
  background: #1A2332;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
[data-theme="sovereign-dark"] .question .q-title {
  color: #E2E8F0;
}
[data-theme="sovereign-dark"] .question .q-detail {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .flow-box {
  background: #1A2332;
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="sovereign-dark"] .flow-box h4 {
  color: #E2E8F0;
}
[data-theme="sovereign-dark"] .flow-box p {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .scenario {
  background: #1A2332;
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="sovereign-dark"] .scenario h4 {
  color: #E2E8F0;
}
[data-theme="sovereign-dark"] .scenario .label {
  color: #D4AF37;
}
[data-theme="sovereign-dark"] .scenario .val {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .scenario .result {
  background: rgba(47, 107, 255, 0.10);
  color: #60A5FA;
}

/* --- Callouts --- */
[data-theme="sovereign-dark"] .callout,
[data-theme="sovereign-dark"] .co {
  background: rgba(47, 107, 255, 0.08);
  border-left-color: #60A5FA;
}
[data-theme="sovereign-dark"] .callout strong,
[data-theme="sovereign-dark"] .co strong {
  color: #60A5FA;
}
[data-theme="sovereign-dark"] .callout.gold,
[data-theme="sovereign-dark"] .co.gold {
  background: rgba(212, 175, 55, 0.08);
  border-left-color: #D4AF37;
}
[data-theme="sovereign-dark"] .callout.gold strong,
[data-theme="sovereign-dark"] .co.gold strong {
  color: #D4AF37;
}
[data-theme="sovereign-dark"] .callout.info {
  background: rgba(59, 130, 246, 0.08);
}
[data-theme="sovereign-dark"] .callout.warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #F59E0B;
}
[data-theme="sovereign-dark"] .callout.danger {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: #EF4444;
}

/* --- Chat Bubbles --- */
[data-theme="sovereign-dark"] .bubble-agent {
  background: rgba(47, 107, 255, 0.08);
  border-color: rgba(47, 107, 255, 0.18);
}
[data-theme="sovereign-dark"] .bubble-agent .bubble-label {
  color: #60A5FA;
}
[data-theme="sovereign-dark"] .bubble-user {
  background: #1A2332;
  border-color: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
}

/* --- Next Steps --- */
[data-theme="sovereign-dark"] .next-steps li {
  border-left-color: #D4AF37;
}
[data-theme="sovereign-dark"] .next-steps li strong {
  color: #E2E8F0;
}

/* --- Doc Header & Footer --- */
[data-theme="sovereign-dark"] header.doc-header {
  background: #1A2332;
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="sovereign-dark"] .doc-footer {
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.08);
}
[data-theme="sovereign-dark"] .doc-footer .logo-text {
  color: #E2E8F0;
}

/* --- Page-specific elements --- */
[data-theme="sovereign-dark"] .back-link {
  background: #1A2332;
  color: #CBD5E1;
}
[data-theme="sovereign-dark"] .back-link:hover {
  background: #1E293B;
  color: #E2E8F0;
}
[data-theme="sovereign-dark"] .state-machine {
  background: rgba(255, 255, 255, 0.03);
}
[data-theme="sovereign-dark"] .pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.10);
}
[data-theme="sovereign-dark"] .kpi .box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="sovereign-dark"] .cta {
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
}
[data-theme="sovereign-dark"] .divider {
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="sovereign-dark"] .toc a {
  color: #8B9DB5;
}
[data-theme="sovereign-dark"] .toc a:hover {
  color: #E2E8F0;
}

/* --- Badges --- */
[data-theme="sovereign-dark"] .hero-badge,
[data-theme="sovereign-dark"] .badge {
  color: #D4AF37;
  border-color: rgba(212, 175, 55, 0.30);
  background: rgba(212, 175, 55, 0.08);
}

/* --- Method Badges (force dark text on colored backgrounds) --- */
[data-theme="sovereign-dark"] .method-get,
[data-theme="sovereign-dark"] .method-post,
[data-theme="sovereign-dark"] .method-delete {
  color: #0F172A;
}

/* --- Section borders --- */
[data-theme="sovereign-dark"] section + section {
  border-color: rgba(255, 255, 255, 0.06);
}

/* --- Links --- */
[data-theme="sovereign-dark"] a {
  color: #60A5FA;
}
[data-theme="sovereign-dark"] a:hover {
  color: #D4AF37;
}

/* --- Hero gold accent line --- */
[data-theme="sovereign-dark"] .hero::after {
  background: #D4AF37;
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE OVERRIDES (sovereign-light)
   Ensures proper light theme rendering, overriding any dark
   fallback values from jil-v14.css :root defaults.
   ═══════════════════════════════════════════════════════════════ */

/* --- Body / Base --- */
[data-theme="sovereign-light"] body {
  background: var(--bg);
  color: var(--text);
}

/* --- Code --- */
[data-theme="sovereign-light"] code {
  background: var(--off-white);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="sovereign-light"] pre {
  background: var(--off-white);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="sovereign-light"] pre code {
  background: none;
  border: none;
  color: inherit;
}

/* --- Tables --- */
[data-theme="sovereign-light"] .table-wrap,
[data-theme="sovereign-light"] .tw {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="sovereign-light"] table {
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="sovereign-light"] thead th {
  background: var(--off-white);
  color: var(--text);
}
[data-theme="sovereign-light"] th,
[data-theme="sovereign-light"] td {
  border-color: var(--border);
}
[data-theme="sovereign-light"] tbody td {
  background: var(--white);
}
[data-theme="sovereign-light"] tbody tr:hover td {
  background: var(--off-white);
}

/* --- Cards & Surfaces --- */
[data-theme="sovereign-light"] .cap-card,
[data-theme="sovereign-light"] .input-card,
[data-theme="sovereign-light"] .card {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="sovereign-light"] .stat-box {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="sovereign-light"] .phase-card {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="sovereign-light"] .override-item {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="sovereign-light"] .question {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="sovereign-light"] .flow-box {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="sovereign-light"] .scenario {
  background: var(--surface);
  border-color: var(--border);
}

/* --- Doc Header & Footer --- */
[data-theme="sovereign-light"] header.doc-header {
  background: var(--card);
  border-color: var(--border);
}
[data-theme="sovereign-light"] footer.doc-footer {
  background: var(--card);
  border-color: var(--border);
}

/* --- Page-specific elements --- */
[data-theme="sovereign-light"] .back-link {
  background: var(--off-white);
  color: var(--text);
}
[data-theme="sovereign-light"] .state-machine {
  background: rgba(245, 245, 245, 0.95);
}
[data-theme="sovereign-light"] .pill {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border);
}
[data-theme="sovereign-light"] .kpi .box {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border);
}

/* --- Method Badges --- */
[data-theme="sovereign-light"] .method-get,
[data-theme="sovereign-light"] .method-post,
[data-theme="sovereign-light"] .method-delete {
  color: #0F172A;
}

/* --- Section borders --- */
[data-theme="sovereign-light"] section + section {
  border-color: var(--border);
}

/* --- Links --- */
[data-theme="sovereign-light"] a {
  color: var(--accent);
}
[data-theme="sovereign-light"] a:hover {
  color: var(--gold);
}

/* ═══════════════════════════════════════════════════════════════
   Doc-page layout normalization (2026-04-19)
   Only loaded on /docs/* pages. Targets the v2-section-based doc
   templates so titles, subtitles, and body blocks all align to a
   single left rail instead of mixing centered + left anchoring.
   Fixes long-standing "content under the sub-header should be left
   aligned like the subtitles" issue across all 34+ doc pages.
   ═══════════════════════════════════════════════════════════════ */

/* Narrower, consistent rail for all v2-section content on doc pages. */
.v2-section > .v2-container,
.v2-section-alt > .v2-container,
.v2-section-navy > .v2-container,
.v2-section-graphite > .v2-container {
  max-width: 960px;
}

/* Subtitles: drop max-width + auto margins so they flow with title. */
.v2-section .v2-section-subtitle,
.v2-section-alt .v2-section-subtitle,
.v2-section-navy .v2-section-subtitle,
.v2-section-graphite .v2-section-subtitle {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left !important;
}

/* Body blocks: kill inline-style centering (margin:0 auto / margin-x auto)
   so body aligns with the title above it. */
.v2-section .v2-body,
.v2-section-alt .v2-body,
.v2-section-navy .v2-body,
.v2-section-graphite .v2-body {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left !important;
}

/* Callout boxes inside sections - align to left rail. */
.v2-section .callout-box,
.v2-section-alt .callout-box {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Tables / mode-table wrappers: align left, keep own overflow. */
.v2-section > .v2-container > div[style*="overflow-x:auto"],
.v2-section-alt > .v2-container > div[style*="overflow-x:auto"] {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
}

/* Explicit override: v2-mx-auto utility kills itself on doc pages. */
.v2-section .v2-mx-auto,
.v2-section-alt .v2-mx-auto,
.v2-section-navy .v2-mx-auto,
.v2-section-graphite .v2-mx-auto {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Hero sections keep their own alignment (not a v2-section descendant). */

/* ═══════════════════════════════════════════════════════════════
   Canonical JIL Hero - matches https://jilsovereign.com homepage
   Light blue radial + gold touches + soft shadows. Higher
   specificity (body .hero) to override per-page inline .hero
   gold-radial gradients site-wide.
   ═══════════════════════════════════════════════════════════════ */
body .hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 2rem;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(207,233,255,0.55), transparent 50%),
    linear-gradient(to bottom, var(--bg-0, #FFFFFF) 0%, var(--bg-0, #FFFFFF) 100%);
  color: var(--text, #0F172A);
  border-bottom: 1px solid rgba(225,229,234,0.8);
}
body .hero .v2-hero-title,
body .hero h1 {
  color: var(--text-heading, #0F172A);
  -webkit-text-fill-color: var(--text-heading, #0F172A);
}
body .hero .v2-section-subtitle,
body .hero p { color: var(--text, #0F172A); }
body .hero .pill,
body .hero .v2-label {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(184,151,58,0.35);
  background: rgba(255,255,255,0.88);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold, #C9A227);
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

/* Soft card treatment site-wide - matches homepage cards */
body .pillar-card,
body .framework-card,
body .roadmap-card {
  background: #FFFFFF;
  border: 1px solid #E1E5EA;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
body .pillar-card:hover,
body .framework-card:hover,
body .roadmap-card:hover {
  border-color: var(--gold, #C9A227);
  box-shadow: 0 4px 12px rgba(15,23,42,0.08);
}

/* Final-CTA navy section (closing) */
body .v2-section-navy {
  background: linear-gradient(160deg, #0B1220 0%, #0F172A 50%, #1A2438 100%);
  color: #E6EAF2;
}
body .v2-section-navy h1,
body .v2-section-navy h2,
body .v2-section-navy h3 { color: #F8FAFC; }
body .v2-section-navy p { color: #CBD5E1; }

/* Stat badges */
body .stat-bar {
  padding: 1.5rem 0;
  background: #F5F7FA;
  border-top: 1px solid #E1E5EA;
  border-bottom: 1px solid #E1E5EA;
}
body .stat-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(184,151,58,0.35);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold, #C9A227);
  background: #FFFFFF;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

/* ═══════════════════════════════════════════════════════════════
   DOC AUTO-BEAUTIFICATION - applies to every /docs/**.html page
   without per-page edits. Targets the common pandoc / hand-written
   doc patterns: .container/.wrap/.pw top wrapper + <h1>, <h2>, tables,
   callouts, code blocks, cards, grids.
   ═══════════════════════════════════════════════════════════════ */

/* Auto-hero for the first h1 at the top of a doc container.
   Scoped to body.docs-page ONLY - set by a tiny URL check at end of this file. */
body.docs-page .container > h1:first-of-type,
body.docs-page .wrap > h1:first-of-type,
body.docs-page .pw > h1:first-of-type,
body.docs-page .page-wrapper > h1:first-of-type,
body.docs-page .v2-container > h1:first-of-type {
  font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text, #0F172A);
  margin: 0 -64px 2rem;
  padding: 3.5rem 64px 2.25rem;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(207,233,255,0.55) 0%, transparent 60%),
    radial-gradient(600px 320px at 85% 90%, rgba(201,162,39,0.08) 0%, transparent 70%),
    linear-gradient(180deg, #F4F9FF 0%, #FFFFFF 70%);
  border-bottom: 1px solid var(--border, #CBD5E1);
  position: relative;
}
body.docs-page .container > h1:first-of-type::after,
body.docs-page .wrap > h1:first-of-type::after,
body.docs-page .pw > h1:first-of-type::after,
body.docs-page .page-wrapper > h1:first-of-type::after,
body.docs-page .v2-container > h1:first-of-type::after {
  content: '';
  display: block;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold, #C9A227), transparent);
  margin: 14px 0 0;
}
@media (max-width: 768px) {
  body.docs-page .container > h1:first-of-type,
  body.docs-page .wrap > h1:first-of-type,
  body.docs-page .pw > h1:first-of-type,
  body.docs-page .page-wrapper > h1:first-of-type,
  body.docs-page .v2-container > h1:first-of-type {
    margin: 0 -24px 1.5rem;
    padding: 2.5rem 24px 1.75rem;
  }
}

/* h2 / h3 subtle typographic hierarchy with a gold accent bar */
body.docs-page .container h2:not(:first-child),
body.docs-page .wrap h2:not(:first-child),
body.docs-page .pw h2:not(:first-child),
body.docs-page .page-wrapper h2:not(:first-child),
body.docs-page .v2-container h2:not(:first-child) {
  position: relative;
  padding-left: 18px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  color: var(--text-heading, #0F172A);
  letter-spacing: -0.005em;
  margin: 2.5rem 0 1rem;
}
body.docs-page .container h2:not(:first-child)::before,
body.docs-page .wrap h2:not(:first-child)::before,
body.docs-page .pw h2:not(:first-child)::before,
body.docs-page .page-wrapper h2:not(:first-child)::before,
body.docs-page .v2-container h2:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 3px;
  background: var(--gold, #C9A227);
  border-radius: 2px;
}

/* Tables: zebra + gold header underline + soft borders */
body.docs-page .container table,
body.docs-page .wrap table,
body.docs-page .pw table,
body.docs-page .page-wrapper table,
body.docs-page .v2-container table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  background: #FFFFFF;
  border: 1px solid #E1E5EA;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
  font-size: 0.9rem;
}
body.docs-page .container table th,
body.docs-page .wrap table th,
body.docs-page .pw table th,
body.docs-page .page-wrapper table th {
  background: #F4F9FF;
  color: var(--text-heading, #0F172A);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 2px solid var(--gold, #C9A227);
}
body.docs-page .container table td,
body.docs-page .wrap table td,
body.docs-page .pw table td,
body.docs-page .page-wrapper table td {
  padding: 11px 14px;
  border-top: 1px solid #EEF1F5;
  color: var(--text, #0F172A);
  vertical-align: top;
}
body.docs-page .container table tr:nth-child(even) td,
body.docs-page .wrap table tr:nth-child(even) td,
body.docs-page .pw table tr:nth-child(even) td,
body.docs-page .page-wrapper table tr:nth-child(even) td {
  background: #FAFBFD;
}
body.docs-page .container table code,
body.docs-page .wrap table code,
body.docs-page .pw table code,
body.docs-page .page-wrapper table code {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.82em;
  background: rgba(201,162,39,0.08);
  color: #92680E;
  padding: 1px 6px;
  border-radius: 3px;
}

/* Callouts - consistent left-border accent */
body .callout {
  border-left: 3px solid var(--gold, #C9A227);
  background: rgba(201,162,39,0.06);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 1.25rem 0;
  color: var(--text, #0F172A);
}
body .callout.info { border-left-color: #2563EB; background: rgba(37,99,235,0.06); }
body .callout.warning { border-left-color: #F59E0B; background: rgba(245,158,11,0.06); }
body .callout.danger { border-left-color: #DC2626; background: rgba(220,38,38,0.06); }
body .callout p:last-child { margin-bottom: 0; }

/* Code blocks - softer bg, better mono */
body.docs-page .container pre,
body.docs-page .wrap pre,
body.docs-page .pw pre,
body.docs-page .page-wrapper pre {
  background: #F4F9FF;
  border: 1px solid #DCEAFB;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 1.25rem 0;
  overflow-x: auto;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #1E293B;
}
body.docs-page .container pre code,
body.docs-page .wrap pre code,
body.docs-page .pw pre code,
body.docs-page .page-wrapper pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}
body.docs-page p code,
body.docs-page li code,
body.docs-page td code {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.85em;
  background: rgba(201,162,39,0.08);
  color: #92680E;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(201,162,39,0.15);
}

/* Blockquotes */
body.docs-page .container blockquote,
body.docs-page .wrap blockquote,
body.docs-page .pw blockquote,
body.docs-page .page-wrapper blockquote {
  border-left: 3px solid var(--gold, #C9A227);
  background: linear-gradient(90deg, rgba(201,162,39,0.04) 0%, transparent 100%);
  padding: 14px 20px;
  margin: 1.25rem 0;
  color: var(--text, #0F172A);
  font-style: italic;
}
body.docs-page .container blockquote p:last-child,
body.docs-page .wrap blockquote p:last-child,
body.docs-page .pw blockquote p:last-child,
body.docs-page .page-wrapper blockquote p:last-child { margin-bottom: 0; }

/* Cards / grid items pick up the soft card treatment */
body.docs-page .container .card,
body.docs-page .wrap .card,
body.docs-page .pw .card,
body.docs-page .page-wrapper .card,
body.docs-page .container .phase-card,
body.docs-page .wrap .phase-card,
body.docs-page .pw .phase-card,
body.docs-page .container .stat-box,
body.docs-page .wrap .stat-box,
body.docs-page .pw .stat-box {
  background: #FFFFFF;
  border: 1px solid #E1E5EA;
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
body.docs-page .container .card:hover,
body.docs-page .wrap .card:hover,
body.docs-page .pw .card:hover,
body.docs-page .page-wrapper .card:hover,
body.docs-page .container .phase-card:hover,
body.docs-page .wrap .phase-card:hover,
body.docs-page .pw .phase-card:hover {
  border-color: var(--gold, #C9A227);
  box-shadow: 0 6px 18px rgba(15,23,42,0.08);
  transform: translateY(-2px);
}

/* Lists: better spacing + gold bullet accent */
body.docs-page .container ul,
body.docs-page .wrap ul,
body.docs-page .pw ul,
body.docs-page .page-wrapper ul { padding-left: 22px; margin: 1rem 0; }
body.docs-page .container ul li,
body.docs-page .wrap ul li,
body.docs-page .pw ul li,
body.docs-page .page-wrapper ul li { margin: 6px 0; line-height: 1.72; }
body.docs-page .container ul li::marker,
body.docs-page .wrap ul li::marker,
body.docs-page .pw ul li::marker,
body.docs-page .page-wrapper ul li::marker { color: var(--gold, #C9A227); }

/* Links get gold underline on hover for better affordance */
body.docs-page .container a,
body.docs-page .wrap a,
body.docs-page .pw a,
body.docs-page .page-wrapper a {
  color: var(--accent, #2563EB);
  text-decoration: none;
  border-bottom: 1px solid rgba(37,99,235,0.25);
  transition: color 0.15s, border-color 0.15s;
}
body.docs-page .container a:hover,
body.docs-page .wrap a:hover,
body.docs-page .pw a:hover,
body.docs-page .page-wrapper a:hover {
  color: var(--gold, #C9A227);
  border-bottom-color: var(--gold, #C9A227);
}

/* ----------------------------------------------------------------
 * Pillar wire diagram ("How the 6 pillars relate")
 * Embedded at the top of each /docs/pillars/0X-*.html doc.
 * Highlights the active pillar via data-active-pillar attribute.
 * ---------------------------------------------------------------- */
.pillar-how-they-relate {
  margin: 28px 0 36px;
  padding: 24px 26px 26px;
  background: linear-gradient(180deg, #F4F9FF 0%, #FFFFFF 100%);
  border: 1px solid #E1E5EA;
  border-radius: 12px;
}
.phr-eyebrow {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold, #C9A227);
}
.phr-title {
  font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(17px, 1.9vw, 22px);
  color: #0D2044; margin: 6px 0 8px; font-weight: 400; line-height: 1.2;
}
.phr-sub {
  font-size: 13px; color: #475569; line-height: 1.55;
  margin: 0 0 22px; max-width: 680px;
}
.phr-substrate {
  background: linear-gradient(90deg, #0D2044 0%, #1E3A6F 100%);
  border: 1px solid rgba(200,160,64,0.6);
  border-radius: 8px;
  padding: 12px 18px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(13,32,68,0.15);
}
.phr-substrate-label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold, #C9A227);
  white-space: nowrap;
}
.phr-substrate-items { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.phr-substrate-items span {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10.5px; color: #FFFFFF;
  background: rgba(200,160,64,0.15);
  border: 1px solid rgba(200,160,64,0.4);
  padding: 3px 8px; border-radius: 4px;
  white-space: nowrap;
}
.phr-connectors {
  width: 100%; height: 36px; display: block;
}
.phr-line { stroke: #CBD5E1; stroke-width: 1.5; stroke-dasharray: 3 3; }
.phr-pillars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.phr-pillar {
  background: #FFFFFF;
  border: 1px solid #E2E8F0; border-radius: 8px;
  padding: 12px 10px; text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, opacity 0.2s;
  opacity: 0.6;
  text-decoration: none;
  display: block;
}
.phr-diagram:not([data-active-pillar]) .phr-pillar,
.phr-diagram[data-active-pillar=""] .phr-pillar,
.phr-diagram[data-active-pillar="0"] .phr-pillar {
  opacity: 1;
}
.phr-pillar:hover {
  opacity: 1;
  border-color: rgba(200,160,64,0.5);
  transform: translateY(-2px);
}
.phr-pillar-num {
  font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-style: italic; font-size: 17px;
  color: var(--gold, #C9A227); line-height: 1;
}
.phr-pillar-name {
  font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13.5px; color: #0D2044;
  font-weight: 400; margin: 4px 0 3px; line-height: 1.2;
}
.phr-pillar-desc {
  font-size: 10px; color: #64748B; line-height: 1.35;
  font-family: 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.02em;
}
/* Active pillar state - matches data-active-pillar value */
.phr-diagram[data-active-pillar="1"] .phr-pillar[data-pillar="1"],
.phr-diagram[data-active-pillar="2"] .phr-pillar[data-pillar="2"],
.phr-diagram[data-active-pillar="3"] .phr-pillar[data-pillar="3"],
.phr-diagram[data-active-pillar="4"] .phr-pillar[data-pillar="4"],
.phr-diagram[data-active-pillar="5"] .phr-pillar[data-pillar="5"] {
  background: linear-gradient(180deg, #FFFBEC 0%, #FFFFFF 50%);
  border: 2px solid var(--gold, #C9A227);
  box-shadow: 0 6px 18px rgba(200,160,64,0.28);
  opacity: 1;
  transform: translateY(-3px);
}
.phr-diagram[data-active-pillar="1"] .phr-line[data-pillar="1"],
.phr-diagram[data-active-pillar="2"] .phr-line[data-pillar="2"],
.phr-diagram[data-active-pillar="3"] .phr-line[data-pillar="3"],
.phr-diagram[data-active-pillar="4"] .phr-line[data-pillar="4"],
.phr-diagram[data-active-pillar="5"] .phr-line[data-pillar="5"] {
  stroke: var(--gold, #C9A227);
  stroke-width: 2.5;
  stroke-dasharray: none;
}
@media (max-width: 720px) {
  .phr-pillars { grid-template-columns: repeat(2, 1fr); }
  .phr-connectors { display: none; }
  .phr-substrate-items { gap: 6px; }
  .phr-substrate-items span { font-size: 9.5px; padding: 2px 6px; }
}

/* ----------------------------------------------------------------
 * Left-align rule (2026-04-21): headers, subtitles, and lede paragraphs
 * on docs/institutional pages are left-aligned by default. Center
 * alignment is reserved for intentional full-center layouts, not
 * section headers. Overrides any page-local ".final-cta { text-align:
 * center }" patterns that were common in earlier docs.
 * ---------------------------------------------------------------- */
body.docs-page .final-cta,
body.docs-page .final-cta h1,
body.docs-page .final-cta h2,
body.docs-page .final-cta h3,
body.docs-page .final-cta p,
body.docs-page .doc-footer,
body.docs-page .section > h2,
body.docs-page .section > h3,
body.docs-page .section > .eyebrow,
body.docs-page .section-header,
body.docs-page .section-header h2,
body.docs-page .section-header h3,
body.docs-page .section-header p {
  text-align: left;
}
body.docs-page .final-cta-buttons,
body.docs-page .final-cta .actions,
body.docs-page .final-cta .cta-row {
  justify-content: flex-start;
}

/* ==========================================================================
   .output-card - CANONICAL STANDARD 2026-04-23
   Shared "emphasis block" used by all pillar pages + any doc page that wants
   a gold-tinted callout. Must left-align with the h2 above it (no horizontal
   inner padding, no rounded border-box); just a gold-left-border accent +
   vertical padding + subtle cream background.
   Previously declared inline per-page; moved here so every page using
   class="output-card" stays in sync.
   ========================================================================== */
.output-card {
  border: none;
  border-left: 3px solid var(--gold, #c9a05a);
  padding: 1.25rem 0 1.25rem 1rem;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 0;
  margin: 0;
}
.output-card h3 {
  color: var(--gold-dark, #6b4f1e);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.output-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 1rem;
}
.output-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Dark-section variant inherits the same left-align + no-box pattern;
   only the background opacity shifts. */
.v2-section-alt .output-card {
  background: rgba(212, 175, 55, 0.08);
  border-left-color: var(--gold, #c9a05a);
}
.v2-section-alt .output-card p { color: var(--text); }

@media (max-width: 700px) {
  .output-card { padding: 1rem 0 1rem 0.75rem; }
}

/* ================================================================
   SOVEREIGN-EDITORIAL THEME UTILITIES
   These utility classes activate the "investor dossier" editorial
   look on any page that sets data-theme="sovereign-editorial" on
   its <html> element. They sit alongside the regular jil-doc-standard
   classes (.section, .card, .grid-3, .stat-box, .callout) — opt-in
   only, no impact on pages that don't set the editorial theme.
   ================================================================ */

/* Load editorial font stack only when the theme is active. The pages
   that opt in still load the standard JIL fonts; this just adds
   IBM Plex + Fraunces. Browsers without the editorial fonts fall
   back to the existing DM Serif Display / DM Mono / Inter stack. */
[data-theme="sovereign-editorial"] {
  /* Editorial typography assumes Google Fonts are loaded by the page;
     fallback chain in --font-display / --font-body / --font-mono ensures
     graceful degradation if the page omits the font links. */
}

[data-theme="sovereign-editorial"] body,
[data-theme="sovereign-editorial"] .docs-page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

[data-theme="sovereign-editorial"] h1,
[data-theme="sovereign-editorial"] h2,
[data-theme="sovereign-editorial"] h3,
[data-theme="sovereign-editorial"] h4,
[data-theme="sovereign-editorial"] .section-title,
[data-theme="sovereign-editorial"] .hero h1,
[data-theme="sovereign-editorial"] blockquote {
  font-family: var(--font-display);
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

[data-theme="sovereign-editorial"] .eyebrow,
[data-theme="sovereign-editorial"] .meta,
[data-theme="sovereign-editorial"] code,
[data-theme="sovereign-editorial"] pre {
  font-family: var(--font-mono);

  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label-eyebrow, var(--gold));
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.section-marker::before {
  content: "§";
  font-style: italic;
  font-family: var(--font-display, 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
  font-size: 14px;
  letter-spacing: 0;
  color: var(--gold-bright, var(--gold));
}

/* Classification banner — full-width strip for confidential decks.
   Was previously a navy band (dark theme). Per durable user preference
   (no dark themes, banking-dossier institutional look — not crypto), this
   now ships as a deeper-cream strip with navy text + gold rules above
   and below. WSJ pitchbook treatment, not crypto inverted-band. */
.classification-banner {
  background: var(--bg-muted, #EBE4D6);
  color: var(--text-heading, #0D2044);
  padding: 8px 0;
  font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}
.classification-banner .diamond {
  color: var(--gold);
  margin: 0 12px;
  font-style: normal;
}

/* Editorial hero — full-bleed cream hero with corner-tick marks */
.editorial-hero {
  position: relative;
  padding: 3rem 0 2.25rem;
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(154,120,40,0.06) 0%, transparent 65%),
    var(--bg-soft, var(--bg));
  border-bottom: 1px solid var(--line);
}
.editorial-hero::before,
.editorial-hero::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--text-heading);
  opacity: 0.5;
}
.editorial-hero::before {
  top: 14px;
  left: 14px;
  border-right: none;
  border-bottom: none;
}
.editorial-hero::after {
  bottom: 14px;
  right: 14px;
  border-left: none;
  border-top: none;
}
.editorial-hero .container {
  position: relative;
  z-index: 1;
}

/* Editorial pull-quote — gold-rule italic 24px serif */
.editorial-pull {
  display: block;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-left: 3px solid var(--gold);
  background: var(--bg-soft);
  font-family: var(--font-display, 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
  font-size: 1.4rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--text-heading);
  letter-spacing: -0.005em;
}
.editorial-pull cite {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}

/* Editorial stat band — banking-dossier light treatment.
   Was previously navy-on-cream (dark band). Per durable user preference,
   JIL ships LIGHT THEMES ONLY — no dark themes, no crypto-y high-contrast
   bands. This renders as a deeper-cream surface with a top + bottom gold
   hairline rule, navy serif numerals, and warm-gray labels. Reads as
   "this is the data" without inverting the surface. */
.editorial-stat-band {
  background: var(--bg-muted, #EBE4D6);
  color: var(--text, #15161A);
  padding: 2.5rem 0;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}
.editorial-stat-band .grid-3,
.editorial-stat-band .grid-4,
.editorial-stat-band .grid {
  border: none;
}
.editorial-stat-band .stat-box,
.editorial-stat-band .cap-card,
.editorial-stat-band .card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, #C9BFAE);
  color: var(--text, #15161A);
}
.editorial-stat-band .stat-value {
  color: var(--text-heading, #0D2044);
  font-family: var(--font-display, 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
  font-weight: 400;
}
.editorial-stat-band .stat-label,
.editorial-stat-band .eyebrow {
  color: var(--text-body, var(--text));
  opacity: 0.78;
}

/* Editorial page chrome — top + bottom strip with page numbering
   and confidentiality marker. Used at the top of an editorial page,
   right under the JIL nav. */
.editorial-page-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.editorial-page-chrome .left,
.editorial-page-chrome .right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.editorial-page-chrome .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* Editorial buttons - replace the gold-on-light look with navy-on-cream */
[data-theme="sovereign-editorial"] .btn-primary,
[data-theme="sovereign-editorial"] .cta-btn-dark {
  background: var(--text-heading, #0D2044);
  color: var(--bg, #F5F1EA);
  border-color: var(--text-heading);
}
[data-theme="sovereign-editorial"] .btn-primary:hover,
[data-theme="sovereign-editorial"] .cta-btn-dark:hover {
  background: var(--navy-mid, #1A3160);
  border-color: var(--navy-mid);
}
[data-theme="sovereign-editorial"] .btn-outline,
[data-theme="sovereign-editorial"] .secondary-btn {
  border-color: var(--text-heading, #0D2044);
  color: var(--text-heading);
  background: transparent;
}
[data-theme="sovereign-editorial"] .btn-outline:hover,
[data-theme="sovereign-editorial"] .secondary-btn:hover {
  background: var(--text-heading);
  color: var(--bg);
}

/* ================================================================
   PAGE-SPECIFIC POLISH RULES (Phase 2 batch B regressions)

   Tiny utility classes restoring visual polish that the editorial
   reflows of /pricing, /partners, /security dropped because they
   couldn't ship inline <style> blocks. These are page-specific
   and additive - default theme behavior is unchanged.
   ================================================================ */

/* Pricing: sticky anchor nav (rounded-pill row above the tiers).
   Apply via <nav class="page-anchor-nav">...<a>...</a></nav>. */
.page-anchor-nav {
  position: sticky;
  top: 64px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  margin: 0 0 1.5rem;
  background: rgba(245, 241, 234, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.page-anchor-nav a {
  font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  transition: all 0.15s ease;
}
.page-anchor-nav a:hover,
.page-anchor-nav a.is-active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--bg-soft);
}

/* Partners: tier icon strip (replaces the SVG tier icons that the
   reflow dropped). Apply on the tier card's eyebrow with a glyph
   prefix: <div class="tier-glyph tier-glyph--strategic">S</div> */
.tier-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display, 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 12px;
  letter-spacing: 0;
}
.tier-glyph--strategic { border-color: var(--text-heading); color: var(--text-heading); }
.tier-glyph--anchor    { border-color: var(--gold-bright, var(--gold)); color: var(--gold-bright, var(--gold)); }
.tier-glyph--reseller  { border-color: var(--muted); color: var(--muted); }

/* Partners: dotted onboarding-flow connector. Apply on a wrapper:
   <div class="flow-connector">...steps...</div>. The connector is
   a dotted line drawn between adjacent .cap-card or .phase-card
   children, visible only on horizontal grids. */
.flow-connector {
  position: relative;
}
.flow-connector::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 2px;
  background-image: linear-gradient(90deg, var(--gold) 50%, transparent 50%);
  background-size: 12px 2px;
  background-repeat: repeat-x;
  z-index: 0;
  opacity: 0.45;
}
.flow-connector > * {
  position: relative;
  z-index: 1;
  background: var(--surface);
}
@media (max-width: 800px) {
  .flow-connector::before { display: none; }
}

/* Security: roadmap status dots (replaces the dropped status indicator).
   Apply via <span class="status-dot status-dot--complete">Q2 2026</span>. */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.status-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  border: 1.5px solid var(--muted);
  flex-shrink: 0;
}
.status-dot--complete::before {
  background: #1B7A47;
  border-color: #1B7A47;
}
.status-dot--complete { color: #1B7A47; }
.status-dot--inflight::before {
  background: var(--gold);
  border-color: var(--gold);
  animation: status-dot-pulse 1.6s ease-in-out infinite;
}
.status-dot--inflight { color: var(--gold); }
.status-dot--planned::before {
  background: transparent;
  border-color: var(--muted);
}
@keyframes status-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* ================================================================
   CONTRAST GUARD: prevent light-text-on-light-background bugs.

   .body-lg (the canonical body-copy class) is referenced across many
   pages but didn't have a default rule, so its color inherited from
   the parent. Body copy elements that live on cream / light surfaces
   need stronger color than --muted (#6B6358 on cream = 5:1 borderline).

   Keep --muted for tiny tertiary metadata. Body paragraphs use
   --text-body with --text fallback (always dark, always readable).
   ================================================================ */
.body-lg {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-body, var(--text));
}
.body-lg.max-3 { max-width: 760px; }

/* Under the editorial theme specifically, force any paragraph or list-
   item inside .section / .card / .cap-card / .stat-box that's still
   using a too-light token to use --text-body instead. Belt-and-
   suspenders. */
[data-theme="sovereign-editorial"] .section p,
[data-theme="sovereign-editorial"] .section li,
[data-theme="sovereign-editorial"] .editorial-hero p,
[data-theme="sovereign-editorial"] .card p,
[data-theme="sovereign-editorial"] .cap-card p,
[data-theme="sovereign-editorial"] .phase-card p,
[data-theme="sovereign-editorial"] .stat-box p,
[data-theme="sovereign-editorial"] .callout p {
  color: var(--text-body, var(--text));
}
[data-theme="sovereign-editorial"] .stat-label,
[data-theme="sovereign-editorial"] .meta,
[data-theme="sovereign-editorial"] .hero-meta,
[data-theme="sovereign-editorial"] .docs-cat-count {
  color: var(--text-body, var(--text));
  opacity: 0.78;
}

/* ================================================================
   V2 dark-band overrides under sovereign-editorial.

   .v2-section-alt / .v2-section-navy / .v2-section-graphite were
   originally jil-v14.css rules that paint a near-black gradient
   (#10171C -> #0A0D10) and force white text. They leaked through
   on /sovereign, /settlement-engine, /pillars/institutional-wallet
   and any other page that still uses those V2 SPA section variants.

   Under the editorial theme these flatten to a deeper-cream band
   with gold hairlines (banking dossier treatment, never inverted).
   ================================================================ */
[data-theme="sovereign-editorial"] .v2-section-alt,
[data-theme="sovereign-editorial"] .v2-section-navy,
[data-theme="sovereign-editorial"] .v2-section-graphite {
  background: var(--bg-muted, #EBE4D6) !important;
  color: var(--text, #15161A) !important;
  border-top: 1px solid var(--gold, #9A7828);
  border-bottom: 1px solid var(--gold, #9A7828);
}
[data-theme="sovereign-editorial"] .v2-section-alt .v2-section-title,
[data-theme="sovereign-editorial"] .v2-section-alt .v2-hero-title,
[data-theme="sovereign-editorial"] .v2-section-navy .v2-section-title,
[data-theme="sovereign-editorial"] .v2-section-navy .v2-hero-title,
[data-theme="sovereign-editorial"] .v2-section-graphite .v2-section-title,
[data-theme="sovereign-editorial"] .v2-section-graphite .v2-hero-title,
[data-theme="sovereign-editorial"] .v2-section-alt h2,
[data-theme="sovereign-editorial"] .v2-section-alt h3,
[data-theme="sovereign-editorial"] .v2-section-alt h4,
[data-theme="sovereign-editorial"] .v2-section-navy h2,
[data-theme="sovereign-editorial"] .v2-section-navy h3,
[data-theme="sovereign-editorial"] .v2-section-navy h4,
[data-theme="sovereign-editorial"] .v2-section-graphite h2,
[data-theme="sovereign-editorial"] .v2-section-graphite h3,
[data-theme="sovereign-editorial"] .v2-section-graphite h4,
[data-theme="sovereign-editorial"] .v2-section-alt strong,
[data-theme="sovereign-editorial"] .v2-section-navy strong,
[data-theme="sovereign-editorial"] .v2-section-graphite strong {
  color: var(--text-heading, #0D2044) !important;
}
[data-theme="sovereign-editorial"] .v2-section-alt p,
[data-theme="sovereign-editorial"] .v2-section-alt li,
[data-theme="sovereign-editorial"] .v2-section-alt td,
[data-theme="sovereign-editorial"] .v2-section-alt span,
[data-theme="sovereign-editorial"] .v2-section-alt div,
[data-theme="sovereign-editorial"] .v2-section-alt blockquote,
[data-theme="sovereign-editorial"] .v2-section-navy p,
[data-theme="sovereign-editorial"] .v2-section-navy li,
[data-theme="sovereign-editorial"] .v2-section-navy td,
[data-theme="sovereign-editorial"] .v2-section-navy span,
[data-theme="sovereign-editorial"] .v2-section-navy div,
[data-theme="sovereign-editorial"] .v2-section-navy blockquote,
[data-theme="sovereign-editorial"] .v2-section-graphite p,
[data-theme="sovereign-editorial"] .v2-section-graphite li,
[data-theme="sovereign-editorial"] .v2-section-graphite td,
[data-theme="sovereign-editorial"] .v2-section-graphite span,
[data-theme="sovereign-editorial"] .v2-section-graphite div,
[data-theme="sovereign-editorial"] .v2-section-graphite blockquote {
  color: var(--text-body, var(--text)) !important;
}
[data-theme="sovereign-editorial"] .v2-section-alt .v2-section-subtitle,
[data-theme="sovereign-editorial"] .v2-section-alt .v2-body,
[data-theme="sovereign-editorial"] .v2-section-alt .v2-small,
[data-theme="sovereign-editorial"] .v2-section-navy .v2-section-subtitle,
[data-theme="sovereign-editorial"] .v2-section-navy .v2-body,
[data-theme="sovereign-editorial"] .v2-section-navy .v2-small,
[data-theme="sovereign-editorial"] .v2-section-graphite .v2-section-subtitle,
[data-theme="sovereign-editorial"] .v2-section-graphite .v2-body,
[data-theme="sovereign-editorial"] .v2-section-graphite .v2-small {
  color: var(--text-body, var(--text)) !important;
}
[data-theme="sovereign-editorial"] .v2-section-alt th,
[data-theme="sovereign-editorial"] .v2-section-navy th,
[data-theme="sovereign-editorial"] .v2-section-graphite th {
  color: var(--text-heading, #0D2044) !important;
  background: rgba(13,32,68,0.06) !important;
}
[data-theme="sovereign-editorial"] .v2-section-alt a,
[data-theme="sovereign-editorial"] .v2-section-navy a,
[data-theme="sovereign-editorial"] .v2-section-graphite a {
  color: var(--gold, #9A7828) !important;
}
[data-theme="sovereign-editorial"] .v2-section-alt .v2-card,
[data-theme="sovereign-editorial"] .v2-section-navy .v2-card,
[data-theme="sovereign-editorial"] .v2-section-graphite .v2-card {
  background: var(--surface, #FFFFFF) !important;
  border-color: var(--line, #C9BFAE) !important;
}
[data-theme="sovereign-editorial"] .v2-section-alt code,
[data-theme="sovereign-editorial"] .v2-section-navy code,
[data-theme="sovereign-editorial"] .v2-section-graphite code {
  color: var(--text-heading, #0D2044) !important;
  background: rgba(13,32,68,0.06) !important;
}

/* ================================================================
   Hero credentials strip (homepage). Sits below the hero stat grid
   on the editorial chassis. Two compact boxes: HIPAA / PHI / PII
   compliance posture + Agentic AI. Body copy is intentionally 50%
   smaller than the canonical .cap-card paragraph (default 15.5px
   -> 12px) so it reads as a CMS-friendly compliance footer, not a
   primary surface. White card on cream page, gold-accented eyebrow.
   ================================================================ */
.hero-credentials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 1.5rem;
  max-width: 1180px;
}
.hero-credential {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, #C9BFAE);
  border-left: 3px solid var(--gold, #9A7828);
  border-radius: 6px;
  padding: 12px 14px;
}
.hero-credential-eyebrow {
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold, #9A7828);
  margin-bottom: 5px;
}
.hero-credential-title {
  font-family: var(--font-display, 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-heading, #0D2044);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.hero-credential-body {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-body, var(--text));
  margin: 0;
}
.hero-credential-body a {
  color: var(--gold, #9A7828);
  text-decoration: none;
  border-bottom: 1px solid var(--gold, #9A7828);
}
.hero-credential-body a:hover {
  color: var(--text-heading, #0D2044);
  border-bottom-color: var(--text-heading, #0D2044);
}

/* ================================================================
   Canonical nav bar override under sovereign-editorial.

   Many pages ship their own inline <header> / .topnav / .masthead
   markup with custom navy/dark backgrounds. Under the editorial
   theme, those all flatten to the canonical JIL nav: white surface
   + 2px gold rule. WSJ-masthead treatment everywhere.

   Catches: .topnav, .masthead, .site-nav, .site-header, custom
   <header> tags inside <body>, and anything declared as a sticky
   top bar. Force-applies the canonical color so we get a single
   nav identity across all 300+ pages.
   ================================================================ */
[data-theme="sovereign-editorial"] header.topnav,
[data-theme="sovereign-editorial"] .topnav,
[data-theme="sovereign-editorial"] .masthead,
[data-theme="sovereign-editorial"] .site-header,
[data-theme="sovereign-editorial"] .site-nav,
[data-theme="sovereign-editorial"] .page-header,
[data-theme="sovereign-editorial"] .nav-bar,
[data-theme="sovereign-editorial"] .navbar,
[data-theme="sovereign-editorial"] body > header[class*="nav"],
[data-theme="sovereign-editorial"] body > header[class*="header"] {
  background: #FFFFFF !important;
  color: var(--text-heading, #0D2044) !important;
  border-bottom: 2px solid var(--gold, #9A7828) !important;
  border-top: none !important;
  box-shadow: none !important;
}
[data-theme="sovereign-editorial"] header.topnav a,
[data-theme="sovereign-editorial"] .topnav a,
[data-theme="sovereign-editorial"] .masthead a,
[data-theme="sovereign-editorial"] .site-header a,
[data-theme="sovereign-editorial"] .site-nav a,
[data-theme="sovereign-editorial"] .page-header a,
[data-theme="sovereign-editorial"] .nav-bar a,
[data-theme="sovereign-editorial"] .navbar a {
  color: var(--text-heading, #0D2044) !important;
}
[data-theme="sovereign-editorial"] header.topnav a:hover,
[data-theme="sovereign-editorial"] .topnav a:hover,
[data-theme="sovereign-editorial"] .masthead a:hover,
[data-theme="sovereign-editorial"] .site-header a:hover,
[data-theme="sovereign-editorial"] .site-nav a:hover,
[data-theme="sovereign-editorial"] .page-header a:hover,
[data-theme="sovereign-editorial"] .nav-bar a:hover,
[data-theme="sovereign-editorial"] .navbar a:hover {
  color: var(--gold, #9A7828) !important;
}

/* Force-light any remaining classification banners that some pages
   ship as standalone <div class="classification"> ribbons (GTM batch 1
   originals). These were originally navy strips with gold text. */
[data-theme="sovereign-editorial"] .classification {
  background: var(--bg-muted, #EBE4D6) !important;
  color: var(--text-heading, #0D2044) !important;
  border-top: 1px solid var(--gold, #9A7828) !important;
  border-bottom: 1px solid var(--gold, #9A7828) !important;
}

/* Universal editorial breadcrumb for /docs/* pages.
   Placed directly above the first <h1>. Uses existing JIL Standard
   tokens (no new colors). Idempotent stamp script: /tmp/stamp_breadcrumbs.py */
.doc-breadcrumb {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border, rgba(13, 32, 68, 0.12));
}
.doc-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.doc-breadcrumb li {
  display: inline-flex;
  align-items: center;
  color: var(--text-body, var(--text));
}
.doc-breadcrumb li + li::before {
  content: '/';
  color: var(--muted, var(--text-body));
  margin-right: 8px;
  opacity: 0.55;
}
.doc-breadcrumb a {
  color: var(--text-body, var(--text));
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.doc-breadcrumb a:hover {
  color: var(--gold, #9A7828);
  border-bottom-color: currentColor;
}
.doc-breadcrumb [aria-current="page"] {
  color: var(--gold, #9A7828);
  font-weight: 600;
}

/* ================================================================
   Internal staff pages (Internal_Pricing, Internal_Subscriptions,
   Internal_Compliance, Internal_*). The default `var(--muted)` body
   text reads as a low-contrast gray on these dense data tables, and
   the founder needs to scan dollar figures + vendor rows quickly.
   On internal pages, body text and meta labels promote to navy ink
   (var(--text)) so every row reads as black-equivalent on cream.
   ================================================================ */
.internal-page,
body.internal-page {
  color: var(--text, #0D2044);
}
.internal-page p,
.internal-page td,
.internal-page th,
.internal-page li,
.internal-page .stat-label,
.internal-page .stat-value,
.internal-page .tt-label,
.internal-page .tt-value,
.internal-page .lead,
.internal-page .tier-filter-label,
.internal-page .tier-filter-count,
.internal-page h2 .count {
  color: var(--text, #0D2044);
}

/* When the page hasn't opted into .internal-page yet, still force any
   element that the page locally aliases as `var(--muted)` body copy
   to render as navy ink on the canonical .tw / table surface. */
.internal-page table.tw td,
.internal-page table.tw th {
  color: var(--text, #0D2044);
}

/* ================================================================
   CONTRAST GUARDRAIL (canonical, applies everywhere via .internal-page
   plus the doc-standard surface). The rule: text rendered DIRECTLY on
   the cream/white surface (no colored background of its own) MUST be
   navy ink. Accent colors (bronze, amber, crimson) are reserved for
   text inside a pill/badge that carries its own colored background.

   This catches:
   - mid-tone bronze text (#b89139) sitting on white / cream
   - mid-tone slate-gray text (#4a5060, #7a8090) sitting on white
   - amber/bronze (#6b5018) used outside its intended pill context
   - any "color: <light hex>" inline override on a non-pill element

   The guardrail uses :not() to carve out pill / stat-value / lead
   contexts so the semantic traffic-lights keep working.
   ================================================================ */
.internal-page :not(.pill):not(.pill *):not(.tt-value):not(.stat-value):not(.cost-cell):not(.cost-free):not(.cost-paid-low):not(.cost-paid-high):not([class*="-pill"]):not([class*="-badge"]):not([class~="green"]):not([class~="amber"]):not([class~="red"]):not(svg):not(svg *) {
  /* If the element doesn't have a deliberate accent class, body text
     is locked to navy. Inline color: overrides on plain text are
     defeated by !important since the user has explicitly flagged
     low-contrast as a recurring problem. */
}

.internal-page,
.internal-page h1,
.internal-page h2,
.internal-page h3,
.internal-page h4,
.internal-page h5,
.internal-page h6,
.internal-page p,
.internal-page p *,
.internal-page td,
.internal-page td *,
.internal-page th,
.internal-page th *,
.internal-page li,
.internal-page li *,
.internal-page span:not(.pill):not(.tt-value):not(.stat-value):not(.lead):not(.cost-cell):not(.cost-free):not(.cost-paid-low):not(.cost-paid-high):not([class*="pill"]):not([class*="badge"]),
.internal-page div:not(.pill):not(.tt-value):not(.stat-value):not(.tier-totals):not(.tier-filter) > span:not(.pill):not(.tt-value):not(.stat-value),
.internal-page strong,
.internal-page em,
.internal-page label,
.internal-page a:not(.btn-primary):not(.btn-outline):not(.btn-gold):not(.btn-secondary):not(.pill) {
  color: #0D2044 !important;
}

/* Restore the semantic color classes - these have pill backgrounds or
   are explicitly traffic-light data marks where the color carries
   meaning. Keep them legible by using darker variants of the
   "warning" tones that read poorly on white. */
.internal-page .pill { color: inherit !important; }
.internal-page .pill.must,  .internal-page .pill.t3   { color: #7a1f1f !important; background: rgba(199,93,93,0.18); }
.internal-page .pill.high,  .internal-page .pill.t2   { color: #4d3a10 !important; background: rgba(184,145,58,0.20); }
.internal-page .pill.med                             { color: #0d3a72 !important; background: rgba(31,114,196,0.16); }
.internal-page .pill.low,   .internal-page .pill.tall { color: #2c3340 !important; background: rgba(122,128,144,0.20); }
.internal-page .pill.live                            { color: #15441c !important; background: rgba(46,125,50,0.18); }
.internal-page .pill.ave,   .internal-page .pill.t1  { color: #2c1747 !important; background: rgba(123,67,151,0.16); }

/* tt-values + stat-values: semantic data marks rendered on a faint
   cream-tinted .tier-totals card. The default (no class) is navy.
   Green/amber/red traffic lights stay but use darker hues. */
.internal-page .tt-value,
.internal-page .stat-value { color: var(--text, #0D2044) !important; }
.internal-page .tt-value.green, .internal-page .stat-value.green { color: #15441c !important; }
.internal-page .tt-value.amber, .internal-page .stat-value.amber { color: #4d3a10 !important; }
.internal-page .tt-value.red,   .internal-page .stat-value.red   { color: #7a1f1f !important; }

/* Lead-time and cost-cell traffic-light text: these render on white,
   so they MUST be at AA contrast minimum. Replace the mid-bronze
   #b89139 (which fails AA on white at body sizes) with the darker
   amber-brown that mirrors the pill .high color. */
.internal-page .lead.instant,
.internal-page .cost-free        { color: #15441c !important; }
.internal-page .lead.short,
.internal-page .cost-paid-low    { color: #4d3a10 !important; }
.internal-page .lead.long,
.internal-page .cost-paid-high   { color: #7a1f1f !important; }

/* ====================================================================
   THEME LOCK — canonical-lock 2026-05-10
   Forces canonical sovereign-light typography + palette on every page
   that sets `data-theme="sovereign-light"` on <html>, regardless of
   bespoke inline <style> blocks. Required because ~40 pages have
   heavy inline CSS that would otherwise drift from canonical.
   The high-specificity `html[data-theme=...]` selectors + !important
   are intentional: they win the cascade vs page-level overrides.
   ==================================================================== */

html[data-theme="sovereign-light"],
html[data-theme="sovereign-light"] body {
  background-color: var(--bg-page, #F7FAFC) !important;
  color: var(--text-primary, #0F172A) !important;
  font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-theme="sovereign-light"] h1,
html[data-theme="sovereign-light"] h2,
html[data-theme="sovereign-light"] h3,
html[data-theme="sovereign-light"] h4,
html[data-theme="sovereign-light"] h5,
html[data-theme="sovereign-light"] h6 {
  font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
  color: var(--navy-primary, #102A43) !important;
}

html[data-theme="sovereign-light"] code,
html[data-theme="sovereign-light"] pre,
html[data-theme="sovereign-light"] kbd,
html[data-theme="sovereign-light"] samp,
html[data-theme="sovereign-light"] .mono {
  font-family: 'IBM Plex Mono', 'DM Mono', ui-monospace, 'SF Mono', monospace !important;
}

/* ====================================================================
   DARK-SURFACE READABILITY GUARD (permanent rule)
   The canonical brand cascade above forces every heading and body
   element to dark navy ink with !important. That intentionally
   normalizes typography sitewide but breaks any element living inside
   a known dark-background container (cta-bar, hero-card,
   v2-section-navy, etc.): navy ink on navy bg renders invisible.
   These rules carry !important to override the brand cascade and
   keep text readable on dark surfaces. To extend the guard to a new
   dark-surface class, add it to the :is() list and you're done -
   the heading and body overrides cover h1-h6, p, li, dt, dd, strong,
   em, span, a uniformly.
   Surfaced from /products/um-attestation cta-bar "Four no-fee working
   sessions to start" rendering navy-on-navy 2026-05-11.
   ==================================================================== */
html[data-theme="sovereign-light"] :is(
  .cta-bar,
  .hero-card,
  .v2-section-navy,
  .editorial-statusbar,
  .editorial-comp-block.dark,
  .surface-dark,
  .surface-navy,
  [data-surface="dark"]
) {
  color: #F8FAFC !important;
}
html[data-theme="sovereign-light"] :is(
  .cta-bar,
  .hero-card,
  .v2-section-navy,
  .editorial-statusbar,
  .editorial-comp-block.dark,
  .surface-dark,
  .surface-navy,
  [data-surface="dark"]
) :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, strong, em, span, a) {
  color: #F8FAFC !important;
}

/* Preserve gold accents inside dark surfaces. The blanket white-on-dark
 * rule above is correct for body copy; this targets the deliberate gold
 * accent class + inline gold em-emphasis the design system uses for
 * headline pull-quotes. Without this, every <em style="color:#C9A227"> in
 * a dark-section heading gets force-painted white. */
:where(
  [data-surface="dark"],
  .surface-dark,
  .surface-navy,
  .v2-section-navy,
  .cta-bar,
  .hero-card
) :is(em[style*="C9A227"], em[style*="c9a227"], .text-gold, .jil-accent-gold) {
  color: #C9A227 !important;
}

/* Canonical link accent: gold, no underline by default, underline on hover */
html[data-theme="sovereign-light"] a:not(.btn):not(.jil-btn):not([class*="button"]):not(.jil-nav__link):not(.jil-nav__dropdown-link):not(.jil-nav__mobile-link):not(.jil-nav__mobile-sub-link) {
  color: var(--gold-primary, #C9A227);
  text-decoration: none;
}
html[data-theme="sovereign-light"] a:not(.btn):not(.jil-btn):not([class*="button"]):not(.jil-nav__link):not(.jil-nav__dropdown-link):not(.jil-nav__mobile-link):not(.jil-nav__mobile-sub-link):hover {
  text-decoration: underline;
}
