/* ============================================================
   AnsarTech — Case Studies (index + detail template)
   Builds on tokens.css + styles.css + pages.css
   ============================================================ */

/* ---------- Reading-progress bar (under nav) ---------- */
.cs-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--at-red);
  z-index: 200;
  box-shadow: 0 0 12px rgba(217,7,29,0.6);
  transition: width 80ms linear;
}
@media (prefers-reduced-motion: reduce) { .cs-progress { transition: none; } }

/* ============================================================
   DETAIL — HERO (dark)
   ============================================================ */
.cs-hero {
  position: relative; overflow: hidden;
  background: var(--at-black); color: var(--at-white);
  padding: clamp(120px, 16vh, 168px) 0 clamp(56px, 8vh, 88px);
}
.cs-hero-grid {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 70% 20%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 70% 20%, black, transparent);
}
.cs-hero-orb {
  position: absolute; z-index: 1; right: -120px; top: 10%;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(217,7,29,0.16), transparent 62%);
  filter: blur(50px); pointer-events: none;
}
.cs-hero-inner { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 32px; }
.cs-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); margin-bottom: 32px;
  transition: color 140ms;
}
.cs-back:hover { color: var(--at-red); }
.cs-back svg { width: 14px; height: 14px; }
.cs-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--at-red); margin-bottom: 22px;
}
.cs-hero-eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--at-red); }
.cs-h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(34px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.024em;
  color: var(--at-white); margin: 0 0 22px; max-width: 20ch; text-wrap: balance;
}
.cs-dek { font-size: clamp(16px, 1.5vw, 20px); line-height: 1.55; color: rgba(247,247,245,0.74); margin: 0 0 24px; max-width: 62ch; }
.cs-meta-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 40px;
}
.cs-meta-row .sep { opacity: 0.4; }

/* Hero metric strip */
.cs-hero-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 36px;
}
.cs-metric-num { font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 52px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--at-red); }
.cs-metric-lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-top: 10px; }

/* ============================================================
   AT-A-GLANCE band
   ============================================================ */
.cs-glance { background: var(--at-charcoal); color: var(--at-white); border-top: 1px solid rgba(255,255,255,0.06); }
.cs-glance-inner { max-width: 1100px; margin: 0 auto; padding: 48px 32px; }
.cs-glance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-bottom: 32px; }
.cs-glance-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 10px; }
.cs-glance-v { font-size: 16px; color: var(--at-white); font-weight: 500; line-height: 1.4; }
.cs-glance-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-pill {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.8);
}
.cs-glance-challenge {
  padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.1);
  display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: baseline;
}
.cs-glance-challenge .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--at-red); }
.cs-glance-challenge p { margin: 0; font-size: 17px; line-height: 1.55; color: rgba(255,255,255,0.8); max-width: 66ch; }

/* ============================================================
   BODY (light, long-form) + sticky TOC
   ============================================================ */
.cs-body { background: var(--at-off-white); color: var(--at-black); }
.cs-body-wrap {
  max-width: 1100px; margin: 0 auto; padding: clamp(56px, 9vh, 96px) 32px;
  display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start;
}
.cs-toc { position: sticky; top: 96px; }
.cs-toc-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--at-mid-gray); margin-bottom: 16px; }
.cs-toc a {
  display: block; font-size: 14px; line-height: 1.4; color: var(--at-mid-gray);
  padding: 8px 0 8px 14px; border-left: 2px solid var(--at-light-gray);
  transition: color 160ms, border-color 160ms;
}
.cs-toc a:hover { color: var(--at-black); }
.cs-toc a.is-active { color: var(--at-red); border-color: var(--at-red); font-weight: 500; }

.cs-prose { max-width: 72ch; }
.cs-prose-section { margin-bottom: 56px; scroll-margin-top: 96px; }
.cs-prose-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--at-red); margin-bottom: 14px; }
.cs-h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; color: var(--at-black); margin: 0 0 20px; }
.cs-h3 { font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -0.012em; color: var(--at-black); margin: 32px 0 12px; }
.cs-prose p { font-size: 17px; line-height: 1.68; color: #2a2a2a; margin: 0 0 18px; }
.cs-prose p a { color: var(--at-red); text-decoration: underline; text-underline-offset: 2px; }
.cs-prose ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.cs-prose ul li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.6; color: #2a2a2a; margin-bottom: 10px; }
.cs-prose ul li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 999px; background: var(--at-red); }

