/* =========================================================
   Externalsight Blog — Article (single post) layer
   v20260531 | Loaded on top of blog.v20260531.css.
   Ports the "Blog Article B" design reading view, plus
   data-driven section styles (faq / cta / table / code).
   ========================================================= */

:root {
  --accent2:      #4FD1C5;
  --accent-glow:  rgba(94,233,240,0.07);
}

/* ── Reading progress bar ───────────────────────────────── */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200;
  background: transparent; pointer-events: none;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  box-shadow: 0 0 10px rgba(94,233,240,0.5);
  transition: width 80ms linear;
}

/* ── Article hero ───────────────────────────────────────── */
.art-hero { position: relative; overflow: hidden; padding: 52px 40px 46px; border-bottom: 1px solid var(--line); }
.art-hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 20% top, black 0%, transparent 68%);
  mask-image: radial-gradient(ellipse at 20% top, black 0%, transparent 68%);
}
.art-hero-glow {
  position: absolute; top: -240px; left: -120px; width: 680px; height: 680px;
  background: radial-gradient(circle, rgba(94,233,240,0.10) 0%, transparent 62%);
  pointer-events: none;
}
.art-hero-inner { position: relative; max-width: 860px; margin: 0 auto; }
.art-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.art-readtime { font-size: 10px; color: var(--ink-dim); letter-spacing: 0.1em; }
.art-h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem); line-height: 1.05; letter-spacing: -0.032em;
  margin: 0 0 22px; font-weight: 600; color: var(--ink); text-wrap: balance; max-width: 19ch;
}
.art-dek { font-size: 17px; line-height: 1.62; color: var(--ink-soft); margin: 0; max-width: 660px; }

.art-byline { display: flex; align-items: center; gap: 24px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.art-byline .byline { gap: 13px; }
.art-byline .byline-avatar { width: 42px; height: 42px; font-size: 12px; }
.art-byline .byline-name { font-size: 14px; }
.art-share { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.share-btn {
  width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-mute);
  transition: border-color 160ms, color 160ms, background 160ms; cursor: pointer;
}
.share-btn:hover { border-color: var(--line-strong); color: var(--accent); background: var(--panel2); }
.share-btn svg { width: 16px; height: 16px; display: block; }

/* ── Layout: article + sidebar ──────────────────────────── */
.art-wrap { max-width: var(--maxw); margin: 0 auto; padding: 56px 40px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 72px; align-items: start; }
.art-main { max-width: 720px; }

/* ── Prose ──────────────────────────────────────────────── */
.prose { color: var(--ink-soft); }
.prose > p { font-size: 16.5px; line-height: 1.78; margin: 0 0 26px; color: var(--ink-soft); }
.prose > p:first-of-type { font-size: 17.5px; color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink-mute); font-style: italic; }
.prose a.inline { color: var(--accent); border-bottom: 1px solid rgba(94,233,240,0.35); transition: border-color 150ms; }
.prose a.inline:hover { border-color: var(--accent); }

.prose h2 {
  font-size: 1.55rem; font-weight: 600; letter-spacing: -0.022em; line-height: 1.18;
  color: var(--ink); margin: 52px 0 18px; scroll-margin-top: 90px; position: relative; padding-left: 22px;
}
.prose h2:first-child { margin-top: 8px; }
.prose h2::before {
  content: ''; position: absolute; left: 0; top: 0.18em; bottom: 0.18em; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--accent), var(--purple));
}
.prose h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); margin: 38px 0 14px; scroll-margin-top: 90px; }

.prose ul, .prose ol { margin: 0 0 26px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.prose li { font-size: 16px; line-height: 1.66; color: var(--ink-soft); padding-left: 30px; position: relative; }
.prose ul li::before {
  content: ''; position: absolute; left: 6px; top: 0.62em; width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent-soft); border: 1px solid rgba(94,233,240,0.5); transform: rotate(45deg);
}
.prose ol { counter-reset: step; }
.prose ol li { counter-increment: step; }
.prose ol li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0.05em;
  font-family: 'Geist Mono', monospace; font-size: 11px; font-weight: 600; color: var(--accent);
}
.prose li strong { color: var(--ink); }
.prose li p { margin: 0; }
.prose li .prose-code { margin-top: 10px; }

/* ── Inline + block code ────────────────────────────────── */
.prose code {
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 0.84em;
  background: rgba(94,233,240,0.07); color: var(--accent2);
  padding: 2px 7px; border-radius: 4px; border: 1px solid rgba(94,233,240,0.14);
}
.prose-code {
  margin: 14px 0 26px; padding: 12px 16px; background: rgba(0,0,0,0.4);
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px;
  overflow-x: auto; font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12.5px; line-height: 1.6; color: var(--accent); white-space: pre;
}
.prose-code code { background: none; border: none; color: inherit; padding: 0; }

