/* ============================================================
   VoiceInsights Africa — Design System
   Voice → Data → Insight, encoded visually as a waveform
   that resolves into structured bars.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Color tokens */
  --bg:        #0F1614;
  --surface:   #16211D;
  --surface-2: #1D2B26;
  --surface-3: #243731;
  --border:    rgba(244, 239, 230, 0.09);
  --border-strong: rgba(244, 239, 230, 0.18);
  --text:      #F4EFE6;
  --text-muted:#9FB3AB;
  --text-dim:  #6C8079;
  --accent:    #E4A23A;   /* amber / marigold */
  --accent-ink:#231502;
  --accent-2:  #4FA490;   /* muted teal - data */
  --accent-2-ink:#04211B;
  --danger:    #D9634A;
  --danger-bg: rgba(217, 99, 74, 0.12);
  --success:   #6FBF8B;
  --success-bg:rgba(111,191,139,0.12);
  --warn:      #E4C23A;
  --warn-bg:   rgba(228,194,58,0.12);

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 248px;
}

/* ---------- Light theme override (toggled via [data-theme="light"] on <html>) ---------- */
html[data-theme="light"] {
  --bg:        #F7F5F0;
  --surface:   #FFFFFF;
  --surface-2: #F1EEE6;
  --surface-3: #E7E2D6;
  --border:    rgba(35, 30, 20, 0.10);
  --border-strong: rgba(35, 30, 20, 0.20);
  --text:      #1E2620;
  --text-muted:#5B6B5E;
  --text-dim:  #8A9B8D;
  --accent:    #C97F1A;
  --accent-ink:#FFF6E6;
  --accent-2:  #2E7D6B;
  --accent-2-ink:#EAFBF6;
  --danger:    #C24A32;
  --danger-bg: rgba(194, 74, 50, 0.10);
  --success:   #3B8F5E;
  --success-bg:rgba(59,143,94,0.10);
  --warn:      #B08A1A;
  --warn-bg:   rgba(176,138,26,0.12);
}
html[data-theme="light"] .pub-nav::before { background: rgba(247, 245, 240, 0.88); }
html[data-theme="light"] .topbar { background: rgba(247,245,240,.8); }
html[data-theme="light"] .sidebar { box-shadow: 1px 0 0 var(--border); }

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 .4em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-muted); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Waveform signature ---------- */
.waveform {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}
.waveform span {
  display: block;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  opacity: .85;
}
.waveform.animate span { animation: wave 1.6s ease-in-out infinite; }
.waveform span:nth-child(2n) { animation-delay: .12s; }
.waveform span:nth-child(3n) { animation-delay: .24s; }
.waveform span:nth-child(4n) { animation-delay: .36s; }
@keyframes wave {
  0%, 100% { transform: scaleY(.4); }
  50% { transform: scaleY(1); }
}
.divider-wave {
  display: flex; align-items: flex-end; gap: 4px; height: 40px; margin: 2.5rem 0;
  opacity: .5;
}
.divider-wave span { flex: 1; background: linear-gradient(180deg, var(--accent-2), transparent); border-radius: 2px 2px 0 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  padding: .65em 1.25em; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, opacity .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent) 0%, #C88A2E 100%); color: var(--accent-ink); box-shadow: 0 6px 18px -6px rgba(228,162,58,.5); }
.btn-primary:hover { opacity: .94; box-shadow: 0 8px 22px -6px rgba(228,162,58,.65); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: .4em .85em; font-size: .8rem; }
.btn-danger { background: var(--danger); color: #240702; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ---------- App shell (sidebar + topbar) ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 130%);
  border-right: 1px solid var(--border); padding: 1.5rem 1rem;
  display: flex; flex-direction: column; gap: 1.75rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  box-shadow: 8px 0 24px -20px rgba(0,0,0,.6);
}
.sidebar-brand { display: flex; align-items: center; gap: .6rem; padding: 0 .5rem; }
.sidebar-brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display:flex; align-items:center; justify-content:center; color: var(--accent-ink); font-family: var(--font-display); font-weight:700; }
.sidebar-brand .name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.sidebar-brand .name em { display:block; font-family: var(--font-body); font-style: normal; font-size: .68rem; color: var(--text-dim); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); padding: 0 .75rem; margin: .5rem 0 .35rem; }
.nav-item {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 8px;
  color: var(--text-muted); font-size: .88rem; font-weight: 500; border-left: 2px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-item svg { width: 17px; height: 17px; opacity: .85; flex-shrink:0; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(228,162,58,.14), transparent 80%);
  color: var(--text); font-weight: 600; border-left-color: var(--accent);
}
.nav-item.active svg { opacity: 1; color: var(--accent); }
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.75rem; border-bottom: 1px solid var(--border); background: rgba(15,22,20,.7); backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 1.15rem; margin: 0; }
.topbar .eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); font-weight: 600; margin-bottom: .2rem; }
.content { padding: 1.75rem; max-width: 1400px; }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: .3rem .7rem .3rem .3rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.user-chip .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-2); color: var(--accent-2-ink); display:flex; align-items:center; justify-content:center; font-size: .75rem; font-weight: 700; }
.lang-toggle { display:flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; font-size: .75rem; }
.lang-toggle button { padding: .35rem .7rem; background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-family: var(--font-body); font-weight: 600; }
.lang-toggle button.active { background: var(--accent); color: var(--accent-ink); }

