/* LNKS blog styles. Reuses base tokens from styles.css.
   Black + white spine, mint accent only on status / active /
   eyebrow. Twelve-px radii. Urbanist body, JetBrains Mono for
   meta + slugs. Cards alternate gentle elevation; no full-radius
   pills outside tag chips on a colored chip set. */

/* ── Overview hero ───────────────────────────────────────────── */
.bl-main { background: var(--bg); color: var(--ink); }
.bl-hero {
  background: var(--black);
  color: #fff;
  padding: 88px var(--gutter) 56px;
}
.bl-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.bl-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 18px;
}
.bl-hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin: 0 0 18px;
  color: #fff;
}
.bl-hero .bl-lead {
  font-size: clamp(17px, 1.5vw, 19px);
  color: rgba(255,255,255,0.78);
  max-width: 720px;
  line-height: 1.5;
}
.bl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.bl-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.15s var(--ease);
}
.bl-tag-pill:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.bl-tag-pill.is-active {
  background: var(--mint);
  color: var(--black);
  border-color: var(--mint);
}

/* ── Tag-page editorial intro ──────────────────────────────── */
.bl-tag-intro {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px var(--gutter) 8px;
}
.bl-tag-intro-inner {
  max-width: 760px;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
}
.bl-tag-intro-inner p {
  margin: 0 0 1em;
}
.bl-tag-intro-inner p:last-child { margin-bottom: 0; }
.bl-tag-intro-inner a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--mint-deep);
  text-underline-offset: 3px;
}

/* ── Featured ─────────────────────────────────────────────────── */
.bl-featured-wrap {
  max-width: 1180px;
  margin: -28px auto 0;
  padding: 0 var(--gutter);
}
.bl-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(10,10,11,0.08);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.bl-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 56px rgba(10,10,11,0.12);
}
.bl-feature-img {
  background: var(--black);
  overflow: hidden;
  align-self: stretch;
  min-height: 100%;
  display: flex;
}
@media (max-width: 820px) {
  .bl-feature-img { aspect-ratio: 1200 / 630; }
}
.bl-feature-img img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
  flex: 1;
}
.bl-feature-text {
  padding: 40px 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bl-feature-text .bl-eyebrow {
  color: var(--mint-deep);
  margin-bottom: 14px;
}
.bl-feature-text h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 14px;
}
.bl-feature-desc {
  color: var(--slate);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 18px;
}
@media (max-width: 820px) {
  .bl-feature { grid-template-columns: 1fr; }
  .bl-feature-text { padding: 28px 22px; }
}

/* ── Card grid ────────────────────────────────────────────────── */
.bl-grid-wrap {
  max-width: 1180px;
  margin: 56px auto 96px;
  padding: 0 var(--gutter);
}
.bl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.bl-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
}
.bl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(10,10,11,0.08);
  border-color: var(--ink);
}
.bl-card-img {
  background: var(--black);
  aspect-ratio: 1200 / 630;
  overflow: hidden;
}
.bl-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bl-card-body {
  padding: 22px 22px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bl-card-body .bl-eyebrow {
  color: var(--mint-deep);
  margin-bottom: 10px;
  font-size: 11px;
}
.bl-card-body h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 10px;
}
.bl-card-desc {
  color: var(--slate);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bl-card.is-read::after {
  content: "✓ Read";
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--mint);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 2;
}

.bl-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
  margin-top: auto;
}
.bl-dot { color: var(--line); }
.bl-empty {
  color: var(--slate);
  text-align: center;
  padding: 80px 0;
}

/* ── Single post ──────────────────────────────────────────────── */
.bp-main {
  background: var(--bg);
  color: var(--ink);
  padding: 0 var(--gutter) 80px;
}
.bp-article {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 0 0;
}
.bp-crumbs {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.bp-crumbs a { color: var(--slate); }
.bp-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.bp-crumbs .sep { color: var(--mute); }
.bp-crumbs .current { color: var(--ink); font-weight: 500; }

.bp-head {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: left;
}
.bp-head h1 {
  font-size: clamp(36px, 5.4vw, 56px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  color: var(--ink);
}
.bp-lead {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--slate);
  line-height: 1.55;
  margin: 0 0 22px;
}
.bp-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--mute);
}
.bp-meta-item { color: var(--slate); }
.bp-meta-dot  { color: var(--line); }