/* Code / config chip */
.cs-code { font-family: var(--font-mono); font-size: 0.88em; background: var(--at-black); color: #ffd1d4; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }

/* Metric callout (inline) */
.cs-callout {
  display: flex; gap: 24px; align-items: baseline; flex-wrap: wrap;
  margin: 28px 0; padding: 24px 28px;
  background: var(--at-white); border: 1px solid var(--at-light-gray); border-left: 3px solid var(--at-red); border-radius: 12px;
}
.cs-callout-num { font-family: var(--font-display); font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--at-red); }
.cs-callout-txt { font-size: 15px; line-height: 1.5; color: var(--at-mid-gray); max-width: 44ch; }

/* Pull quote */
.cs-pull {
  margin: 36px 0; padding: 8px 0 8px 28px; border-left: 4px solid var(--at-red);
  font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 500;
  font-style: italic; line-height: 1.3; letter-spacing: -0.015em; color: var(--at-black);
}

/* Callout / note box */
.cs-note {
  margin: 28px 0; padding: 24px 26px; border-radius: 12px;
  background: #ECECEC; border: 1px solid var(--at-light-gray);
}
.cs-note-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--at-red); margin-bottom: 10px; }
.cs-note p { font-size: 15px; line-height: 1.6; color: #2a2a2a; margin: 0; }

/* Phase blocks (numbered, ghost number) */
.cs-phases { display: flex; flex-direction: column; gap: 16px; margin: 24px 0 8px; }
.cs-phase {
  position: relative; overflow: hidden;
  background: var(--at-white); border: 1px solid var(--at-light-gray); border-radius: 14px;
  padding: 28px 30px;
  transition: border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.cs-phase:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.cs-phase-ghost { position: absolute; right: 8px; bottom: -28px; font-family: var(--font-display); font-size: 150px; font-weight: 600; line-height: 0.8; color: rgba(14,14,14,0.04); letter-spacing: -0.04em; pointer-events: none; }
.cs-phase-n { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--at-red); margin-bottom: 12px; position: relative; z-index: 2; }
.cs-phase-h { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -0.015em; color: var(--at-black); margin: 0 0 10px; position: relative; z-index: 2; }
.cs-phase ul { position: relative; z-index: 2; margin: 0; }

/* Figure */
.cs-figure { margin: 32px 0; }
.cs-figure-frame {
  border: 1px solid var(--at-light-gray); border-radius: 12px; overflow: hidden; background: var(--at-white);
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  color: var(--at-mid-gray); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  background-image: radial-gradient(rgba(14,14,14,0.05) 1px, transparent 1px); background-size: 20px 20px;
}
.cs-figure-cap { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--at-mid-gray); margin-top: 10px; }

/* ============================================================
   RESULTS RECAP (dark scoreboard)
   ============================================================ */
.cs-recap { background: var(--at-black); color: var(--at-white); }
.cs-recap-inner { max-width: 1100px; margin: 0 auto; padding: clamp(56px, 9vh, 96px) 32px; }
.cs-recap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 40px; }
.cs-recap-stat { border-top: 2px solid var(--at-red); padding-top: 20px; }
.cs-recap-num { font-family: var(--font-display); font-size: clamp(36px, 4.6vw, 60px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--at-white); }
.cs-recap-lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-top: 12px; }

/* ============================================================
   TESTIMONIAL
   ============================================================ */
.cs-testi { background: var(--at-off-white); color: var(--at-black); }
.cs-testi-inner { max-width: 900px; margin: 0 auto; padding: clamp(56px, 9vh, 96px) 32px; }
.cs-testi-q {
  font-family: var(--font-display); font-size: clamp(24px, 3vw, 38px); font-weight: 500;
  line-height: 1.3; letter-spacing: -0.018em; color: var(--at-black); margin: 0 0 28px; text-wrap: balance;
}
.cs-testi-q .lead { color: var(--at-red); }
.cs-testi-by { display: flex; align-items: center; gap: 14px; }
.cs-testi-avatar { width: 46px; height: 46px; border-radius: 999px; background: var(--at-black); color: var(--at-red); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.cs-testi-name { font-size: 15px; font-weight: 600; color: var(--at-black); }
.cs-testi-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--at-mid-gray); margin-top: 3px; }

/* ============================================================
   STACK + RELATED
   ============================================================ */