/* ── Callout / key-takeaways ────────────────────────────── */
.callout {
  background: var(--panel); border: 1px solid var(--line-strong); border-left: 2px solid var(--accent);
  border-radius: 10px; padding: 24px 26px; margin: 34px 0;
}
.callout-label {
  display: inline-flex; align-items: center; gap: 7px; font-family: 'Geist Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}
.callout-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.callout p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin: 0; }
.callout ul { margin: 10px 0 0; }
.callout ul li { font-size: 14.5px; }

.callout.warn { border-left-color: var(--warn); }
.callout.warn .callout-label { color: var(--warn); }
.callout.warn .callout-label::before { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

/* ── Inline terminal / evidence block ───────────────────── */
.evidence { margin: 34px 0; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; box-shadow: 0 24px 54px -28px rgba(0,0,0,0.5); }
.evidence-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.evidence-bar .cdot { width: 9px; height: 9px; border-radius: 50%; }
.evidence-bar .console-title { font-size: 11px; color: var(--ink-mute); margin-left: 6px; }
.evidence-tag { margin-left: auto; font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--ink-dim); letter-spacing: 0.1em; }
.evidence-body { padding: 18px 20px; font-family: 'Geist Mono', monospace; font-size: 12.5px; line-height: 1.85; color: var(--ink-soft); overflow-x: auto; }
.evidence-body .c { color: var(--ink-dim); }
.evidence-body .k { color: var(--accent); }
.evidence-body .ok { color: var(--success); }
.evidence-body .warn { color: var(--warn); }
.evidence-body .crit { color: var(--danger); }
.evidence-body .pre { white-space: pre; }

/* ── Stat row inside article ────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; margin: 34px 0; }
.stat-cell { background: var(--panel); padding: 22px 22px; }
.stat-cell .stat-num { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-cell .stat-num.accent { color: var(--accent); }
.stat-cell .stat-cap { font-size: 11.5px; color: var(--ink-mute); line-height: 1.5; margin-top: 9px; }

.prose hr { border: none; border-top: 1px solid var(--line); margin: 44px 0; }

/* ── FAQ list (data-driven faq sections) ────────────────── */
.faq-list { margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.faq-item { padding: 24px 0; border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-item dt { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 10px; padding-left: 26px; position: relative; line-height: 1.4; }
.faq-item dt::before {
  content: "Q"; position: absolute; left: 0; top: 0; font-family: 'Geist Mono', monospace;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(94,233,240,0.25); border-radius: 4px;
  padding: 2px 5px; line-height: 1.6;
}
.faq-item dd { margin: 0; padding-left: 26px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.8; }

/* ── CTA arrow links (data-driven cta sections) ─────────── */
.cta-link-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.cta-link-arrow {
  display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 14px;
  padding: 10px 16px; border: 1px solid rgba(94,233,240,0.2); border-radius: 6px; background: var(--accent-glow);
  transition: background 150ms, border-color 150ms, transform 150ms; width: fit-content;
}
.cta-link-arrow:hover { background: var(--accent-soft); border-color: rgba(94,233,240,0.35); transform: translateX(4px); }

/* ── Comparison table (data-driven table sections) ──────── */
.table-wrap { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; margin: 20px 0 8px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
.table-wrap caption {
  caption-side: bottom; padding: 10px 16px; font-size: 12px; color: var(--ink-mute); text-align: left;
  border-top: 1px solid var(--line); font-family: 'Geist Mono', monospace; letter-spacing: 0.02em;
}
.table-wrap thead th {
  text-align: left; padding: 11px 16px; font-family: 'Geist Mono', monospace; font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-mute);
  background: rgba(255,255,255,0.025); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table-wrap thead th.col-highlight, .table-wrap tbody td.col-highlight { background: var(--accent-glow); color: var(--accent); font-weight: 600; }
.table-wrap tbody tr { border-bottom: 1px solid var(--line); transition: background 150ms; }
.table-wrap tbody tr:last-child { border-bottom: none; }
.table-wrap tbody tr:hover { background: rgba(255,255,255,0.02); }
.table-wrap tbody td { padding: 12px 16px; color: var(--ink-soft); vertical-align: middle; line-height: 1.55; }

/* ── Plan badges (preserved from prior info-page version) ─ */
.plan-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-family: 'Geist Mono', monospace; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; border: 1px solid transparent;
}
.plan-badge--recon    { background: rgba(148,163,184,0.1); color: #94a3b8; border-color: rgba(148,163,184,0.2); }
.plan-badge--sentinel { background: var(--accent-soft); color: var(--accent); border-color: rgba(94,233,240,0.22); }
.plan-badge--fortress { background: rgba(79,209,197,0.1); color: var(--accent2); border-color: rgba(79,209,197,0.22); }
.plan-badge--citadel  { background: linear-gradient(135deg, rgba(94,233,240,0.15), rgba(79,209,197,0.1)); color: var(--accent); border-color: rgba(94,233,240,0.3); }

/* ── Author card (end of article) ───────────────────────── */
.author-card { display: flex; gap: 18px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; padding: 26px 28px; margin: 48px 0 0; }
.author-card .byline-avatar { width: 52px; height: 52px; font-size: 15px; flex-shrink: 0; }
.author-card-body { display: flex; flex-direction: column; gap: 6px; }
.author-card-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.author-card-role { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.04em; }
.author-card-bio { font-size: 13.5px; line-height: 1.6; color: var(--ink-mute); margin: 4px 0 0; }

/* ── Sidebar ────────────────────────────────────────────── */
.art-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 22px; }
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 20px 20px; }
.toc-title { font-family: 'Geist Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px; }
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-link {
  font-size: 13px; line-height: 1.45; color: var(--ink-mute); padding: 7px 12px; border-radius: 7px;
  border-left: 2px solid transparent; transition: color 150ms, background 150ms, border-color 150ms;
  display: block;
}
.toc-link:hover { color: var(--ink-soft); background: var(--panel2); }
.toc-link.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }

/* Sidebar CTA card */
.side-cta { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; box-shadow: 0 28px 60px -34px rgba(94,233,240,0.2); }
.side-cta-head { padding: 11px 16px; background: var(--panel2); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.side-cta-head .mono { font-size: 10px; color: var(--ink-mute); letter-spacing: 0.14em; }
.side-cta-live { display: inline-flex; align-items: center; gap: 6px; font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--success); font-weight: 600; }
.side-cta-body { padding: 22px 20px; }
.side-cta-score { display: flex; align-items: baseline; gap: 9px; margin-bottom: 4px; }
.side-cta-score .num { font-size: 38px; font-weight: 600; letter-spacing: -0.03em; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.side-cta-score .grade { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--warn); }
.side-cta-cap { font-size: 12px; color: var(--ink-mute); line-height: 1.5; margin: 0 0 18px; }
.side-cta-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; transition: opacity 150ms; }
.side-cta-btn:hover { opacity: 0.88; }
.side-cta-note { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--ink-dim); text-align: center; margin: 12px 0 0; letter-spacing: 0.03em; }

