/* ============================================
   Engineering Blog - WSJ-Inspired Theme
   Matches main site styling
   ============================================ */

:root {
  /* WSJ-Inspired Color Palette */
  --wsj-tan: #f5f1eb;
  --wsj-cream: #faf8f5;
  --wsj-dark: #1a1a1a;
  --wsj-nav: #352a21;
  --wsj-brown: #6b5b4f;
  --wsj-gold: #c4a35a;
  --wsj-blue: #0274b6;
  --wsj-red: #b71c1c;
  --wsj-green: #2e7d32;
  --wsj-border: #d4c8b8;

  /* Semantic Colors */
  --bg: var(--wsj-tan);
  --bg-elevated: var(--wsj-cream);
  --bg-code: #fefcf9;
  --text: var(--wsj-dark);
  --text-dim: var(--wsj-brown);
  --accent: var(--wsj-blue);
  --success: var(--wsj-green);
  --warning: var(--wsj-gold);
  --error: var(--wsj-red);
  --border: var(--wsj-border);

  /* Shadows */
  --elev-1: 0 1px 3px rgba(107, 91, 79, 0.08),
    0 4px 12px rgba(107, 91, 79, 0.04);

  /* Typography */
  --font-serif: "Libre Baskerville", Georgia, serif;
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, Segoe UI,
    Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle paper texture overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.025;
  z-index: 1000;
}

/* ============================================
   Navigation
   ============================================ */
.main-nav {
  background: var(--wsj-nav);
  border-bottom: 1px solid #453931;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-brand-link {
  text-decoration: none;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: white;
  padding: 14px 0;
  margin-right: 32px;
  white-space: nowrap;
}

.nav-sections {
  display: flex;
  align-items: center;
  flex: 1;
}

.nav-section {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-section-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 0 12px 0 0;
  white-space: nowrap;
}

.nav-section-links {
  display: flex;
  gap: 0;
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 20px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 150ms ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: var(--wsj-gold);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    padding: 12px 16px;
    gap: 8px;
  }

  .nav-brand {
    margin-right: 0;
    padding: 0;
  }

  .nav-sections {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .nav-section {
    flex-direction: column;
    width: 100%;
    gap: 4px;
  }

  .nav-section-label {
    padding: 4px 0;
  }

  .nav-section-links {
    width: 100%;
    justify-content: center;
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 4px 0;
  }

  .nav-link {
    padding: 10px 14px;
    font-size: 11px;
  }
}

/* Inline code */
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85em;
  background: var(--wsj-cream);
  padding: 0.15em 0.4em;
  border: 1px solid var(--border);
}
code.nowrap {
  white-space: nowrap;
}

/* Header */
header {
  background: var(--wsj-cream);
  border-bottom: 3px double var(--wsj-border);
  padding: 48px 24px 40px;
}

.blog-header {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.blog-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--wsj-brown);
  margin-bottom: 16px;
}

.blog-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.blog-subtitle {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #555;
  line-height: 1.6;
}

/* Matching priority list */
ol.matching-priority {
  background: var(--wsj-cream);
  border: 1px solid var(--border);
  padding: 24px 24px 24px 48px;
  margin: 24px 0;
}

ol.matching-priority li {
  margin-bottom: 12px;
  padding-left: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
}

ol.matching-priority li:last-child {
  margin-bottom: 0;
}

ol.matching-priority strong {
  color: var(--accent);
}

/* Main Content */
.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

/* Article Header */
.article-header {
  text-align: center;
  padding-top: 48px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.article-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--wsj-brown);
  margin-bottom: 16px;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 6vw, 44px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.article-subtitle {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--wsj-brown);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  margin: 48px 0 20px;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text);
}

h4 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--text);
}

p {
  margin-bottom: 20px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
}

.content ol,
.content ul {
  margin: 20px 0 28px;
  padding-left: 1.5rem;
}

.content ol li,
.content ul li {
  margin: 0;
  padding-bottom: 24px;
  line-height: 1.7;
}

.content ol li p {
  margin: 0 0 1em;
}

.content ol li p:last-child {
  margin-bottom: 0;
}

.content ol li:last-child,
.content ul li:last-child {
  padding-bottom: 0;
}

em {
  font-style: italic;
}

strong {
  font-weight: 700;
  color: var(--wsj-dark);
}

/* Stats Bar */
.stats-bar {
  margin: 32px 0;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  overflow: hidden;
}

.stats-row--2x2 {
  grid-template-columns: repeat(2, 1fr);
}

