/* ———————————————————————————————— TOKENS */
:root {
  --blue:   #2563EB;
  --blue-600: #1D4ED8;
  --blue-100: #DBEAFE;
  --green:  #10B981;
  --green-100: #D1FAE5;
  --red:    #EF4444;
  --red-100: #FEE2E2;
  --purple: #8B5CF6;
  --purple-100: #EDE9FE;
  --orange: #F59E0B;
  --orange-100: #FEF3C7;

  --bg:     #FFFFFF;
  --bg-2:   #F8FAFC;
  --bg-3:   #F1F5F9;
  --line:   #E2E8F0;
  --line-2: #CBD5E1;
  --ink-3:  #94A3B8;
  --ink-2:  #475569;
  --ink-1:  #1E293B;
  --ink:    #0F172A;

  --radius: 10px;
  --radius-lg: 16px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --bugi-bg: #F8FAFC;
}
html[data-theme="dark"] {
  --bg:     #0B1120;
  --bg-2:   #0F172A;
  --bg-3:   #1E293B;
  --line:   #1E293B;
  --line-2: #334155;
  --ink-3:  #64748B;
  --ink-2:  #94A3B8;
  --ink-1:  #CBD5E1;
  --ink:    #F1F5F9;
  --blue-100: rgba(37,99,235,0.18);
  --green-100: rgba(16,185,129,0.16);
  --red-100: rgba(239,68,68,0.18);
  --purple-100: rgba(139,92,246,0.18);
  --orange-100: rgba(245,158,11,0.18);
  --bugi-bg: #0F172A;
}

/* ———————————————————————————————— BASE RESETS (scoped to editorial pages) */
body.bugi-editorial {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .2s, color .2s;
}
body.bugi-editorial *, body.bugi-editorial *::before, body.bugi-editorial *::after { box-sizing: border-box; }
body.bugi-editorial img { display: block; max-width: 100%; }
body.bugi-editorial a { color: inherit; text-decoration: none; }
body.bugi-editorial button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.bugi-container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ———————————————————————————————— NAV */
.bugi-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bugi-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.bugi-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  color: var(--ink);
}
.bugi-brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--blue); color: white;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
}
.bugi-brand-mark::before { content: 'B/'; letter-spacing: -1px; }
.bugi-brand .slash { color: var(--ink-3); font-weight: 400; }

.bugi-nav-links { display: flex; gap: 2px; }
.bugi-nav-link {
  padding: 8px 12px; border-radius: 8px;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  transition: background .12s, color .12s;
}
.bugi-nav-link:hover { background: var(--bg-3); color: var(--ink); }
.bugi-nav-link.active { color: var(--blue); }
html[data-theme="dark"] .bugi-nav-link.active { color: #60A5FA; }

.bugi-nav-actions { display: flex; gap: 6px; align-items: center; }
.bugi-icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: background .12s, color .12s;
  background: none; border: none;
}
.bugi-icon-btn:hover { background: var(--bg-3); color: var(--ink); cursor: pointer; }
.bugi-theme-btn .moon { display: block; }
.bugi-theme-btn .sun { display: none; }
html[data-theme="dark"] .bugi-theme-btn .moon { display: none; }
html[data-theme="dark"] .bugi-theme-btn .sun { display: block; }

.bugi-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--line); background: var(--bg);
  color: var(--ink-1);
  transition: border-color .12s, color .12s, background .12s;
}
.bugi-btn:hover { border-color: var(--line-2); color: var(--ink); }
.bugi-btn-primary {
  background: var(--ink); border-color: var(--ink); color: var(--bg);
  font-weight: 600;
}
html[data-theme="dark"] .bugi-btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.bugi-btn-primary:hover { background: var(--ink-1); border-color: var(--ink-1); color: var(--bg); }

/* ———————————————————————————————— CATEGORY COLORS */
[data-cat="guides"]  { --cat: var(--blue);   --cat-bg: var(--blue-100); }
[data-cat="fix"]     { --cat: var(--green);  --cat-bg: var(--green-100); }
[data-cat="compare"] { --cat: var(--purple); --cat-bg: var(--purple-100); }
[data-cat="deploy"]  { --cat: var(--orange); --cat-bg: var(--orange-100); }

.cat-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  background: var(--cat-bg); color: var(--cat);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cat-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cat);
}