.cs-stackband { background: var(--at-charcoal); color: var(--at-white); }
.cs-stackband-inner { max-width: 1100px; margin: 0 auto; padding: 56px 32px; display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.cs-stackband-h { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.cs-stackband .cs-glance-pills { flex: 1; }

.cs-related { background: var(--at-black); color: var(--at-white); }
.cs-related-inner { max-width: 1100px; margin: 0 auto; padding: clamp(56px, 9vh, 96px) 32px; }
.cs-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.cs-rel-card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1A1A1A 0%, #131316 100%);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 32px;
  transition: border-color 240ms var(--ease-out), transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.cs-rel-card:hover { border-color: rgba(217,7,29,0.45); transform: translateY(-3px); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.cs-rel-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--at-red); margin-bottom: 18px; }
.cs-rel-num { font-family: var(--font-display); font-size: 56px; font-weight: 600; letter-spacing: -0.03em; line-height: 0.9; color: var(--at-red); margin-bottom: 14px; }
.cs-rel-h { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; color: var(--at-white); margin: 0 0 18px; max-width: 24ch; }
.cs-rel-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--at-red); }
.cs-rel-link svg { width: 13px; height: 13px; transition: transform 200ms var(--ease-out); }
.cs-rel-card:hover .cs-rel-link svg { transform: translate(3px, -3px); }

/* Sticky mini-CTA */
.cs-minicta {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}
.cs-minicta.is-shown { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ============================================================
   INDEX page
   ============================================================ */
.csi-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.csi-chip {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 16px; border-radius: 999px; cursor: none;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.75);
  transition: all 160ms var(--ease-out);
}
.csi-chip:hover { border-color: rgba(255,255,255,0.4); color: var(--at-white); }
.csi-chip.is-active { background: var(--at-red); border-color: var(--at-red); color: var(--at-white); }
.csi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.csi-card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1A1A1A 0%, #131316 100%);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 30px;
  transition: border-color 240ms var(--ease-out), transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.csi-card:hover { border-color: rgba(217,7,29,0.45); transform: translateY(-3px); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.csi-card-eyebrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.csi-card-cat { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--at-red); }
.csi-card-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.55); padding: 4px 9px; border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; }
.csi-card-num { font-family: var(--font-display); font-size: clamp(56px, 7vw, 76px); font-weight: 600; letter-spacing: -0.03em; line-height: 0.9; color: var(--at-red); margin-bottom: 14px; }
.csi-card-h { font-family: var(--font-display); font-size: 21px; font-weight: 500; line-height: 1.22; letter-spacing: -0.015em; color: var(--at-white); margin: 0 0 18px; }
.csi-card-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--at-red); }
.csi-card-link svg { width: 13px; height: 13px; transition: transform 200ms var(--ease-out); }
.csi-card:hover .csi-card-link svg { transform: translate(3px, -3px); }
.csi-card.is-hidden { display: none; }