.bp-hero {
  max-width: 1100px;
  margin: 0 auto 56px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--black);
  border: 1px solid var(--line);
  aspect-ratio: 1200 / 630;
}
.bp-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Layout: body + TOC ──────────────────────────────────────── */
.bp-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  max-width: 760px;
  margin: 0 auto;
}
.bp-article.has-toc .bp-layout {
  grid-template-columns: 1fr 220px;
  max-width: 1080px;
}
.bp-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  font-family: var(--font-mono);
  font-size: 12.5px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.bp-toc-title {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--mute);
  margin-bottom: 14px;
}
.bp-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bp-toc-list a {
  color: var(--slate);
  display: block;
  line-height: 1.4;
}
.bp-toc-list a:hover { color: var(--ink); }
.bp-toc-list .bp-toc-l3 { padding-left: 14px; }
.bp-toc-list a.is-active {
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 880px) {
  .bp-article.has-toc .bp-layout { grid-template-columns: 1fr; }
  .bp-toc { display: none; }
}

/* ── Body prose ───────────────────────────────────────────────── */
.bp-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}
.bp-body > * + * { margin-top: 1.1em; }
.bp-body h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
  scroll-margin-top: 96px;
}
.bp-body h2:first-child { margin-top: 0; }
.bp-body h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 36px 0 12px;
  scroll-margin-top: 96px;
}
.bp-body p { margin: 0 0 1.1em; }
.bp-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--mint-deep);
  transition: text-decoration-color 0.15s;
}
.bp-body a:hover { text-decoration-color: var(--ink); }
.bp-body a.lc-autolink {
  text-decoration-color: var(--mint-deep);
}
.bp-body strong { font-weight: 700; }
.bp-body em { font-style: italic; }
.bp-body ul, .bp-body ol { padding-left: 26px; margin: 1em 0; }
.bp-body li { margin: 0 0 0.4em; }
.bp-body blockquote {
  border-left: 3px solid var(--mint);
  margin: 1.5em 0;
  padding: 6px 0 6px 22px;
  color: var(--slate);
  font-style: italic;
}
.bp-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--line-soft);
  padding: 2px 6px;
  border-radius: 6px;
}
.bp-body pre {
  background: var(--black);
  color: #f4f3f5;
  border-radius: var(--radius);
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.55;
}
.bp-body pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  color: inherit;
}
.bp-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}
.bp-body img, .bp-body svg {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.bp-body .anchor {
  opacity: 0;
  margin-left: 8px;
  font-weight: 400;
  color: var(--mute);
  transition: opacity 0.15s;
}
.bp-body h2:hover .anchor,
.bp-body h3:hover .anchor { opacity: 1; }

/* Tables */
.bp-body .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 1.5em 0;
}
.bp-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.bp-body th, .bp-body td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.bp-body th {
  font-weight: 700;
  background: var(--line-soft);
}

/* Callouts (carry over from docs) */
.bp-body .callout {
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 1.5em 0;
  border-left: 4px solid var(--mint);
  background: var(--mint-soft);
  color: var(--mint-ink);
}
.bp-body .callout p:last-child { margin-bottom: 0; }
.bp-body .callout-warn { border-color: #d89a37; background: #fff7ea; color: #6a4400; }
.bp-body .callout-danger { border-color: var(--danger); background: var(--danger-soft); color: #74180b; }
.bp-body .callout-info { border-color: #5384f5; background: #e8efff; color: #143b8a; }

/* ── Tags + CTA + footer note ────────────────────────────────── */
.bp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 8px;
}
/* Scoped to .bp-body so we override the body-prose anchor styles
   (which add a green underline to every <a> inside the body). */
.bp-body .bp-tag,
.bp-body a.bp-tag {
  display: inline-flex;
  padding: 6px 12px;
  background: var(--mint);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
}
.bp-body .bp-tag:hover,
.bp-body a.bp-tag:hover {
  background: var(--mint-deep);
  color: var(--black);
  text-decoration: none;
}

.bp-cta {
  margin: 56px 0 24px;
  padding: 32px;
  background: var(--black);
  color: #fff;
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) {
  .bp-cta { grid-template-columns: 1fr auto; align-items: center; }
}
.bp-cta-inner {
  display: contents;
}
.bp-cta h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  color: #fff;
}
.bp-cta p {
  color: rgba(255,255,255,0.75);
  font-size: 14.5px;
  margin: 0;
  max-width: 460px;
}
.bp-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bp-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  background: var(--mint);
  color: var(--black);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: transform 0.15s var(--ease);
}
.bp-cta-btn:hover { transform: translateY(-1px); background: var(--mint); color: var(--black); }