/* ———————————————————————————————— EDITORIAL — HERO */
.e-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.e-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  align-items: center;
}
.e-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px; color: var(--ink-3);
  margin-bottom: 22px;
}
.e-eyebrow .bar { width: 24px; height: 1px; background: var(--line-2); }
.e-eyebrow b { color: var(--ink-1); font-weight: 600; }
.e-title {
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 20px;
  max-width: 760px;
}
.e-title em {
  font-style: normal;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.03em;
  font-size: 0.88em;
  padding: 0 0.08em;
}
html[data-theme="dark"] .e-title em { color: #60A5FA; }

.e-sub {
  font-size: 18px; line-height: 1.55;
  color: var(--ink-2);
  max-width: 600px;
  margin: 0 0 32px;
}
.e-search {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 14px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  max-width: 540px;
  transition: border-color .15s, box-shadow .15s;
}
.e-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 14%, transparent);
}
.e-search svg { color: var(--ink-3); flex-shrink: 0; }
.e-search input {
  flex: 1; border: none; outline: none;
  background: transparent; color: var(--ink);
  font-size: 14px; font-family: inherit;
  padding: 8px 0;
}
.e-search input::placeholder { color: var(--ink-3); }
.e-search .kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 7px; border-radius: 5px;
  background: var(--bg-3); color: var(--ink-2);
  border: 1px solid var(--line);
}

.e-meta {
  display: flex; align-items: center; gap: 18px;
  margin-top: 24px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.e-meta .live { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.e-meta .live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 40%, transparent);
  animation: bugi-pulse 2s infinite;
}
@keyframes bugi-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 40%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.e-meta a:hover { color: var(--ink-1); }

/* Bugi anchor */
.e-bugi-anchor {
  position: relative;
  width: 220px; height: 220px;
  flex-shrink: 0;
}
.e-bugi-disk {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--bugi-bg);
  border: 1px solid var(--line);
  overflow: hidden;
}
html[data-theme="dark"] .e-bugi-disk { background: var(--bg-2); border-color: var(--line); }
.e-bugi-disk img {
  position: absolute; inset: -8%;
  width: 116%; height: 116%;
  object-fit: cover;
  mix-blend-mode: multiply;
  filter: saturate(0.9);
  transition: transform .35s ease, opacity .2s;
}
html[data-theme="dark"] .e-bugi-disk img {
  mix-blend-mode: screen;
  filter: saturate(0.8) brightness(0.92);
}
.e-bugi-anchor:hover .e-bugi-disk img {
  transform: translateY(-3%) rotate(-2deg);
}
.e-bugi-img-2 { opacity: 0; }
.e-bugi-anchor:hover .e-bugi-img-1 { opacity: 0; }
.e-bugi-anchor:hover .e-bugi-img-2 { opacity: 1; }

.e-bugi-ring {
  position: absolute; inset: -10px;
  border: 1px dashed var(--line-2);
  border-radius: 50%;
  pointer-events: none;
  animation: bugi-rot 60s linear infinite;
}
@keyframes bugi-rot { to { transform: rotate(360deg); } }

.e-bugi-chip {
  position: absolute; bottom: -6px; right: -8px;
  font-family: var(--font-mono); font-size: 10px;
  background: var(--bg); border: 1px solid var(--line);
  padding: 4px 8px; border-radius: 6px;
  color: var(--ink-2);
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.e-bugi-chip b { color: var(--blue); font-weight: 600; }
html[data-theme="dark"] .e-bugi-chip b { color: #60A5FA; }

/* category strip */
.e-strip {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 28px;
}
.e-strip-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; color: var(--ink-1); font-weight: 500;
  background: var(--bg);
  transition: border-color .12s, color .12s, background .12s;
}
.e-strip-item:hover { border-color: var(--cat); color: var(--cat); }
.e-strip-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat); }
.e-strip-item .n {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  margin-left: 2px;
}

/* section heading */
.e-section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.e-shead {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 36px; gap: 24px;
}
.e-shead h2 {
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.15;
}
.e-shead .num {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--ink-3);
  display: block; margin-bottom: 6px;
}
.e-shead .e-link {
  font-size: 13px; color: var(--ink-1); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  transition: color .12s, border-color .12s;
}
.e-shead .e-link:hover { color: var(--blue); border-color: var(--blue); }

/* Popular */
.e-pop {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
}
.e-pop-side { display: flex; flex-direction: column; gap: 24px; }

.e-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  transition: border-color .15s, transform .15s;
}
.e-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.e-card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.e-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.e-card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.e-card-title {
  font-size: 20px; font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}
.e-card.e-feature .e-card-title { font-size: 28px; letter-spacing: -0.025em; }
.e-card.e-feature .e-card-thumb { aspect-ratio: 21/10; }
.e-card-desc {
  font-size: 14px; color: var(--ink-2);
  line-height: 1.55; margin: 0;
}
.e-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: auto; padding-top: 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
}
.e-card-foot .author {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2);
}
.e-card-foot .author::before {
  content: ''; width: 20px; height: 20px; border-radius: 50%;
  background-size: 140%; background-position: center 20%;
  flex-shrink: 0;
}
.read-time {
  display: inline-flex; align-items: center; gap: 4px;
}

