/* Shared stylesheet for recreated archive blog posts (web/blog/*.html).
   Built entirely on ../tokens.css. Lifted from the in-page styles of the
   2026-era posts so archive posts match the visual DNA exactly.
   Page-specific data-viz (if any) stays in the post's own <style>. */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body {
  background-image:
    radial-gradient(ellipse 1200px 600px at 50% -10%, oklch(0.78 0.17 60 / 0.08), transparent 60%),
    radial-gradient(ellipse 800px 500px at 90% 20%, oklch(0.66 0.21 295 / 0.05), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  opacity: 0.4;
}
main { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============== ARTICLE HEADER ============== */
.article-head { max-width: 820px; margin: 0 auto; padding: 64px 32px 0; }
.crumbs {
  font-family: var(--mono); font-size: var(--fs-micro); color: var(--fg-3);
  letter-spacing: 0.12em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px; margin-bottom: 28px;
}
.crumbs a { color: var(--fg-3); transition: color var(--dur-fast); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: 0.4; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.a-tag {
  font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-xs); padding: 4px 9px;
}
.a-tag.muted { color: var(--fg-3); border-color: var(--line); }
.article-head h1 {
  font-size: clamp(38px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.03em;
  font-weight: 500; text-wrap: balance;
}
.article-head h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-2); }
.article-sub { margin-top: 20px; font-size: var(--fs-lead); color: var(--fg-2); line-height: var(--lh-relaxed); max-width: 680px; }
.byline {
  margin-top: 28px; display: flex; align-items: center; gap: 16px;
  font-family: var(--mono); font-size: var(--fs-micro); color: var(--fg-3);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--fg-3); }

/* hero image */
.article-hero-img { max-width: 760px; margin: 36px auto 0; padding: 0 32px; }
.article-hero-img img {
  width: 100%; max-width: 560px; display: block; margin: 0 auto;
  border-radius: var(--radius-xl); border: 1px solid var(--line);
}
.ph {
  border-radius: var(--radius-xl); border: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, oklch(0.78 0.17 60 / 0.045) 11px 12px),
    linear-gradient(160deg, var(--bg-2), var(--bg-1));
  position: relative; overflow: hidden; display: grid; place-items: center;
  aspect-ratio: 16 / 7; width: 100%;
}
.ph-label {
  font-family: var(--mono); font-size: var(--fs-micro); white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--fg-3);
  background: var(--bg); padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill);
}

/* ============== ARTICLE LAYOUT (TOC + prose) ============== */
.article-layout {
  max-width: 1140px; margin: 0 auto; padding: 56px 32px 0;
  display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 72px; justify-content: center;
}
.toc { position: sticky; top: 96px; align-self: start; }
.toc h6 {
  font-family: var(--mono); font-size: var(--fs-micro); color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.14em; font-weight: 500;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line-soft);
}
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc a {
  display: block; padding: 7px 12px; border-radius: var(--radius-sm);
  font-size: var(--fs-small); color: var(--fg-3); line-height: 1.35;
  border-left: 2px solid transparent; transition: color var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast);
}
.toc a:hover { color: var(--fg-2); background: var(--bg-1); }
.toc a.active { color: var(--fg); border-left-color: var(--accent); background: var(--bg-1); }

/* prose */
.prose { min-width: 0; }
.prose > p { font-size: 17px; line-height: 1.72; color: var(--fg-2); margin-bottom: 22px; text-wrap: pretty; }
.prose > p strong, .prose li strong { color: var(--fg); font-weight: 600; }
.prose .lead-p { font-size: 19px; color: var(--fg); }
.prose a.inline { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-dim); }
.prose a.inline:hover { text-decoration-color: var(--accent); }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: var(--radius-xs); padding: 1px 6px; color: var(--accent-2); }

.prose h2 {
  font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
  margin: 56px 0 18px; padding-top: 32px; border-top: 1px solid var(--line-soft);
  scroll-margin-top: 90px; text-wrap: balance;
}
.prose h2 .h2-eyebrow {
  display: block; font-family: var(--mono); font-size: var(--fs-micro); color: var(--accent);
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; margin-bottom: 10px;
}
.prose h3 {
  font-size: var(--fs-h5); font-weight: 600; letter-spacing: -0.01em; color: var(--fg);
  margin: 32px 0 12px; scroll-margin-top: 90px;
}

.prose ul.bullets { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 0 0 22px; }
.prose ul.bullets li {
  position: relative; padding-left: 26px; font-size: 16px; line-height: 1.65; color: var(--fg-2);
}
.prose ul.bullets li::before {
  content: '▸'; position: absolute; left: 4px; top: 0; color: var(--accent); font-family: var(--mono); font-size: 13px;
}

/* inline figure */
.figure { margin: 8px 0 26px; }
.figure img { width: 100%; display: block; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--bg-1); }
.figure figcaption { font-family: var(--mono); font-size: var(--fs-micro); color: var(--fg-3); letter-spacing: 0.04em; margin-top: 10px; text-align: center; }