.stats-caption {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  margin-top: 12px;
}

.stat {
  background: var(--wsj-cream);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Code Blocks */
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  margin: 24px 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--wsj-tan);
}

.code-header-note {
  font-weight: 400;
  font-style: italic;
  font-size: 11px;
  line-height: 1.4;
}

.code-content {
  padding: 16px 20px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}

.code-content pre {
  margin: 0;
  padding: 0;
  background: transparent;
  overflow-x: auto;
}

.code-content code {
  display: block;
  white-space: pre;
  background: transparent;
  padding: 0;
  border: none;
}

/* Code syntax highlighting */
.code-comment {
  color: var(--wsj-brown);
  font-style: italic;
}

.code-new {
  color: var(--wsj-green);
  font-weight: 500;
}

.code-error {
  color: var(--wsj-red);
}

.code-keyword {
  color: var(--wsj-blue);
  font-weight: 500;
}

/* Page excerpt (full-text source block) — from doc_mem_1 */
.page-excerpt {
  margin: 32px 0;
  padding: 24px 28px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}

.page-excerpt-header {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.page-excerpt-section {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}

.page-excerpt-body p {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 14px 0;
  color: var(--text);
}

.page-excerpt-body p:last-child {
  margin-bottom: 0;
}

.page-excerpt-body .excerpt-cut {
  background: rgba(46, 125, 50, 0.15);
  box-shadow: inset 3px 0 0 var(--success);
  padding: 2px 0 2px 6px;
}

.page-excerpt-body .excerpt-overlap {
  background: rgba(196, 163, 90, 0.25);
  padding: 1px 4px;
  border-radius: 2px;
}

.page-excerpt-key {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-dim);
}

.page-excerpt-key .key-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-excerpt-key .key-swatch {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.page-excerpt-key .key-swatch.cut {
  background: rgba(46, 125, 50, 0.15);
  box-shadow: inset 3px 0 0 var(--success);
}

.page-excerpt-key .key-swatch.overlap {
  background: rgba(196, 163, 90, 0.25);
}

/* Interactive Demo */
.demo-container {
  background: var(--wsj-cream);
  border: 1px solid var(--border);
  margin: 32px 0;
  overflow: hidden;
}

.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--wsj-tan);
}

.demo-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.demo-controls {
  display: flex;
  gap: 8px;
}

.demo-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  background: var(--wsj-dark);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-btn:hover {
  background: #333;
}

.demo-btn:active {
  background: #000;
}

.demo-body {
  padding: 20px;
}

