/* Individual blog post (article) page styles */

.article-section {
  padding: 28px 0 64px;
  position: relative;
  z-index: 1;
}

/* Crumbs above title */
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 22px;
}
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--ink-4); }

/* Article header (full-bleed within shell) */
.article-header {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 36px;
}
@media (max-width: 920px) {
  .article-header { grid-template-columns: 1fr; gap: 28px; }
}

.article-header h1 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 0 0 16px;
  text-wrap: balance;
}
.article-header .meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.article-header .cat-tag {
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-edge);
  color: var(--ink);
  text-transform: uppercase;
  font-size: 10.5px;
}
.article-header .deck {
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.55;
  max-width: 56ch;
  text-wrap: pretty;
}

/* Visual on the right side of the header */
.article-visual {
  position: relative;
  height: 280px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 80% at 30% 30%, color-mix(in oklab, var(--accent), transparent 70%), transparent 60%),
    radial-gradient(50% 70% at 80% 80%, color-mix(in oklab, var(--accent), transparent 84%), transparent 60%),
    var(--surface);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.article-visual::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(60% 60% at 50% 50%, black, transparent);
  opacity: 0.5;
}
.article-visual svg {
  width: 130px;
  height: 130px;
  color: var(--accent);
  filter: drop-shadow(0 12px 32px var(--accent-edge));
  position: relative;
  z-index: 1;
}
.article-visual .corner-mark {
  position: absolute;
  top: 16px; left: 18px;
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
}

/* Two-column layout: TOC + article body */
.article-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 920px) { .article-grid { grid-template-columns: 1fr; gap: 8px; } }

.toc {
  position: sticky;
  top: 88px;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
}
@media (max-width: 920px) { .toc { display: none; } }

.toc .toc-label {
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10.5px;
  margin-bottom: 12px;
  padding-left: 12px;
}
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line-soft); }
.toc li { line-height: 1.5; }
.toc a {
  display: block;
  padding: 6px 12px;
  color: var(--ink-3);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 140ms, border-color 140ms;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
}
.toc a:hover { color: var(--ink); }
.toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* The article body */
.article-body {
  max-width: 720px;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.article-body > * + * { margin-top: 1.05em; }
.article-body p { margin: 0; text-wrap: pretty; }

.article-body h2 {
  font-family: "Geist", sans-serif;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--ink);
  font-weight: 500;
  margin: 64px 0 0;
  scroll-margin-top: 96px;
  position: relative;
  padding-top: 24px;
}
.article-body h2::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 36px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-family: "Geist", sans-serif;
  font-size: 19px;
  letter-spacing: -0.012em;
  color: var(--ink);
  font-weight: 500;
  margin: 36px 0 0;
  scroll-margin-top: 96px;
}

.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { color: var(--ink-2); }
.article-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-edge);
  transition: border-color 140ms;
}
.article-body a:hover { border-bottom-color: var(--accent); }

.article-body ul, .article-body ol {
  padding-left: 0;
  list-style: none;
  margin-top: 1.05em;
}
.article-body ul li, .article-body ol li {
  position: relative;
  padding-left: 28px;
  margin-top: 10px;
  line-height: 1.6;
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 8px; top: 0.7em;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}
.article-body ol { counter-reset: art; }
.article-body ol li {
  counter-increment: art;
}
.article-body ol li::before {
  content: counter(art, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

/* Definition-style list items (for incident list with bold labels) */
.article-body .incident { display: block; }
.article-body .incident strong {
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
}

/* Pull-quote */
.article-body blockquote {
  margin: 36px 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  font-style: normal;
  letter-spacing: -0.005em;
}
.article-body blockquote::before {
  content: "“";
  font-family: "Geist", sans-serif;
  font-size: 40px;
  color: var(--accent);
  line-height: 0.5;
  margin-right: 6px;
  vertical-align: -10px;
}

/* Affiliate / "Top pick" callout */
.callout-affiliate {
  margin: 44px 0;
  padding: 28px;
  background:
    radial-gradient(60% 100% at 100% 0%, color-mix(in oklab, var(--accent), transparent 88%), transparent 60%),
    var(--surface);
  border: 1px solid var(--accent-edge);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .callout-affiliate { grid-template-columns: 1fr; text-align: left; }
}
.callout-affiliate .visual {
  width: 72px; height: 72px;
  border-radius: 16px;
  background: linear-gradient(150deg, var(--accent), color-mix(in oklab, var(--accent) 60%, var(--ink)));
  display: grid; place-items: center;
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px var(--accent-edge), 0 12px 32px -10px var(--accent-edge);
}
.callout-affiliate .visual svg { width: 36px; height: 36px; }
.callout-affiliate .body .eyebrow {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.callout-affiliate .body h4 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.callout-affiliate .body p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.55;
}
.callout-affiliate .cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 11px;
  font-weight: 500;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
  border: none;
}
.callout-affiliate .disclaimer {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  margin-top: 6px;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.02em;
}

/* "Related tools" cards at end */
.related-tools {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--line-soft);
}
.related-head {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 720px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 160ms, transform 160ms;
}
.tool-card:hover { border-color: var(--accent-edge); transform: translateY(-2px); }
.tool-card .icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.tool-card .icon svg { width: 22px; height: 22px; }
.tool-card .label .t { display: block; font-weight: 500; font-size: 14.5px; color: var(--ink); }
.tool-card .label .s { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.tool-card .arrow { margin-left: auto; color: var(--ink-3); }

/* Disclaimer block at bottom */
.article-disclaimer {
  margin-top: 36px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.55;
}

/* Back link */
.back-link {
  margin-top: 44px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: color 140ms, border-color 140ms;
}
.back-link:hover { color: var(--ink); border-color: var(--ink-3); }

/* Inline images / gifs inside an article body */
.article-body img.responsive-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
}
.article-body img.responsive-img.gif {
  max-width: 480px;
}

/* Reading progress bar (top of viewport) */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  width: 0%;
  z-index: 100;
  transition: width 80ms linear;
}

/* Prev / next within article (between sections) */
.next-up {
  margin-top: 56px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 160ms;
}
.next-up:hover { border-color: var(--accent-edge); }
.next-up .label {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.next-up .title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.3;
}
.next-up .arrow {
  margin-left: auto;
  color: var(--ink-3);
}