/* ---------- Toast notifications ---------- */
#toast-stack { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200; display: flex; flex-direction: column; gap: .6rem; align-items: flex-end; }
.toast {
  background: var(--surface-2); border: 1px solid var(--border-strong); border-left: 3px solid var(--accent-2);
  border-radius: 10px; padding: .8rem 1.1rem; font-size: .85rem; color: var(--text); max-width: 340px;
  box-shadow: 0 16px 32px -14px rgba(0,0,0,.6);
  animation: toast-in .25s ease;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.toast.toast-out { animation: toast-out .2s ease forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }

/* ---------- Skeleton loaders ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 6px; }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(244,239,230,.06), transparent);
  animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skeleton-text { height: .9em; width: 60%; margin: .3em 0; }
.skeleton-row td { padding: .9rem 1.1rem; }

/* ---------- Sidebar user card ---------- */
.sidebar-user-card { display: flex; align-items: center; gap: .6rem; padding: .6rem; border-radius: 10px; background: var(--surface-2); margin-bottom: .75rem; }
.sidebar-user-card .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display:flex; align-items:center; justify-content:center; font-size: .8rem; font-weight: 700; flex-shrink:0; }
.sidebar-user-card .info { min-width: 0; }
.sidebar-user-card .info .name { font-size: .82rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-card .info .role { font-size: .68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Cards / stats ---------- */
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr);} .grid-5 { grid-template-columns: repeat(2,1fr); } }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface) 100%);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 16px 32px -20px rgba(0,0,0,.6);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0; transition: opacity .2s ease;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 22px 40px -18px rgba(0,0,0,.65);
  transform: translateY(-1px);
}
.card:hover::before { opacity: 1; }
.card-title { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .09em; font-weight: 700; margin-bottom: .8rem; }
.stat-value {
  font-family: var(--font-mono); font-size: 2.2rem; font-weight: 700; letter-spacing: -.015em;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text; background-clip: text; color: var(--text);
  display:flex; align-items:baseline; gap:.4rem;
}
.stat-delta { font-size: .78rem; font-weight: 700; font-family: var(--font-mono); padding: .1em .5em; border-radius: 999px; }
.stat-delta.up { color: var(--success); background: var(--success-bg); }
.stat-delta.down { color: var(--danger); background: var(--danger-bg); }

/* ---------- Table ---------- */
.table-wrap {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface);
  box-shadow: 0 16px 32px -22px rgba(0,0,0,.55);
}
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
thead th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); font-weight: 700; padding: .85rem 1.1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
tbody td { padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .35em; font-size: .7rem; font-weight: 700; padding: .28em .7em; border-radius: 999px; letter-spacing: .01em; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-neutral { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border-strong); }
.badge-accent { background: rgba(228,162,58,.16); color: var(--accent); box-shadow: 0 0 0 1px rgba(228,162,58,.25) inset; }

/* ---------- Forms ---------- */
label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-muted); margin-bottom: .4rem; }
input, select, textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
  padding: .65rem .8rem; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .9rem;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
.field { margin-bottom: 1.1rem; }
.field-row { display: flex; gap: 1rem; }
.field-row .field { flex: 1; }

