/* ═══════════════════════════════════════════════════════════════════
   article.css — Shared article/editorial template for RhodiumPrices.com
   Loaded alongside style.css on all content/article pages

   Layout philosophy:
     Dark header/footer/hero (site identity) +
     WHITE reading zone (body content) +
     Dark sidebar (live data)
   This pattern: Bloomberg, Reuters, Medium, The Block
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reading progress bar ─────────────────────────────────────────── */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--rh), #f5c842);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ══════════════════════════════════════════════════════════════════
   WHITE READING ZONE
   The main article body column (NOT the page, NOT the sidebar)
   gets a white background with dark text for readability.
   Works by overriding the dark theme vars inside .art-body scope.
══════════════════════════════════════════════════════════════════ */

/* ── White background on all article body zones ─────────────────── */
.art-body,
.art-page,
.art-layout,
.content-section,
.reading-zone {
  background: #ffffff;
}

/* Force white in content sections from subagent-written pages */
.content-section {
  border-top-color: #e8eaed !important;
  border-bottom-color: #e8eaed !important;
}

/* ── Override section dividers within white zone ─────────────────── */
.art-section {
  border-bottom-color: #e8eaed;
}

/* ── Headings: near-black on white ───────────────────────────────── */
.art-body h1, .art-body h2, .art-body h3, .art-body h4,
.content-main h1, .content-main h2, .content-main h3, .content-main h4,
.art-section h2, .art-section h3,
.art-layout h2, .art-layout h3 {
  color: #111827;
}

/* h3 left-border accent: deeper gold on white */
.art-body h3::before,
.art-layout h3::before {
  background: #b8860b;
}

/* Section label pills — on white, use stronger text */
.art-section-label,
[class*="lbl-"] {
  border: 1px solid currentColor;
  opacity: .9;
}

