/* ============================================================
   Evercontact — Blog layer (sits on top of styles.css)
   Used by both the HTML preview and the WordPress theme.
   ============================================================ */

/* Category accent hues — drive cover gradients + tags */
:root {
  --cat-product: 270;
  --cat-data: 65;
  --cat-sales: 155;
  --cat-eng: 235;
  --cat-company: 330;
  --cat-research: 200;
}

/* ---------- Blog masthead ---------- */
.blog-masthead {
  padding-top: clamp(48px, 6vw, 92px);
  padding-bottom: clamp(28px, 3vw, 44px);
  position: relative;
  overflow: clip;
}
.blog-masthead__bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(760px 320px at 82% -25%, color-mix(in oklab, var(--accent) 15%, transparent), transparent 60%),
    radial-gradient(540px 280px at 2% 0%, color-mix(in oklab, var(--signal) 8%, transparent), transparent 60%);
}
.blog-masthead__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.blog-masthead h1 {
  font-size: clamp(40px, 5.6vw, 80px);
  margin-top: 18px;
}
.blog-masthead h1 .it {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.blog-masthead .lede { margin-top: 16px; max-width: 52ch; }

/* Category filter chips */
.cat-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.cat-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
  white-space: nowrap;
}
.cat-chip:hover { color: var(--fg); border-color: var(--line-strong); }
.cat-chip[aria-current="true"],
.cat-chip.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
}

/* ============================================================
   Generative cover (featured-image placeholder)
   ============================================================ */
