@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,800;0,900;1,400;1,700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ═══════════════════════════════════════════════════════════════════════
   AI Intelligence Hub — V2 Economist Article CSS
   Shared stylesheet for all article, digest, and research brief pages.
   Category accent colors are set via --red / --red-2 in each page's :root.
   ═══════════════════════════════════════════════════════════════════════

   Category accent color reference:
   Healthcare AI       --red: #e3120b;  --red-2: #b30d07;
   MCP & Agentic       --red: #003399;  --red-2: #002277;
   Snowflake           --red: #29B5E8;  --red-2: #1a96c7;
   Technical Writeups  --red: #2e4057;  --red-2: #1e2d3d;
   Vendor Research     --red: #006655;  --red-2: #004d40;
   Microsoft AI        --red: #0078D4;  --red-2: #005fa3;
   About / Brand       --red: #e3120b;  --red-2: #b30d07;
   ═══════════════════════════════════════════════════════════════════════ */

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

:root {
  /* Override these two per page to set category accent */
  --red:      #e3120b;
  --red-2:    #b30d07;

  --ink:      #000000;
  --ink-2:    #1a1a1a;
  --muted:    #757575;
  --muted-2:  #999999;
  --bg:       #ffffff;
  --bg-soft:  #f7f7f7;
  --border:   #d4d4d4;
  --hairline: #000000;

  --cat-ai:     #e3120b;
  --cat-mcp:    #003399;
  --cat-snow:   #29B5E8;
  --cat-tech:   #2e4057;
  --cat-vendor: #006655;
  --cat-msft:   #0078D4;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'JetBrains Mono', monospace;
}

html, body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-2); text-decoration: underline; }

/* ── PAGE HEADER ── */
.page-header {
  background: var(--red);
  color: #fff;
  padding: 56px 36px 48px;
  border-bottom: 4px solid var(--ink);
}
.header-inner { max-width: 860px; margin: 0 auto; }
.header-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-eyebrow .sep { opacity: 0.45; }
.header-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 760px;
  margin-bottom: 20px;
}
.header-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  max-width: 620px;
  line-height: 1.65;
  margin-bottom: 28px;
  font-style: italic;
}
.header-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(255,255,255,0.65);
  flex-wrap: wrap;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.header-meta .sep { opacity: 0.35; }
.badge {
  background: #fff;
  color: var(--red);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── STICKY NAV ── */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 2px solid var(--hairline);
}
.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.nav-inner a {
  display: block;
  padding: 13px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-inner a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
  text-decoration: none;
}

/* ── CONTENT ── */
.content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 36px 80px;
}

/* ── ARTICLE SECTIONS ── */
.article-section {
  border-top: 1px solid var(--hairline);
  padding: 48px 0;
}
.article-section:first-child {
  border-top: none;
  padding-top: 44px;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 3px;
  background: var(--red);
  vertical-align: middle;
}
.article-section h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.article-section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  margin: 28px 0 12px;
  border-top: 2px solid var(--red);
  padding-top: 14px;
}
.article-section p {
  color: var(--ink-2);
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.78;
}
.article-section p:last-child { margin-bottom: 0; }

/* Drop cap for first section */
.jody-prose > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  line-height: 0.8;
  float: left;
  margin-right: 8px;
  margin-top: 6px;
  color: var(--red);
}

em { font-style: italic; }
strong { font-weight: 700; }

/* ── CALLOUTS ── */
.callout {
  background: var(--bg-soft);
  border-left: 4px solid var(--red);
  padding: 18px 22px;
  margin: 14px 0 18px;
  font-size: 0.97rem;
  color: var(--ink-2);
  line-height: 1.65;
}
.callout strong {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.callout-warn {
  background: var(--bg-soft);
  border-left: 4px solid var(--ink);
  padding: 18px 22px;
  margin: 14px 0 18px;
  font-size: 0.97rem;
  color: var(--ink-2);
  line-height: 1.65;
}
.callout-green {
  background: #f0faf0;
  border-left: 4px solid #006655;
  padding: 18px 22px;
  margin: 14px 0 18px;
  font-size: 0.97rem;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ── DIGEST: STORY GRID ── */
.story-grid { display: flex; flex-direction: column; gap: 28px; }
.story-item { border-bottom: 1px solid var(--border); padding-bottom: 28px; }
.story-item:last-child { border-bottom: none; }
.story-item h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  border-top: 2px solid var(--red);
  padding-top: 12px;
}
.story-item h3 a { color: var(--ink); }
.story-item h3 a:hover { color: var(--red); text-decoration: none; }
.story-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.type-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--red);
  color: var(--red);
}
.older-warn {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #92400e;
  background: #fef3c7;
  padding: 2px 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.story-item p {
  color: var(--ink-2);
  font-size: 0.97rem;
  line-height: 1.72;
  margin-bottom: 12px;
}
.read-link {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid var(--red);
  padding-bottom: 1px;
}
.read-link:hover { color: var(--red-2); border-bottom-color: var(--red-2); text-decoration: none; }

/* ── CODE BLOCKS ── */
.code-block-wrap {
  margin: 20px 0;
  border: 1px solid var(--border);
}
.code-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-soft);
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
}
.code-block-wrap pre {
  background: #0f1117;
  color: #e8eaf0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
}

/* ── TABLES ── */
.scope-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}
.scope-table th {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-bottom: 2px solid var(--hairline);
  text-align: left;
}
.scope-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.scope-table tr:last-child td { border-bottom: none; }

/* ── FOOTER ── */
.page-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 28px 36px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.8;
  border-top: 4px solid var(--red);
}
.page-footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.page-footer a:hover { color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .content { padding: 0 20px 60px; }
  .nav-inner { padding: 0 20px; }
  .page-header { padding: 40px 20px 36px; }
  .header-title { font-size: 1.9rem; }
}
