/* Blog Component System v2 — LLM-First Architecture
   5 component types, strict cadence, answer-first structure.
   Designed to maximize LLM citation extractability. */

/* ═══════════════════════════════════════════════
   TOKENS
   ═══════════════════════════════════════════════ */
:root {
  /* Spacing */
  --bv2-xs: 0.5rem;
  --bv2-sm: 1rem;
  --bv2-md: 1.5rem;
  --bv2-lg: 2.5rem;
  --bv2-xl: 4rem;

  /* Colors */
  --bv2-surface: #ffffff;
  --bv2-surface-alt: #f9fafb;
  --bv2-surface-accent: #eef2ff;
  --bv2-text: #111827;
  --bv2-text-secondary: #4b5563;
  --bv2-text-muted: #9ca3af;
  --bv2-border: #e5e7eb;
  --bv2-accent: #4f46e5;
  --bv2-accent-hover: #4338ca;
  --bv2-accent-light: #eef2ff;
  --bv2-success: #059669;
  --bv2-warning: #d97706;

  /* Typography */
  --bv2-font: 'Inter', system-ui, -apple-system, sans-serif;
  --bv2-line-height: 1.75;
  --bv2-max-width: 720px;

  /* Radii */
  --bv2-radius: 0.75rem;
  --bv2-radius-sm: 0.5rem;
}

/* ═══════════════════════════════════════════════
   1. HERO BLOCK
   Article identity, trust signals, instant answer
   ═══════════════════════════════════════════════ */
.bv2-hero {
  max-width: var(--bv2-max-width);
  margin: 0 auto;
  padding: var(--bv2-xl) 0 var(--bv2-lg);
}

.bv2-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--bv2-text-muted);
  margin-bottom: var(--bv2-md);
}

.bv2-hero__breadcrumb a {
  color: var(--bv2-text-secondary);
  text-decoration: none;
}

.bv2-hero__breadcrumb a:hover {
  color: var(--bv2-accent);
}

.bv2-hero h1 {
  font-family: var(--bv2-font);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--bv2-text);
  margin: 0 0 var(--bv2-md);
  letter-spacing: -0.025em;
}

/* answer-sentence: the LLM extraction target */
.bv2-hero__answer {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--bv2-text-secondary);
  margin: 0 0 var(--bv2-md);
  padding: var(--bv2-sm) var(--bv2-md);
  border-left: 3px solid var(--bv2-accent);
  background: var(--bv2-accent-light);
  border-radius: 0 var(--bv2-radius-sm) var(--bv2-radius-sm) 0;
}

.bv2-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bv2-sm);
  font-size: 0.875rem;
  color: var(--bv2-text-muted);
}

.bv2-hero__author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bv2-hero__author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.bv2-hero__author-name {
  font-weight: 600;
  color: var(--bv2-text);
}

.bv2-hero__author-title {
  font-size: 0.8125rem;
  color: var(--bv2-text-muted);
}

.bv2-hero__sep {
  color: var(--bv2-border);
}

.bv2-hero__tags {
  display: flex;
  gap: 0.375rem;
  margin-top: var(--bv2-sm);
}

.bv2-hero__tag {
  display: inline-flex;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--bv2-accent);
  background: var(--bv2-accent-light);
  border-radius: 999px;
  text-decoration: none;
}

.bv2-hero__image {
  width: 100%;
  margin-top: var(--bv2-lg);
  border-radius: var(--bv2-radius);
  overflow: hidden;
}

.bv2-hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ═══════════════════════════════════════════════
   2. SUMMARY BLOCK
   Structured extraction target — one per post
   ═══════════════════════════════════════════════ */
.bv2-summary {
  max-width: var(--bv2-max-width);
  margin: 0 auto var(--bv2-lg);
  padding: var(--bv2-md) var(--bv2-lg);
  background: var(--bv2-surface-alt);
  border: 1px solid var(--bv2-border);
  border-radius: var(--bv2-radius);
}

.bv2-summary__label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bv2-accent);
  margin-bottom: var(--bv2-sm);
}

.bv2-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.bv2-summary li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--bv2-text);
}

.bv2-summary li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bv2-accent);
}

.bv2-summary li strong {
  color: var(--bv2-text);
}

/* ═══════════════════════════════════════════════
   3. EVIDENCE CARD
   Data points, stats, quotes, comparisons
   ═══════════════════════════════════════════════ */

