/* =========================================================
   CoderBlog — Editorial Reader theme
   Cream + terracotta + forest green, serif headlines,
   JetBrains Mono for code, designed for technical essays.
   ========================================================= */

:root {
  --bg:        #faf6ef;
  --bg-soft:   #f5efe5;
  --bg-card:   #fffdf8;
  --border:    #e8e0d0;
  --border-strong: #d4c4a8;
  --text:      #1a1a1a;
  --ink:       #1a1a1a;  /* alias for --text — used as a "dark accent" token by components */
  --text-dim:  #4a4a4a;
  --text-faint:#8a7e6a;
  --terracotta:        #c2410c;
  --terracotta-hover:  #9a3409;
  --terracotta-soft:   #fbe8da;
  --green:             #166534;
  --green-soft:        #d4e8d4;
  --code-bg:           #f5efe5;
  --max-w:             1520px;
  --article-w:         720px;
  --side-w:            200px;
  --ad-w:              300px;
  --ad-l-w:            180px;
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--terracotta); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s ease; }
a:hover { border-bottom-color: var(--terracotta); }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 48px 0; }

/* ====== TOP NAV ====== */
.cb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 56px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.cb-brand {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  font-style: italic;
  border-bottom: none;
}
.cb-brand:hover { color: var(--terracotta); border-bottom: none; }
.cb-nav {
  display: flex; gap: 32px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.cb-nav a {
  color: var(--text-dim);
  border-bottom: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.cb-nav a:hover { color: var(--terracotta); }
.cb-nav a.active { color: var(--terracotta); border-bottom-color: var(--terracotta); }
@media (max-width: 700px) { .cb-topbar { padding: 16px 24px; } .cb-nav { display: none; } }

/* ====== HOMEPAGE — HERO ====== */
.cb-hero {
  padding: 96px 56px 80px;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at top, rgba(194,65,12,0.05), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.cb-hero .cb-issue {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--terracotta);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 28px;
  padding: 4px 14px;
  border-top: 1px solid var(--terracotta);
  border-bottom: 1px solid var(--terracotta);
}
.cb-hero h1 {
  font-family: var(--font-serif);
  font-size: 88px;
  line-height: 1.0;
  margin: 0 auto 24px;
  max-width: 1000px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
}
.cb-hero h1 em { font-style: italic; color: var(--terracotta); font-weight: 500; }
.cb-hero .cb-sub {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.cb-hero .cb-byline-row {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  text-transform: uppercase;
}
@media (max-width: 700px) {
  .cb-hero { padding: 56px 24px 48px; }
  .cb-hero h1 { font-size: 48px; }
}

/* ====== HOMEPAGE — CATEGORIES ====== */
.cb-section { padding: 80px 56px; max-width: 1328px; margin: 0 auto; }
.cb-section-label {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--terracotta);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 36px;
  text-align: center;
}
.cb-section-label::before, .cb-section-label::after { content: "—"; margin: 0 14px; color: var(--border-strong); }
.cb-section-label.green { color: var(--green); }

.cb-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.cb-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px 24px;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.cb-cat:hover { transform: translateY(-2px); border-color: var(--terracotta); box-shadow: 0 8px 24px rgba(60,40,20,0.08); border-bottom-color: var(--terracotta); }
.cb-cat .cb-cat-icon {
  width: 44px; height: 44px;
  background: var(--terracotta-soft);
  color: var(--terracotta);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.cb-cat.green .cb-cat-icon { background: var(--green-soft); color: var(--green); }
.cb-cat h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; font-family: var(--font-serif); letter-spacing: -0.01em; }
.cb-cat p { margin: 0 0 12px; color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.cb-cat .cb-cat-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
@media (max-width: 1100px) { .cb-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .cb-cat-grid { grid-template-columns: 1fr; } .cb-section { padding: 48px 24px; } }

/* ====== HOMEPAGE — FEATURED ====== */
.cb-feature-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
}
.cb-feature { border-bottom: none; }
.cb-feature-img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #2d1f0f 0%, #5c3a1e 50%, var(--terracotta) 100%);
  border-radius: 6px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cb-feature-img::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1), transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 3px);
}
.cb-feature-img img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.cb-feature-img.placeholder::after { display: none; }
.cb-feature-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--terracotta);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.cb-feature-eyebrow.green { color: var(--green); }
.cb-feature h2 {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1.1;
  margin: 0 0 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: none;
}
.cb-feature h2 a { color: var(--text); border-bottom: none; }
.cb-feature h2 a:hover { color: var(--terracotta); }
.cb-feature .cb-excerpt {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0 0 14px;
  font-weight: 400;
}
.cb-feature .cb-byline {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cb-feature .cb-byline strong { color: var(--text); font-weight: 600; }

.cb-feature-side { display: flex; flex-direction: column; gap: 28px; }
.cb-small-feature {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 18px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  border-bottom-style: dashed;
}
.cb-small-feature:last-child { border-bottom: none; padding-bottom: 0; }
.cb-small-feature .cb-sm-img {
  aspect-ratio: 1;
  border-radius: 4px;
  background: linear-gradient(135deg, #f5efe5, #e8d9bf);
  overflow: hidden;
}
.cb-small-feature .cb-sm-img img { width: 100%; height: 100%; object-fit: cover; }
.cb-small-feature .cb-sm-img.b { background: linear-gradient(135deg, #1a3a1a, #4a8a4a); }
.cb-small-feature .cb-sm-img.c { background: linear-gradient(135deg, #3a1a1a, #8a4a3a); }
.cb-small-feature .cb-sm-img.d { background: linear-gradient(135deg, #1a1a3a, #4a4a8a); }
.cb-small-feature h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cb-small-feature h3 a { color: var(--text); border-bottom: none; }
.cb-small-feature h3 a:hover { color: var(--terracotta); }
.cb-small-feature .cb-byline {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 1100px) {
  .cb-feature-grid { grid-template-columns: 1fr; }
  .cb-feature-side { flex-direction: row; flex-wrap: wrap; }
  .cb-small-feature { flex: 1 1 280px; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
}

/* ====== HOMEPAGE — LATEST LIST ====== */
.cb-latest {
  background: var(--bg-soft);
  padding: 80px 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cb-latest-inner { max-width: 1328px; margin: 0 auto; }
.cb-latest h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  margin: 0 0 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}
.cb-latest h2::before, .cb-latest h2::after { content: "—"; margin: 0 14px; color: var(--border-strong); font-style: normal; font-family: var(--font-serif); font-weight: 400; }
.cb-post-list { display: flex; flex-direction: column; gap: 0; max-width: 880px; margin: 0 auto; }
.cb-post-row {
  display: grid;
  grid-template-columns: 110px 1fr 130px;
  gap: 28px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px dashed var(--border);
  border-bottom-color: var(--border-strong);
}
.cb-post-row:last-child { border-bottom: none; }
.cb-post-row .cb-post-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  padding-top: 4px;
}
.cb-post-row .cb-post-cat {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--terracotta);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cb-post-row .cb-post-cat.green { color: var(--green); }
.cb-post-row h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cb-post-row h3 a { color: var(--text); border-bottom: none; }
.cb-post-row h3 a:hover { color: var(--terracotta); }
.cb-post-row .cb-post-excerpt { color: var(--text-dim); font-size: 14px; line-height: 1.6; margin: 0 0 10px; }
.cb-post-row .cb-post-meta { font-size: 12px; color: var(--text-faint); }
.cb-post-row .cb-post-meta strong { color: var(--text); font-weight: 500; }
.cb-post-row .cb-post-rt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-align: right;
  padding-top: 4px;
}
.cb-empty { text-align: center; color: var(--text-faint); padding: 40px 0; font-style: italic; font-family: var(--font-serif); }
@media (max-width: 800px) {
  .cb-latest { padding: 56px 24px; }
  .cb-post-row { grid-template-columns: 1fr; gap: 8px; }
  .cb-post-row .cb-post-rt { text-align: left; }
}

/* ====== FOOTER ====== */
.cb-footer {
  padding: 56px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  font-family: var(--font-serif);
  font-style: italic;
  background: var(--bg);
}
.cb-footer .cb-footer-quote { margin: 0 0 16px; }
.cb-footer .cb-footer-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 24px;
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cb-footer .cb-footer-links a { color: var(--text-dim); border-bottom: none; }
.cb-footer .cb-footer-links a:hover { color: var(--terracotta); }

/* ====== ARTICLE PAGE ====== */
.cb-article-wrap { padding: 56px 56px 96px; }
.cb-article-header {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.cb-article-header .cb-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--terracotta);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.cb-article-header .cb-eyebrow.green { color: var(--green); }
.cb-article-header h1 {
  font-family: var(--font-serif);
  font-size: 52px;
  line-height: 1.05;
  margin: 0 0 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.cb-article-header .cb-lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 28px;
}
.cb-article-header .cb-byline {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cb-article-header .cb-byline strong { color: var(--text); font-weight: 600; }
.cb-article-header .cb-byline .cb-sep { margin: 0 10px; color: var(--border); }

.cb-article-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--ad-l-w) var(--side-w) var(--article-w) var(--ad-w);
  gap: 32px;
  align-items: start;
}
.cb-article-main { min-width: 0; }

/* TOC */
.cb-toc {
  position: sticky;
  top: 32px;
  padding-top: 24px;
  border-left: 1px solid var(--border);
  padding-left: 22px;
}
.cb-toc h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  margin: 0 0 18px;
  font-weight: 600;
  text-transform: uppercase;
}
.cb-toc h4::before { content: "§ "; color: var(--terracotta); font-style: italic; font-family: var(--font-serif); }
.cb-toc-list { list-style: none; padding: 0; margin: 0 0 0 -23px; }
.cb-toc-list li {
  font-family: var(--font-serif);
  font-size: 14.5px;
  color: var(--text-dim);
  padding: 9px 0 9px 21px;
  cursor: pointer;
  line-height: 1.35;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.cb-toc-list li .cb-toc-num {
  font-style: italic;
  color: var(--terracotta);
  margin-right: 8px;
  font-weight: 500;
}
.cb-toc-list li a { color: inherit; border-bottom: none; }
.cb-toc-list li:hover { color: var(--terracotta); }
.cb-toc-list li.active { color: var(--terracotta); border-left-color: var(--terracotta); font-weight: 600; }
.cb-toc-list li.active a { color: var(--terracotta); }
.cb-toc-list li.l3 { padding-left: 38px; font-size: 13.5px; }
.cb-toc-progress {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.cb-toc-progress .cb-bar {
  height: 2px;
  background: var(--bg-soft);
  border-radius: 1px;
  margin-top: 8px;
  overflow: hidden;
}
.cb-toc-progress .cb-bar > div { height: 100%; width: 0%; background: var(--terracotta); transition: width 0.1s linear; }

/* AD SLOT */
.cb-ad-slot {
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cb-ad {
  border: 1.5px dashed var(--border-strong);
  background:
    repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(194,65,12,0.03) 8px, rgba(194,65,12,0.03) 9px),
    rgba(255,253,248,0.5);
  border-radius: 4px;
  height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-family: var(--font-serif);
  gap: 6px;
  overflow: hidden;
}
.cb-ad .cb-ad-label { font-style: italic; font-size: 16px; color: var(--text-dim); }
.cb-ad .cb-ad-size { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.15em; color: var(--text-faint); }
.cb-ad-sticky { position: sticky; top: 32px; }
.cb-ad-tall { height: 600px; }
/* When a real AdSense <ins> is in there, drop the dashed border + diagonal stripes */
.cb-ad:has(> ins.adsbygoogle) {
  border: none;
  background: transparent;
  height: auto;
  min-height: 0;
  justify-content: flex-start;
}
.cb-ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-height: 250px;
}
.cb-ad-slot-left .cb-ad,
.cb-ad-slot-left .cb-ad-placeholder { min-height: 600px; }
.cb-ad-slot-left .cb-ad-placeholder { min-height: 600px; }

/* In-article banner ads injected by main.js */
.cb-in-article-ad {
  margin: 40px auto;
  padding: 28px 16px 24px;
  min-height: 110px;
  max-width: 100%;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(194,65,12,0.02) 8px, rgba(194,65,12,0.02) 9px),
    rgba(255,253,248,0.4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cb-in-article-ad::before {
  content: "Advertisement";
  position: absolute;
  top: 6px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.cb-in-article-ad:has(> ins.adsbygoogle) {
  background: transparent;
  border: none;
  padding: 0;
}
.cb-in-article-ad:has(> ins.adsbygoogle)::before { display: none; }

/* ARTICLE BODY */
.cb-article-body {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.75;
  color: #1f1a14;
}
.cb-article-body p { margin: 0 0 24px; }
/* Drop cap ONLY on the very first paragraph (the lede, in the article header).
   No other paragraph gets one — keeps the body clean and readable. */
.cb-lede::first-letter {
  font-family: var(--font-serif);
  font-style: normal;  /* override the lede's italic for the drop cap */
  float: left;
  font-size: 64px;
  line-height: 0.85;
  padding: 6px 12px 0 0;
  color: var(--terracotta);
  font-weight: 600;
}
.cb-article-body h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.2;
  margin: 56px 0 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;
}
.cb-article-body h2::before {
  content: "§";
  color: var(--terracotta);
  margin-right: 14px;
  font-style: italic;
  font-weight: 400;
}
.cb-article-body h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin: 40px 0 12px;
  font-weight: 600;
  scroll-margin-top: 90px;
}
.cb-article-body em { font-style: italic; }
.cb-article-body strong { font-weight: 600; }
.cb-article-body a { color: var(--terracotta); border-bottom: 1px solid var(--terracotta-soft); }
.cb-article-body a:hover { border-bottom-color: var(--terracotta); }
.cb-article-body ul, .cb-article-body ol { padding-left: 24px; }
.cb-article-body li { margin-bottom: 8px; }
.cb-article-body blockquote {
  margin: 48px 0;
  padding: 0 20px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.3;
  font-style: italic;
  color: var(--terracotta);
  font-weight: 500;
  border-left: none;
  border-right: none;
}
.cb-article-body blockquote::before {
  content: "\201C";
  font-size: 56px;
  line-height: 0;
  vertical-align: -18px;
  margin-right: 6px;
  color: var(--terracotta);
}
.cb-article-body blockquote p { margin: 0; }
.cb-article-body hr { border: 0; border-top: 1px solid var(--border); margin: 48px 0; }
.cb-article-body img {
  border-radius: 4px;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  /* Cap height so very tall screenshots don't dominate the page */
  max-height: 560px;
}
.cb-article-body figure { margin: 28px 0; }
.cb-article-body figcaption {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  margin-top: 10px;
  letter-spacing: 0.05em;
  font-style: italic;
}
/* Defensive: no drop cap on figcaption (was getting stray first-letter styling from elsewhere) */
.cb-article-body figcaption::first-letter,
.cb-article-body h2::first-letter,
.cb-article-body h3::first-letter,
.cb-article-body p::first-letter,
.cb-article-body li::first-letter {
  font-size: inherit !important;
  float: none !important;
  font-style: inherit !important;
  color: inherit !important;
  font-weight: inherit !important;
  padding: 0 !important;
  line-height: inherit !important;
}
.cb-article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-family: var(--font-sans); font-size: 14px; }
.cb-article-body th, .cb-article-body td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.cb-article-body th { background: var(--bg-soft); font-weight: 600; color: var(--text); }

/* ====== CODE BLOCKS — clean style, line numbers, copy button ====== */
/* Targets the actual <pre><code> Statiq markdown produces. */
.cb-article-body pre {
  background: var(--code-bg);
  border-left: 4px solid var(--terracotta);
  border-radius: 0 4px 4px 0;
  padding: 18px 20px;
  margin: 32px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
  color: #2a2010;
  position: relative;
  /* No `counter-reset` needed — highlight.js's child structure is preserved. */
}
/* <code> inherits pre's font; we just need to keep <pre>'s white-space: pre. */
.cb-article-body pre code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: #2a2010;
  background: transparent;
}
/* Language label — extracted by JS into data-lang on pre */
.cb-article-body pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 4px;
  right: 56px;  /* leave room for the copy button */
  padding: 3px 10px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--code-bg);
  pointer-events: none;
  z-index: 2;
}
/* Copy button injected by main.js */
.cb-article-body pre .cb-copy-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  padding: 4px 10px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
  z-index: 3;
}
.cb-article-body pre:hover .cb-copy-btn,
.cb-article-body pre .cb-copy-btn:focus { opacity: 1; }
.cb-article-body pre .cb-copy-btn:hover { color: var(--terracotta); border-color: var(--terracotta); }
.cb-article-body pre .cb-copy-btn.cb-cb-copied { color: var(--green); border-color: var(--green); }

/* Inline <code> (not inside <pre>) */
.cb-article-body :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--terracotta);
  border: 1px solid var(--border);
  word-break: break-word;
}