/* Latest by Category */
.e-by-cat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.e-cat-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--bg);
  position: relative;
  display: flex; flex-direction: column;
  transition: border-color .15s;
}
.e-cat-block:hover { border-color: var(--cat); }
.e-cat-block::before {
  content: '';
  position: absolute; top: -1px; left: 24px; right: 24px;
  height: 2px;
  background: var(--cat);
  transform-origin: left;
  transform: scaleX(0.15);
  transition: transform .3s ease;
}
.e-cat-block:hover::before { transform: scaleX(1); }

.e-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.e-cat-title-row {
  display: flex; align-items: baseline; gap: 12px;
}
.e-cat-title {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}
.e-cat-arrow {
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: color .15s, background .15s;
}
.e-cat-block:hover .e-cat-arrow { color: var(--cat); background: var(--cat-bg); }

.e-articles { display: flex; flex-direction: column; }
.e-article {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.e-article:first-child { border-top: none; padding-top: 4px; }
.e-article-num {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
}
.e-article-main { min-width: 0; }
.e-article-title {
  font-size: 14px; font-weight: 500;
  color: var(--ink-1);
  display: block;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .12s;
}
.e-article:hover .e-article-title { color: var(--cat); }
.e-article-meta {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
}
.e-article-meta .sep { margin: 0 6px; color: var(--line-2); }
.e-article-time {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Footer */
.e-foot {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.e-foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.e-foot-text {
  color: var(--ink-2); font-size: 14px;
  line-height: 1.6;
  margin: 14px 0 16px;
  max-width: 360px;
}
.e-foot-col h5 {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 14px;
}
.e-foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.e-foot-col a { color: var(--ink-1); font-size: 14px; transition: color .12s; }
.e-foot-col a:hover { color: var(--blue); }
.e-foot-bottom {
  padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
  flex-wrap: wrap; gap: 12px;
}

/* Archive page styling */
.bugi-archive {
  padding: 64px 0;
}
.bugi-archive-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.bugi-archive-sub {
  color: var(--ink-2);
  font-size: 16px;
  margin: 0 0 48px;
}
.bugi-archive-month {
  margin-bottom: 40px;
}
.bugi-archive-month-head {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.bugi-archive-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-1);
  transition: color .12s;
}
.bugi-archive-item:first-child { border-top: none; }
.bugi-archive-item:hover .bugi-archive-item-title { color: var(--cat, var(--blue)); }
.bugi-archive-item-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.bugi-archive-item-title {
  font-size: 15px;
  font-weight: 500;
  transition: color .12s;
}
.bugi-archive-item-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

/* Responsive */
@media (max-width: 960px) {
  .bugi-nav-links { display: none; }
  .e-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .e-bugi-anchor { width: 180px; height: 180px; }
  .e-pop { grid-template-columns: 1fr; }
  .e-by-cat { grid-template-columns: 1fr; }
  .e-foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .bugi-archive-item { grid-template-columns: 70px 1fr auto; }
  .bugi-archive-item-time { display: none; }
}
@media (max-width: 540px) {
  .bugi-container { padding: 0 18px; }
  .e-search { flex-wrap: wrap; }
  .e-search .kbd { display: none; }
  .e-foot-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   SINGLE-POST BODY — article shell, typography, 11 components
   Applied when body has class "bugi-single"
   ========================================================================= */

body.bugi-single {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .2s, color .2s;
}
body.bugi-single *, body.bugi-single *::before, body.bugi-single *::after { box-sizing: border-box; }

/* ——— Article shell: two-column (main + sticky TOC) */
.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 64px;
  padding: 56px 0 80px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.article-main { min-width: 0; max-width: 720px; }

/* Article header */
.a-header { margin-bottom: 8px; }
.a-crumbs {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-3); margin-bottom: 24px;
}
.a-crumbs a { color: var(--ink-2); transition: color .12s; }
.a-crumbs a:hover { color: var(--ink); }
.a-crumbs .sep { color: var(--line-2); }

.a-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-3); margin-bottom: 18px;
}
.a-eyebrow .bar { width: 20px; height: 1px; background: var(--line-2); }
.a-eyebrow b { color: var(--ink-1); font-weight: 600; }