/* ── Related articles ───────────────────────────────────── */
.related { max-width: var(--maxw); margin: 0 auto; padding: 24px 40px 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }

/* ── End CTA band ───────────────────────────────────────── */
.cta-band { position: relative; overflow: hidden; margin: 80px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-band-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}
.cta-band-glow { position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 700px; height: 500px; background: radial-gradient(circle, rgba(94,233,240,0.1) 0%, transparent 62%); pointer-events: none; }
.cta-band-inner { position: relative; max-width: 760px; margin: 0 auto; padding: 76px 40px; text-align: center; }
.cta-band h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.06; color: var(--ink); margin: 0 0 16px; text-wrap: balance; }
.cta-band p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 0 auto 30px; max-width: 480px; }
.cta-band-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-primary { padding: 13px 24px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 600; box-shadow: 0 0 36px rgba(94,233,240,0.28); transition: opacity 150ms; }
.cta-primary:hover { opacity: 0.9; }
.cta-secondary { padding: 13px 24px; border-radius: 8px; background: transparent; color: var(--ink); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; transition: border-color 150ms; }
.cta-secondary:hover { border-color: var(--accent); }
.cta-band-trust { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 26px; font-family: 'Geist Mono', monospace; font-size: 11.5px; color: var(--ink-mute); letter-spacing: 0.04em; }
.cta-band-trust span { display: inline-flex; align-items: center; gap: 6px; }
.cta-band-trust .ok { color: var(--success); }

/* ── Back to top ────────────────────────────────────────── */
#back-to-top {
  position: fixed; bottom: 32px; right: 32px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(94,233,240,0.08); border: 1px solid rgba(94,233,240,0.2); color: var(--accent);
  cursor: pointer; opacity: 0; transform: translateY(10px);
  transition: opacity 250ms, transform 250ms, background 150ms, box-shadow 150ms;
  z-index: 150; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
#back-to-top svg { pointer-events: none; }
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { background: rgba(94,233,240,0.16); border-color: var(--accent); box-shadow: 0 0 22px rgba(94,233,240,0.2); transform: translateY(-3px); }

/* entry animation */
.art-hero, .art-wrap { animation: fadeup 0.45s ease both; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1080px) {
  .art-wrap { grid-template-columns: 1fr; gap: 0; }
  .art-side { display: none; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .art-hero { padding: 40px 20px 36px; }
  .art-wrap { padding: 40px 20px 32px; }
  .related { padding: 24px 20px 0; }
  .related-grid { grid-template-columns: 1fr; }
  .cta-band-inner { padding: 56px 20px; }
  .art-share { width: 100%; margin-left: 0; }
  #back-to-top { bottom: 20px; right: 20px; }
}
