/* ═══════════════════════════════════════
   ARTICLE PAGE STYLES
   Imports: tokens.css, base.css, nav.css
═══════════════════════════════════════ */

/* ── Article header ── */
.article-header { background: var(--ink); padding: 56px 0 48px; position: relative; overflow: hidden; }
.article-header::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--green-800), transparent); }
.article-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--text-dim-on-dark); margin-bottom: 20px; }
.article-breadcrumb a { color: var(--green-400); font-weight: 600; }
.article-breadcrumb a:hover { text-decoration: underline; }
.article-breadcrumb-sep { color: var(--text-dim-on-dark); }
.article-topic-badge { display: inline-flex; align-items: center; gap: 7px; background: rgba(74,222,128,.15); border: 1px solid rgba(74,222,128,.3); color: var(--green-400); font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 100px; margin-bottom: 18px; letter-spacing: .5px; text-transform: uppercase; }
.article-topic-badge svg { display: block; flex-shrink: 0; }
.article-header h1 { font-family: var(--font-serif); font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 700; color: var(--white); line-height: 1.15; letter-spacing: -.4px; max-width: 680px; margin-bottom: 16px; }
.article-header-sub { font-size: 1.05rem; color: var(--text-muted-on-dark); line-height: 1.72; margin-bottom: 28px; }
.article-meta-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); }
.article-meta-item { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--text-dim-on-dark); }
.article-meta-item strong { color: var(--text-muted-on-dark); font-weight: 600; }
.article-meta-item svg { display: block; flex-shrink: 0; opacity: .75; }

/* ── Article layout ── */
.article-body { background: var(--cream); padding: 56px 0 80px; }

/* ── Article header background canvas ── */
.article-bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
.acv-grid { stroke: rgba(74,222,128,.08); stroke-width: 1; }
.acv-ring { fill: none; stroke: var(--green-700); stroke-width: 1.5; }
.acv-ring-1 { animation: acv-pulse 4s ease-in-out infinite; transform-origin: 72% 43%; }
.acv-ring-2 { animation: acv-pulse 5.5s ease-in-out infinite .8s; transform-origin: 72% 43%; }
@keyframes acv-pulse { 0%,100%{opacity:.15;transform:scale(1)} 50%{opacity:.45;transform:scale(1.06)} }
.acv-dot { fill: var(--green-600); }
.acv-dot-1 { animation: acv-float 6s ease-in-out infinite; }
.acv-dot-2 { animation: acv-float 8s ease-in-out infinite 1s; }
.acv-dot-3 { animation: acv-float 7s ease-in-out infinite 2s; }
.acv-dot-4 { animation: acv-float 9s ease-in-out infinite .5s; }
.acv-dot-amber { fill: var(--amber-500); animation: acv-float 7.5s ease-in-out infinite 1.5s; }
@keyframes acv-float { 0%,100%{transform:translateY(0);opacity:.3} 50%{transform:translateY(-12px);opacity:.7} }
.acv-path { fill: none; stroke: rgba(74,222,128,.2); stroke-width: 1; stroke-dasharray: 4 6; animation: acv-dash 12s linear infinite; }
@keyframes acv-dash { to{stroke-dashoffset:-200;} }
.article-layout { display: grid; grid-template-columns: 720px 260px; gap: 56px; align-items: start; }

