/* ==========================================================================
   PEPIndex public site — shared stylesheet
   --------------------------------------------------------------------------
   One stylesheet for every static page under dashboard/public/. Before
   2026-09-28 each page carried its own inline <style>: five pages had the
   newer DM Sans / Instrument Serif system, nine an older plain template with
   browser-default link colors. Styles live HERE now; a page may still set
   its accent with  <html style="--accent-rgb:R,G,B">.

   Sections: tokens · base · nav · photo hero · content · components ·
   charts & diagrams · footer · responsive · motion.
   ========================================================================== */

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --accent-rgb: 76, 184, 224;
  --accent: rgb(var(--accent-rgb));
  --bg: #08090c;
  --surface: #0f1118;
  --surface-2: #131622;
  --border: #1e2130;
  --border-soft: #141620;
  --text: #c8d0e0;
  --text-strong: #ffffff;
  --text-mid: #9aa7b2;
  --text-dim: #7888a0;
  --grid: #1c2030;
  --axis: #2a3042;
  --radius: 14px;
  --maxw: 980px;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Chart series — validated (dataviz six checks) against --surface.
     Colour follows the ENTITY on every page, never its rank. */
  --c-domestic: #3987e5;
  --c-trade: #d95926;
  --c-foreign: #199e70;
  --c-rhetorical: #c98500;
  --c-judicial: #d55181;
  --c-composite: #4cb8e0;
  color-scheme: dark;
}

/* ── base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); line-height: 1.7; font-size: 16px;
  overflow-x: hidden; position: relative;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 1000px 700px at 50% 20%, black 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 1000px 700px at 50% 20%, black 0%, transparent 72%);
}
.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 8px 24px 84px; }
img { max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:visited { color: var(--accent); }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
p { margin: 0 0 16px; color: var(--text-mid); }
strong, b { color: var(--text); }
ul, ol { padding-left: 22px; margin: 0 0 18px; color: var(--text-mid); }
li { margin-bottom: 7px; }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 40px 0; }

h1 {
  font-family: var(--font-serif); font-weight: 400; font-size: 3.3rem; line-height: 1.05;
  letter-spacing: -1px; margin: 0 0 16px; color: var(--text-strong);
  background: linear-gradient(100deg, #fff 40%, rgba(var(--accent-rgb),1) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
h2 {
  font-family: var(--font-serif); font-weight: 400; font-size: 1.7rem; line-height: 1.2;
  color: var(--text-strong); margin: 56px 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft); position: relative;
}
h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 52px; height: 1px; background: var(--accent); }
h3 { font-size: 1.02rem; font-weight: 700; color: var(--text-strong); margin: 30px 0 10px; }
h4 { font-size: .9rem; font-weight: 700; color: var(--accent); margin: 22px 0 8px; letter-spacing: .02em; }

code {
  font-family: var(--font-mono); font-size: .85em; background: var(--surface);
  color: var(--accent); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border-soft);
  overflow-wrap: anywhere;
}
pre {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; overflow-x: auto; margin: 16px 0 26px; line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; font-size: .84rem; color: #d7dde8; overflow-wrap: normal; }

/* tables: bare tables are styled; .table-wrap adds horizontal scroll on small screens */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin: 16px 0 28px; -webkit-overflow-scrolling: touch; }
.table-wrap > table { margin: 0; border: 0; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; margin: 16px 0 26px; }
caption { caption-side: top; text-align: left; color: var(--text-dim); font-size: .8rem; padding: 0 0 8px; }
thead th {
  background: rgba(var(--accent-rgb), .08); color: var(--accent); text-align: left;
  padding: 11px 16px; font-weight: 700; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: top; color: var(--text-mid); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,.018); }
tbody td strong { color: var(--text); }