.cover {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  --h: var(--cat-product);
}
.cover::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 120% at 12% 12%, color-mix(in oklab, oklch(72% 0.15 var(--h)) 70%, transparent), transparent 55%),
    radial-gradient(120% 120% at 90% 100%, color-mix(in oklab, oklch(55% 0.17 calc(var(--h) + 40)) 65%, transparent), transparent 50%),
    linear-gradient(135deg, oklch(60% 0.14 var(--h)), oklch(42% 0.13 calc(var(--h) + 30)));
}
/* faint engineering grid overlay */
.cover::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(oklch(100% 0 0 / 0.10) 1px, transparent 1px),
    linear-gradient(90deg, oklch(100% 0 0 / 0.10) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(120% 100% at 100% 0%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 100% at 100% 0%, #000, transparent 75%);
}
.cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* mono label sits over the gradient when there is no real image */
.cover__tag {
  position: absolute;
  left: 14px; bottom: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(100% 0 0 / 0.92);
  background: oklch(0% 0 0 / 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid oklch(100% 0 0 / 0.22);
  padding: 5px 11px;
  border-radius: 999px;
}
.cover__mark {
  position: absolute;
  right: 16px; top: 14px;
  z-index: 2;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1.5px solid oklch(100% 0 0 / 0.55);
  background: oklch(100% 0 0 / 0.12);
}

/* category hue helpers */
.cat--product { --h: var(--cat-product); }
.cat--data    { --h: var(--cat-data); }
.cat--sales   { --h: var(--cat-sales); }
.cat--eng     { --h: var(--cat-eng); }
.cat--company { --h: var(--cat-company); }
.cat--research{ --h: var(--cat-research); }

/* tag pill that follows the category hue */
.tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(48% 0.16 var(--h, 270));
  background: color-mix(in oklab, oklch(60% 0.16 var(--h, 270)) 14%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
[data-theme="dark"] .tag { color: oklch(78% 0.14 var(--h, 270)); }

/* ============================================================
   Featured (lead) post
   ============================================================ */
.lead {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding-bottom: clamp(40px, 5vw, 64px);
  margin-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 880px) { .lead { grid-template-columns: 1fr; gap: 28px; } }
.lead .cover { aspect-ratio: 16 / 11; }
.lead__body { display: flex; flex-direction: column; gap: 18px; }
.lead__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  display: inline-flex; align-items: center; gap: 8px;
}
.lead__kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.lead h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.lead h2 a { transition: color .2s var(--ease); }
.lead h2 a:hover { color: var(--accent); }
.lead__excerpt { font-size: clamp(16px, 1.3vw, 18px); color: var(--fg-muted); line-height: 1.55; max-width: 52ch; }

/* ============================================================
   Index grid + sidebar
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 980px) { .blog-grid { grid-template-columns: 1fr; } }

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 36px) clamp(20px, 2.4vw, 32px);
}
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* Post card */
.post-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.post-card .cover { aspect-ratio: 16 / 10; transition: transform .4s var(--ease); }
.post-card a.cover-link { display: block; border-radius: var(--radius-lg); overflow: hidden; }
.post-card:hover .cover { transform: translateY(-3px); }
.post-card__meta-top { display: flex; align-items: center; gap: 10px; }
.post-card h3 {
  font-size: clamp(19px, 1.6vw, 23px);
  letter-spacing: -0.02em;
  line-height: 1.18;
  font-weight: 500;
}
.post-card h3 a { transition: color .2s var(--ease); }
.post-card h3 a:hover { color: var(--accent); }
.post-card__excerpt {
  font-size: 14.5px;
  color: var(--fg-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__foot {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-subtle);
}
.byline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-subtle);
}
.byline .avatar {
  width: 22px; height: 22px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 10px;
  font-family: var(--font-sans);
  background: linear-gradient(135deg, oklch(70% 0.12 var(--ah, 260)), oklch(50% 0.14 var(--ah, 260)));
}
.dot-sep { width: 3px; height: 3px; border-radius: 999px; background: var(--fg-subtle); flex: none; }

/* Pagination */
.pager {
  margin-top: clamp(40px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.pager__pages { display: flex; gap: 6px; align-items: center; }
.pager__pages a, .pager__pages span {
  min-width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  padding: 0 10px;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.pager__pages a:hover { color: var(--fg); border-color: var(--line-strong); }
.pager__pages .is-current {
  color: var(--accent-fg); background: var(--fg); border-color: var(--fg);
}
.pager__dots { border: 0 !important; background: 0 !important; }

/* ============================================================
   Sidebar widgets
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
}
@media (max-width: 980px) { .sidebar { position: static; } }
.widget {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.widget__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.widget__title::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--accent);
}

/* Recent posts widget */
.mini-list { display: flex; flex-direction: column; }
.mini {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mini:first-child { padding-top: 0; }
.mini:last-child { border-bottom: 0; padding-bottom: 0; }
.mini .cover { aspect-ratio: 1; border-radius: 10px; }
.mini__t { font-size: 13.5px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; transition: color .2s var(--ease); }
.mini:hover .mini__t { color: var(--accent); }
.mini__m { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-subtle); margin-top: 4px; }

/* Categories widget */
.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--fg-muted);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.cat-list a:hover { color: var(--fg); background: var(--bg-soft); }
.cat-list a .swatch { width: 9px; height: 9px; border-radius: 3px; background: oklch(60% 0.16 var(--h, 270)); flex: none; }
.cat-list a span:first-of-type { display: inline-flex; align-items: center; gap: 10px; }
.cat-list a .count { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-subtle); }

/* Newsletter widget */
.widget--news { background: var(--bg-soft); }
.widget--news p { font-size: 13.5px; color: var(--fg-muted); line-height: 1.5; margin-bottom: 14px; }
.news-form { display: flex; flex-direction: column; gap: 8px; }
.news-form input {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.news-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.news-form .btn { justify-content: center; }
.news-form__fine { font-family: var(--font-mono); font-size: 10px; color: var(--fg-subtle); margin-top: 2px; }

/* Product CTA widget (dark) */
.widget--cta {
  background: var(--fg);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.widget--cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 200px at 100% 0%, color-mix(in oklab, var(--accent) 36%, transparent), transparent 65%);
  pointer-events: none;
}
.widget--cta .widget__title { color: color-mix(in oklab, var(--bg) 60%, transparent); position: relative; }
.widget--cta .widget__title::before { background: var(--accent); }
.widget--cta h4 { font-size: 19px; letter-spacing: -0.02em; font-weight: 500; position: relative; color: var(--bg); margin-bottom: 8px; }
.widget--cta p { font-size: 13.5px; color: color-mix(in oklab, var(--bg) 68%, transparent); line-height: 1.5; position: relative; margin-bottom: 16px; }
.widget--cta .btn { position: relative; justify-content: center; width: 100%; }
.widget--cta .btn--primary { background: var(--bg); color: var(--fg); }
.widget--cta .btn--primary:hover { background: var(--accent); color: var(--accent-fg); }

/* ============================================================
   Single post
   ============================================================ */
.article {
  padding-top: clamp(36px, 4vw, 56px);
  padding-bottom: clamp(40px, 5vw, 64px);
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--fg-muted); transition: color .2s var(--ease); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--line-strong); }

.article__head { max-width: 800px; margin: 0 auto; text-align: center; }
.article__head .tag { align-self: center; margin-inline: auto; }
.article__title {
  font-size: clamp(34px, 4.4vw, 60px);
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 18px auto 0;
  max-width: 18ch;
}
.article__dek {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 20px auto 0;
  max-width: 56ch;
}
.article__byline {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.article__byline .avatar {
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px;
  background: linear-gradient(135deg, oklch(70% 0.12 var(--ah, 260)), oklch(50% 0.14 var(--ah, 260)));
}
.article__byline .who { text-align: left; }
.article__byline .who b { font-weight: 500; font-size: 14.5px; display: block; }
.article__byline .who span {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-subtle);
}
.article__byline .vline { width: 1px; height: 30px; background: var(--line); }

