/* ─────────────────────────────────────────────────────────────────
   Guardfolio — Blog Article Shared CSS
   Design: trustworthy fintech, readable long-form, clean hierarchy
   ───────────────────────────────────────────────────────────────── */

/* DESIGN: Font loaded at page level via <link> on each page.
   Fallback chain matches system UI fonts for instant render. */

:root {
  --primary:      #6366f1;
  --primary-dark: #4338ca;
  --primary-light:#e0e7ff;
  --secondary:    #7c3aed;
  --hero-from:    #0b1120;
  --hero-to:      #1a3070;
  --ink-900:      #0f172a;
  --ink-800:      #1e293b;
  --ink-700:      #334155;
  --ink-600:      #475569;
  --ink-500:      #64748b;
  --bg-soft:      #f8fafc;
  --border:       #e2e8f0;
  --radius-card:  14px;
  --shadow-card:  0 1px 3px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.08);
  /* Align with main.css — blog HTML often uses var(--gray-*) inline */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --max-readable-width: 700px;
  --space-section: clamp(40px, 5vw, 56px);
}

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, svg, canvas { max-width: 100%; }
html { scroll-behavior: smooth; }

/* ── Base ────────────────────────────────────────────────────────── */
body {
  margin: 0;
  font-family:
    "Plus Jakarta Sans",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink-800);
  background: #fff;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  width: auto;
  height: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* ── Reading-progress bar (populated by JS on each page) ─────────── */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, #a78bfa 100%);
  z-index: 9999;
  transition: width .1s linear;
  pointer-events: none;
}

/* ── Layout container ────────────────────────────────────────────── */
.container {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─────────────────────────────────────────────────────────────────
   BREADCRUMB
   ───────────────────────────────────────────────────────────────── */
.breadcrumb-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
}
.breadcrumb-wrap .container { max-width: 840px; }

/* Legacy selector — keep working for old inline-style breadcrumbs */
.breadcrumb-wrap nav,
nav[aria-label="Breadcrumb"] {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-500);
}
.breadcrumb-wrap nav a,
nav[aria-label="Breadcrumb"] a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  transition: background .15s;
}
.breadcrumb-wrap nav a:hover,
nav[aria-label="Breadcrumb"] a:hover {
  background: var(--primary-light);
}

/* ─────────────────────────────────────────────────────────────────
   ARTICLE HEADER
   ───────────────────────────────────────────────────────────────── */
.article-header {
  background: linear-gradient(140deg, var(--hero-from) 0%, var(--hero-to) 100%);
  color: #fff;
  padding: 60px 0 46px;
  position: relative;
  overflow: hidden;
}

/* DESIGN: Subtle dot-grid texture for depth */
.article-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* DESIGN: Accent glow — top-right quadrant */
.article-header::after {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(99,102,241,.22) 0%, transparent 68%);
  pointer-events: none;
}

.article-header .container {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Category pill ───────────────────────────────────────────────── */
.article-category {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #a5b4fc;
  border: 1px solid rgba(165,180,252,.32);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 18px;
  background: rgba(99,102,241,.12);
}

/* ── H1 ─────────────────────────────────────────────────────────── */
.article-header h1 {
  margin: 0 auto;
  font-size: clamp(26px, 4.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #fff;
  max-width: 740px;
  text-align: center;
}

/* ── Article meta row — single centered line ─────────────────────── */
.article-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 0;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
  text-align: center;
  max-width: 100%;
  padding: 0 8px;
}
.article-meta span { display: inline-flex; align-items: center; }
.article-meta span + span::before {
  content: "·";
  margin: 0 10px;
  opacity: .45;
  font-size: 16px;
}
@media (max-width: 520px) {
  .article-meta {
    flex-direction: column;
    gap: 4px;
  }
  .article-meta span + span::before {
    display: none;
  }
}

/* ─────────────────────────────────────────────────────────────────
   ARTICLE BODY
   ───────────────────────────────────────────────────────────────── */
.article-content {
  max-width: var(--max-readable-width);
  margin: 42px auto 76px;
  padding: 0 24px;
  overflow-wrap: anywhere;
}

/* ── Hero image ──────────────────────────────────────────────────── */
.article-image {
  width: min(100%, 640px);
  max-width: 640px;
  height: auto;
  border-radius: 12px;
  margin: 0 auto 30px;
  display: block;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

/* ── H2 — section breaks with border rule ────────────────────────── */
.article-content h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: var(--space-section) 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── H3 — accent left rule ───────────────────────────────────────── */
.article-content h3 {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.3;
  margin: 30px 0 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.article-content h3::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 3px;
  min-width: 3px;
  height: 1.2em;
  background: var(--primary);
  border-radius: 2px;
  margin-top: .12em;
}

/* ── Body text ───────────────────────────────────────────────────── */
.article-content p {
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.78;
  color: var(--ink-700);
  margin: 0 0 18px;
}

/* ── Links ───────────────────────────────────────────────────────── */
.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color .15s;
}
.article-content a:hover { color: var(--primary-dark); }

/* ── Strong ──────────────────────────────────────────────────────── */
.article-content strong { color: var(--ink-900); font-weight: 700; }

/* ── Lists — card-row style with accent arrow ────────────────────── */
.article-content ul,
.article-content ol {
  margin: 14px 0 24px;
  padding: 0;
  list-style: none;
}
.article-content ol { counter-reset: ol-counter; }

.article-content li {
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-700);
  padding: 10px 16px 10px 44px;
  position: relative;
  border-radius: 9px;
  margin-bottom: 7px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

/* ul: arrow bullet */
.article-content ul li::before {
  content: "→";
  position: absolute;
  left: 14px;
  top: 10px;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.75;
}

/* ol: counter bullet */
.article-content ol li { counter-increment: ol-counter; }
.article-content ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 13px;
  top: 10px;
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.75;
}