/* ── Prose ── */
.article-content { min-width: 0; }
.prose h2 { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; color: var(--ink); line-height: 1.2; letter-spacing: -.3px; margin: 48px 0 16px; padding-top: 48px; border-top: 2px solid var(--stone-200); scroll-margin-top: 72px; }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: var(--ink); line-height: 1.3; margin: 32px 0 12px; scroll-margin-top: 72px; }
.prose h4 { font-size: .95rem; font-weight: 700; color: var(--ink); margin: 24px 0 8px; text-transform: uppercase; letter-spacing: .5px; }
.prose p { font-size: 1rem; color: var(--ink-soft); line-height: 1.8; margin-bottom: 20px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { font-style: italic; }
.prose a { color: var(--green-700); font-weight: 600; }
.prose a:hover { text-decoration: underline; }
.prose ul, .prose ol { margin: 16px 0 20px 24px; color: var(--ink-soft); font-size: 1rem; line-height: 1.8; }
.prose li { margin-bottom: 8px; }
.prose li:last-child { margin-bottom: 0; }
.section-anchor { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; color: var(--green-600); text-decoration: none; margin-left: 10px; opacity: 0; transition: opacity .2s; vertical-align: middle; }
.section-anchor svg { display: block; }
.prose h2:hover .section-anchor, .prose h3:hover .section-anchor { opacity: 1; }

/* ── Callouts ── */
.callout { border-radius: var(--radius-lg); padding: 24px 28px; margin: 28px 0; }
.callout-info { background: var(--blue-50); border-left: 4px solid var(--blue-700); }
.callout-info .callout-label { color: var(--blue-700); }
.callout-green { background: var(--green-50); border-left: 4px solid var(--green-700); }
.callout-green .callout-label { color: var(--green-800); }
.callout-amber { background: var(--amber-50); border-left: 4px solid var(--amber-500); }
.callout-amber .callout-label { color: #92400e; }
.callout-dark { background: var(--ink); border-left: 4px solid var(--green-600); }
.callout-dark .callout-label { color: var(--green-400); }
.callout-dark p { color: var(--text-muted-on-dark); }
.callout-dark a { color: var(--green-400); }
.callout-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.callout-label svg { display: block; flex-shrink: 0; }
.callout p { font-size: .93rem; line-height: 1.72; margin-bottom: 10px; }
.callout p:last-child { margin-bottom: 0; }
.callout ul { margin: 8px 0 0 20px; font-size: .93rem; line-height: 1.72; }
.callout li { margin-bottom: 6px; }

/* ── FAQ Section ── */
.article-faq { margin: 56px 0 0; padding-top: 48px; border-top: 2px solid var(--stone-200); }
.faq-heading { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; color: var(--ink); line-height: 1.2; letter-spacing: -.3px; margin: 0 0 28px; }
.faq-item { border: 1px solid var(--stone-200); border-radius: var(--radius-lg); margin-bottom: 10px; overflow: hidden; transition: border-color .18s; }
.faq-item:hover { border-color: var(--green-600); }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.4; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; font-weight: 300; color: var(--green-600); flex-shrink: 0; transition: transform .2s; line-height: 1; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] { border-color: var(--green-600); }
.faq-item[open] summary { color: var(--green-800); border-bottom: 1px solid var(--stone-200); }
.faq-answer { padding: 18px 22px; background: var(--stone-50); }
.faq-answer p { font-size: .95rem; color: var(--ink-soft); line-height: 1.78; margin-bottom: 12px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul { margin: 8px 0 12px 20px; font-size: .95rem; color: var(--ink-soft); line-height: 1.7; }
.faq-answer li { margin-bottom: 6px; }
.faq-answer strong { color: var(--ink); }

/* ── POUR grid ── */
.pour-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
.pour-card { background: var(--white); border: 1px solid var(--stone-200); border-radius: var(--radius-lg); padding: 22px 20px; transition: border-color .18s, box-shadow .18s; }
.pour-card:hover { border-color: var(--green-600); box-shadow: var(--shadow); }
.pour-card::before { content: attr(data-letter); display: block; font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--green-900); line-height: 1; margin-bottom: 8px; }
.pour-card h4 { font-size: .95rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; text-transform: none; letter-spacing: 0; }
.pour-card p { font-size: .85rem; color: var(--ink-soft); line-height: 1.6; margin: 0; }

/* ── Conformance levels table ── */
.levels-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .9rem; border: 1px solid var(--stone-200); border-radius: var(--radius-lg); overflow: hidden; }
.levels-table thead { background: var(--ink); }
.levels-table th { padding: 12px 16px; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-on-green950); }
.levels-table td { padding: 14px 16px; border-bottom: 1px solid var(--stone-100); vertical-align: top; }
.levels-table tr:last-child td { border-bottom: none; }
.levels-table tbody tr:nth-child(odd) { background: var(--white); }
.levels-table tbody tr:nth-child(even) { background: var(--stone-50); }
.levels-table tbody tr:hover { background: var(--green-50); }
.level-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pill-a   { background: var(--green-100); color: var(--green-800); }
.pill-aa  { background: var(--amber-100); color: #92400e; }
.pill-aaa { background: #f3e8ff; color: #6b21a8; }

/* ── External link cards ── */
.ext-links { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.ext-link-card { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--stone-200); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; transition: border-color .18s, box-shadow .18s; }
.ext-link-card:hover { border-color: var(--green-600); box-shadow: var(--shadow); text-decoration: none; }
.ext-link-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--green-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--green-700); }
.ext-link-icon svg { display: block; }
.ext-link-body { flex: 1; min-width: 0; }
.ext-link-title { font-size: .9rem; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.ext-link-desc { font-size: .78rem; color: var(--ink-soft); line-height: 1.4; }
.ext-link-arrow { font-size: .8rem; color: var(--ui-arrow); flex-shrink: 0; transition: transform .18s; }
.ext-link-card:hover .ext-link-arrow { transform: translateX(3px); color: var(--green-700); }

/* ── Sidebar ── */
.article-sidebar { position: sticky; top: 72px; }
.toc { background: var(--white); border: 1px solid var(--stone-200); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; }
.toc-header { background: var(--ink); padding: 14px 20px; display: flex; align-items: center; gap: 8px; }
.toc-header-text { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-on-green950); }
.toc-list { list-style: none; padding: 8px 0; }
.toc-item { border-bottom: 1px solid var(--stone-100); }
.toc-item:last-child { border-bottom: none; }
.toc-link { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: .88rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; transition: background .15s, color .15s; }
.toc-link:hover { background: var(--green-50); color: var(--green-800); text-decoration: none; }
.toc-link.active { background: var(--green-50); color: var(--green-800); font-weight: 700; }
.toc-link-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stone-200); flex-shrink: 0; transition: background .15s; }
.toc-link.active .toc-link-dot, .toc-link:hover .toc-link-dot { background: var(--green-600); }
.toc-sub { list-style: none; }
.toc-sub .toc-link { padding-left: 38px; font-size: .82rem; }
.toc-sub .toc-link-dot { width: 6px; height: 6px; }
.sidebar-card { background: var(--white); border: 1px solid var(--stone-200); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.sidebar-card-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); margin-bottom: 12px; }
.sidebar-card p { font-size: .85rem; color: var(--ink-soft); line-height: 1.65; margin-bottom: 12px; }
.sidebar-card p:last-child { margin-bottom: 0; }
.sidebar-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar-tag { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 100px; background: var(--stone-100); color: var(--ink-soft); }
.related-list { display: flex; flex-direction: column; gap: 0; }
.related-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--stone-100); text-decoration: none; transition: background .15s; }
.related-item:last-child { border-bottom: none; }
.related-item:hover { text-decoration: none; }
.related-item:hover .related-title { color: var(--green-800); }
.related-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-500); flex-shrink: 0; margin-top: 6px; }
.related-title { font-size: .85rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.related-cat { font-size: .72rem; color: var(--ink-soft); margin-top: 2px; }

/* ── Article footer nav ── */
.article-footer { background: var(--stone-50); border-top: 1px solid var(--stone-200); padding: 48px 0; }
.article-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.article-nav-btn { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--stone-200); border-radius: var(--radius-lg); padding: 16px 20px; text-decoration: none; transition: border-color .18s, box-shadow .18s; max-width: 320px; }
.article-nav-btn:hover { border-color: var(--green-600); box-shadow: var(--shadow); text-decoration: none; }
.article-nav-btn.next { flex-direction: row-reverse; text-align: right; }
.article-nav-icon { font-size: 1.1rem; color: var(--green-700); flex-shrink: 0; }
.article-nav-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-soft); margin-bottom: 3px; }
.article-nav-title { font-size: .9rem; font-weight: 700; color: var(--ink); line-height: 1.3; }

/* ── Responsive ── */
@media (max-width: 1060px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .toc { display: none; }
  .article-bg-canvas { display: none; }
}
@media (max-width: 760px) {
  .pour-grid { grid-template-columns: 1fr; }
  .article-footer-inner { flex-direction: column; }
  .article-nav-btn { max-width: 100%; width: 100%; }
}