/* ---------- Misc ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.pill-tabs { display: flex; gap: .4rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.pill-tabs a { padding: .6rem .3rem; font-size: .87rem; font-weight: 600; color: var(--text-dim); border-bottom: 2px solid transparent; margin-right: 1.2rem; }
.pill-tabs a.active { color: var(--text); border-color: var(--accent); }
.muted-note { font-size: .8rem; color: var(--text-dim); }
.pill-tabs a.dash-tab { cursor: pointer; }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent-2); }

/* ---------- Marketing (public) pages ---------- */
.pub-nav {
  padding: 1.1rem 5vw; max-width: 1200px; margin: 0 auto;
  position: sticky; top: 0; z-index: 100;
}
.pub-nav::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100vw; height: 100%; z-index: -1;
  background: rgba(15, 22, 20, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
html[data-theme="light"] .pub-nav::before { background: rgba(247, 245, 240, 0.88); }
.pub-nav-row1 { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pub-nav-row1-right { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.pub-nav-row2 { display: flex; margin-top: .9rem; }
.pub-nav-links { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; padding-left: 42px; margin-top: .9rem; }
.pub-nav-links a.active-nav-link {
  background: linear-gradient(135deg, var(--accent) 0%, #C88A2E 100%) !important;
  color: var(--accent-ink) !important;
  padding: .4rem .9rem; border-radius: 999px; margin: -.4rem -.9rem;
}
.pub-hero { padding: 3rem 5vw 5rem; max-width: 1200px; margin: 0 auto; }
.pub-hero .eyebrow { color: var(--accent-2); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; display:block; }
.pub-hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.04; max-width: 14ch; }
.pub-hero .lead { font-size: 1.15rem; max-width: 46ch; margin-top: 1.2rem; }
.pub-section { padding: 4rem 5vw; max-width: 1200px; margin: 0 auto; }
.pub-section h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 20ch; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.6rem; }
.feature-card .num { font-family: var(--font-mono); color: var(--accent-2); font-size: .78rem; margin-bottom: .8rem; display:block; }
footer.pub-footer { padding: 3rem 5vw; max-width: 1200px; margin: 2rem auto 0; border-top: 1px solid var(--border); display:flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; z-index: 40; transition: left .2s ease; box-shadow: 20px 0 40px rgba(0,0,0,.4); }
  .sidebar.open { left: 0; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 0; }
}

/* ---------- Public marketing pages: mobile ---------- */
/* ---------- Tooltips ---------- */
[data-tooltip] { position: relative; cursor: help; border-bottom: 1px dotted var(--text-dim); }
[data-tooltip]::after {
  content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: .5rem .75rem; font-size: .74rem; font-weight: 500; white-space: normal; width: max-content; max-width: 220px;
  box-shadow: 0 12px 24px -8px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease;
  z-index: 50; line-height: 1.4;
}
[data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(-2px); }

.trust-bar { max-width: 1200px; margin: 0 auto; padding: 1.5rem 5vw; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.trust-bar-badges { display: flex; gap: .7rem; flex-wrap: wrap; }
.trust-badge { display: inline-flex; align-items: center; gap: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .4rem .9rem; font-size: .76rem; color: var(--text-muted); font-weight: 600; }
@media (max-width: 860px) { .trust-bar { padding: 1.25rem 6vw; } }

.ai-pipeline { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 0; }
.ai-pipeline-node { display: flex; flex-direction: column; align-items: center; gap: .6rem; width: 130px; text-align: center; }
.ai-pipeline-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0 rgba(79,164,144,.5); animation: ai-pulse 2.2s infinite; }
.ai-pipeline-node:nth-child(1) .ai-pipeline-dot { animation-delay: 0s; }
.ai-pipeline-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; line-height: 1.3; }
.ai-pipeline-arrow { color: var(--text-dim); font-size: 1.1rem; padding: 0 .4rem; flex-shrink: 0; }
@keyframes ai-pulse {
  0% { box-shadow: 0 0 0 0 rgba(79,164,144,.5); }
  70% { box-shadow: 0 0 0 8px rgba(79,164,144,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,164,144,0); }
}
@media (max-width: 860px) {
  .ai-pipeline { flex-direction: column; align-items: flex-start; }
  .ai-pipeline-node { width: auto; flex-direction: row; text-align: left; }
  .ai-pipeline-arrow { transform: rotate(90deg); padding: .3rem 0 .3rem 1.5rem; }
}