/* ─────────────────────────────────────────────────────────────────
   HIGHLIGHT / WARNING / DATA BOXES
   ───────────────────────────────────────────────────────────────── */
.highlight-box,
.warning-box,
.data-box {
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 20px 24px;
  margin: 30px 0;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
  position: relative;
}
.highlight-box p,
.data-box p {
  margin: 0;
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-800);
}

.warning-box {
  background: #fff8f8;
  border-color: #fecdd3;
  border-left-color: #f43f5e;
}
.warning-box p {
  margin: 0;
  font-size: 16px;
  line-height: 1.72;
  color: #881337;
}

/* ─────────────────────────────────────────────────────────────────
   CTA BOX
   ───────────────────────────────────────────────────────────────── */
.cta-box {
  background: linear-gradient(140deg, #0f172a 0%, #1b2d63 100%);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  margin: 42px 0 26px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(30,58,138,.35), 0 2px 8px rgba(0,0,0,.15);
}
.cta-box::before {
  content: "";
  position: absolute;
  top: -70px; right: -70px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%);
  pointer-events: none;
}
.cta-box h3 {
  font-size: 20px;
  font-weight: 800;
  color: #fff !important;
  margin: 0 0 10px;
  letter-spacing: -.01em;
  /* Override the ::before accent rule */
  display: block;
}
.cta-box h3::before { display: none; }
.cta-box p {
  color: rgba(255,255,255,.85) !important;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 18px !important;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 9px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  transition: transform .15s, box-shadow .15s;
}
.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  color: var(--primary-dark);
}

/* ─────────────────────────────────────────────────────────────────
   RISK BANNER (secondary CTA block)
   ───────────────────────────────────────────────────────────────── */