/* ── nav ────────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: rgba(8,9,12,0.72); border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-nav-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; }
.site-nav .brand {
  font-weight: 800; color: #fff; font-size: .95rem; letter-spacing: .2px; text-decoration: none;
  display: flex; align-items: center; gap: 9px; white-space: nowrap;
}
.site-nav .brand::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), .85);
}
.site-nav .links { display: flex; gap: 22px; flex: 1; min-width: 0; }
.site-nav .links a { color: var(--text-dim); font-size: .84rem; white-space: nowrap; transition: color .15s; }
.site-nav .links a:hover { color: #fff; text-decoration: none; }
.site-nav .links a.active { color: #fff; }
.site-nav .links a.active::after { content: ""; display: block; height: 2px; margin-top: 3px; border-radius: 2px; background: var(--accent); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  background: rgba(var(--accent-rgb), .14); color: #fff !important; font-size: .8rem; font-weight: 700;
  border: 1px solid rgba(var(--accent-rgb), .35); white-space: nowrap; transition: background .2s, border-color .2s;
}
.nav-cta:hover { background: rgba(var(--accent-rgb), .24); border-color: rgba(var(--accent-rgb), .6); text-decoration: none; }

/* ── photo hero ─────────────────────────────────────────────────────────── */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(400px, 58vh, 580px); display: flex; align-items: flex-end;
  border-bottom: 1px solid var(--border-soft); margin-bottom: 8px;
}
.page-hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3;
  animation: heroDrift 24s ease-out both;
}
.page-hero::before {  /* legibility scrim: strong on the text side, fading to the photo */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(8,9,12,.95) 0%, rgba(8,9,12,.82) 34%, rgba(8,9,12,.42) 68%, rgba(8,9,12,.5) 100%),
    linear-gradient(180deg, rgba(8,9,12,.35) 0%, rgba(8,9,12,0) 30%, rgba(8,9,12,.7) 82%, var(--bg) 100%);
}
.page-hero::after {  /* accent wash so each page's photo sits in the brand palette */
  content: ""; position: absolute; inset: 0; z-index: -1; mix-blend-mode: soft-light;
  background: radial-gradient(900px 520px at 12% 90%, rgba(var(--accent-rgb), .45), transparent 65%);
}
.page-hero--plain { min-height: 0; }
.page-hero--plain::before {
  background:
    radial-gradient(760px 420px at 10% 0%, rgba(var(--accent-rgb), .16), transparent 62%),
    radial-gradient(620px 480px at 100% 0%, rgba(76,184,224,.06), transparent 60%);
}
.page-hero--plain::after { display: none; }
.page-hero-inner { position: relative; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 132px 24px 52px; }
.page-hero--plain .page-hero-inner { padding: 64px 24px 30px; }
.page-hero-inner > * { max-width: 700px; animation: fadeUp .7s cubic-bezier(.16,1,.3,1) both; }
.page-hero-inner > .stat-strip, .page-hero-inner > .hero-actions { max-width: none; }
.page-hero-inner > *:nth-child(2) { animation-delay: .05s; }
.page-hero-inner > *:nth-child(3) { animation-delay: .1s; }
.page-hero-inner > *:nth-child(4) { animation-delay: .15s; }
.page-hero-inner > *:nth-child(5) { animation-delay: .2s; }
.page-hero .subtitle { color: #c3ccd8; font-size: 1.12rem; line-height: 1.6; margin: 0 0 26px; }
.page-hero .version { margin-top: -12px; }
.photo-credit {
  position: absolute; right: 16px; bottom: 12px; z-index: 1; margin: 0;
  font-size: .68rem; color: rgba(255,255,255,.5); letter-spacing: .01em;
}
.photo-credit a { color: rgba(255,255,255,.72); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.breadcrumb { font-size: .78rem; color: var(--text-dim); margin: 0 0 18px; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--accent);
  padding: 6px 12px; border-radius: 30px; background: rgba(var(--accent-rgb), .12);
  border: 1px solid rgba(var(--accent-rgb), .3); margin: 0 0 18px;
}
.subtitle { color: var(--text-mid); font-size: 1.06rem; margin: 0 0 30px; max-width: 640px; }
.version { font-family: var(--font-mono); font-size: .74rem; color: var(--text-dim); margin: 0 0 28px; }

/* ── content components ─────────────────────────────────────────────────── */
.callout {
  display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .09), rgba(var(--accent-rgb), .02));
  border: 1px solid rgba(var(--accent-rgb), .24); border-radius: var(--radius);
  padding: 18px 20px; margin: 24px 0; font-size: .93rem; color: var(--text-mid);
}
.callout > :not(.ic) { flex: 1 1 280px; min-width: 0; }
.callout:not(:has(> .ic)) { display: block; }
.callout .ic {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--accent-rgb), .18);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.callout p { margin: 0 0 10px; }
.callout p:last-child { margin-bottom: 0; }
.callout table { margin: 12px 0 4px; }