/* certificate / stat callout */
.cert-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 24px; }
.cert {
  flex: 1; min-width: 180px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-1), var(--bg)); padding: 18px 20px;
}
.cert .k { font-family: var(--mono); font-size: var(--fs-micro); color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.12em; }
.cert .v { font-family: var(--serif); font-size: 32px; color: var(--accent); line-height: 1; margin-top: 6px; }
.cert .d { font-size: var(--fs-small); color: var(--fg-2); margin-top: 8px; line-height: 1.5; }

/* callout box */
.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  background: oklch(0.78 0.17 60 / 0.05);
  padding: 18px 22px; margin: 0 0 24px;
}
.callout p { font-size: 16px; line-height: 1.65; color: var(--fg-2); margin: 0; }
.callout p strong { color: var(--fg); }

/* legal fineprint (e.g. Gartner disclaimers on press releases) */
.prose .fineprint {
  font-size: 12.5px; line-height: 1.6; color: var(--fg-3);
  margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line-soft);
  text-wrap: pretty;
}

/* event detail pages — meta panel in the sticky aside */
.event-aside { display: flex; flex-direction: column; gap: 18px; }
.ev-meta {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-1), var(--bg)); overflow: hidden;
}
.ev-meta > div {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px;
}
.ev-meta > div + div { border-top: 1px solid var(--line-soft); }
.ev-k {
  font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-3);
}
.ev-v { font-size: 15px; color: var(--fg); line-height: 1.4; }
.event-aside .btn { width: 100%; justify-content: center; }
.ev-sponsor { margin-top: 4px; font-family: var(--mono); font-size: var(--fs-micro); color: var(--fg-3); letter-spacing: 0.04em; }

/* pull quote */
.pull {
  margin: 36px 0; padding: 28px 32px;
  border: 1px solid var(--line); border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 500px 300px at 0% 0%, var(--accent-dim), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg));
  position: relative; overflow: hidden;
}
.pull::before {
  content: '“'; position: absolute; top: 2px; left: 20px;
  font-family: var(--serif); font-size: 120px; line-height: 1; color: var(--accent); opacity: 0.14;
}
.pull blockquote {
  position: relative; font-size: 18px; line-height: 1.6; color: var(--fg);
  font-style: italic; font-family: var(--serif); letter-spacing: 0.01em;
}
.pull .cite { margin-top: 16px; font-family: var(--mono); font-size: var(--fs-micro); color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.pull .cite span { color: var(--fg-3); }

/* comparison table */
.ctable-wrap { margin: 4px 0 26px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table.ctable { border-collapse: collapse; width: 100%; min-width: 640px; font-size: var(--fs-small); }
table.ctable th, table.ctable td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; line-height: 1.45; }
table.ctable thead th {
  font-family: var(--mono); font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-3); background: var(--bg-1); font-weight: 500;
}
table.ctable thead th.kf { color: var(--accent); }
table.ctable tbody th {
  font-family: var(--mono); font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg-2); font-weight: 500; white-space: nowrap; background: oklch(0.165 0.014 250 / 0.5);
}
table.ctable td { color: var(--fg-2); }
table.ctable td.kf { color: var(--fg); background: oklch(0.78 0.17 60 / 0.05); font-weight: 500; }
table.ctable tr:last-child th, table.ctable tr:last-child td { border-bottom: none; }

/* numbered checklist */
ol.checklist { list-style: none; counter-reset: ck; display: flex; flex-direction: column; gap: 12px; margin: 4px 0 26px; }
ol.checklist li {
  counter-increment: ck; position: relative; padding: 16px 18px 16px 56px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  font-size: 16px; line-height: 1.55; color: var(--fg-2);
}
ol.checklist li strong { color: var(--fg); }
ol.checklist li::before {
  content: counter(ck, decimal-leading-zero); position: absolute; left: 16px; top: 15px;
  font-family: var(--mono); font-size: var(--fs-micro); color: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius-xs); padding: 3px 6px;
}

.article-foot {
  max-width: 720px; margin: 56px auto 0; padding: 28px 32px 0;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.back-link {
  font-family: var(--mono); font-size: var(--fs-small); color: var(--fg-2);
  display: inline-flex; align-items: center; gap: 8px; transition: gap var(--dur-med) var(--ease-out), color var(--dur-fast);
}
.back-link:hover { gap: 12px; color: var(--accent); }
.share { display: flex; gap: 8px; }

/* CTA band em uses serif */
.cta-band h2 em { font-family: var(--serif); font-style: italic; -webkit-text-fill-color: transparent; }

@media (max-width: 980px) {
  .article-layout { grid-template-columns: minmax(0, 720px); justify-content: center; }
  .toc { display: none; }
  .nav-links { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