.risk-banner {
  max-width: 680px;
  /* Top margin: previous blocks (e.g. Related Reading) often have margin-bottom: 0 — without this the CTA sits flush and reads as overlapping */
  margin: 32px auto 56px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-card);
  padding: 32px;
  text-align: center;
  clear: both;
}
.related-articles + .risk-banner {
  margin-top: 40px;
}
.risk-banner-headline {
  font-size: 18px;
  font-weight: 700;
  color: #14532d;
  margin: 0 0 8px;
}
.risk-banner-sub {
  font-size: 15px;
  color: #166534;
  line-height: 1.6;
  margin: 0 0 22px;
}
.risk-banner-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.risk-banner-cta-primary {
  display: inline-flex;
  align-items: center;
  background: #16a34a;
  color: #fff;
  padding: 11px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: background .15s;
}
.risk-banner-cta-primary:hover { background: #15803d; color: #fff; }
.risk-banner-cta-secondary {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: #16a34a;
  padding: 11px 22px;
  border-radius: 8px;
  border: 1.5px solid #16a34a;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s;
}
.risk-banner-cta-secondary:hover { background: #f0fdf4; }

/* Inside .article-content, global link styles beat single-class CTAs — restore banner colors */
.article-content .risk-banner .risk-banner-cta-primary {
  color: #fff;
  text-decoration: none;
}
.article-content .risk-banner .risk-banner-cta-primary:hover {
  color: #fff;
  text-decoration: none;
}
.article-content .risk-banner .risk-banner-cta-secondary {
  color: #16a34a;
  text-decoration: none;
}
.article-content .risk-banner .risk-banner-cta-secondary:hover {
  background: #f0fdf4;
  color: #15803d;
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────────
   TABLES — wrapper scrolls; <table> keeps native display for layout
   (.table-wrapper = legacy alias, e.g. metals-volatility-indicator)
   ───────────────────────────────────────────────────────────────── */
.article-content .table-scroll,
.article-content .table-wrapper {
  /* Critical: constrain width so overflow-x creates an inner scroll, not page growth */
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
}
/* Mobile: subtle hint that the table scrolls (shown via media query below) */
.table-scroll-hint {
  display: none;
  font-size: 13px;
  color: var(--ink-500);
  margin: 0 0 10px;
  line-height: 1.4;
}
.article-content .table-scroll table,
.article-content .table-wrapper table {
  /* Wider than phones → horizontal pan stays inside .table-scroll */
  width: max-content;
  min-width: 720px;
  border-collapse: collapse;
  margin: 0;
  border: none;
  border-radius: 0;
  display: table;
}
.article-content .table-scroll table th,
.article-content .table-scroll table td,
.article-content .table-wrapper table th,
.article-content .table-wrapper table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.55;
  white-space: nowrap;
  text-align: left;
}
.article-content .table-scroll table tr:last-child td,
.article-content .table-wrapper table tr:last-child td { border-bottom: none; }
.article-content .table-scroll table th,
.article-content .table-wrapper table th {
  background: var(--bg-soft);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────────
   OPT-OUTS — elements that must NOT inherit card-list styles
   ───────────────────────────────────────────────────────────────── */

/* Table of contents lists */
.toc ul, .toc ol { list-style: none; margin: 0; padding: 0; }
.toc li {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 4px 0 !important;
  margin-bottom: 0 !important;
  font-size: 15px !important;
}
.toc li::before { display: none !important; }
.toc li a { font-weight: 500; text-decoration: none; color: var(--primary); }
.toc li a:hover { text-decoration: underline; }

/* Risk-number spans inside risk-cards — hide the CSS counter */
.risk-card li::before { display: none !important; }
.risk-card li {
  background: none !important;
  border: none !important;
  padding: 4px 0 4px 20px !important;
  border-radius: 0 !important;
}
.risk-card ul { list-style: disc; padding-left: 20px; }
.risk-card ul li::before { display: none !important; }

/* ─────────────────────────────────────────────────────────────────
   RISK LIST LAYOUT (e.g. blog/portfolio-risks-2026)
   ───────────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 32px;
}
.stat-box {
  background: linear-gradient(145deg, #f0f4ff 0%, #fafbff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 14px;
  text-align: center;
}
.stat-box .number {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.stat-box .label {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-600);
  font-weight: 500;
}

.toc h4 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
}

/* Row: .risk-number + .risk-body — badge stays in flow so headings never overlap */
.risk-card {
  position: relative;
  margin: 28px 0;
  padding: 22px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.risk-card .risk-body {
  flex: 1;
  min-width: 0;
}
.risk-card .risk-number {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  box-sizing: border-box;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.risk-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin: 0 0 14px;
  padding: 0;
  border: none;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.3;
  color: var(--ink-900);
}
.risk-card h3::before {
  display: none !important;
  content: none !important;
}
.risk-card .severity {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 100px;
  flex-shrink: 0;
}
.risk-card .severity.high {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.risk-card .severity.medium {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.risk-card p {
  font-size: 16px;
  margin-bottom: 14px;
}
.risk-card p:last-of-type {
  margin-bottom: 0;
}
.risk-card .impact {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-700);
}

.checklist {
  margin: 28px 0;
  padding: 22px 22px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.checklist h4 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
}
.checklist ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  counter-reset: checklist;
}
.checklist ul li {
  counter-increment: checklist;
  position: relative;
  padding: 14px 16px 14px 52px !important;
  margin-bottom: 10px !important;
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-700);
}
.checklist ul li:last-child {
  margin-bottom: 0 !important;
}
.checklist ul li::before {
  content: counter(checklist) !important;
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
  border-radius: 8px;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.danger-box {
  margin: 28px 0;
  padding: 20px 22px;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  border: 1px solid #fecdd3;
  border-left: 4px solid #f43f5e;
  background: #fff8f8;
}
.danger-box p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: #881337;
}

/* Nav lists inside article (e.g. related-articles grids) */
.article-content nav li,
.related-articles li,
.tool-links li {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.article-content nav li::before,
.related-articles li::before,
.tool-links li::before { display: none !important; }

/* ─────────────────────────────────────────────────────────────────
   BLOCKQUOTE
   ───────────────────────────────────────────────────────────────── */
.article-content blockquote {
  margin: 28px 0;
  padding: 18px 24px 18px 20px;
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--ink-700);
  font-size: 17px;
  line-height: 1.75;
}
.article-content blockquote p { margin: 0; font-size: inherit; color: inherit; }

/* ─────────────────────────────────────────────────────────────────
   HR — subtle section divider
   ───────────────────────────────────────────────────────────────── */
.article-content hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 44px 0;
}

/* ─────────────────────────────────────────────────────────────────
   TOOL LINKS (replaces inline blue "Free tools" cards)
   ───────────────────────────────────────────────────────────────── */
.tool-links {
  max-width: 680px;
  margin: 36px auto 0;
  padding: 24px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-card);
}
.tool-links h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #1e40af;
  margin: 0 0 14px;
  display: block;
}
.tool-links h3::before { display: none; }
.tool-links-grid {
  display: grid;
  gap: 8px;
}
.tool-links a {
  display: block;
  padding: 11px 14px;
  background: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  transition: background .15s, border-color .15s;
  line-height: 1.4;
}
.tool-links a:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }

/* ─────────────────────────────────────────────────────────────────
   RELATED ARTICLES (replaces inline related-posts cards)
   ───────────────────────────────────────────────────────────────── */
.related-articles {
  max-width: var(--max-readable-width);
  margin: 34px auto 0;
}
/* Inline “Keep Reading” blocks — don’t use section h3 accent bar */
.related-articles h3 {
  display: block;
}
.related-articles h3::before {
  display: none !important;
}

.related-articles-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-500);
  margin-bottom: 14px;
}
.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.related-article-card {
  display: block;
  padding: 16px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--ink-900);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.related-article-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(99,102,241,.12);
  transform: translateY(-2px);
  color: var(--ink-900);
}
.related-article-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-500);
  margin-bottom: 6px;
}
.related-article-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-900);
  margin-bottom: 6px;
}
.related-article-desc {
  font-size: 13.5px;
  color: var(--ink-500);
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────── */
footer {
  background: #f8fafc;
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}
footer .footer-links a {
  color: var(--ink-500);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
footer .footer-links a:hover { color: var(--primary); background: var(--primary-light); }
footer .footer-copyright {
  font-size: 12.5px;
  color: #94a3b8;
}

/* ─────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .article-header { padding: 50px 0 38px; }

  .article-content {
    margin: 30px auto 52px;
    padding: 0 16px;
  }

  .article-content p,
  .article-content li { font-size: 15px; line-height: 1.68; }

  .article-content h2 { margin-top: 36px; margin-bottom: 12px; }
  .article-content h3 { margin-top: 24px; }

  .article-content ul li,
  .article-content ol li { padding-left: 38px; }

  .highlight-box,
  .warning-box,
  .data-box { padding: 18px 18px; }

  .cta-box { padding: 28px 20px; }
  .cta-button { display: block; width: 100%; text-align: center; padding: 14px 20px; }

  .risk-banner {
    padding: 20px 14px;
    margin: 28px auto 34px;
  }
  .risk-banner-headline {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 8px;
  }
  .risk-banner-sub {
    font-size: 14px;
    line-height: 1.58;
    margin-bottom: 16px;
  }
  .risk-banner-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto;
  }
  .risk-banner-cta-primary,
  .risk-banner-cta-secondary {
    width: 100%;
    justify-content: center;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
  }

  /* Related Reading cards (inline flex rows at bottom of some posts) */
  .related-articles > div + div > a {
    padding: 16px !important;
    gap: 12px !important;
  }

  /* Full-bleed scroll strip: breakout of article padding so pan-x is usable */
  .article-content .table-scroll,
  .article-content .table-wrapper {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-sizing: border-box;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    scrollbar-gutter: stable;
  }

  .table-scroll-hint {
    display: block;
  }

  .stat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .risk-card {
    padding: 20px 16px;
    gap: 12px;
  }
  .risk-card .risk-number {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
    padding: 0 6px;
    border-radius: 9px;
  }

  .checklist {
    padding: 18px 16px 20px;
  }
  .checklist ul li {
    padding-left: 48px !important;
    font-size: 15px;
  }
  .checklist ul li::before {
    left: 12px;
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .article-header h1 { font-size: clamp(24px, 8vw, 32px); }
  .article-content h2 { font-size: clamp(20px, 6.5vw, 26px); }
  .article-content h3 { font-size: clamp(16px, 5vw, 19px); }

  .article-content .table-scroll table th,
  .article-content .table-scroll table td,
  .article-content .table-wrapper table th,
  .article-content .table-wrapper table td { padding: 10px 12px; font-size: 14px; }

  .container,
  .article-content { padding-left: 16px; padding-right: 16px; }
}

@supports (width: 100dvw) {
  @media (max-width: 700px) {
    .article-content .table-scroll,
    .article-content .table-wrapper {
      width: 100dvw;
      max-width: 100dvw;
      margin-left: calc(50% - 50dvw);
      margin-right: calc(50% - 50dvw);
    }
  }
}