.article__cover {
  margin: clamp(32px, 4vw, 52px) auto 0;
  max-width: 1080px;
}
.article__cover .cover { aspect-ratio: 21 / 9; border-radius: var(--radius-xl); }
@media (max-width: 700px) { .article__cover .cover { aspect-ratio: 16 / 11; } }

/* Article body layout — prose with a sticky share rail */
.article__layout {
  margin: clamp(36px, 4vw, 56px) auto 0;
  max-width: 1080px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 220px;
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}
@media (max-width: 980px) { .article__layout { grid-template-columns: 48px minmax(0, 1fr); } }
@media (max-width: 720px) { .article__layout { grid-template-columns: 1fr; } }

.share-rail {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
@media (max-width: 720px) { .share-rail { flex-direction: row; position: static; justify-content: flex-start; } }
.share-rail__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  writing-mode: vertical-rl;
  margin-bottom: 4px;
}
@media (max-width: 720px) { .share-rail__label { writing-mode: horizontal-tb; } }
.share-btn {
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--fg-muted);
  display: grid; place-items: center;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.share-btn:hover { color: var(--accent); border-color: var(--line-strong); transform: translateY(-1px); }

/* TOC rail (right) */
.toc {
  position: sticky;
  top: 96px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
@media (max-width: 980px) { .toc { display: none; } }
.toc__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 8px;
}
.toc a {
  font-size: 13px;
  color: var(--fg-muted);
  padding: 5px 0;
  line-height: 1.35;
  transition: color .2s var(--ease);
}
.toc a:hover, .toc a.is-active { color: var(--accent); }

/* ---------- Prose ---------- */
.prose { max-width: 68ch; font-size: 17px; line-height: 1.72; color: var(--fg); }
.prose > * + * { margin-top: 1.25em; }
.prose p { color: var(--fg); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-top: 1.8em;
  scroll-margin-top: 96px;
}
.prose h3 {
  font-size: clamp(19px, 1.8vw, 23px);
  letter-spacing: -0.02em;
  margin-top: 1.6em;
  scroll-margin-top: 96px;
}
.prose h2 + p, .prose h3 + p { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.prose ul li, .prose ol li { position: relative; padding-left: 26px; }
.prose ul li::before {
  content: ""; position: absolute; left: 6px; top: 11px;
  width: 6px; height: 6px; border-radius: 999px; background: var(--accent);
}
.prose ol { counter-reset: li; }
.prose ol li::before {
  counter-increment: li; content: counter(li);
  position: absolute; left: 0; top: 1px;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  font-weight: 500;
}
.prose blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.prose blockquote p { color: inherit; }
.prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.02em;
}
.prose img, .prose figure { border-radius: var(--radius); }
.prose figure { margin: 0; }
.prose figure .cover { aspect-ratio: 16 / 9; }
.prose figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-subtle);
  text-align: center;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}
.prose pre {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
}
.prose pre code { background: 0; border: 0; padding: 0; font-size: inherit; }
.prose hr { height: 1px; background: var(--line); border: 0; margin-block: 2em; }
.prose .pull {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-align: center;
  margin-block: 1.4em;
  max-width: 24ch;
  margin-inline: auto;
}
.prose .lead-in::first-letter {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 3.4em;
  line-height: 0.78;
  float: left;
  padding: 6px 12px 0 0;
  color: var(--accent);
}
/* Callout box */
.prose .callout {
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
}
.prose .callout b { color: var(--accent); }

/* Tags row under article */
.article__tags {
  max-width: 68ch;
  margin: clamp(36px, 4vw, 52px) auto 0;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.article__tags .lbl { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-subtle); margin-right: 4px; }
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { color: var(--accent); border-color: var(--line-strong); }

/* Author bio box */
.author-box {
  max-width: 68ch;
  margin: clamp(36px, 4vw, 52px) auto 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
}
.author-box .avatar {
  width: 56px; height: 56px; border-radius: 999px;
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 18px;
  background: linear-gradient(135deg, oklch(70% 0.12 var(--ah, 260)), oklch(50% 0.14 var(--ah, 260)));
}
.author-box__name { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.author-box__role { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); margin-top: 2px; }
.author-box__bio { font-size: 14px; color: var(--fg-muted); line-height: 1.6; margin-top: 10px; }
.author-box__links { margin-top: 12px; display: flex; gap: 8px; }
.author-box__links a {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.author-box__links a:hover { color: var(--accent); border-color: var(--line-strong); }

/* ============================================================
   Related posts
   ============================================================ */
.related {
  border-top: 1px solid var(--line);
  padding-top: clamp(40px, 5vw, 64px);
}
.related__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 28px;
}
.related__head h2 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.025em; }
.related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}
@media (max-width: 820px) { .related__grid { grid-template-columns: 1fr; } }