.mobile-nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0; }

/* ---------- Accessibility: skip-to-content link (WCAG 2.1) ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 500;
  background: var(--accent); color: var(--accent-ink); padding: .7rem 1.2rem; border-radius: 0 0 8px 0;
  font-weight: 700; font-size: .85rem; text-decoration: none;
}
.skip-link:focus { left: 0; }
.mobile-nav-toggle span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.mobile-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .pub-nav { padding: 1rem 6vw; }
  .mobile-nav-toggle { display: flex; }
  .pub-nav-collapse {
    display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: .9rem;
  }
  .pub-nav-collapse.open { display: flex; }
  .pub-nav-row1-right { padding-top: 1rem; margin-top: .5rem; border-top: 1px solid var(--border); }
  .pub-nav-row1-right .btn, .pub-nav-row1-right .site-lang-switch { width: 100%; justify-content: center; }
  .pub-nav-links { margin-top: 0; padding-left: 0; }
  .pub-hero { padding: 2rem 6vw 3rem; }
  .pub-hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); max-width: none; }
  .pub-hero .lead { font-size: 1rem; max-width: none; }
  .hero-grid { grid-template-columns: 1fr !important; }
  .pub-section { padding: 2.5rem 6vw; }
  .pub-section h2 { font-size: clamp(1.4rem, 6vw, 1.9rem); max-width: none; }
  footer.pub-footer { padding: 2.5rem 6vw; flex-direction: column; gap: 1.75rem; }
  .site-lang-switch button { padding: .35rem .55rem; font-size: .68rem; }
  .feature-card { padding: 1.25rem; }
}
@media (max-width: 480px) {
  .pub-hero h1 { font-size: 1.7rem; }
  .btn { font-size: .85rem; padding: .6em 1.05em; }
}

/* ============================================================
   EXECUTIVE INFOGRAPHIC ENGINE (Phase 16) — reusable component styles.
   Uses only existing design tokens (--accent, --surface, --border, etc.)
   already confirmed dark-mode compatible (Task 13). Responsive by
   default via CSS Grid auto-fit. Print-friendly page breaks included.
   ============================================================ */
.ig-page { margin-bottom: 2rem; padding: 1.5rem; background: var(--surface); border-radius: 12px; border: 1px solid var(--border); page-break-inside: avoid; }
.ig-section-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
.ig-disclosure { font-size: .78rem; color: var(--text-dim); font-style: italic; margin: .4rem 0 1rem; }
.ig-unavailable { display: inline-block; font-size: .72rem; padding: .2rem .5rem; background: var(--bg); border-radius: 6px; color: var(--text-dim); cursor: help; }
.ig-inline-label { font-size: .8rem; margin-left: .4rem; }

.ig-demo-banner { background: #3a2a0a; color: var(--accent); text-align: center; padding: .5rem; border-radius: 8px; font-weight: 600; font-size: .85rem; margin-bottom: 1rem; }
.ig-cover { text-align: center; padding: 3rem 1.5rem; }
.ig-logo { max-height: 60px; margin-bottom: 1rem; }
.ig-eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 1px; font-size: .8rem; font-weight: 700; }
.ig-title { font-size: 2rem; margin: .5rem 0; }
.ig-subtitle { color: var(--text-muted); margin-bottom: 1.5rem; }
.ig-cover-stats { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; margin: 1.5rem 0; }
.ig-cover-stats strong { display: block; font-size: 1.8rem; color: var(--accent); }
.ig-cover-stats span { font-size: .8rem; color: var(--text-muted); }
.ig-generated { font-size: .78rem; color: var(--text-dim); }