/* ── Body text: dark grey for comfortable reading ────────────────── */
.art-body p,    .art-body li,    .art-body ul,    .art-body ol,
.content-main p,.content-main li,.content-main ul,.content-main ol,
.art-section p, .art-section li,
.art-layout p,  .art-layout li {
  color: #374151;
}
.art-body strong,    .content-main strong,
.art-section strong, .art-layout strong {
  color: #111827;
}
.art-body a,    .content-main a { color: #b8860b; }
.art-body a:hover { text-decoration: underline; }

/* ── Article intro paragraph (larger) ────────────────────────────── */
.art-intro { color: #374151; }
.art-intro strong { color: #111827; }

/* ── Callout boxes: on white background ──────────────────────────── */
.callout p { color: #374151; }
.callout p strong { color: #111827; }
.callout-key  { background: rgba(184,134,11,.07); border-color: rgba(184,134,11,.28); }
.callout-warn { background: rgba(220,38,38,.06);  border-color: rgba(220,38,38,.22); }
.callout-info { background: rgba(37,99,235,.06);  border-color: rgba(37,99,235,.2); }
.callout-pos  { background: rgba(22,163,74,.06);  border-color: rgba(22,163,74,.2); }
.callout-key  .callout-title { color: #92650a; }
.callout-warn .callout-title { color: #b91c1c; }
.callout-info .callout-title { color: #1d4ed8; }
.callout-pos  .callout-title { color: #15803d; }

/* ── Data tables: on white background ────────────────────────────── */
.art-table,
.data-table {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.art-table th, .data-table th {
  background: #f1f5f9;
  color: #64748b;
  border-bottom-color: #e2e8f0;
}
.art-table td, .data-table td {
  color: #374151;
  border-bottom-color: #f0f4f8;
}
.art-table tr:last-child td, .data-table tr:last-child td { border-bottom: none; }
.art-table tr:hover td, .data-table tr:hover td { background: #f8fafc; }
.art-table td.num, .data-table td.mono  { color: #111827; font-weight: 700; }
.art-table td.rh,  .data-table td.rh   { color: #92650a; font-weight: 700; }
.art-table td.pos, .data-table td.pos  { color: #15803d; }
.art-table td.neg, .data-table td.neg  { color: #b91c1c; }
.art-table caption { color: #64748b; }

/* ── Table of contents: on white ─────────────────────────────────── */
.art-toc {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-left-color: #b8860b;
}
.art-toc-title { color: #64748b; }
.art-toc a { color: #374151; }
.art-toc a:hover { color: #b8860b; }
.art-toc .sub-item a { color: #94a3b8; }

/* ── Article section labels ───────────────────────────────────────── */
.lbl-supply { background: rgba(220,38,38,.08);   color: #b91c1c; }
.lbl-demand { background: rgba(37,99,235,.08);   color: #1d4ed8; }
.lbl-market { background: rgba(109,40,217,.08);  color: #6d28d9; }
.lbl-tech   { background: rgba(22,163,74,.08);   color: #15803d; }
.lbl-sub    { background: rgba(184,134,11,.08);  color: #92650a; }
.lbl-chem   { background: rgba(184,134,11,.08);  color: #92650a; }
.lbl-guide  { background: rgba(184,134,11,.08);  color: #92650a; }
.lbl-data   { background: rgba(22,163,74,.08);   color: #15803d; }
.lbl-invest { background: rgba(37,99,235,.08);   color: #1d4ed8; }
.lbl-tax    { background: rgba(234,88,12,.08);   color: #c2410c; }

/* ── Article stat cards (within white zone) ──────────────────────── */
.art-stat {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.art-stat-val { color: #b8860b; }
.art-stat-lbl { color: #64748b; }

/* ── FAQ section: light grey band (after white zone) ─────────────── */
.art-faq { background: #f4f5f7 !important; }
.art-faq .sec-title, .faq-section .sec-title { color: #111827; }
.faq-item {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.faq-item:hover { border-color: #cbd5e1; }
.faq-item summary { color: #111827; }
.faq-item[open] summary { background: #f8fafc; color: #0f172a; }
.faq-item[open] summary::after { color: #b8860b; }
.faq-item p { color: #374151; }
.faq-item strong { color: #111827; }

/* Content-section FAQs (subagent pages) */
.faq-section {
  background: #f4f5f7 !important;
}

/* ── Related articles: keep dark (site accent) ───────────────────── */
.art-related { /* inherits dark from var(--bg2) */ }

/* ── Subagent page specific: .content-main ───────────────────────── */
.content-main { background: transparent; }
.content-main h2 { color: #111827 !important; }
.content-main h3 { color: #1e293b !important; }
.content-main p  { color: #374151 !important; }
.content-main ul, .content-main li { color: #374151 !important; }
.content-main strong { color: #111827 !important; }

/* Ensure background flows through content-section container */
.content-section .container { background: transparent; }

/* ── Article breadcrumb ───────────────────────────────────────────── */
.art-breadcrumb {
  padding: 13px 0;
  font-size: 12.5px;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.art-breadcrumb a { color: var(--text3); text-decoration: none; transition: color var(--t); }
.art-breadcrumb a:hover { color: var(--rh); }
.art-breadcrumb .sep { margin: 0 8px; opacity: .5; }

/* ── Article hero ─────────────────────────────────────────────────── */
.art-hero {
  padding: 52px 0 44px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212,168,67,.08) 0%, transparent 60%);
}
.art-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(212,168,67,.1);
  color: var(--rh);
  border: 1px solid rgba(212,168,67,.2);
  margin-bottom: 18px;
  text-decoration: none;
}
.art-category .cat-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--rh);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.art-h1 {
  font-size: clamp(26px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 820px;
}
.art-h1 .accent { color: var(--rh); }
.art-meta-row {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.art-meta-row .meta-sep { margin: 0 12px; opacity: .3; }
.art-meta-row a { color: var(--text3); text-decoration: none; transition: color var(--t); }
.art-meta-row a:hover { color: var(--rh); }
.art-meta-row .author-name { color: var(--text2); font-weight: 500; }
.art-intro {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.8;
  max-width: 760px;
  margin-bottom: 28px;
}
.art-intro strong { color: var(--text1); }

/* ── Key stats strip (hero bottom) ───────────────────────────────── */
.art-stats-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.art-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 12px 18px;
  min-width: 130px;
}
.art-stat-val {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--rh);
  margin-bottom: 3px;
}
.art-stat-lbl { font-size: 11px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* ── Two-column article layout ────────────────────────────────────── */
.art-page {
  padding: 0 0 72px;
}
.art-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 52px;
  align-items: start;
  padding-top: 44px;
}

/* ── Article body ─────────────────────────────────────────────────── */
.art-body {}
.art-section {
  padding: 0 0 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--border);
}
.art-section:last-child { border-bottom: none; }

/* Section label pill */
.art-section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.lbl-supply   { background: rgba(255,82,82,.1);   color: #ff6b6b; }
.lbl-demand   { background: rgba(106,172,255,.1); color: #6aacff; }
.lbl-market   { background: rgba(160,120,255,.1); color: #a078ff; }
.lbl-tech     { background: rgba(80,200,120,.1);  color: #50c878; }
.lbl-sub      { background: rgba(212,168,67,.1);  color: var(--rh); }
.lbl-chem     { background: rgba(245,200,66,.1);  color: #f5c842; }
.lbl-guide    { background: rgba(212,168,67,.1);  color: var(--rh); }
.lbl-data     { background: rgba(80,200,120,.1);  color: #50c878; }
.lbl-invest   { background: rgba(106,172,255,.1); color: #6aacff; }
.lbl-tax      { background: rgba(255,160,100,.1); color: #ffa060; }

/* Typography */
.art-body h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.7px;
  line-height: 1.2;
  margin: 32px 0 12px;
  color: var(--text1);
}
.art-body h2:first-child { margin-top: 0; }
.art-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.art-body h3::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 17px;
  background: var(--rh);
  border-radius: 2px;
  flex-shrink: 0;
}
.art-body p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.85;
  margin-bottom: 16px;
}
.art-body p strong { color: var(--text1); }
.art-body ul, .art-body ol {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.85;
  margin-bottom: 16px;
  padding-left: 22px;
}
.art-body li { margin-bottom: 6px; }
.art-body li strong { color: var(--text1); }

/* ── Callout boxes ────────────────────────────────────────────────── */
.callout {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
}
.callout-key {
  background: rgba(212,168,67,.07);
  border: 1px solid rgba(212,168,67,.22);
}
.callout-warn {
  background: rgba(239,68,68,.06);
  border: 1px solid rgba(239,68,68,.2);
}
.callout-info {
  background: rgba(106,172,255,.06);
  border: 1px solid rgba(106,172,255,.18);
}
.callout-pos {
  background: rgba(34,197,94,.06);
  border: 1px solid rgba(34,197,94,.18);
}
.callout-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .9px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.callout-key  .callout-title { color: var(--rh); }
.callout-warn .callout-title { color: var(--neg); }
.callout-info .callout-title { color: #6aacff; }
.callout-pos  .callout-title { color: var(--pos); }
.callout p { font-size: 13.5px; color: var(--text2); line-height: 1.75; margin: 0; }
.callout p strong { color: var(--text1); }

/* ── Data tables ──────────────────────────────────────────────────── */
.art-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 20px 0;
  font-size: 13.5px;
}
.art-table th {
  background: var(--bg3);
  padding: 11px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text3);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.art-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  vertical-align: top;
}
.art-table tr:last-child td { border-bottom: none; }
.art-table tr:hover td { background: var(--bg3); }
.art-table td.num { font-family: var(--mono); font-weight: 700; color: var(--text1); }
.art-table td.rh  { font-family: var(--mono); font-weight: 700; color: var(--rh); }
.art-table td.pos { font-weight: 600; color: var(--pos); }
.art-table td.neg { font-weight: 600; color: var(--neg); }
.art-table td strong { color: var(--text1); }
.art-table caption {
  font-size: 11.5px;
  color: var(--text3);
  text-align: left;
  padding: 8px 0 4px;
  caption-side: bottom;
}

/* ── Table of contents (TOC) ──────────────────────────────────────── */
.art-toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--rh);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.art-toc-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
}
.art-toc ol {
  list-style: decimal;
  padding-left: 18px;
  margin: 0;
}
.art-toc li { font-size: 13px; margin-bottom: 6px; }
.art-toc a { color: var(--text2); text-decoration: none; transition: color var(--t); }
.art-toc a:hover { color: var(--rh); }
.art-toc .sub-item { padding-left: 16px; margin-top: 4px; }
.art-toc .sub-item a { font-size: 12px; color: var(--text3); }

/* ── Sidebar ──────────────────────────────────────────────────────── */
.art-sidebar { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.sidebar-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sidebar-widget-head {
  padding: 11px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.sidebar-widget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.sidebar-widget-row:last-child { border-bottom: none; }
.sidebar-widget-row span { color: var(--text3); }
.sidebar-widget-row strong { font-family: var(--mono); color: var(--text1); }
.sidebar-widget-row.highlight strong { color: var(--rh); }

/* Live price widget */
.sidebar-price-widget {
  background: var(--card);
  border: 1px solid rgba(212,168,67,.28);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.spw-label { font-size: 10px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--text3); margin-bottom: 8px; }
.spw-price { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--rh); letter-spacing: -1px; }
.spw-unit  { font-size: 12px; color: var(--text3); margin-top: 4px; }
.spw-change { font-size: 12px; font-weight: 600; margin-top: 6px; }

/* Sidebar related links */
.sidebar-links { padding: 4px 0; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background var(--t), color var(--t);
}
.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover { background: var(--bg3); color: var(--text1); }
.sidebar-link .sl-icon { font-size: 14px; flex-shrink: 0; }
.sidebar-link .sl-arrow { color: var(--rh); margin-left: auto; flex-shrink: 0; font-size: 11px; }

/* ── Article footer / related section ────────────────────────────── */
.art-related {
  padding: 48px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.art-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.art-related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  display: block;
  transition: transform var(--t), border-color var(--t);
}
.art-related-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212,168,67,.3);
}
.arc-cat  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--text3); margin-bottom: 8px; }
.arc-title { font-size: 14px; font-weight: 700; color: var(--text1); margin-bottom: 5px; line-height: 1.3; }
.arc-desc { font-size: 12px; color: var(--text3); line-height: 1.5; }

/* ── FAQ section ──────────────────────────────────────────────────── */
.art-faq { padding: 52px 0; background: var(--bg2); border-top: 1px solid var(--border); }
.art-faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
@media (max-width: 700px) { .art-faq-grid { grid-template-columns: 1fr; } }

/* ── Nav — article pages ──────────────────────────────────────────── */
/* Standard nav for all article/content pages */
.art-nav-links {
  display: flex;
  gap: 4px;
}
.art-nav-links .nav-link.active {
  color: var(--rh) !important;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .art-layout {
    grid-template-columns: 1fr 260px;
    gap: 36px;
  }
}
@media (max-width: 900px) {
  .art-layout {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }
  .art-sidebar { position: static; }
  .art-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .art-stats-strip { gap: 8px; }
  .art-stat { min-width: calc(50% - 4px); }
  .art-related-grid { grid-template-columns: 1fr; }
  .art-h1 { font-size: 26px; }
}