/* ============================================================
   Newsletter band (full-width, end of article / index)
   ============================================================ */
.news-band {
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 760px) { .news-band { grid-template-columns: 1fr; gap: 28px; } }
.news-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(540px 240px at 0% 0%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%);
}
.news-band h2 { position: relative; font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.03em; max-width: 16ch; }
.news-band h2 .it { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }
.news-band p { position: relative; color: var(--fg-muted); margin-top: 12px; max-width: 44ch; }
.news-band__form { position: relative; display: flex; flex-direction: column; gap: 10px; }
.news-band__row { display: flex; gap: 10px; flex-wrap: wrap; }
.news-band__row input {
  flex: 1; min-width: 200px;
  font-family: var(--font-sans); font-size: 15px; color: var(--fg);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 999px;
  padding: 13px 18px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.news-band__row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.news-band__fine { font-family: var(--font-mono); font-size: 11px; color: var(--fg-subtle); }

/* ============================================================
   404 / no results
   ============================================================ */
.blank-state {
  text-align: center;
  padding: clamp(56px, 9vw, 130px) 0;
  max-width: 560px;
  margin-inline: auto;
}
.blank-state .code {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(80px, 16vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.blank-state h1 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 8px; }
.blank-state p { color: var(--fg-muted); margin-top: 16px; font-size: 16px; }
.blank-state .btn { margin-top: 28px; }

/* ============================================================
   Comments
   ============================================================ */
.comments {
  max-width: 68ch;
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.comments__title { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.025em; margin-bottom: 28px; }
.comment-list { display: flex; flex-direction: column; gap: 24px; list-style: none; padding: 0; margin: 0; }
.comment-list ol { list-style: none; padding-left: 32px; margin-top: 24px; display: flex; flex-direction: column; gap: 24px; }
.comment-body { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.comment-body .avatar {
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px;
  background: linear-gradient(135deg, oklch(70% 0.12 var(--ah, 260)), oklch(50% 0.14 var(--ah, 260)));
}
.comment-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.comment-meta b { font-weight: 500; font-size: 14.5px; }
.comment-meta time { font-family: var(--font-mono); font-size: 11px; color: var(--fg-subtle); }
.comment-text { font-size: 15px; line-height: 1.6; color: var(--fg-muted); margin-top: 6px; }
.comment-reply { margin-top: 8px; font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); }
.comment-form { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.comment-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .comment-form__row { grid-template-columns: 1fr; } }

/* Reading progress bar */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 60;
  pointer-events: none;
}
.read-progress i {
  display: block; height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--accent), var(--signal));
  transition: width .1s linear;
}

/* ============================================================
   WordPress wp_nav_menu output — match the design-system nav
   ============================================================ */
.nav__links-ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links-ul li { list-style: none; margin: 0; }
.nav__links .nav__link { white-space: nowrap; }
.nav__links-ul .current-menu-item > .nav__link,
.nav__links-ul .current_page_item > .nav__link { color: var(--fg); }
@media (max-width: 880px) {
  .nav__links-ul { flex-direction: column; gap: 2px; width: 100%; align-items: stretch; }
  .nav__links-ul .nav__link { padding: 12px 8px; font-size: 16px; }
}

/* Footer menu (wp_nav_menu in the footer location) */
.footer__menu {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 32px;
}
@media (max-width: 700px) { .footer__menu { grid-template-columns: 1fr 1fr; } }
.footer__menu li { list-style: none; }
.footer__menu a { display: block; padding: 4px 0; font-size: 14px; color: var(--fg-muted); }
.footer__menu a:hover { color: var(--fg); }

/* WordPress comment-form niceties */
.comment-form .form-submit { margin-top: 4px; }
.comment-respond .comment-reply-title small { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; }
.comment-list .children { list-style: none; padding-left: 32px; margin-top: 24px; display: flex; flex-direction: column; gap: 24px; }
.comment-list .comment { list-style: none; }
.comment-list > .comment + .comment { margin-top: 24px; }
.comments .comment-list { display: flex; flex-direction: column; gap: 24px; }

/* Pagination links from the_comments_pagination / paginate_links */
.comments .nav-links,
.pager .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }

/* WP block/editor safety inside prose */
.prose .wp-block-image img { border-radius: var(--radius); }
.prose .wp-block-pullquote { border: 0; padding: 0; }
.prose .wp-block-quote { margin-inline: 0; }
.prose ul.wp-block-list, .prose ol.wp-block-list { padding-left: 0; }
