/* ── Reset & Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0E1E35;
  --navy-mid:   #1A3050;
  --blue:       #1B6BB5;
  --blue-light: #2B84D8;
  --accent:     #00A8E8;
  --accent-dim: #007FB5;
  --surface:    #F7F9FC;
  --surface-2:  #EDF1F7;
  --border:     #D4DCE8;
  --border-mid: #B8C5D6;
  --text-1:     #0E1E35;
  --text-2:     #3A5068;
  --text-3:     #6B85A0;
  --text-inv:   #FFFFFF;
  --green:      #1A7A4A;
  --green-bg:   #E8F5EE;
  --amber:      #8B5E00;
  --amber-bg:   #FFF3D4;
  --red:        #B02020;
  --red-bg:     #FCEAEA;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Figtree', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;

  --shadow-sm: 0 1px 3px rgba(14,30,53,.06), 0 1px 2px rgba(14,30,53,.04);
  --shadow-md: 0 4px 12px rgba(14,30,53,.08), 0 2px 4px rgba(14,30,53,.05);
  --shadow-lg: 0 8px 24px rgba(14,30,53,.10), 0 4px 8px rgba(14,30,53,.06);

  --transition: 200ms cubic-bezier(.25,.46,.45,.94);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: var(--text-inv);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  white-space: nowrap;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(0,168,232,.25);
}

.brand-name sup { font-size: 8px; }

.header-title h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  color: #fff;
}

.header-sub {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
  font-style: italic;
}

.header-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.meta-pill {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 11px;
  color: rgba(255,255,255,.6);
  white-space: nowrap;
}

/* ── Search Bar ──────────────────────────────────────────────────────── */
.search-bar-wrap {
  background: var(--navy-mid);
  padding: 14px 32px;
  position: relative;
}

.search-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,.4);
  pointer-events: none;
}

#searchInput {
  width: 100%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
  padding: 10px 40px 10px 42px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

#searchInput::placeholder { color: rgba(255,255,255,.35); }
#searchInput:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,.12);
}

.search-clear {
  position: absolute;
  right: 14px;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  font-size: 12px;
  display: none;
  transition: color var(--transition);
}
.search-clear:hover { color: rgba(255,255,255,.8); }

.search-results-panel {
  max-width: 800px;
  margin: 10px auto 0;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-results-panel.hidden { display: none; }

.search-result-group-label {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.search-result-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface-2); }

.search-result-q {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 2px;
}

.search-result-aud {
  font-size: 11px;
  color: var(--text-3);
}

.search-result-item mark {
  background: #FFF3A3;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.search-no-results {
  padding: 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}

/* ── Audience Nav ────────────────────────────────────────────────────── */
.audience-nav {
  background: #fff;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 73px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.audience-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.audience-nav-inner::-webkit-scrollbar { display: none; }

.aud-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  position: relative;
}

.aud-tab:hover { color: var(--text-1); background: var(--surface); }

.aud-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.aud-icon {
  font-size: 14px;
  opacity: .6;
}

.aud-tab.active .aud-icon { opacity: 1; }

.aud-count {
  background: var(--surface-2);
  border-radius: 100px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  transition: all var(--transition);
}

.aud-tab.active .aud-count {
  background: #EBF3FD;
  color: var(--blue);
}

/* ── Main Content ────────────────────────────────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* ── Audience Sections ───────────────────────────────────────────────── */
.aud-section { display: none; }
.aud-section.active { display: block; }

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.section-header-left h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 8px;
}

.section-header-left p {
  font-size: 14px;
  color: var(--text-2);
  max-width: 680px;
  line-height: 1.5;
}

.expand-all-btn {
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: .03em;
  transition: background var(--transition);
  white-space: nowrap;
  margin-top: 6px;
}
.expand-all-btn:hover { background: var(--blue); }

/* ── Topic Groups ────────────────────────────────────────────────────── */
.topic-group {
  margin-bottom: 44px;
}

.topic-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.topic-heading::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Q&A Cards ───────────────────────────────────────────────────────── */
.qa-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.qa-card:hover {
  border-color: var(--border-mid);
  box-shadow: var(--shadow-md);
}

.qa-card.open {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), var(--shadow-md);
}

.qa-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: background var(--transition);
}

.qa-toggle:hover { background: var(--surface); }
.qa-card.open .qa-toggle { background: #EBF3FD; }

.qa-q {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.4;
}

.qa-card.open .qa-q { color: var(--blue); }

.qa-chevron {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--text-3);
  transition: transform var(--transition);
  line-height: 1;
  margin-top: -1px;
}

.qa-card.open .qa-chevron {
  transform: rotate(90deg);
  color: var(--blue);
}

.qa-body {
  display: none;
  padding: 0 20px 20px 20px;
  border-top: 1px solid var(--border);
  background: #FAFCFF;
}

.qa-card.open .qa-body { display: block; }

.qa-body p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  padding-top: 16px;
}

.qa-body p + p { margin-top: 12px; }

.qa-body strong { color: var(--text-1); font-weight: 600; }

.qa-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  color: var(--navy);
  white-space: nowrap;
}

.ref-tag {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  background: #EBF3FD;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  display: inline-block;
  letter-spacing: .02em;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.4);
  padding: 20px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
}

/* ── Animations ──────────────────────────────────────────────────────── */
.aud-section.active {
  animation: fadeIn 250ms ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 20px;
  }
  .header-meta { flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  .main-content { padding: 24px 16px 60px; }
  .search-bar-wrap { padding: 12px 16px; }
  .audience-nav-inner { padding: 0 16px; }
  .section-header { flex-direction: column; gap: 16px; }
  .section-header-left h2 { font-size: 24px; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 600px) {
  .aud-label { display: none; }
  .aud-tab { padding: 12px 14px; }
  .audience-nav { top: 60px; }
}

/* ── Print ───────────────────────────────────────────────────────────── */
@media print {
  .site-header, .search-bar-wrap, .audience-nav, .expand-all-btn { display: none; }
  .aud-section { display: block !important; page-break-before: always; }
  .qa-body { display: block !important; }
  .qa-chevron { display: none; }
  body { background: white; }
}