.bp-foot-note {
  font-size: 13px;
  color: var(--mute);
  font-family: var(--font-mono);
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.bp-foot-note a { color: var(--slate); }

/* ── Visual primitives for posts (use sparingly) ────────────── */

/* Pull-quote — used to emphasise a single sentence from the body
   that's worth slowing the reader down for. One per post max. */
.bp-body .bp-pullquote {
  margin: 36px 0;
  padding: 8px 0 8px 22px;
  border-left: 4px solid var(--mint);
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-style: normal;
}
.bp-body .bp-pullquote cite {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 500;
  font-style: normal;
  color: var(--slate);
  font-family: var(--font-mono);
}

/* Stat callout — heroic number + short label. Use to anchor a
   piece of evidence the post wants the reader to remember. */
.bp-body .bp-stat {
  margin: 36px 0;
  padding: 28px 32px;
  background: var(--black);
  color: #fff;
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
}
.bp-body .bp-stat-number {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--mint);
}
.bp-body .bp-stat-label {
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255,255,255,0.78);
}
.bp-body .bp-stat-label strong {
  color: #fff;
  font-weight: 600;
}
@media (max-width: 540px) {
  .bp-body .bp-stat {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px;
  }
}

/* Mid-post CTA — smaller and more conversational than the end-of-
   post one. Use sparingly: at most one per post, ideally after a
   section that naturally invites the next step. */
.bp-body .bp-mid-cta {
  margin: 40px 0;
  padding: 22px 26px;
  background: var(--mint-soft);
  border: 1px solid rgba(43,192,74,0.2);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}
.bp-body .bp-mid-cta-text {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--mint-ink);
  margin: 0;
}
.bp-body .bp-mid-cta-text strong {
  color: var(--ink);
  font-weight: 700;
}
.bp-body .bp-mid-cta a {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.bp-body .bp-mid-cta a:hover {
  background: var(--black);
  color: #fff;
  text-decoration: none;
}
@media (max-width: 600px) {
  .bp-body .bp-mid-cta {
    grid-template-columns: 1fr;
  }
  .bp-body .bp-mid-cta a { justify-self: flex-start; }
}

/* Figure with caption — wraps an inline SVG/image with a small
   muted caption underneath. The caption is for context Google can
   read (alt text doesn't show); it also adds visual rhythm. */
.bp-body .bp-figure {
  margin: 36px 0;
}
.bp-body .bp-figure > svg,
.bp-body .bp-figure > img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}
.bp-body .bp-figure figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--slate);
  text-align: center;
  line-height: 1.5;
}

/* Section divider — single mint dot centred on a hairline. Nicer
   than a plain <hr> when a post has three or more major sections. */
.bp-body .bp-divider {
  margin: 56px 0;
  height: 1px;
  background: var(--line);
  position: relative;
  border: 0;
}
.bp-body .bp-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

/* ── FAQ component (renderer-emitted in posts) ───────────────── */
.bp-body .lc-faq {
  margin: 32px 0;
}
.bp-body .lc-faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: background 0.15s;
}
.bp-body .lc-faq details[open] {
  background: #fafafa;
  border-color: var(--ink);
}
.bp-body .lc-faq summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
  position: relative;
  padding-right: 42px;
  color: var(--ink);
}
.bp-body .lc-faq summary::-webkit-details-marker { display: none; }
.bp-body .lc-faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mint-deep);
  font-size: 22px;
  font-weight: 700;
  transition: transform 0.2s var(--ease);
  line-height: 1;
}
.bp-body .lc-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.bp-body .lc-faq .a {
  padding: 0 18px 16px;
  color: var(--slate);
  font-size: 14.5px;
  line-height: 1.6;
}
.bp-body .lc-faq .a p:last-child { margin-bottom: 0; }

/* ── Related ──────────────────────────────────────────────────── */
.bp-related {
  max-width: 1180px;
  margin: 80px auto 0;
}
.bp-related h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}
.bp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

/* ── Read progress bar (top of post page) ───────────────────── */
.bp-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0,0,0,0);
  z-index: 60;
  pointer-events: none;
}
.bp-progress-bar {
  height: 100%;
  background: var(--mint);
  width: 0;
  transition: width 0.08s linear;
}