.a-title {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 16px 0 20px;
  color: var(--ink);
}
.a-dek {
  font-size: 19px; line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 640px;
}
.a-meta {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.a-meta .author {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-1); font-weight: 500;
}
.a-meta .author .av {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.a-meta .sep { color: var(--line-2); }
.a-meta .read-time svg { vertical-align: -2px; margin-right: 3px; }

/* ——— Article body typography */
.a-body { padding: 36px 0 16px; font-size: 17px; line-height: 1.72; color: var(--ink-1); }
.a-body > p { margin: 0 0 22px; }
.a-body > p:first-of-type::first-letter { font-weight: 600; color: var(--ink); }
.a-body h2 {
  font-size: 28px; letter-spacing: -0.02em;
  font-weight: 700; color: var(--ink);
  margin: 56px 0 16px; line-height: 1.2;
  scroll-margin-top: 84px;
}
.a-body h2[data-num]::before {
  content: '§ ' attr(data-num);
  display: inline-block;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-3); font-weight: 500;
  letter-spacing: 0.02em;
  margin-right: 10px;
  vertical-align: 0.28em;
}
.a-body h3 {
  font-size: 20px; letter-spacing: -0.015em;
  font-weight: 600; color: var(--ink);
  margin: 36px 0 12px;
  scroll-margin-top: 84px;
}
.a-body a { color: var(--blue); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--blue) 30%, transparent); text-underline-offset: 3px; }
.a-body a:hover { text-decoration-color: var(--blue); }
html[data-theme="dark"] .a-body a { color: #60A5FA; text-decoration-color: rgba(96,165,250,.4); }
.a-body strong { color: var(--ink); font-weight: 600; }
.a-body ul, .a-body ol { padding-left: 22px; margin: 0 0 24px; }
.a-body ul li, .a-body ol li { margin-bottom: 10px; }
.a-body ul li::marker { color: var(--ink-3); }
.a-body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--blue);
  color: var(--ink);
  font-size: 18px;
  font-style: italic;
}
.a-body :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--bg-3);
  border-radius: 4px;
  color: var(--ink-1);
  border: 1px solid var(--line);
}

