/* ==========================================================================
   VIRA blog — shared stylesheet for /blog/* and /authors/*
   Sources design tokens from /index.html (homepage). Keep in sync.
   ========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: #0a0f1a;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === Space background === */
.space-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(30, 80, 120, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(20, 40, 80, 0.3) 0%, transparent 50%),
    #0a0f1a;
}
.space-bg .stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 40% 15%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 55% 70%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 70% 35%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 90% 10%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 60% 90%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 35% 95%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 75% 85%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 95% 45%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 45% 5%, rgba(255,255,255,0.5), transparent);
  background-size: 250px 250px;
}
.earth-glow {
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 60%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40,120,180,0.15) 0%, rgba(20,60,120,0.05) 40%, transparent 70%);
  pointer-events: none;
}

/* === Glass cards (matching app) === */
.glass {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}
.glass-teal { background: rgba(56, 130, 150, 0.25); }
.glass-teal:hover { background: rgba(56, 130, 150, 0.40); }
.glass-green { background: rgba(34, 120, 60, 0.30); }
.glass-green:hover { background: rgba(34, 120, 60, 0.50); }
.glass-purple { background: rgba(90, 50, 150, 0.30); }
.glass-purple:hover { background: rgba(90, 50, 150, 0.50); }
.glass-orange { background: rgba(160, 80, 20, 0.23); }
.glass-orange:hover { background: rgba(160, 80, 20, 0.40); }
.glass-dark { background: rgba(15, 20, 35, 0.60); }
.glass-subtle { background: rgba(255, 255, 255, 0.04); }
.glass-subtle:hover { background: rgba(255, 255, 255, 0.08); }

/* === Buttons === */
.btn-dark, .btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn-dark { background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(6px); }
.btn-dark:hover { background: rgba(0, 0, 0, 0.55); }
.btn-glass {
  background: rgba(56, 130, 150, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
}
.btn-glass:hover { background: rgba(56, 130, 150, 0.45); }

/* === Layout === */
.content { position: relative; z-index: 1; }
.section { padding: 80px 24px; }
.section-tight { padding: 40px 24px; }
.container { max-width: 1100px; margin: 0 auto; }
.container-narrow { max-width: 780px; margin: 0 auto; }

/* === Nav === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 15, 26, 0.7);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav-logo {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 18px; font-weight: 600;
  letter-spacing: 3px; color: #fff; text-transform: uppercase;
}
.nav-logo img { height: 32px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none; font-size: 14px; font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* Mobile nav toggle. Ported verbatim from the homepage's inline <style>
   (index.html) because these rules live ONLY there — site.css does not have
   them either, and blog pages load neither. Without them the button injected
   into 19 pages would be present, functional and invisible: the same shape of
   defect radar.css's header records ("a white input on a dark page. No test
   would have caught that").

   Fixes what Telegram bug report #5 (2026-07-19) raised for the homepage and
   never got for the blog: below 768px .nav-links was simply hidden, with no
   toggle and no nav.js, so Features / How It Works / Why VIRA / Insights were
   unreachable on a phone. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 8px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 64px;   /* matches this file's fixed 64px nav */
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    background: rgba(10, 15, 26, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 10px 0; font-size: 15px; width: 100%; }
}

/* === Typography === */
h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.5vw, 36px); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }
p { line-height: 1.7; }
.text-muted { color: rgba(255,255,255,0.50); }
.text-light { color: rgba(255,255,255,0.70); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }

/* === Section header === */
.section-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 12px;
  background: rgba(56,130,150,0.15);
  color: rgba(180,220,240,0.9);
  font-size: 13px; font-weight: 500;
  margin-bottom: 20px;
}
.section-header p {
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  margin-top: 12px;
}