/* ---------- Calendar breakdown table ---------- */
.cs-table { width: 100%; border-collapse: collapse; margin: 22px 0 6px; font-size: 15px; }
.cs-table th, .cs-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--at-light-gray); }
.cs-table th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--at-mid-gray); }
.cs-table td { color: #2a2a2a; }
.cs-table td:last-child, .cs-table th:last-child { text-align: right; font-family: var(--font-mono); font-weight: 500; }
.cs-table tr.total td { font-weight: 700; color: var(--at-black); border-bottom: none; border-top: 2px solid var(--at-red); }
.cs-table tr.total td:last-child { color: var(--at-red); }

/* ---------- Mind-map embed (dark, full section) ---------- */
.cs-map { background: var(--at-black); color: var(--at-white); }
.cs-map-inner { max-width: 1100px; margin: 0 auto; padding: clamp(56px,9vh,96px) 32px; }
.cs-map-frame { width: 100%; height: 720px; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; display: block; background: var(--at-charcoal); }
/* Local PNG/SVG map — scrollable viewer on a dark backing (dark-themed diagram) */
.cs-map-scroll { width: 100%; height: 720px; overflow: auto; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; background: #0E0E0E; -webkit-overflow-scrolling: touch; }
.cs-map-img { display: block; width: 100%; height: auto; border: 0; max-width: none; }
.cs-map-zoom { display: inline-flex; align-items: center; gap: 8px; }
.cs-map-zoom button {
  width: 28px; height: 28px; border-radius: 7px; cursor: none;
  background: rgba(14,14,14,0.04); border: 1px solid rgba(14,14,14,0.22);
  color: var(--at-black); font-size: 17px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 140ms, background 140ms;
}
.cs-map-zoom button:hover { border-color: var(--at-red); background: rgba(217,7,29,0.08); color: var(--at-red); }
.cs-map-zoom-val { font-family: var(--font-mono); font-size: 12px; min-width: 40px; text-align: center; color: var(--at-mid-gray); }
.cs-map-openbtn { background: none; border: none; cursor: none; margin-left: 6px; color: var(--at-red); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cs-map-capright { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cs-map-scroll.is-grabbing { cursor: grabbing; }
.cs-map-scroll.is-grabbing img { cursor: grabbing !important; }
.cs-map-openbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Fullscreen map lightbox */
.cs-lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(8,8,10,0.96); overflow: auto; padding: 24px; }
.cs-lightbox-inner { width: max-content; margin: 0 auto; }
.cs-lightbox-inner img { display: block; width: 1700px; max-width: none; height: auto; border-radius: 8px; }
.cs-lightbox-close { position: fixed; top: 18px; right: 24px; z-index: 301; width: 44px; height: 44px; border-radius: 999px; cursor: none; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22); color: #fff; font-size: 24px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: border-color 140ms, background 140ms; }
.cs-lightbox-close:hover { border-color: var(--at-red); background: rgba(217,7,29,0.14); }
@media (max-width: 760px) { .cs-lightbox-inner img { width: 1100px; } }
@media (max-width: 760px) { .cs-map-scroll { height: 460px; } }
.cs-map-cap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.cs-map-cap a { color: var(--at-red); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Technical deep-dive expander ---------- */
.cs-expander { border: 1px solid var(--at-light-gray); border-radius: 14px; background: var(--at-white); overflow: hidden; }
.cs-expander > summary { list-style: none; cursor: none; padding: 24px 26px; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.cs-expander > summary::-webkit-details-marker { display: none; }
.cs-expander-intro { font-size: 15px; color: var(--at-mid-gray); max-width: 54ch; line-height: 1.5; margin: 0; }
.cs-expander-btn { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--at-red); white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.cs-expander-btn .plus { display: inline-block; font-size: 16px; transition: transform 220ms var(--ease-out); }
.cs-expander[open] .cs-expander-btn .plus { transform: rotate(45deg); }
.cs-expander-body { padding: 4px 26px 28px; border-top: 1px solid var(--at-light-gray); }
.cs-expander-body .cs-h3 { margin-top: 28px; }

/* ---------- Multi-line code block (deep-dive JSON / flow) ---------- */
.cs-codeblock {
  margin: 18px 0; padding: 18px 20px; border-radius: 10px;
  background: var(--at-black); border: 1px solid #2a2a2a;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.65;
  color: #d9d9d9; white-space: pre; overflow-x: auto;
}
.cs-codeblock .k { color: #ff7b8a; }
.cs-codeblock .s { color: #ffd166; }
.cs-codeblock .c { color: #6e6e6e; }

/* ---------- Tag cloud (consent forms) ---------- */
.cs-tagcloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 8px; }
.cs-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.01em; padding: 5px 10px; border-radius: 6px; background: var(--at-off-white); border: 1px solid var(--at-light-gray); color: #3a3a3a; }

/* Pull-quote chip in the at-a-glance rail */
.cs-glance-quote { margin-top: 28px; padding: 20px 22px; border-left: 3px solid var(--at-red); background: rgba(255,255,255,0.03); border-radius: 0 10px 10px 0; }
.cs-glance-quote p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,0.85); font-style: italic; }
.cs-glance-quote .by { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.55); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cs-body-wrap { grid-template-columns: 1fr; gap: 28px; }
  .cs-toc { position: static; top: auto; border: 1px solid var(--at-light-gray); border-radius: 12px; padding: 18px 20px; background: var(--at-white); }
  .cs-toc a { border-left: none; padding-left: 0; }
  .cs-toc a.is-active { border-left: none; padding-left: 0; }
  .csi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .cs-hero-metrics, .cs-glance-grid, .cs-recap-grid { grid-template-columns: 1fr 1fr; }
  .cs-glance-challenge { grid-template-columns: 1fr; gap: 10px; }
  .cs-related-grid, .csi-grid { grid-template-columns: 1fr; }
  .cs-prose { max-width: 100%; }
  .cs-callout { flex-direction: column; gap: 10px; }
  .cs-minicta { display: none; }
  .cs-map-frame { height: 480px; }
  .cs-expander > summary { flex-direction: column; align-items: flex-start; gap: 14px; }
}