/* ——— Code block (with language label + copy button + syntax tokens) */
.code-block {
  position: relative;
  margin: 24px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0D1322;
  border: 1px solid #1E293B;
}
.code-block-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: #111927;
  border-bottom: 1px solid #1E293B;
  font-family: var(--font-mono); font-size: 11px;
  color: #94A3B8;
}
.code-block-head .lang { display: inline-flex; align-items: center; gap: 6px; }
.code-block-head .lang::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
}
.copy-btn {
  padding: 3px 8px; border-radius: 5px;
  font-family: var(--font-mono); font-size: 11px;
  color: #94A3B8;
  background: transparent;
  border: 1px solid #1E293B;
  cursor: pointer;
  transition: color .12s, border-color .12s;
}
.copy-btn:hover { color: #F1F5F9; border-color: #334155; }
.code-block pre {
  margin: 0; padding: 16px 18px;
  font-family: var(--font-mono); font-size: 13.5px;
  line-height: 1.7;
  color: #CBD5E1;
  overflow-x: auto;
}
.code-block pre .tok-c { color: #64748B; font-style: italic; }
.code-block pre .tok-k { color: #C4B5FD; }
.code-block pre .tok-s { color: #86EFAC; }
.code-block pre .tok-n { color: #93C5FD; }
.code-block pre .tok-p { color: #FCA5A5; }
.code-block pre .tok-f { color: #60A5FA; }

/* ——— 01 TL;DR card */
.c-tldr {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  margin: 0 0 36px;
}
.c-tldr .label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--blue); font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
html[data-theme="dark"] .c-tldr .label { color: #60A5FA; }
.c-tldr ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; }
.c-tldr li { margin-bottom: 6px; color: var(--ink-1); }
.c-tldr li::marker { color: var(--blue); }

/* ——— 02 Key takeaway */
.c-takeaway {
  display: flex; gap: 14px;
  margin: 28px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--cat, var(--blue));
  background: var(--cat-bg, var(--bg-2));
  border-radius: 0 8px 8px 0;
}
.c-takeaway .label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--cat, var(--blue)); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  flex-shrink: 0; margin-top: 3px;
}
.c-takeaway p { margin: 0; font-size: 15px; color: var(--ink); }

/* ——— 03 Callout (4 variants: tip / warning / note / danger) */
.c-callout {
  display: flex; gap: 14px;
  margin: 24px 0;
  padding: 14px 18px;
  border: 1px solid var(--co-line, var(--line));
  background: var(--co-bg, var(--bg-2));
  border-radius: 10px;
}
.c-callout + .c-callout { margin-top: 10px; }
.c-callout.tip     { --co-line: color-mix(in srgb, var(--blue) 25%, var(--line)); --co-bg: color-mix(in srgb, var(--blue) 5%, var(--bg-2)); --co-ink: var(--blue); }
.c-callout.warning { --co-line: color-mix(in srgb, var(--orange) 30%, var(--line)); --co-bg: color-mix(in srgb, var(--orange) 6%, var(--bg-2)); --co-ink: var(--orange); }
.c-callout.note    { --co-line: var(--line); --co-bg: var(--bg-2); --co-ink: var(--ink-2); }
.c-callout.danger  { --co-line: color-mix(in srgb, var(--red) 30%, var(--line)); --co-bg: color-mix(in srgb, var(--red) 6%, var(--bg-2)); --co-ink: var(--red); }
.c-callout .ico {
  width: 22px; height: 22px; flex-shrink: 0;
  color: var(--co-ink); margin-top: 1px;
}
.c-callout .title { font-weight: 600; color: var(--ink); margin-bottom: 2px; font-size: 14px; }
.c-callout .body { font-size: 14.5px; color: var(--ink-1); line-height: 1.6; }

/* ——— 04 Stat highlights */
.c-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.c-stat {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  text-align: left;
}
.c-stat .num {
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1; margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.c-stat .num .u { font-size: 16px; color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.c-stat .lbl {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 6px;
}
.c-stat[data-accent="blue"] .num { color: var(--blue); }
.c-stat[data-accent="green"] .num { color: var(--green); }
.c-stat[data-accent="orange"] .num { color: var(--orange); }
.c-stat[data-accent="purple"] .num { color: var(--purple); }
html[data-theme="dark"] .c-stat[data-accent="blue"] .num { color: #60A5FA; }
html[data-theme="dark"] .c-stat[data-accent="green"] .num { color: #34D399; }
html[data-theme="dark"] .c-stat[data-accent="orange"] .num { color: #FBBF24; }
html[data-theme="dark"] .c-stat[data-accent="purple"] .num { color: #A78BFA; }

/* ——— 05 Pros & Cons */
.c-procon { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.c-procon .col {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.c-procon .col.pros { border-left: 3px solid var(--green); }
.c-procon .col.cons { border-left: 3px solid var(--red); }
.c-procon .col-head {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.c-procon .col.pros .col-head { color: var(--green); }
.c-procon .col.cons .col-head { color: var(--red); }
.c-procon ul { list-style: none; padding: 0; margin: 0; font-size: 13.5px; line-height: 1.55; }
.c-procon li {
  display: grid; grid-template-columns: 16px 1fr; gap: 8px;
  padding: 4px 0;
  color: var(--ink-1);
}
.c-procon li .mk {
  width: 14px; height: 14px;
  display: grid; place-items: center;
  border-radius: 50%;
  margin-top: 3px;
  font-size: 10px; font-weight: 700;
}
.c-procon li.pro .mk { background: var(--green-100); color: var(--green); }
.c-procon li.con .mk { background: var(--red-100); color: var(--red); }

/* ——— 06 Step indicator */
.c-steps { display: flex; flex-direction: column; gap: 0; margin: 24px 0; }
.c-step {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px;
  padding: 6px 0;
  position: relative;
}
.c-step:not(:last-child)::after {
  content: ''; position: absolute;
  left: 17px; top: 34px; bottom: -6px;
  width: 2px; background: var(--line);
}
.c-step.done:not(:last-child)::after { background: var(--blue); }
.c-step .circ {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--ink-3);
  z-index: 1;
}
.c-step.done .circ { background: var(--blue); border-color: var(--blue); color: white; }
.c-step.active .circ { border-color: var(--blue); color: var(--blue); }
.c-step .title { font-weight: 600; font-size: 14.5px; color: var(--ink); margin-bottom: 2px; line-height: 1.35; padding-top: 4px; }
.c-step .desc { font-size: 13px; color: var(--ink-2); padding-bottom: 6px; line-height: 1.5; }

/* ——— 07 Info box (definition list) */
.c-info {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
  margin: 24px 0;
}
.c-info-head {
  padding: 10px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.c-info-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.c-info dl { margin: 0; padding: 8px 16px; }
.c-info div.r {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 16px; padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.c-info div.r:last-child { border-bottom: 0; }
.c-info dt { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.c-info dd { margin: 0; color: var(--ink); font-weight: 500; }
.c-info dd.mono { font-family: var(--font-mono); font-size: 12.5px; }

/* ——— 08 Comparison table */
.c-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  margin: 24px 0;
}
.c-table thead th {
  text-align: left; padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.c-table thead th:not(:first-child) { text-align: center; }
.c-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.c-table tbody tr:last-child td { border-bottom: 0; }
.c-table tbody td:first-child { font-weight: 500; color: var(--ink-1); }
.c-table tbody td:not(:first-child) { text-align: center; }
.c-mark {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 12px; font-weight: 700;
  font-family: var(--font-mono);
}
.c-mark.yes { background: var(--green-100); color: var(--green); }
.c-mark.no  { background: var(--red-100); color: var(--red); }
.c-mark.mid { background: var(--orange-100); color: var(--orange); }

/* ——— 09 KBD keys */
kbd.c-kbd {
  display: inline-block;
  font-family: var(--font-mono); font-size: 12px;
  padding: 3px 7px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--ink-1);
  line-height: 1;
  min-width: 22px;
  text-align: center;
}

/* ——— 10 Terminal output */
.c-term {
  font-family: var(--font-mono); font-size: 13px;
  background: #0D1322;
  color: #CBD5E1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1E293B;
  margin: 24px 0;
}
.c-term-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: #111927;
  border-bottom: 1px solid #1E293B;
}
.c-term-head .dots { display: flex; gap: 6px; }
.c-term-head .dots span { width: 10px; height: 10px; border-radius: 50%; background: #1E293B; }
.c-term-head .dots span:nth-child(1) { background: #EF4444; opacity: 0.7; }
.c-term-head .dots span:nth-child(2) { background: #F59E0B; opacity: 0.7; }
.c-term-head .dots span:nth-child(3) { background: #10B981; opacity: 0.7; }
.c-term-head .path { font-size: 11px; color: #64748B; margin-left: auto; }
.c-term pre { margin: 0; padding: 14px 16px; line-height: 1.7; white-space: pre-wrap; }
.c-term .p { color: #86EFAC; }
.c-term .cmd { color: #F1F5F9; }
.c-term .ok { color: #86EFAC; }
.c-term .err { color: #FCA5A5; }
.c-term .dim { color: #64748B; }
.c-term .warn { color: #FBBF24; }

/* ——— 11 Pull quote */
.c-quote {
  padding: 18px 22px;
  border-left: 3px solid var(--purple);
  background: var(--purple-100);
  border-radius: 0 10px 10px 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
  position: relative;
  margin: 28px 0;
}
html[data-theme="dark"] .c-quote { border-left-color: #A78BFA; }
.c-quote::before {
  content: '"';
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 44px;
  line-height: 0;
  color: var(--purple);
  vertical-align: -14px;
  margin-right: 6px;
  font-weight: 700;
}
html[data-theme="dark"] .c-quote::before { color: #A78BFA; }
.c-quote .attr {
  display: block; margin-top: 10px;
  font-style: normal;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-3);
}

/* ——— FAQ accordion */
.faq { margin: 40px 0 0; border-top: 1px solid var(--line); padding-top: 36px; }
.faq h2 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 18px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  font-weight: 500; font-size: 16px;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev {
  flex-shrink: 0;
  transition: transform .2s;
  color: var(--ink-3);
}
.faq-item[open] summary .chev { transform: rotate(180deg); color: var(--ink-1); }
.faq-item .answer { padding: 0 0 20px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.faq-item .answer p { margin: 0 0 10px; }

/* ——— Related posts */
.related { margin: 40px 0 0; padding-top: 36px; }
.related h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 20px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rel-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  transition: border-color .15s, transform .15s;
}
.rel-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.rel-card h3 {
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0; color: var(--ink);
}
.rel-card .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-top: auto; }

/* ——— Sidebar TOC (sticky, scroll-spy via JS) */
.article-side { position: sticky; top: 88px; font-size: 13px; }
.toc { padding: 0 0 0 20px; border-left: 1px solid var(--line); }
.toc-head {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 14px;
}
.toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.toc a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 7px 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
  transition: color .12s;
  border-left: 2px solid transparent;
  padding-left: 10px; margin-left: -13px;
}
.toc a .n { font-family: var(--font-mono); color: var(--ink-3); font-size: 11px; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); font-weight: 500; border-left-color: var(--blue); }
.toc a.active .n { color: var(--blue); }
.toc .sub { padding-left: 38px; color: var(--ink-3); font-size: 12.5px; }
.toc .sub.active { color: var(--ink-1); }

.toc-reading {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.toc-reading .r-label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.toc-reading .r-bar {
  height: 3px; background: var(--line);
  border-radius: 2px; overflow: hidden;
}
.toc-reading .r-bar .fill {
  display: block; height: 100%;
  background: var(--blue);
  width: var(--p, 0%);
  transition: width .15s;
}
.toc-reading .r-meta {
  margin-top: 8px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-2);
  display: flex; justify-content: space-between;
}

/* ——— Responsive for single-post */
@media (max-width: 960px) {
  .article-shell { grid-template-columns: 1fr; gap: 0; padding: 32px 20px 48px; }
  .article-side { display: none; }
  .rel-grid { grid-template-columns: 1fr; }
  .c-stats { grid-template-columns: repeat(2, 1fr); }
  .c-procon { grid-template-columns: 1fr; }
}
/* ——— 768px: tablet responsive adjustments */
@media (max-width: 768px) {
  .e-hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .article-shell { grid-template-columns: 1fr; gap: 32px; }
  .article-side { display: none; }
  .rel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .a-title { font-size: clamp(26px, 7vw, 34px); }
  .a-dek { font-size: 17px; }
  .a-body { font-size: 16px; }
  .a-crumbs { flex-wrap: wrap; }
  .code-block pre { overflow-x: auto; }
  .a-eyebrow { flex-wrap: wrap; }
}

/* ——— Article footer wrapper — keeps related posts spacing consistent with author-box */
.a-footer { margin: 0; padding: 0; }

/* ——— Author box (Claude Design handoff v2 — 2026-04-19) */
.author-box {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 24px;
  align-items: center;
  margin: 56px 0 0;
  padding: 28px 4px 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.author-box::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 56px; height: 2px;
  background: var(--cat, var(--blue));
}
.author-av {
  width: 80px; height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
  flex-shrink: 0;
}
.author-av img {
  position: absolute; inset: -8%;
  width: 116%; height: 116%;
  object-fit: cover;
  mix-blend-mode: multiply;
}
html[data-theme="dark"] .author-av img { mix-blend-mode: screen; filter: brightness(.92); }
.author-main { min-width: 0; }
.author-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.author-label::after {
  content: ''; width: 14px; height: 1px; background: var(--line-2);
}
.author-name {
  font-size: 20px; font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 6px;
  display: flex; align-items: baseline; gap: 10px;
}
.author-name .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cat, var(--blue));
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--cat, var(--blue)) 40%, var(--line));
  border-radius: 4px;
}
.author-bio {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
  max-width: 440px;
}
.author-actions {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.author-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500;
  color: var(--cat, var(--blue));
  padding-bottom: 3px;
  border-bottom: 1px solid color-mix(in srgb, var(--cat, var(--blue)) 35%, transparent);
  transition: border-color .15s, gap .15s;
}
.author-cta:hover {
  border-bottom-color: var(--cat, var(--blue));
  gap: 9px;
}
.author-cta svg { transition: transform .15s; }
.author-cta:hover svg { transform: translateX(2px); }
.author-secondary {
  display: flex; gap: 14px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.author-secondary a {
  color: var(--ink-3);
  transition: color .12s;
}
.author-secondary a:hover { color: var(--ink-1); }
.author-secondary a + a { padding-left: 14px; border-left: 1px solid var(--line); }
@media (max-width: 640px) {
  .author-box {
    grid-template-columns: 64px 1fr;
    row-gap: 18px;
    padding: 24px 0;
  }
  .author-av { width: 64px; height: 64px; }
  .author-actions {
    grid-column: 1 / -1;
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 14px;
  }
}

/* ——— C-4 mobile safety net: block-level elements never exceed viewport.
   Code BLOCKS (inside <pre>): preserve whitespace, horizontal scroll inside their wrapper.
   INLINE code (outside <pre>): allowed to break, long tokens wrap.
   .c-table: scroll-box wrapper so comparison tables don't crush. */
@media (max-width: 768px) {
  body.bugi-single img,
  body.bugi-single iframe { max-width: 100%; }
  /* Code blocks — preserve whitespace, scroll horizontally inside .code-block */
  body.bugi-single .code-block { max-width: 100%; }
  body.bugi-single .code-block pre { overflow-x: auto; max-width: 100%; white-space: pre; word-break: normal; overflow-wrap: normal; }
  body.bugi-single pre { max-width: 100%; overflow-x: auto; }
  body.bugi-single pre code { white-space: pre; word-break: normal; overflow-wrap: normal; }
  /* Inline code (not inside a <pre>) — break long tokens so they don't overflow */
  body.bugi-single .a-body :not(pre) > code { overflow-wrap: anywhere; word-break: break-all; }
  /* Comparison tables scroll box */
  body.bugi-single .c-table { display: block; overflow-x: auto; max-width: 100%; }
  /* Default: non-code, non-table descendants fit viewport */
  body.bugi-single .a-body *:not(pre):not(code):not(.code-block):not(.c-table) {
    max-width: 100%; overflow-wrap: anywhere;
  }
}

/* ——— C-4 contrast fixes (WCAG AA) */
/* .a-crumbs and .a-eyebrow: bump text from ink-3 to ink-2 (7.58:1 light / 7.34:1 dark on respective bg) */
.a-crumbs { color: var(--ink-2); }
.a-crumbs a { color: var(--ink-1); }
.a-eyebrow { color: var(--ink-2); }
/* .read-time inherits from .a-meta (ink-3); override to ink-2 */
.a-meta .read-time { color: var(--ink-2); }
/* .rel-card .meta and .toc-head: bump ink-3 → ink-2 */
.rel-card .meta { color: var(--ink-2); }
.toc-head { color: var(--ink-2); }
/* TOC section numbers: ink-3 → ink-2 */
.toc a .n { color: var(--ink-2); }
/* Dark mode: --blue (#2563eb) fails 4.5:1 on dark bg; use a lighter blue */
html[data-theme="dark"] .toc a.active .n { color: #60A5FA; }
html[data-theme="dark"] .author-cta { color: #60A5FA; }
/* .copyright-bar (GeneratePress footer bar) — ensure dark bg is applied */
html[data-theme="dark"] .site-info { background: var(--bg-2) !important; }
html[data-theme="dark"] .copyright-bar { color: var(--ink-1); }

/* ——— Empty category placeholder (C-2) */
.e-cat-empty {
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 6px;
  align-items: center;
  min-height: 140px;
  justify-content: center;
}
.e-cat-empty-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: color-mix(in srgb, var(--cat, var(--ink-3)) 14%, transparent);
  display: grid; place-items: center;
  margin-bottom: 6px;
}
.e-cat-empty-icon .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cat, var(--ink-3));
}
.e-cat-empty-title { font-size: 15px; font-weight: 600; color: var(--ink-1); }
.e-cat-empty-desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
html[data-theme="dark"] .e-cat-empty { background: var(--bg-2); border-color: var(--line); }

/* ——— C-T11 author-box contrast fixes (WCAG AA): bump ink-3 and per-category dark accent */
.author-label { color: var(--ink-2); }
html[data-theme="dark"] .author-label { color: var(--ink-1); }
html[data-theme="dark"] [data-cat="guides"] .badge  { color: #60A5FA; border-color: color-mix(in srgb, #60A5FA 40%, var(--line)); }
html[data-theme="dark"] [data-cat="fix"] .badge     { color: #34D399; border-color: color-mix(in srgb, #34D399 40%, var(--line)); }
html[data-theme="dark"] [data-cat="compare"] .badge { color: #A78BFA; border-color: color-mix(in srgb, #A78BFA 40%, var(--line)); }
html[data-theme="dark"] [data-cat="deploy"] .badge  { color: #FBBF24; border-color: color-mix(in srgb, #FBBF24 40%, var(--line)); }

/* ——— C-2 home contrast fixes (WCAG AA) ——————————————————————————————————
   Light mode: ink-3 (#94A3B8 on white 2.56:1) → bump to ink-2 (#475569 on white 5.74:1)
   Dark mode:  ink-3 (#64748B on dark  3.75:1) → bump to ink-1 (#CBD5E1 on dark ≥7:1)
   Also: GP sets --base-3:#fff for site-header + inside-article; override in dark mode.
   Also: cat-badge text uses --blue (#2563EB) on --blue-100 (#DBEAFE) = 4.23:1 < 4.5:1.
*/

/* Override GP's --base-3 (used for site-header + inside-article bg) in dark mode */
/* Also override --contrast so GP nav links become readable on dark header bg */
html[data-theme="dark"] {
  --base-3: var(--bg);
  --contrast: var(--ink);
  --contrast-2: var(--ink-1);
  --contrast-3: var(--ink-2);
}

/* Logo spans — dark mode: ensure visible on dark header bg */
html[data-theme="dark"] .bugi-logo-blue { color: #60A5FA; }
html[data-theme="dark"] .bugi-logo-gray { color: var(--ink-2); }

/* Eyebrow text: ink-3 → ink-2 (decorative bar and · dots have aria-hidden="true") */
.e-eyebrow { color: var(--ink-2); }
html[data-theme="dark"] .e-eyebrow { color: var(--ink-1); }

/* Meta line below search: ink-3 → ink-2 */
.e-meta { color: var(--ink-2); }
.e-meta .live { color: var(--ink-2); }
html[data-theme="dark"] .e-meta { color: var(--ink-1); }
html[data-theme="dark"] .e-meta .live { color: var(--ink-1); }

/* Section number labels: ink-3 → ink-2 */
.e-shead .num { color: var(--ink-2); }
html[data-theme="dark"] .e-shead .num { color: var(--ink-1); }

/* Card label (e.g. "Feature" tag): replace inline ink-3 style */
.e-card-label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-2);
}
html[data-theme="dark"] .e-card-label { color: var(--ink-1); }

/* Card footer read-time: inherits ink-3 from .e-card-foot → bump to ink-2 */
.e-card-foot .read-time { color: var(--ink-2); }
html[data-theme="dark"] .e-card-foot .read-time { color: var(--ink-1); }

/* cat-badge: --blue (#2563EB) on --blue-100 (#DBEAFE) = 4.23:1; use --blue-600 (#1D4ED8) = ~5.2:1 */
[data-cat="guides"] .cat-badge { --cat: var(--blue-600); }
/* Dark mode cat-badge: use lighter accessible colors per category */
html[data-theme="dark"] [data-cat="guides"] .cat-badge  { --cat: #60A5FA; }
html[data-theme="dark"] [data-cat="fix"] .cat-badge     { --cat: #34D399; }
html[data-theme="dark"] [data-cat="compare"] .cat-badge { --cat: #A78BFA; }
html[data-theme="dark"] [data-cat="deploy"] .cat-badge  { --cat: #FBBF24; }

/* Footer column headers and bottom strip: ink-3 → ink-2 */
/* h5 replaced by p.e-foot-col-label (fix heading-order a11y) — style identically */
.e-foot-col h5,
.e-foot-col-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 14px;
}
.e-foot-bottom { color: var(--ink-2); }
html[data-theme="dark"] .e-foot-col h5,
html[data-theme="dark"] .e-foot-col-label { color: var(--ink-1); }
html[data-theme="dark"] .e-foot-bottom { color: var(--ink-1); }