.stat-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.stat-chip {
  display: flex; align-items: baseline; gap: 7px; padding: 10px 15px; border-radius: 10px;
  background: rgba(15,17,24,.72); border: 1px solid var(--border); backdrop-filter: blur(6px);
}
.stat-chip b { color: #fff; font-family: var(--font-mono); font-size: .95rem; }
.stat-chip span { color: var(--text-dim); font-size: .76rem; }

.field-list { list-style: none; margin: 14px 0 18px; padding: 0; }
.field-list li { position: relative; padding-left: 22px; margin-bottom: 10px; font-size: .93rem; color: var(--text-mid); }
.field-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

.steps { list-style: none; margin: 16px 0 28px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 14px; padding: 15px 17px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; margin: 0; }
.steps .n {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; background: rgba(var(--accent-rgb), .15); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; font-family: var(--font-mono);
}
.steps p { margin: 0; color: var(--text-mid); font-size: .9rem; }

.endpoints { display: flex; flex-direction: column; gap: 9px; margin: 16px 0 28px; }
.endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 13px 16px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px; }
.endpoint code { background: none; border: 0; padding: 0; font-size: .83rem; color: #e0e4e8; }
.endpoint .desc { flex-basis: 100%; color: var(--text-dim); font-size: .8rem; margin-top: 1px; }
.method, .endpoint .method {
  display: inline-block; font-family: var(--font-mono); font-size: .68rem; font-weight: 700; padding: 3px 8px;
  border-radius: 5px; background: rgba(76,184,224,.15); color: #4cb8e0; letter-spacing: .04em;
}
.method.post, .endpoint .method.post { background: rgba(90,170,109,.15); color: #5aaa6d; }
/* tier chips — .endpoint .tier (use-case pages) and .tier-badge (API page) */
.endpoint .tier, .tier-badge {
  display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .05em; padding: 3px 9px;
  border-radius: 20px; white-space: nowrap; text-transform: uppercase;
}
.endpoint .tier { margin-left: auto; }
.endpoint .tier.free, .tier-badge.free { background: rgba(90,170,109,.15); color: #5aaa6d; }
.endpoint .tier.standard, .tier-badge.standard { background: rgba(76,184,224,.15); color: #4cb8e0; }
.endpoint .tier.premium, .tier-badge.premium { background: rgba(232,145,58,.15); color: #e8913a; }

.pill { display: inline-block; white-space: nowrap; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: var(--surface-2); color: var(--text-mid); border: 1px solid var(--border); }
.pill.ok { background: rgba(12,163,12,.12); color: #43c143; border-color: rgba(12,163,12,.3); }
.pill.bad { background: rgba(208,59,59,.12); color: #ea6a6a; border-color: rgba(208,59,59,.3); }
.pill.unmon, .pill.context { background: rgba(250,178,25,.1); color: #f0bb4a; border-color: rgba(250,178,25,.28); }
.pill.score { background: rgba(var(--accent-rgb), .12); color: var(--accent); border-color: rgba(var(--accent-rgb), .3); }
.meta { color: var(--text-dim); font-size: .82rem; }

.provenance-badge, .weight-badge {
  display: inline-block; font-family: var(--font-mono); font-size: .7rem; font-weight: 700; padding: 2px 8px;
  border-radius: 5px; background: rgba(var(--accent-rgb), .12); color: var(--accent); margin-right: 6px;
}
.ver { font-family: var(--font-mono); font-size: .78em; color: var(--accent); background: rgba(var(--accent-rgb), .12); padding: 2px 9px; border-radius: 6px; margin-right: 6px; vertical-align: 3px; }
.date { font-family: var(--font-sans); font-size: .62em; color: var(--text-dim); margin-right: 4px; vertical-align: 3px; }
.null-y { color: #f0bb4a; font-weight: 600; }
.null-n { color: var(--text-dim); }

.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin: 24px 0 8px; columns: 2 240px; column-gap: 28px;
}
.toc a { display: block; color: var(--text-mid); font-size: .86rem; padding: 3px 0; break-inside: avoid; }
.toc a:hover { color: var(--accent); }

ol.terms { counter-reset: term; list-style: none; padding-left: 0; }
ol.terms > li { counter-increment: term; position: relative; padding: 16px 18px 16px 58px; margin: 0 0 10px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; }
ol.terms > li::before { content: counter(term); position: absolute; left: 18px; top: 16px; width: 26px; height: 26px; border-radius: 8px; background: rgba(var(--accent-rgb), .15); color: var(--accent); font: 700 .75rem/26px var(--font-mono); text-align: center; }
ol.terms > li strong { color: #fff; }

/* pricing plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 12px 0 36px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; padding: 26px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.008));
  border: 1px solid var(--border); border-radius: 16px;
}
.plan h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: 1.5rem; }
.plan h2::after { display: none; }
.plan ul { list-style: none; padding: 0; margin: 12px 0 22px; flex: 1; }
.plan li { position: relative; padding-left: 20px; font-size: .9rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.plan.featured { border-color: rgba(var(--accent-rgb), .55); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .2) inset, 0 20px 50px rgba(0,0,0,.4); }
.price { font-family: var(--font-mono); font-size: 2rem; color: #fff; font-weight: 700; line-height: 1.2; margin: 4px 0 2px; }
.price small { font-size: .8rem; color: var(--text-dim); font-weight: 400; }

/* buttons & CTA blocks */
.cta, a.cta {
  position: relative; display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #08090c;
  font-weight: 700; padding: 12px 24px; border-radius: 9px; font-size: .9rem; border: 0; cursor: pointer;
  box-shadow: 0 8px 26px rgba(var(--accent-rgb), .3); transition: transform .2s, box-shadow .2s;
}
.cta:visited { color: #08090c; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(var(--accent-rgb), .42); text-decoration: none; }
.cta.secondary, .cta-ghost, a.cta-ghost {
  display: inline-flex; align-items: center; gap: 8px; background: transparent; color: #fff; font-weight: 700;
  padding: 12px 24px; border-radius: 9px; font-size: .9rem; border: 1px solid rgba(255,255,255,.24); box-shadow: none;
  transition: border-color .2s, background .2s, transform .2s;
}
.cta.secondary:visited, .cta-ghost:visited { color: #fff; }
.cta.secondary:hover, .cta-ghost:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.05); transform: translateY(-2px); text-decoration: none; }
.cta-row { position: relative; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }
.cta-secondary { position: relative; display: inline-flex; align-items: center; gap: 5px; color: var(--text-dim); font-size: .87rem; margin-top: 18px; }
.cta-secondary:hover { color: #fff; }
.cta-block {
  position: relative; overflow: hidden; background: linear-gradient(155deg, rgba(var(--accent-rgb), .11), var(--surface) 62%);
  border: 1px solid rgba(var(--accent-rgb), .28); border-radius: 18px; padding: 38px 32px; margin: 56px 0 8px; text-align: center;
}
.cta-block::before { content: ""; position: absolute; top: -40%; right: -8%; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .25), transparent 70%); filter: blur(6px); }
.cta-block h3 { position: relative; color: #fff; margin: 0 0 10px; font-size: 1.5rem; font-family: var(--font-serif); font-weight: 400; }
.cta-block p { position: relative; color: var(--text-dim); margin: 0 0 22px; }

.live-band {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 30px 0 8px;
  padding: 18px 22px; border-radius: var(--radius); text-decoration: none;
  background: linear-gradient(120deg, rgba(76,184,224,.10), rgba(76,184,224,.02));
  border: 1px solid rgba(76,184,224,.26); transition: border-color .2s, transform .2s, box-shadow .2s;
}
.live-band:hover { border-color: rgba(76,184,224,.55); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.4); text-decoration: none; }
.live-band .pulse { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: #4cb8e0; animation: livePulse 2.4s ease-out infinite; }
.live-band .lb-text { flex: 1; min-width: 210px; }
.live-band .lb-text b { display: block; color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.live-band .lb-text span { color: var(--text-dim); font-size: .84rem; }
.live-band .lb-go { color: #4cb8e0; font-weight: 700; font-size: .86rem; white-space: nowrap; }

.foot-note { margin-top: 8px; padding: 20px 22px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); font-size: .9rem; }
h2.divider { margin: 40px 0 16px; }

/* ── use-case hub: photo cards ──────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 8px 0 44px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(var(--card-rgb), .55); box-shadow: 0 22px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(var(--card-rgb), .18) inset; text-decoration: none; }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0c0e14; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.16,1,.3,1); filter: saturate(.9); }
.card:hover .card-media img { transform: scale(1.06); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,12,0) 35%, rgba(15,17,24,.96) 100%), linear-gradient(0deg, rgba(var(--card-rgb), .22), transparent 60%); }
.card-media .tag {
  position: absolute; left: 16px; bottom: 14px; z-index: 1; font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: #fff; padding: 5px 11px; border-radius: 30px; background: rgba(var(--card-rgb), .85);
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card h2 { font-family: var(--font-sans); color: #fff; font-size: 1.12rem; margin: 0 0 6px; border: none; padding: 0; font-weight: 700; }
.card h2::after { display: none; }
.card .who { color: rgb(var(--card-rgb)); font-size: .78rem; font-weight: 700; margin: 0 0 10px; }
.card p { color: var(--text-mid); font-size: .88rem; margin: 0 0 16px; flex: 1; }
.card .go { font-size: .8rem; font-weight: 700; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.card:hover .go { color: #fff; }
.card .go svg { transition: transform .25s; }
.card:hover .go svg { transform: translateX(3px); }

/* alternating editorial rows (use-case hub "how teams use it") */
.feature-rows { display: flex; flex-direction: column; gap: 22px; margin: 18px 0 40px; }
.feature-row { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); }
.feature-row:nth-child(even) .feature-media { order: 2; }
.feature-media { position: relative; min-height: 260px; }
.feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,17,24,0) 55%, rgba(15,17,24,.9) 100%); }
.feature-row:nth-child(even) .feature-media::after { background: linear-gradient(270deg, rgba(15,17,24,0) 55%, rgba(15,17,24,.9) 100%); }
.feature-copy { padding: 30px 30px 26px; display: flex; flex-direction: column; justify-content: center; }
.feature-copy .kicker { align-self: flex-start; }
.feature-copy h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.6rem; margin: 0 0 10px; }
.feature-copy p { font-size: .92rem; }
.photo-credit-inline { font-size: .66rem; color: var(--text-dim); margin: 6px 0 0; }
.photo-credit-inline a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }

/* ── charts & diagrams ──────────────────────────────────────────────────── */
.viz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 20px 0 30px; align-items: start; }
.viz-grid > .viz { margin: 0; }
.viz {
  position: relative; margin: 22px 0 30px; padding: 20px 20px 16px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008)), var(--surface);
  border: 1px solid var(--border);
}
.viz-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 0 0 12px; }
.viz-title { font-size: .98rem; font-weight: 700; color: #fff; margin: 0; }
.viz-sub { font-size: .8rem; color: var(--text-dim); margin: 2px 0 0; }
.viz-headline { font-size: 1.9rem; font-weight: 700; color: #fff; line-height: 1; }
.viz-headline small { font-size: .8rem; font-weight: 500; color: var(--text-dim); margin-left: 6px; }
.viz-body { position: relative; min-height: 120px; }
.viz-body svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-body svg text { font-family: var(--font-sans); }
.viz[data-state="loading"] .viz-body { opacity: .45; }
.viz-empty { color: var(--text-dim); font-size: .85rem; padding: 28px 0; text-align: center; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: .78rem; color: var(--text-mid); }
.viz-legend li { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.viz-legend .key { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.viz-legend .key.sw { width: 10px; height: 10px; border-radius: 3px; }
.viz-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 10px; font-size: .74rem; color: var(--text-dim); }
.viz-table { margin-top: 8px; font-size: .8rem; }
.viz-table summary { cursor: pointer; color: var(--text-dim); font-size: .76rem; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.viz-table summary::-webkit-details-marker { display: none; }
.viz-table summary::before { content: "▸"; transition: transform .2s; display: inline-block; }
.viz-table[open] summary::before { transform: rotate(90deg); }
.viz-table summary:hover { color: #fff; }
.viz-table .table-wrap { margin: 10px 0 0; max-height: 280px; overflow-y: auto; }
.viz-table table { font-size: .78rem; }
.viz-table td, .viz-table th { padding: 7px 12px; font-variant-numeric: tabular-nums; }
.viz-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 120px; padding: 9px 11px; border-radius: 10px;
  background: rgba(19,22,34,.96); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 12px 30px rgba(0,0,0,.5);
  font-size: .76rem; color: var(--text-mid); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.viz-tip.on { opacity: 1; transform: translateY(0); }
.viz-tip .t-head { color: var(--text-dim); font-size: .7rem; margin-bottom: 4px; }
.viz-tip .t-row { display: flex; align-items: center; gap: 8px; line-height: 1.5; }
.viz-tip .t-row .k { width: 12px; height: 2px; border-radius: 2px; flex-shrink: 0; }
.viz-tip .t-row .k.sw { width: 8px; height: 8px; border-radius: 2px; }
.viz-tip .t-row b { color: #fff; font-weight: 700; min-width: 34px; }
.viz .hit { cursor: crosshair; }
.viz .bar-hit:hover + .bar, .viz .bar-hit:focus + .bar { filter: brightness(1.25); }

/* KPI row */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0 26px; }
.kpi { padding: 16px 16px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--kpi-c, var(--accent)); opacity: .9; }
.kpi .k-label { font-size: .72rem; color: var(--text-dim); letter-spacing: .02em; }
.kpi .k-value { font-size: 1.75rem; font-weight: 700; color: #fff; line-height: 1.15; margin: 4px 0 2px; }
.kpi .k-sub { font-size: .74rem; color: var(--text-dim); }
.kpi .k-delta.up { color: #e6806b; }
.kpi .k-delta.down { color: #43c143; }
.kpi svg { display: block; width: 100%; height: 26px; margin-top: 6px; }

/* flow diagram (lifecycle, pipeline) — HTML, so it reflows and reads without JS */
.flow { list-style: none; margin: 22px 0 30px; padding: 0; display: grid; grid-template-columns: repeat(var(--flow-n, 5), minmax(0, 1fr)); gap: 0; counter-reset: flow; }
.flow > li { position: relative; margin: 0; padding: 0 10px; text-align: left; counter-increment: flow; }
.flow > li::before {  /* connector */
  content: ""; position: absolute; top: 19px; left: 50px; right: -10px; height: 2px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .7), rgba(var(--accent-rgb), .15));
}
.flow > li:last-child::before { display: none; }
.flow .node {
  position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid rgba(var(--accent-rgb), .45); color: var(--accent);
  font: 700 .8rem/1 var(--font-mono); box-shadow: 0 0 0 5px var(--bg), 0 0 22px rgba(var(--accent-rgb), .18);
}
.flow .node::after { content: counter(flow, decimal-leading-zero); }
.flow h4 { color: #fff; font-size: .92rem; margin: 14px 0 4px; letter-spacing: 0; }
.flow p { font-size: .82rem; margin: 0 0 8px; color: var(--text-mid); line-height: 1.55; }
.flow .state { display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; background: rgba(var(--accent-rgb), .12); color: var(--accent); }
.flow .state.done { background: rgba(12,163,12,.12); color: #43c143; }
.flow-card { padding: 24px 18px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin: 22px 0 30px; }
.flow-card .flow { margin: 0 0 12px; }
.flow-card .viz-head { padding: 0 10px; }

/* ── footer (shape owned by dashboard/scripts/footer-block.py) ──────────── */
.site-footer { margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--border); }
.site-footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; margin-bottom: 32px; }
.site-footer h3 { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 12px; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: #b8c4d4; text-decoration: none; font-size: .82rem; line-height: 1.5; }
.site-footer a:hover { color: #4cb8e0; text-decoration: underline; }
.site-footer-base { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; justify-content: space-between; padding-top: 22px; border-top: 1px solid var(--border-soft); font-size: .74rem; color: #506070; }
.site-footer-base a { font-size: .74rem; color: var(--text-dim); }
.site-footer-meta { font-family: var(--font-mono); font-size: .68rem; color: #3f4c5c; }
/* share row — filled and un-hidden by site/pepi-share.js */
.site-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 28px; }
.site-share[hidden], .site-share [hidden] { display: none; }
.site-share-label { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; margin-right: 6px; }
.site-share a, .site-share button {
  font: inherit; font-size: .78rem; line-height: 1; color: #b8c4d4; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; cursor: pointer; text-decoration: none;
}
.site-share a:hover, .site-share button:hover { color: var(--text-strong); border-color: var(--accent); text-decoration: none; }
.site-share [data-share-native] { color: var(--text-strong); border-color: rgba(var(--accent-rgb), .6); }
/* compact copy under the page title (built by pepi-share.js) — sits on the
   hero photo, so the pills carry their own translucent backing */
.site-share--top { margin: 22px 0 0; gap: 8px; }
.site-share--top a, .site-share--top button {
  font-size: .74rem; padding: 7px 12px; background: rgba(8, 9, 12, .55);
  border-color: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .site-nav-inner { gap: 16px; flex-wrap: wrap; padding: 12px 20px; }
  .site-nav .links { order: 3; flex-basis: 100%; overflow-x: auto; gap: 18px; padding-bottom: 4px; scrollbar-width: none; }
  .site-nav .links::-webkit-scrollbar { display: none; }
  .nav-cta { margin-left: auto; }
  .cards { grid-template-columns: 1fr; }
  .card-media { aspect-ratio: 21 / 9; }
  .plans { grid-template-columns: 1fr; }
  .viz-grid { grid-template-columns: 1fr; }
  .feature-row, .feature-row:nth-child(even) { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .feature-media { order: 0; }
  .feature-media { min-height: 200px; }
  .feature-media::after, .feature-row:nth-child(even) .feature-media::after { background: linear-gradient(180deg, rgba(15,17,24,0) 50%, rgba(15,17,24,.9) 100%); }
}
@media (max-width: 720px) {
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow > li { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 0 0 18px; }
  .flow > li::before { top: 40px; bottom: 0; left: 19px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, rgba(var(--accent-rgb), .6), rgba(var(--accent-rgb), .12)); }
  .flow .node { grid-row: 1 / span 3; }
  .flow h4 { margin-top: 8px; }
  .flow .state { justify-self: start; }
  .site-footer-cols { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .site-footer-base { flex-direction: column; gap: 10px; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  h1 { font-size: 2.35rem; letter-spacing: -.5px; }
  h2 { font-size: 1.45rem; margin-top: 44px; }
  .page-hero { min-height: 440px; }
  .page-hero::before {
    background:
      linear-gradient(180deg, rgba(8,9,12,.55) 0%, rgba(8,9,12,.72) 40%, rgba(8,9,12,.92) 78%, var(--bg) 100%);
  }
  .page-hero-inner { padding: 110px 20px 40px; }
  .page-hero--plain .page-hero-inner { padding: 44px 20px 22px; }
  .page-hero .subtitle { font-size: 1rem; }
  .wrap { padding: 4px 20px 72px; }
  .viz { padding: 16px 14px 12px; }
  .kpi .k-value { font-size: 1.45rem; }
  .cta-block { padding: 30px 20px; }
  .photo-credit { right: 12px; bottom: 8px; }
  thead th, tbody td { padding: 9px 12px; }
}

/* ── motion ─────────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes heroDrift { from { transform: scale(1.08); } to { transform: scale(1.0); } }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(76,184,224,.55); }
  70% { box-shadow: 0 0 0 11px rgba(76,184,224,0); }
  100% { box-shadow: 0 0 0 0 rgba(76,184,224,0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-nav, .page-hero-img, .page-hero::before, .page-hero::after, .photo-credit, body::after { display: none !important; }
  body { background: #fff; color: #111; }
  h1 { -webkit-text-fill-color: #111; background: none; }
}