/* Base */
.bv2-evidence {
  margin: var(--bv2-md) 0;
  padding: var(--bv2-md);
  border-radius: var(--bv2-radius-sm);
  border: 1px solid var(--bv2-border);
}

/* Stat variant */
.bv2-evidence--stat {
  display: flex;
  align-items: flex-start;
  gap: var(--bv2-sm);
  background: var(--bv2-surface-alt);
}

.bv2-evidence__number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--bv2-accent);
  line-height: 1;
  flex-shrink: 0;
  min-width: 3.5rem;
}

.bv2-evidence__body {
  flex: 1;
}

.bv2-evidence__claim {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bv2-text);
  margin: 0 0 0.25rem;
  line-height: 1.4;
}

.bv2-evidence__source {
  font-size: 0.8125rem;
  color: var(--bv2-text-muted);
}

.bv2-evidence__source a {
  color: var(--bv2-accent);
  text-decoration: none;
}

/* Quote variant */
.bv2-evidence--quote {
  background: var(--bv2-surface);
  border-left: 3px solid var(--bv2-accent);
}

.bv2-evidence__text {
  font-size: 1rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--bv2-text);
  margin: 0 0 var(--bv2-xs);
}

.bv2-evidence__attr {
  font-size: 0.8125rem;
  color: var(--bv2-text-muted);
  font-style: normal;
}

.bv2-evidence__attr strong {
  color: var(--bv2-text-secondary);
}

/* Comparison variant */
.bv2-evidence--comparison {
  background: var(--bv2-surface);
  padding: 0;
  overflow: hidden;
}

.bv2-evidence--comparison table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.bv2-evidence--comparison th {
  background: var(--bv2-surface-alt);
  padding: 0.625rem var(--bv2-sm);
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--bv2-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--bv2-border);
}

.bv2-evidence--comparison td {
  padding: 0.625rem var(--bv2-sm);
  border-bottom: 1px solid var(--bv2-border);
  color: var(--bv2-text);
}

.bv2-evidence--comparison tr:last-child td {
  border-bottom: none;
}

/* ═══════════════════════════════════════════════
   4. ACTION BLOCK
   Conversion without disruption — max 2 per post
   ═══════════════════════════════════════════════ */

/* Contextual variant (mid-article) */
.bv2-action {
  margin: var(--bv2-lg) 0;
  padding: var(--bv2-md) var(--bv2-lg);
  border-radius: var(--bv2-radius);
  text-align: center;
}

.bv2-action--contextual {
  background: var(--bv2-accent-light);
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.bv2-action__text {
  font-size: 0.9375rem;
  color: var(--bv2-text);
  margin: 0 0 var(--bv2-sm);
}

.bv2-action__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bv2-surface);
  background: var(--bv2-accent);
  border: none;
  border-radius: var(--bv2-radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.bv2-action__btn:hover {
  background: var(--bv2-accent-hover);
}

/* Terminal variant (end of article) */
.bv2-action--terminal {
  background: #1e1b4b;
  color: var(--bv2-surface);
}

.bv2-action--terminal .bv2-action__text {
  color: rgba(255, 255, 255, 0.85);
}

.bv2-action--terminal .bv2-action__proof {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: var(--bv2-xs);
}

.bv2-action--terminal .bv2-action__btn {
  background: var(--bv2-surface);
  color: var(--bv2-accent);
}

.bv2-action--terminal .bv2-action__btn:hover {
  background: var(--bv2-surface-alt);
}

/* ═══════════════════════════════════════════════
   5. REFERENCE BLOCK
   Definitions, glossary terms, entity resolution
   ═══════════════════════════════════════════════ */
.bv2-reference {
  margin: var(--bv2-md) 0;
  padding: var(--bv2-md);
  background: var(--bv2-surface-alt);
  border-radius: var(--bv2-radius-sm);
  border: 1px solid var(--bv2-border);
}

.bv2-reference__term {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bv2-accent);
  margin: 0 0 0.375rem;
}

.bv2-reference__definition {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--bv2-text);
  margin: 0;
}

/* ═══════════════════════════════════════════════
   CONTENT BODY — shared typography
   ═══════════════════════════════════════════════ */