/* highlight.js — minimal style override (the code itself keeps our font/color) */
.hljs            { background: transparent !important; color: #2a2010; }
.hljs-keyword,
.hljs-selector-tag { color: #1a1a1a; font-weight: 600; }
.hljs-string,
.hljs-attr        { color: var(--green); font-style: italic; }
.hljs-comment     { color: #8a7e6a; font-style: italic; }
.hljs-title.function_,
.hljs-title,
.hljs-built_in    { color: var(--terracotta); }
.hljs-number,
.hljs-literal     { color: #b45309; }
.hljs-type,
.hljs-class .hljs-title { color: var(--green); font-weight: 500; }

/* INLINE CODE */
.cb-article-body :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--terracotta);
  word-break: break-word;
}

/* AUTHOR BLOCK */
.cb-author {
  margin: 64px 0 0;
  padding: 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 20px;
  align-items: center;
}
.cb-author .cb-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--terracotta), var(--green));
  flex-shrink: 0;
}
.cb-author h4 {
  font-family: var(--font-serif);
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}
.cb-author p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.5; font-family: var(--font-sans); }

/* TAGS row at article bottom */
.cb-tags-row {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; gap: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.cb-tags-row a {
  padding: 4px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.cb-tags-row a:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* PAGER */
.cb-pager {
  margin: 48px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-sans);
  font-size: 14px;
}
.cb-pager a {
  flex: 1;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.cb-pager a:hover { border-color: var(--terracotta); border-bottom-color: var(--terracotta); }
.cb-pager .cb-pager-label { display: block; font-size: 11px; letter-spacing: 0.15em; color: var(--text-faint); text-transform: uppercase; margin-bottom: 6px; }
.cb-pager .cb-pager-title { display: block; color: var(--text); font-family: var(--font-serif); font-size: 16px; font-weight: 600; }
.cb-pager a:hover .cb-pager-title { color: var(--terracotta); }
.cb-pager .cb-pager-next { text-align: right; }

/* RESPONSIVE — ARTICLE */
@media (max-width: 1180px) {
  .cb-article-grid { grid-template-columns: 1fr; gap: 32px; }
  .cb-toc { position: static; padding: 24px; background: var(--bg-soft); border-left: none; border-radius: 4px; }
  .cb-toc-progress { display: none; }
  .cb-ad-slot { flex-direction: row; flex-wrap: wrap; }
  .cb-ad-slot-left,
  .cb-ad-slot-right { order: 99; }  /* push ads below the article on tablet */
  .cb-ad-slot .cb-ad { flex: 1 1 280px; }
  .cb-ad-sticky { position: static; }
}
@media (max-width: 700px) {
  .cb-article-wrap { padding: 40px 24px 64px; }
  .cb-article-header h1 { font-size: 32px; }
  .cb-article-body { font-size: 17px; }
  .cb-article-body h2 { font-size: 24px; }
  .cb-article-body blockquote { font-size: 22px; }
  .cb-codeblock { padding: 18px 18px; font-size: 12.5px; }
}

/* ====== SIDEBAR ====== */
.cb-sidebar { font-family: var(--font-sans); }
.cb-sidebar section { margin-bottom: 36px; }
.cb-sidebar h3 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 14px;
  border-bottom: none;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.cb-sidebar ul { list-style: none; padding: 0; margin: 0; }
.cb-sidebar li { margin-bottom: 8px; }
.cb-sidebar a {
  color: var(--text-dim);
  font-size: 14px;
  border-bottom: none;
  font-family: var(--font-serif);
}
.cb-sidebar a:hover { color: var(--terracotta); }
.cb-sidebar .cb-search-form {
  display: flex; gap: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-card);
}
.cb-sidebar .cb-search-form input {
  flex: 1; border: 0; background: transparent;
  padding: 10px 12px; font-size: 14px;
  font-family: var(--font-serif);
  color: var(--text); outline: none;
}
.cb-sidebar .cb-search-form button {
  border: 0; background: var(--terracotta); color: #fff;
  padding: 0 14px; cursor: pointer; font-size: 16px;
}
.cb-sidebar .cb-search-form button:hover { background: var(--terracotta-hover); }
.cb-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-tag-cloud a {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.cb-tag-cloud a:hover { border-color: var(--terracotta); color: var(--terracotta); }
.cb-sidebar .cb-recent li { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.cb-sidebar .cb-recent li:last-child { border-bottom: none; }
.cb-sidebar .cb-recent .cb-r-title { display: block; font-size: 14px; line-height: 1.4; margin-bottom: 4px; }
.cb-sidebar .cb-recent .cb-r-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* ====== ARCHIVES + CATEGORY + SEARCH pages ====== */
.cb-archive-wrap { max-width: 920px; margin: 0 auto; padding: 64px 56px 96px; }
.cb-archive-wrap h1 {
  font-family: var(--font-serif);
  font-size: 48px;
  margin: 0 0 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}
.cb-archive-wrap h1 em { color: var(--terracotta); font-style: italic; }
.cb-archive-year {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--terracotta);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--terracotta);
}
.cb-archive-list { list-style: none; padding: 0; margin: 0; }
.cb-archive-list li {
  display: grid;
  grid-template-columns: 100px 1fr 110px;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
  align-items: baseline;
}
.cb-archive-list .cb-a-date { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.cb-archive-list .cb-a-title { font-family: var(--font-serif); font-size: 18px; }
.cb-archive-list .cb-a-title a { color: var(--text); border-bottom: none; }
.cb-archive-list .cb-a-title a:hover { color: var(--terracotta); }
.cb-archive-list .cb-a-cat { font-size: 11px; letter-spacing: 0.15em; color: var(--terracotta); text-transform: uppercase; text-align: right; }
.cb-archive-list .cb-a-cat.green { color: var(--green); }
@media (max-width: 700px) { .cb-archive-wrap { padding: 40px 24px 64px; } .cb-archive-list li { grid-template-columns: 1fr; gap: 4px; } .cb-archive-list .cb-a-cat { text-align: left; } }

/* ====== Category list with thumbnails (compact horizontal rows) ====== */
.cb-archive-list-with-thumbs {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 0;
}
.cb-archive-item {
  display: grid;
  /* Thumb 100px → title (minmax(0,1fr) so nowrap can clip with ellipsis) → cat label auto */
  grid-template-columns: 100px minmax(0, 1fr) auto;
  /* center: the thumb is now sized to roughly match the title+date block height,
     so vertical centering keeps the whole row visually balanced instead of the
     thumb "floating" up next to the title while the cat label sits at the bottom. */
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.cb-archive-item:last-child { border-bottom: 0; }
.cb-archive-thumb {
  display: block;
  width: 100px;
  height: 63px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-soft);
  border-bottom: none;
  flex-shrink: 0;
}
.cb-archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-bottom: none;
}
.cb-archive-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cb-archive-meta .cb-a-title {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  /* Force 1 line + ellipsis — keeps the row compact */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cb-archive-meta .cb-a-title a {
  color: var(--text);
  border-bottom: none;
}
.cb-archive-meta .cb-a-title a:hover { color: var(--terracotta); }
.cb-archive-meta .cb-a-date {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cb-archive-cat-col {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  white-space: nowrap;
  text-align: right;
  /* Lift slightly so the small uppercase label sits on the title's optical center
     (looks better than pinning it to the row baseline once align-items is center) */
  transform: translateY(-6px);
}
.cb-archive-cat-col.green { color: var(--green); }
@media (max-width: 700px) {
  .cb-archive-item {
    grid-template-columns: 72px 1fr;
    gap: 12px;
  }
  .cb-archive-thumb { width: 72px; height: 45px; }
  .cb-archive-cat-col {
    grid-column: 1 / -1;
    text-align: left;
    transform: none;
  }
}

/* ====== 404 ====== */
.cb-404 { text-align: center; padding: 96px 24px; max-width: 640px; margin: 0 auto; }
.cb-404 h1 { font-family: var(--font-serif); font-size: 80px; margin: 0 0 8px; color: var(--terracotta); font-weight: 500; font-style: italic; }
.cb-404 h2 { font-family: var(--font-serif); font-size: 28px; margin: 0 0 16px; font-weight: 500; }
.cb-404 p { color: var(--text-dim); font-size: 16px; margin: 0 0 32px; }
.cb-404 a { display: inline-block; padding: 12px 24px; background: var(--terracotta); color: #fff; border-radius: 4px; font-weight: 500; }
.cb-404 a:hover { background: var(--terracotta-hover); border-bottom: 0; }

/* ====== TWOLAYOUT — for posts with optional sidebar ====== */
.cb-twolayout { display: grid; grid-template-columns: 1fr 280px; gap: 56px; max-width: 1328px; margin: 0 auto; padding: 56px 56px 96px; }
.cb-twolayout .cb-content { min-width: 0; }
@media (max-width: 1100px) { .cb-twolayout { grid-template-columns: 1fr; padding: 40px 24px 64px; } }

/* ====== IMAGE LIGHTBOX ====== */
.cb-article-body img,
.cb-feature-img img,
.cb-small-feature .cb-sm-img img {
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cb-article-body img:hover,
.cb-feature-img:hover img,
.cb-small-feature .cb-sm-img:hover img {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(60, 40, 20, 0.12);
}

.cb-lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 12, 8, 0.94);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 56px 48px 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cb-lightbox.cb-lightbox-open {
  opacity: 1;
  pointer-events: auto;
}
.cb-lightbox img {
  max-width: 96vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  background: #fffdf8;
  cursor: zoom-out;
  transform: scale(0.96);
  transition: transform 0.22s ease;
}
.cb-lightbox.cb-lightbox-open img { transform: scale(1); }
.cb-lightbox-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
  display: flex; align-items: center; justify-content: center;
}
.cb-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}
.cb-lightbox-hint {
  position: absolute;
  top: 22px; left: 22px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-family: var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cb-lightbox-caption {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-family: var(--font-serif);
  font-style: italic;
  max-width: 80vw;
  text-align: center;
  line-height: 1.5;
}
.cb-lightbox-counter {
  position: absolute;
  bottom: 20px; right: 24px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

body.cb-lightbox-active { overflow: hidden; }

@media (max-width: 700px) {
  .cb-lightbox { padding: 64px 16px 64px; }
  .cb-lightbox img { max-height: 70vh; }
  .cb-lightbox-close { top: 10px; right: 10px; width: 38px; height: 38px; }
  .cb-lightbox-hint { display: none; }
}

/* ---------- Pagination ---------- */
.cb-hero-compact { padding: 64px 24px 32px; }
.cb-hero-compact h1 { font-size: 56px; }
@media (max-width: 700px) { .cb-hero-compact h1 { font-size: 36px; } }

.cb-pagination {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 48px 0 0;
    background: #fafaf7;
}
.cb-pagination-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.cb-page-btn {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.18s ease;
    border-radius: 2px;
}
.cb-page-btn:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.cb-page-btn.disabled {
    color: rgba(0, 0, 0, 0.25);
    border-color: rgba(0, 0, 0, 0.1);
    cursor: not-allowed;
    background: transparent;
}
.cb-page-info {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* ====== Google Translate widget positioning ====== */
/* Float at bottom-right; lift above footer on mobile */
.gtranslate_wrapper {
    z-index: 40;  /* below the sticky header (z=50) so it never overlaps top menu */
}

/* ====== Back to top button (above gtranslate widget at bottom-right) ====== */
.cb-back-to-top {
    position: fixed;
    right: 20px;
    bottom: 80px;  /* sit above the gtranslate widget which is ~50px tall at bottom */
    z-index: 35;    /* below the sticky header (z=50), below gtranslate wrapper (z=40) */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background 0.15s, border-color 0.15s;
}
.cb-back-to-top.cb-btt-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.cb-back-to-top:hover {
    background: var(--terracotta);
    border-color: var(--terracotta);
}
.cb-back-to-top svg { display: block; }

/* ====== Floating "next article" button (left side, paired with back-to-top) ====== */
.cb-next-article {
    position: fixed;
    left: 20px;
    bottom: 80px;
    z-index: 35;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 14px;
    max-width: 220px;
    background: var(--ink);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    border-radius: 2px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background 0.15s, border-color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cb-next-article.cb-na-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.cb-next-article:hover {
    background: var(--terracotta);
    border-color: var(--terracotta);
}
.cb-next-article-label { opacity: 0.7; font-size: 9px; }
.cb-next-article-title {
    font-family: var(--font-serif);
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 700px) {
    .cb-back-to-top {
        right: 14px;
        bottom: 70px;
        padding: 8px 12px;
        font-size: 10px;
    }
    .cb-back-to-top span { display: none; }  /* icon only on mobile */
    .cb-next-article {
        left: 14px;
        bottom: 70px;
        max-width: 140px;
    }
    .cb-next-article-title { max-width: 90px; font-size: 11px; }
}

/* ====== Waline comments — themed to match the cream/terracotta look ====== */
.cb-comments {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.cb-comments-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}
.cb-comments-title::before {
    content: "§ ";
    color: var(--terracotta);
    font-style: italic;
    font-family: var(--font-serif);
}
.cb-comments-hint {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 14px;
    color: var(--text-dim);
    margin: 0 0 32px;
}
/* Waline root container */
#waline {
    margin-top: 12px;
}
/* Waline comment count header */
.waline-comment-title {
    display: none;  /* we use our own cb-comments-title above */
}
.waline-widget {
    background: transparent !important;
}
/* Input area */
.waline-input-wrapper {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 4px !important;
    padding: 12px !important;
}
.waline-input {
    font-family: var(--font-sans) !important;
    font-size: 15px !important;
    color: var(--text) !important;
    background: transparent !important;
}
/* Submit button */
.waline-send {
    background: var(--ink) !important;
    color: var(--bg) !important;
    border-radius: 2px !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    padding: 8px 16px !important;
    transition: background 0.15s !important;
}
.waline-send:hover {
    background: var(--terracotta) !important;
}
/* Each comment item */
.waline-comment {
    padding: 20px 0 !important;
    border-bottom: 1px dashed var(--border) !important;
}
.waline-comment:last-child {
    border-bottom: 0 !important;
}
.waline-comment .waline-nick {
    color: var(--text) !important;
    font-weight: 600 !important;
    font-family: var(--font-sans) !important;
    font-size: 14px !important;
}
.waline-comment .waline-nick.like {
    color: var(--terracotta) !important;
}
.waline-comment .waline-time {
    color: var(--text-faint) !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
}
.waline-comment .waline-comment-content,
.waline-comment-body {
    color: var(--text) !important;
    font-family: var(--font-serif) !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
}
/* Avatar */
.waline-avatar {
    border-radius: 50% !important;
    border: 1px solid var(--border) !important;
}
/* Reactions & like */
.waline-like,
.waline-reply,
.waline-info {
    color: var(--text-dim) !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    letter-spacing: 0.05em !important;
}
.waline-like:hover,
.waline-reply:hover {
    color: var(--terracotta) !important;
}
.waline-badge {
    background: var(--terracotta) !important;
    color: var(--bg) !important;
    border: 0 !important;
    font-size: 9px !important;
}
/* Pagination */
.waline-pagination {
    color: var(--text-dim) !important;
    font-family: var(--font-mono) !important;
    font-size: 12px !important;
}
.waline-pagination button {
    color: var(--text) !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 2px !important;
    padding: 4px 10px !important;
    margin: 0 2px !important;
}
.waline-pagination button:hover {
    background: var(--ink) !important;
    color: var(--bg) !important;
}
/* Login panel (modal) */
.waline-loginform {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 4px !important;
    font-family: var(--font-sans) !important;
}
/* Dark-mode tweaks — keep the cream palette under dark scheme */
@media (prefers-color-scheme: dark) {
    #waline { color: var(--text); }
    .waline-input { color: var(--text) !important; }
    .waline-comment .waline-comment-content,
    .waline-comment-body { color: var(--text) !important; }
}