.demo-line {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  padding: 12px 16px;
  padding-right: 150px;
  margin-bottom: 8px;
  background: var(--bg);
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.demo-line.highlight-speaker {
  background: rgba(2, 116, 182, 0.1);
  border-left-color: var(--accent);
}

.demo-line.highlight-scan {
  background: var(--wsj-cream);
  border-left-color: var(--text-dim);
}

.demo-line.highlight-state {
  background: rgba(46, 125, 50, 0.1);
  border-left-color: var(--success);
}

.demo-line.highlight-error {
  background: rgba(183, 28, 28, 0.1);
  border-left-color: var(--error);
}

.demo-line .annotation {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  padding: 4px 8px;
  opacity: 0;
  transition: opacity 0.3s;
}

.demo-line.highlight-speaker .annotation {
  background: var(--accent);
  color: white;
  opacity: 1;
}

.demo-line.highlight-scan .annotation {
  background: var(--wsj-cream);
  color: var(--text-dim);
  opacity: 1;
}

.demo-line.highlight-state .annotation {
  background: var(--success);
  color: white;
  opacity: 1;
}

.demo-line.highlight-error .annotation {
  background: var(--error);
  color: white;
  opacity: 1;
}

.speaker-name {
  color: var(--accent);
  font-weight: 600;
}
.state-name {
  color: var(--success);
  font-weight: 600;
}
.error-text {
  color: var(--error);
}

/* Disambiguation Demo */
.disambig-line {
  background: var(--bg);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.disambig-line.active {
  border-left-color: var(--accent);
  background: rgba(2, 116, 182, 0.08);
}

.disambig-line.matched {
  border-left-color: var(--success);
  background: rgba(46, 125, 50, 0.08);
}

.disambig-text {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.disambig-match {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.disambig-line.matched .disambig-match {
  opacity: 1;
}

.match-arrow {
  color: var(--success);
  font-weight: bold;
}

.match-result {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
}

/* Line Scan Demo */
.line-scan-body {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
}

.scan-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin: 4px 0;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.scan-line .line-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.scan-line .scan-result {
  margin-left: 16px;
  font-size: 12px;
  min-width: 100px;
  text-align: right;
}

.scan-line.scanning {
  opacity: 1;
  background: rgba(2, 116, 182, 0.1);
  border-left-color: var(--accent);
}

.scan-line.scanned {
  opacity: 1;
  background: rgba(2, 116, 182, 0.1);
  border-left-color: var(--accent);
}

.scan-line.speaker-found {
  opacity: 1;
  background: rgba(46, 125, 50, 0.1);
  border-left-color: var(--success);
}

.scan-line.speaker-found .scan-result {
  color: var(--success);
  font-weight: 600;
}

.scan-line.processed {
  opacity: 0.5;
  background: transparent;
  border-left-color: transparent;
}

.scan-line.processed .scan-result {
  color: var(--text-dim);
}

.scan-line:not(.speaker-found):not(.scanned):not(.processed) .scan-result {
  color: var(--text-dim);
}

.scan-output {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.output-section {
  min-height: 100px;
}

.output-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.output-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px;
  min-height: 80px;
  transition: all 0.3s ease;
}

.output-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 116, 182, 0.1);
}

.output-card.saving {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.output-speaker {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
}

.output-text {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

.saved-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 12px;
  margin-bottom: 8px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.saved-speaker {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.saved-text {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  display: block;
  white-space: pre-wrap;
}

/* Nickname Demo */
.nickname-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
}

.nickname-step {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 16px 20px;
  width: 100%;
  max-width: 400px;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.nickname-step.active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 116, 182, 0.1);
}

.nickname-step.active.skipped {
  border-color: var(--text-dim);
  box-shadow: none;
  opacity: 0.6;
}

.nickname-step.active.matched {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.nickname-step .step-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.nickname-step .step-content {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.nickname-arrow {
  font-size: 20px;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nickname-arrow.visible {
  opacity: 1;
  color: var(--accent);
}

.lookup-key {
  color: var(--accent);
}

.lookup-result {
  margin-left: 16px;
  padding: 4px 8px;
  background: var(--bg);
}

.lookup-result.success {
  background: rgba(46, 125, 50, 0.15);
  color: var(--success);
}

.nickname-highlight {
  background: rgba(2, 116, 182, 0.2);
  padding: 2px 4px;
  color: var(--accent);
}

.step-content.matched {
  color: var(--success);
}

/* Animated Parser */
.parser-animation {
  background: var(--wsj-cream);
  border: 1px solid var(--border);
  padding: 24px;
  margin: 32px 0;
}

.parser-input {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  padding: 16px;
  background: var(--bg);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.parser-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.parser-output {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.parser-field {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 16px;
}

.parser-field-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.parser-field-value {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  color: var(--accent);
  min-height: 1.5em;
}

.parser-field-value.success {
  color: var(--success);
}
.parser-field-value.error {
  color: var(--error);
}

/* File Chain Animation */
.file-chain {
  background: var(--wsj-cream);
  border: 1px solid var(--border);
  padding: 24px;
  margin: 32px 0;
}

.file-chain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.file-chain-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.file-boxes {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 8px;
}

.file-box {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 16px;
  min-width: 150px;
  flex-shrink: 0;
  transition: all 0.3s;
}

.file-box.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 116, 182, 0.1);
}

.file-name {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.file-speaker {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.file-speaker.inherited {
  color: var(--warning);
}

.file-speaker.detected {
  color: var(--success);
}

.file-arrow {
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.file-chain-legend {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 13px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
}

.legend-dot.detected {
  background: var(--success);
}
.legend-dot.inherited {
  background: var(--warning);
}

/* Progress bar for parsing animation */
.parse-progress {
  height: 4px;
  background: var(--border);
  margin-top: 16px;
  overflow: hidden;
}

.parse-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s ease;
}

/* Callout */
.callout {
  background: var(--wsj-cream);
  border-left: 4px solid var(--wsj-gold);
  padding: 20px 24px;
  margin: 32px 0;
}

.callout p {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
}

/* Footer */
footer {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
  font-size: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .parser-output {
    grid-template-columns: 1fr;
  }

  .scan-output {
    grid-template-columns: 1fr;
  }

  header {
    padding: 32px 16px;
  }

  .content {
    padding: 32px 16px 60px;
  }

  h2 {
    font-size: 22px;
    margin: 36px 0 16px;
  }

  h3 {
    font-size: 17px;
  }
}