.bv2-body {
  max-width: var(--bv2-max-width);
  margin: 0 auto;
  padding: 0 0 var(--bv2-xl);
  font-family: var(--bv2-font);
  font-size: 1rem;
  line-height: var(--bv2-line-height);
  color: var(--bv2-text);
}

.bv2-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bv2-text);
  margin: var(--bv2-xl) 0 var(--bv2-sm);
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.bv2-body h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--bv2-text);
  margin: var(--bv2-lg) 0 var(--bv2-xs);
  line-height: 1.35;
}

.bv2-body p {
  margin: 0 0 var(--bv2-sm);
}

.bv2-body ul, .bv2-body ol {
  padding-left: 1.5rem;
  margin: 0 0 var(--bv2-sm);
}

.bv2-body li {
  margin-bottom: 0.375rem;
}

.bv2-body a {
  color: var(--bv2-accent);
  text-decoration: underline;
  text-decoration-color: rgba(79, 70, 229, 0.3);
  text-underline-offset: 2px;
}

.bv2-body a:hover {
  text-decoration-color: var(--bv2-accent);
}

/* Steps */
.bv2-step {
  display: flex;
  gap: var(--bv2-sm);
  margin: var(--bv2-md) 0;
}

.bv2-step__num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bv2-accent);
  color: var(--bv2-surface);
  font-size: 0.8125rem;
  font-weight: 700;
}

.bv2-step__content {
  flex: 1;
}

.bv2-step__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--bv2-text);
  margin: 0 0 0.25rem;
}

.bv2-step__desc {
  font-size: 0.9375rem;
  color: var(--bv2-text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* FAQ section */
.bv2-faq {
  margin-top: var(--bv2-lg);
}

.bv2-faq details {
  border-bottom: 1px solid var(--bv2-border);
}

.bv2-faq details:first-of-type {
  border-top: 1px solid var(--bv2-border);
}

.bv2-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--bv2-sm) 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bv2-text);
  cursor: pointer;
  list-style: none;
}

.bv2-faq summary::-webkit-details-marker {
  display: none;
}

.bv2-faq summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--bv2-text-muted);
  transition: transform 0.15s;
}

.bv2-faq details[open] summary::after {
  content: '−';
}

.bv2-faq .bv2-faq__answer {
  padding: 0 0 var(--bv2-sm);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--bv2-text-secondary);
}

/* Related posts */
.bv2-related {
  margin-top: var(--bv2-xl);
  padding-top: var(--bv2-lg);
  border-top: 1px solid var(--bv2-border);
}

.bv2-related__label {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bv2-text-muted);
  margin-bottom: var(--bv2-md);
}

.bv2-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--bv2-md);
}

.bv2-related__card {
  display: flex;
  flex-direction: column;
  padding: var(--bv2-md);
  background: var(--bv2-surface-alt);
  border: 1px solid var(--bv2-border);
  border-radius: var(--bv2-radius-sm);
  text-decoration: none;
  transition: border-color 0.15s;
}

.bv2-related__card:hover {
  border-color: var(--bv2-accent);
}

.bv2-related__card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bv2-text);
  line-height: 1.4;
  margin: 0;
}

.bv2-related__card-date {
  font-size: 0.8125rem;
  color: var(--bv2-text-muted);
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Author bio */
.bv2-author {
  display: flex;
  gap: var(--bv2-md);
  margin-top: var(--bv2-lg);
  padding: var(--bv2-md);
  background: var(--bv2-surface-alt);
  border-radius: var(--bv2-radius);
}

.bv2-author__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.bv2-author__name {
  font-weight: 700;
  color: var(--bv2-text);
  font-size: 0.9375rem;
}

.bv2-author__role {
  font-size: 0.8125rem;
  color: var(--bv2-text-muted);
}

.bv2-author__bio {
  font-size: 0.875rem;
  color: var(--bv2-text-secondary);
  line-height: 1.6;
  margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .bv2-hero, .bv2-summary, .bv2-body {
    padding-left: var(--bv2-sm);
    padding-right: var(--bv2-sm);
  }

  .bv2-hero h1 {
    font-size: 1.625rem;
  }

  .bv2-evidence--stat {
    flex-direction: column;
    gap: var(--bv2-xs);
  }

  .bv2-evidence__number {
    min-width: unset;
  }

  .bv2-author {
    flex-direction: column;
    gap: var(--bv2-sm);
  }
}