/* === Animations === */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* === Footer === */
.footer { padding: 48px 24px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer a { color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: #fff; }

/* ==========================================================================
   Blog-specific
   ========================================================================== */

/* === Breadcrumbs === */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
}
.breadcrumbs a { color: rgba(180,220,240,0.85); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs .sep { color: rgba(255,255,255,0.3); }

/* === Article hero === */
.article-meta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-top: 24px; margin-bottom: 32px;
}
.article-meta .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.05);
  font-size: 12px;
  font-weight: 500;
}
.article-meta .pill-cluster { background: rgba(34,120,60,0.25); color: rgba(140,230,160,0.9); }
.article-meta .pill-pillar { background: rgba(56,130,150,0.30); color: rgba(180,220,240,0.95); }
.article-meta .pill-tl { background: rgba(160,80,20,0.30); color: rgba(255,190,100,0.95); }
.article-meta .author-link { color: rgba(180,220,240,0.85); text-decoration: none; }
.article-meta .author-link:hover { color: #fff; }
.article-meta .dot { color: rgba(255,255,255,0.25); }

/* === TL;DR card === */
.tldr {
  padding: 24px 28px;
  border-left: 3px solid rgba(180,220,240,0.6);
  background: rgba(56,130,150,0.10);
  border-radius: 0 14px 14px 0;
  margin: 32px 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
}
.tldr strong { color: #fff; }
.tldr a {
  color: rgba(180,220,240,0.95);
  text-decoration: underline;
  text-decoration-color: rgba(180,220,240,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.tldr a:visited { color: rgba(180,220,240,0.95); }
.tldr a:hover { text-decoration-color: rgba(180,220,240,1); }

/* === Article body typography === */
.prose { color: rgba(255,255,255,0.82); font-size: 16px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 56px; margin-bottom: 16px;
  color: #fff;
  font-size: clamp(22px, 2.6vw, 30px);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  margin-top: 32px; margin-bottom: 8px;
  color: #fff;
  font-size: 19px;
}
.prose p { color: rgba(255,255,255,0.75); }
.prose strong { color: #fff; font-weight: 600; }
.prose a {
  color: rgba(180,220,240,0.95);
  text-decoration: underline;
  text-decoration-color: rgba(180,220,240,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.prose a:hover { text-decoration-color: rgba(180,220,240,1); }
.prose ul, .prose ol { padding-left: 1.5em; color: rgba(255,255,255,0.78); }
.prose li + li { margin-top: 0.4em; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  padding: 2px 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
}
.prose blockquote {
  border-left: 3px solid rgba(180,220,240,0.4);
  padding: 8px 0 8px 20px;
  margin: 24px 0;
  color: rgba(255,255,255,0.65);
  font-style: italic;
}
.prose .unverified {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(255,190,100,0.15);
  color: rgba(255,190,100,0.95);
  font-size: 0.82em;
  font-weight: 500;
  margin-left: 4px;
  vertical-align: middle;
}

/* === Comparison table inside article === */
.prose table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; margin: 28px 0;
}
.prose table th, .prose table td {
  padding: 14px 18px; text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.prose table th {
  color: rgba(255,255,255,0.5);
  font-weight: 500; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(255,255,255,0.02);
}
.prose table td:first-child { color: rgba(255,255,255,0.75); }

/* Tables SCROLL on a phone instead of being clipped.
 *
 * `width: 100%` above does not prevent overflow: a 4-column table cannot compress
 * below the sum of its cells' minimum content widths, and 36px of horizontal cell
 * padding each makes that worse. Meanwhile `body { overflow-x: hidden }` (line 12)
 * means the page cannot scroll sideways — so the cut-off columns were not merely
 * awkward, they were UNREACHABLE on a narrow screen. Several posts carry comparison
 * tables whose whole value is the columns.
 *
 * Scoped to a media query so desktop layout is untouched: display:block turns the
 * table into its own scroll container, which is the only CSS-only fix available
 * because the markdown pipeline emits a bare <table> with no wrapper to hang
 * overflow on. */
@media (max-width: 700px) {
  .prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .prose table th, .prose table td {
    padding: 10px 12px;
    white-space: nowrap;
  }
}

/* === FAQ === */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  padding: 18px 24px;
  border-radius: 14px;
  background: rgba(15, 20, 35, 0.55);
  border: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}
.faq details[open] { background: rgba(15, 20, 35, 0.75); }
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: rgba(180,220,240,0.7);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: '–'; }
.faq details > p, .faq details > div {
  margin-top: 12px;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  font-size: 15px;
}

/* === Sources block === */
.sources {
  font-size: 14px; color: rgba(255,255,255,0.65);
  padding: 24px;
}
.sources ol { padding-left: 1.5em; }
.sources li { margin-bottom: 8px; }
.sources a { color: rgba(180,220,240,0.9); text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.sources .src-meta { color: rgba(255,255,255,0.4); font-size: 13px; margin-left: 4px; }

/* === Disclaimer === */
.disclaimer {
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px dashed rgba(255,190,100,0.3);
  background: rgba(160, 80, 20, 0.08);
  color: rgba(255,200,140,0.85);
  font-size: 13px; line-height: 1.55;
  margin: 32px 0;
}

/* === Author byline card === */
.author-card {
  display: flex; gap: 16px; align-items: center;
  padding: 20px 24px;
  margin-top: 48px;
}
.author-card .avatar {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(56,130,150,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.author-card .author-info { flex: 1; min-width: 0; }
.author-card .author-name {
  font-weight: 600; font-size: 16px;
  color: #fff; margin-bottom: 2px;
  text-decoration: none;
}
.author-card .author-name:hover { text-decoration: underline; }
.author-card .author-role {
  font-size: 13px;
  color: rgba(140,230,160,0.85);
  margin-bottom: 6px;
}
.author-card .author-bio {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
}

/* === Pillar uplink === */
.pillar-uplink {
  padding: 18px 24px; margin: 32px 0;
  border-left: 3px solid rgba(140,230,160,0.7);
  background: rgba(34, 120, 60, 0.10);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  color: rgba(255,255,255,0.80);
}
.pillar-uplink a {
  color: rgba(180,220,240,0.95);
  text-decoration: underline;
  text-decoration-color: rgba(180,220,240,0.4);
}

/* ==========================================================================
   Filter pill — the ONE survivor of the old index/filter block
   ==========================================================================
   The rest of that block (.filters, .filter-row, .filter-search, .filter-meta,
   .filter-reset, .card-grid, .piece-card, .empty-state, .status-dot,
   .type-tag-*) moved to src/assets/blog-index.css on 2026-07-31 and is deleted
   here. It had never been used: /blog/ renders through base.njk and does not load
   this file, and the 18 posts use only .filter-pill, as a decorative label with no
   count and no click.

   .card-grid in particular had to go — site.css:114 defines the same class with a
   different grid, so if this file were ever loaded beside it, /tenders/,
   /glossary/ and /funding/ would silently reflow. */
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.65);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-pill:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.filter-pill.active {
  background: rgba(56,130,150,0.40);
  border-color: rgba(180,220,240,0.4);
  color: #fff;
}
.filter-pill .count {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
}
.filter-pill.active .count { color: rgba(255,255,255,0.7); }