.ig-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.ig-kpi-card { background: var(--bg); border-radius: 10px; padding: 1rem; text-align: center; }
.ig-kpi-value { display: block; font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.ig-kpi-label { font-size: .78rem; color: var(--text-muted); }
.ig-kpi-na { opacity: .7; }

.ig-bar-list { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.ig-bar-row { display: grid; grid-template-columns: 100px 1fr 90px; align-items: center; gap: .6rem; font-size: .82rem; }
.ig-bar-track { background: var(--bg); border-radius: 6px; height: 14px; overflow: hidden; }
.ig-bar-fill { background: var(--accent); height: 100%; }

.ig-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem; }
@media (max-width: 640px) { .ig-two-col { grid-template-columns: 1fr; } .ig-bar-row { grid-template-columns: 80px 1fr 70px; } }

.ig-demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.ig-demo-block h3 { font-size: .9rem; margin-bottom: .4rem; }
.ig-demo-list { font-size: .82rem; list-style: none; padding: 0; }

.ig-funnel { display: flex; flex-direction: column; gap: .4rem; margin: 1rem 0; }
.ig-funnel-stage { background: var(--accent); color: #1a1a1a; padding: .6rem 1rem; border-radius: 6px; display: flex; justify-content: space-between; }

.ig-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.ig-finding-card, .ig-quote-card, .ig-insight-card, .ig-rec-card { background: var(--bg); border-radius: 10px; padding: 1rem; }
.ig-finding-icon { font-size: 1.6rem; margin-bottom: .4rem; }
.ig-finding-headline { font-weight: 600; font-size: .88rem; }
.ig-finding-evidence { font-size: .78rem; color: var(--text-muted); margin-top: .4rem; }
.ig-quote-card { font-style: italic; }
.ig-quote-card footer { font-style: normal; font-size: .72rem; color: var(--text-dim); margin-top: .5rem; }

.ig-badge-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.ig-badge { font-size: .68rem; padding: .2rem .5rem; background: var(--surface-2, var(--bg)); border-radius: 6px; color: var(--text-muted); }
.ig-badge-lg { font-size: .9rem; padding: .4rem .8rem; font-weight: 700; color: var(--accent); }

/* Traffic-light indicators: color AND text label together (WCAG 2.2 —
   never rely on color alone for colorblind accessibility). */
.ig-severity-gauge, .ig-risk-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.ig-traffic-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.ig-traffic-text, .ig-traffic-text-sm { font-size: .85rem; }
.ig-traffic-text-sm { font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.ig-risk-matrix { display: flex; flex-direction: column; gap: .6rem; }
.ig-risk-row p { margin: 0; font-size: .85rem; }

.ig-tier-heading { font-size: 1rem; margin: 1rem 0 .5rem; color: var(--accent); }
.ig-rec-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .5rem; }

@media print {
  .ig-page { break-inside: avoid; page-break-before: always; border: none; }
  .ig-cover { page-break-before: auto; }
}

/* ============================================================
   EXECUTIVE DECISION INTELLIGENCE ENGINE (Phase 17) — additive to the
   Phase 16 .ig-* styles above, same design tokens reused.
   ============================================================ */
.dc-card-list { display: flex; flex-direction: column; gap: 1rem; }
.dc-card { background: var(--bg); border-radius: 10px; padding: 1rem; border-left: 3px solid var(--accent); }
.dc-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.dc-kpi-name { font-weight: 700; }
.dc-risk-badge { font-size: .68rem; font-weight: 700; padding: .2rem .5rem; border-radius: 6px; color: #1a1a1a; }
.dc-value { font-size: 1.1rem; color: var(--accent); font-weight: 700; margin-bottom: .6rem; }
.dc-field { font-size: .82rem; margin-bottom: .4rem; }
.dc-recommendation { background: var(--surface); padding: .5rem; border-radius: 6px; }
.dc-confidence { font-size: .72rem; color: var(--text-dim); font-style: italic; margin-top: .5rem; }
.dc-opp-tag { display: inline-block; font-size: .68rem; background: var(--surface-2, var(--surface)); padding: .15rem .4rem; border-radius: 5px; margin: .15rem .3rem .15rem 0; }

.dc-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.dc-top10-block h3, .dc-talking-block h3 { font-size: .9rem; margin-bottom: .4rem; color: var(--accent); }
.dc-top10-block ol, .dc-talking-block ul { font-size: .8rem; padding-left: 1.2rem; }
.dc-risk-inline { color: var(--text-dim); font-size: .72rem; }

.dc-matrix-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.dc-matrix-col h3 { font-size: .85rem; color: var(--accent); margin-bottom: .5rem; }
.dc-matrix-item { background: var(--bg); border-radius: 6px; padding: .5rem; font-size: .78rem; margin-bottom: .5rem; }
.dc-matrix-owner { display: block; font-size: .68rem; color: var(--text-dim); margin-top: .3rem; }

@media (max-width: 640px) { .dc-dashboard-grid, .dc-matrix-grid { grid-template-columns: 1fr; } }
