/* ─────────────────────────────────────────────────────────────────
   Auron Advisory — Shared Insight Article System   /css/auron-article.css
   Pair with /js/auron-article.js. House style: cream, ink, dark gold.
   Assumes page defines --gold-dark, --ink, --ink-mid, --ink-light,
   --cream, --border (fallbacks provided).
   ───────────────────────────────────────────────────────────────── */

/* ── Reading-progress bar (sits at the bottom edge of the sticky nav) ── */
.read-progress { position: fixed; left: 0; right: 0; top: 76px; height: 2px; background: transparent; z-index: 99; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--gold-dark, #7A5E1F); transition: width .12s linear; }
@media (max-width: 620px) { .read-progress { top: 64px; } }

/* ── Controls: toggle + export ── */
.controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin: 0 0 2.2rem; padding: 0.9rem 0; border-top: 0.5px solid var(--border, rgba(26,26,24,0.12)); border-bottom: 0.5px solid var(--border, rgba(26,26,24,0.12)); }
.toggle { display: inline-flex; border: 0.5px solid var(--border, rgba(26,26,24,0.12)); background: #fff; }
.toggle button { font-family: 'Instrument Sans', sans-serif; font-size: 12px; letter-spacing: 0.05em; padding: 0.5rem 1.05rem; background: transparent; border: none; color: var(--ink-mid, #4A4A45); cursor: pointer; transition: color .15s, background .15s; min-height: 40px; }
.toggle button + button { border-left: 0.5px solid var(--border, rgba(26,26,24,0.12)); }
.toggle button[aria-pressed="true"] { background: var(--gold-dark, #7A5E1F); color: var(--cream, #FAFAF7); }
.toggle button:focus-visible { outline: 2px solid var(--gold-dark, #7A5E1F); outline-offset: 2px; }
.export-btn { font-family: 'Instrument Sans', sans-serif; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink, #1A1A18); background: transparent; border: 0.5px solid var(--ink, #1A1A18); padding: 0.55rem 1.1rem; cursor: pointer; transition: background .15s, color .15s; min-height: 40px; }
.export-btn:hover { background: var(--ink, #1A1A18); color: var(--cream, #FAFAF7); }
.export-btn:focus-visible { outline: 2px solid var(--gold-dark, #7A5E1F); outline-offset: 2px; }
.view-hint { flex-basis: 100%; font-size: 12.5px; color: var(--ink-light, #8A8A80); }

/* ── Inline TOC (mobile + top of article) ── */
.toc { display: block; background: var(--cream-mid, #F0EFE8); border-left: 3px solid var(--gold-dark, #7A5E1F); padding: 1rem 1.3rem; margin: 0 0 2.4rem; }
.toc h4 { font-family: 'Instrument Sans', sans-serif; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dark, #7A5E1F); margin: 0 0 0.7rem; font-weight: 600; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { position: relative; padding: 0.42rem 0 0.42rem 1.9rem; border-top: 0.5px solid var(--border, rgba(26,26,24,0.12)); counter-increment: toc; margin: 0; }
.toc li:first-of-type { border-top: none; padding-top: 0; }
.toc li::before { content: counter(toc); position: absolute; left: 0; top: 0.5rem; font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 600; color: var(--gold-dark, #7A5E1F); line-height: 1; width: auto; height: auto; background: none; border-radius: 0; }
.toc li:first-of-type::before { top: 0.1rem; }
.toc a { text-decoration: none; color: var(--ink, #1A1A18); font-weight: 600; font-size: 14.5px; transition: color .15s; }
.toc a:hover { color: var(--gold-dark, #7A5E1F); }
.toc .desc { color: var(--ink-mid, #4A4A45); font-weight: 400; font-size: 13px; }
.toc .desc::before { content: " · "; color: var(--gold-dark, #7A5E1F); }

/* ── "↑ Contents" back-links ── */
.toc-back { display: block; font-family: 'Instrument Sans', sans-serif; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-light, #8A8A80); text-decoration: none; margin: 2.5rem 0 0.4rem; transition: color .15s; }
.toc-back:hover { color: var(--gold-dark, #7A5E1F); }
.toc-back::before { content: '↑ '; }

/* ── Sticky sidebar TOC (desktop ≥ 1180px) ── */
.toc-side { display: none; }
@media (min-width: 1180px) {
  .has-toc-side { position: relative; }
  .toc-side { display: block; position: absolute; top: 0; right: -260px; width: 220px; height: 100%; pointer-events: none; }
  .toc-side-inner { position: sticky; top: 100px; pointer-events: auto; border-left: 1px solid var(--border, rgba(26,26,24,0.12)); padding: 0.2rem 0 0.2rem 1rem; }
  .toc-side h4 { font-family: 'Instrument Sans', sans-serif; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark, #7A5E1F); margin: 0 0 0.6rem; font-weight: 600; }
  .toc-side ol { list-style: none; margin: 0; padding: 0; }
  .toc-side li { margin: 0; padding: 0; }
  .toc-side li::before { content: none; }
  .toc-side a { display: block; font-family: 'Instrument Sans', sans-serif; font-size: 12.5px; line-height: 1.4; color: var(--ink-light, #8A8A80); text-decoration: none; padding: 0.3rem 0 0.3rem 0.6rem; border-left: 2px solid transparent; margin-left: -1rem; padding-left: 1.4rem; transition: color .15s, border-color .15s; }
  .toc-side a:hover { color: var(--ink, #1A1A18); }
  .toc-side a.is-active { color: var(--ink, #1A1A18); border-left-color: var(--gold-dark, #7A5E1F); font-weight: 600; }
  /* when the sidebar shows, the inline TOC becomes redundant */
  .toc { display: none; }
}

/* ── Summary block ── */
.summary-points { background: #fff; border: 0.5px solid var(--border, rgba(26,26,24,0.12)); padding: 1.5rem 1.7rem; margin: 1.8rem 0 2rem; }
.summary-points h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 600; color: var(--ink, #1A1A18); margin: 0 0 0.9rem; }
.summary-points ul { margin: 0; padding: 0; list-style: none; }
.summary-points li { position: relative; padding-left: 1.4rem; margin-bottom: 0.7rem; color: var(--ink-mid, #4A4A45); font-size: 15.5px; line-height: 1.55; }
.summary-points li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; background: var(--gold-dark, #7A5E1F); border-radius: 50%; }
.summary-points li strong { color: var(--ink, #1A1A18); font-weight: 600; }

/* ── View state ── */
.summary-only { display: none; }
article.summary .full-only { display: none !important; }
article.summary .summary-only { display: block; }
article.summary .toc, article.summary .toc-side, article.summary .toc-back { display: none !important; }

/* ── Print / Export PDF (respects active view) ── */
@media print {
  @page { margin: 18mm 16mm; }
  .site-header, nav, footer, .controls, .toc-back, .toc-side, .read-progress, .consent, .article-cta, .nav-toggle { display: none !important; }
  body { background: #fff !important; color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  article { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
  article.summary .full-only { display: none !important; }
  .toc { display: block; border-left: 3px solid #7A5E1F; background: #f5f4ef !important; page-break-inside: avoid; }
  h1, h2, h3 { color: #111 !important; page-break-after: avoid; }
  h1 em, .eyebrow { color: #7A5E1F !important; }
  blockquote, table, figure, img, .summary-points { page-break-inside: avoid; }
  a { color: #7A5E1F !important; text-decoration: none; }
}
