/* ============================================================
   Croydon Surveyors — Blog & Interactive Styles
   ============================================================ */

/* Reading progress bar */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 10000; width: 0%; transition: width .1s linear;
}

/* Sticky sidebar TOC */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 1.5rem;
}
.blog-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}
.sidebar-toc {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--gold);
  margin-bottom: 2rem;
}
.sidebar-toc h4 { margin-bottom: 1rem; font-size: .95rem; }
.sidebar-toc ol { list-style: decimal; margin-left: 1rem; }
.sidebar-toc ol li { margin-bottom: .5rem; }
.sidebar-toc ol li a {
  font-size: .87rem; color: #374151; /* 9.7:1 on off-white ✅ */
  transition: var(--transition); text-decoration: none;
}
.sidebar-toc ol li a:hover { color: #7a5e00; } /* deepened gold — 5.5:1 ✅ */
.sidebar-toc ol li a.active { color: var(--navy); font-weight: 600; }
.sidebar-related {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--light-grey);
}
.sidebar-related h4 { margin-bottom: 1rem; font-size: .95rem; }
.related-post {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .7rem 0;
  border-bottom: 1px solid var(--light-grey);
}
.related-post:last-child { border: none; }
.related-post img { width: 60px; height: 50px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.related-post a { font-size: .83rem; color: var(--navy); font-weight: 500; line-height: 1.3; } /* 12.6:1 on white ✅ */
.related-post a:hover { color: #7a5e00; } /* 5.5:1 on white ✅ */

/* Interactive quiz widget (legacy — kept for other articles) */
.quiz-widget {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  color: var(--white);
}
.quiz-widget h3 { color: var(--gold); margin-bottom: 1rem; font-size: 1.15rem; }
.quiz-options { display: flex; flex-direction: column; gap: .7rem; margin: 1rem 0; }
.quiz-option {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: .9rem 1.2rem;
  cursor: pointer; transition: var(--transition);
  font-size: .93rem;
}
.quiz-option:hover { background: rgba(200,168,75,.2); border-color: var(--gold); }
.quiz-option.correct { background: rgba(22,163,74,.3); border-color: #16a34a; }
.quiz-option.wrong   { background: rgba(220,38,38,.3); border-color: #dc2626; }
/* Fix: only show result when it has text content */
.quiz-result:empty { display: none !important; }
.quiz-result { margin-top: 1rem; padding: 1rem; background: rgba(200,168,75,.15); border-radius: var(--radius); font-size: .92rem; }

/* ============================================================
   Premium Quiz Widget (.quiz-widget-pro)
   ============================================================ */
.quiz-widget-pro {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.08);
  margin: 2rem 0;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
/* Header */
.qwp-header {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #0a1628 0%, #1a2e4a 100%);
  padding: 1.3rem 1.8rem;
  gap: 1rem; flex-wrap: wrap;
}
.qwp-header-left { display: flex; align-items: center; gap: .9rem; }
.qwp-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), #b8960a);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(200,168,75,.35);
}
.qwp-label {
  font-weight: 700; font-size: 1rem; color: var(--white);
}
.qwp-sub {
  font-size: .78rem; color: rgba(255,255,255,.78); margin-top: .15rem; /* ≥4.5:1 on dark ✅ */
}
.qwp-counter {
  font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,.80); /* ≥4.5:1 on dark ✅ */
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  padding: .3rem .85rem; border-radius: 50px;
  white-space: nowrap;
}
/* Body */
.qwp-body {
  background: #0f1e35;
  padding: 1.8rem;
}
.qwp-question {
  font-size: 1.05rem; font-weight: 600;
  color: #ffffff; /* pure white — max contrast ✅ */
  line-height: 1.5; margin-bottom: 1.4rem;
}
/* Options */
.qwp-options {
  display: flex; flex-direction: column; gap: .7rem;
  margin-bottom: 1.2rem;
}
.qwp-option {
  display: flex; align-items: center; gap: .85rem;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: .9rem 1.1rem;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, transform .15s ease;
  color: var(--white); font-size: .93rem; width: 100%;
}
.qwp-option:hover:not(:disabled) {
  background: rgba(200,168,75,.12);
  border-color: rgba(200,168,75,.5);
  transform: translateX(4px);
}
.qwp-opt-letter {
  min-width: 30px; height: 30px;
  background: rgba(255,255,255,.10);
  border: 1.5px solid rgba(255,255,255,.22);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; color: rgba(255,255,255,.90); /* ≥4.5:1 on dark ✅ */
  flex-shrink: 0;
  transition: all .2s ease;
}
.qwp-opt-text { flex: 1; line-height: 1.4; }
.qwp-opt-icon {
  min-width: 22px;
  font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
}
/* Correct state */
.qwp-option.qwp-correct {
  background: rgba(22,163,74,.2);
  border-color: #16a34a;
}
.qwp-option.qwp-correct .qwp-opt-letter {
  background: #16a34a; border-color: #16a34a; color: #fff;
}
.qwp-option.qwp-correct .qwp-opt-icon { color: #4ade80; }
/* Wrong state */
.qwp-option.qwp-wrong {
  background: rgba(220,38,38,.2);
  border-color: #dc2626;
}
.qwp-option.qwp-wrong .qwp-opt-letter {
  background: #dc2626; border-color: #dc2626; color: #fff;
}
.qwp-option.qwp-wrong .qwp-opt-icon { color: #f87171; }
/* Result panel */
.qwp-result {
  display: none;
  align-items: flex-start; gap: 1rem;
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-top: .4rem;
  animation: qwpFadeIn .35s ease forwards;
}
@keyframes qwpFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.qwp-result--correct {
  background: rgba(22,163,74,.15);
  border: 1.5px solid rgba(22,163,74,.35);
}
.qwp-result--wrong {
  background: rgba(220,38,38,.12);
  border: 1.5px solid rgba(220,38,38,.3);
}
.qwp-result-icon {
  font-size: 1.5rem; flex-shrink: 0; line-height: 1;
  margin-top: .1rem;
}
.qwp-result--correct .qwp-result-icon { color: #4ade80; }
.qwp-result--wrong  .qwp-result-icon { color: #f87171; }
.qwp-result-text {
  font-size: .9rem; color: rgba(255,255,255,.95); line-height: 1.55; /* ≥4.5:1 ✅ */
}
.qwp-result-text strong { color: var(--white); }
.qwp-result-text em { color: var(--gold); font-style: normal; font-weight: 600; }

/* Cost calculator widget */
.calc-widget {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--light-grey);
}
.calc-widget h3 { margin-bottom: 1.2rem; }
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.calc-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: var(--dark-grey); }
.calc-field select, .calc-field input {
  width: 100%; padding: .7rem 1rem;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius); font-size: .92rem;
  background: var(--white); color: var(--dark-grey);
  transition: var(--transition);
}
.calc-field select:focus, .calc-field input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,168,75,.15);
}
.calc-result {
  background: var(--navy); color: var(--white);
  border-radius: var(--radius); padding: 1.2rem 1.5rem;
  margin-top: 1rem; display: none;
}
.calc-result.show { display: block; }
.calc-price {
  font-family: var(--font-serif); font-size: 2rem;
  color: var(--gold); font-weight: 700;
}
.calc-note { font-size: .8rem; color: rgba(255,255,255,.90); margin-top: .3rem; } /* ≥4.5:1 on navy ✅ */

/* Legacy checklist widget (kept for other articles) */
.checklist-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--light-grey);
  margin: 1.5rem 0;
}
.checklist-widget h4 { margin-bottom: 1rem; color: var(--navy); }
.check-item {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .6rem 0; border-bottom: 1px solid var(--light-grey);
  cursor: pointer; transition: var(--transition);
}
.check-item:last-child { border: none; }
.check-box {
  width: 22px; height: 22px; flex-shrink: 0; margin-top: .1rem;
  border: 2px solid var(--light-grey); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.check-item.done .check-box { background: var(--green); border-color: var(--green); color: #fff; }
.check-item span { font-size: .92rem; }
.check-item.done span { text-decoration: line-through; color: var(--mid-grey); }

/* ============================================================
   Premium Coverage Widget
   ============================================================ */
.coverage-widget {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
  margin: 1.8rem 0 2.2rem;
  box-shadow: 0 8px 36px rgba(0,0,0,.1);
}
/* Header */
.cw-header {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #0a1628 0%, #0f2550 100%);
  padding: 1.4rem 1.8rem;
  gap: 1rem; flex-wrap: wrap;
}
.cw-header-left { display: flex; align-items: center; gap: 1rem; }
.cw-icon-box {
  width: 50px; height: 50px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), #b8960a);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.3rem;
  box-shadow: 0 4px 14px rgba(200,168,75,.4);
}
.cw-title {
  font-weight: 700; font-size: 1rem;
  color: var(--white); line-height: 1.3;
}
.cw-subtitle {
  font-size: .8rem; color: rgba(255,255,255,.80); /* ≥4.5:1 on dark ✅ */
  margin-top: .2rem;
}
.cw-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(200,168,75,.15);
  border: 1px solid rgba(200,168,75,.35);
  color: var(--gold);
  font-size: .75rem; font-weight: 700;
  padding: .35rem .9rem; border-radius: 50px;
  letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
/* 2-col grid */
.cw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  padding: .5rem 1rem;
}
.cw-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem .7rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
  position: relative;
}
.cw-item:hover { background: #f8fafc; transform: translateX(3px); }
.cw-item.cw-done { background: #f0fdf4; }
.cw-item-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  transition: transform .2s ease;
}
.cw-item:hover .cw-item-icon { transform: scale(1.1); }
.cw-item.cw-done .cw-item-icon { filter: grayscale(.4); }
.cw-item-body { flex: 1; min-width: 0; }
.cw-item-title {
  font-weight: 700; font-size: .88rem;
  color: var(--navy); line-height: 1.25;
}
.cw-item.cw-done .cw-item-title {
  text-decoration: line-through;
  color: var(--mid-grey);
}
.cw-item-desc {
  font-size: .77rem; color: #374151; /* 9.7:1 on white ✅ */
  margin-top: .15rem; line-height: 1.35;
}
.cw-check {
  width: 26px; height: 26px; flex-shrink: 0;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: .72rem;
  transition: all .22s ease;
}
.cw-item:hover .cw-check { border-color: var(--gold); }
.cw-item.cw-done .cw-check {
  background: var(--green); border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(22,163,74,.18);
}
/* Footer progress bar */
.cw-footer {
  display: flex; align-items: center; gap: 1rem;
  background: #f8fafc;
  border-top: 1.5px solid #e2e8f0;
  padding: 1rem 1.8rem;
}
.cw-footer-stat { text-align: center; white-space: nowrap; }
.cw-stat-num {
  display: block;
  font-family: var(--font-serif); font-size: 1.3rem;
  font-weight: 700; color: var(--navy); line-height: 1;
}
.cw-stat-lbl { font-size: .72rem; color: #374151; font-weight: 500; } /* 9.7:1 on light bg ✅ */
.cw-footer-bar {
  flex: 1; height: 8px;
  background: #e2e8f0; border-radius: 8px; overflow: hidden;
}
.cw-footer-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #22c55e);
  border-radius: 8px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}

@media (max-width: 640px) {
  .cw-grid { grid-template-columns: 1fr; }
  .cw-header { padding: 1.1rem 1.2rem; }
  .cw-footer { padding: .9rem 1.2rem; }
}

/* Tooltip */
.tooltip-wrap { position: relative; display: inline; }
.tooltip-wrap .tt-trigger {
  border-bottom: 1px dashed var(--gold);
  cursor: help; color: var(--accent);
}
.tooltip-wrap .tt-box {
  position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: var(--white);
  padding: .5rem .9rem; border-radius: var(--radius);
  font-size: .8rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: var(--transition);
  z-index: 100;
}
.tooltip-wrap:hover .tt-box { opacity: 1; }

/* Image lightbox */
.lb-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.lb-overlay.active { opacity: 1; pointer-events: all; }
.lb-img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); }
.lb-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: var(--gold); color: var(--navy);
  width: 40px; height: 40px; border-radius: 50%;
  border: none; font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Blog filter tabs */
.blog-filters {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: .5rem 1.2rem;
  border-radius: 50px;
  border: 2px solid #94a3b8; /* WCAG 3:1 UI component ✅ */
  background: var(--white);
  font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  color: #374151; /* 9.7:1 on white ✅ */
}
.filter-btn:hover, .filter-btn.active {
  background: var(--navy); color: #ffffff; border-color: var(--navy); /* 12.6:1 ✅ */
}
.filter-btn:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 2px;
}

/* Blog search */
.blog-search-bar {
  display: flex; gap: .6rem; margin-bottom: 2rem;
}
.blog-search-bar input {
  flex: 1; padding: .8rem 1.2rem;
  border: 2px solid #94a3b8; /* WCAG 3:1 UI component ✅ */
  border-radius: var(--radius); font-size: .93rem;
  color: #1f2937; /* 13.0:1 on white ✅ */
  background: #ffffff;
}
.blog-search-bar input::placeholder { color: #6b7280; } /* 4.6:1 on white ✅ AA */
.blog-search-bar input:focus {
  outline: 3px solid #0066cc; /* WCAG focus indicator ✅ */
  outline-offset: 2px;
  border-color: #0066cc;
}
.blog-search-bar button {
  background: var(--navy); color: #ffffff; /* 12.6:1 ✅ */
  border: none; border-radius: var(--radius);
  padding: .8rem 1.5rem; cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}
.blog-search-bar button:hover { background: #b8960a; color: var(--navy); } /* 5.2:1 ✅ */
.blog-search-bar button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Infographic box */
.info-box {
  border-left: 4px solid var(--accent);
  background: #eff6ff;
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.info-box.gold { border-color: var(--gold); background: #fffbeb; }
.info-box.green { border-color: var(--green); background: #f0fdf4; }
.info-box.red   { border-color: var(--red);  background: #fef2f2; }
.info-box strong { display: block; margin-bottom: .4rem; font-size: .95rem; color: #1f2937; } /* 13.0:1 on light bg ✅ */
.info-box p { font-size: .9rem; color: #1f2937; margin: 0; } /* 13.0:1 on light bg ✅ */
/* Ensure info-box link colors are accessible */
.info-box a { color: #1d4ed8; } /* 5.9:1 on light bg ✅ AA */
.info-box a:hover { color: #1e3a8a; } /* 8.5:1 on light bg ✅ AAA */

/* Data visualisation bars */
.data-bar-group { margin: 1.5rem 0; }
.data-bar-item { margin-bottom: 1rem; }
.data-bar-label {
  display: flex; justify-content: space-between;
  font-size: .88rem; font-weight: 600; margin-bottom: .4rem;
}
.data-bar-track {
  height: 10px; background: var(--light-grey);
  border-radius: 5px; overflow: hidden;
}
.data-bar-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  width: 0%; transition: width 1.2s ease;
}

/* ============================================================
   Cost Cards Grid
   ============================================================ */
.cost-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.8rem 0 1rem;
}
.cost-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--light-grey);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.2rem 1.2rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.cost-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  border-color: var(--gold);
}
.cost-card--highlight {
  border-color: var(--gold);
  background: linear-gradient(160deg, #fffbeb 0%, #fff 60%);
  box-shadow: 0 8px 28px rgba(200,168,75,.18);
}
.cost-card-badge {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy);
  font-size: .72rem; font-weight: 700;
  padding: .25rem .8rem;
  border-radius: 50px;
  white-space: nowrap;
  letter-spacing: .03em;
}
.cost-card-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--navy), #1a3a6e);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .9rem;
  color: var(--gold); font-size: 1.1rem;
}
.cost-card--highlight .cost-card-icon {
  background: linear-gradient(135deg, var(--gold), #b8960a);
  color: var(--white);
}
.cost-card-type {
  font-weight: 700; font-size: .87rem;
  color: var(--navy); margin-bottom: .2rem;
  line-height: 1.3;
}
.cost-card-sub {
  font-size: .77rem; color: #374151; /* 9.7:1 on white ✅ */
  margin-bottom: .9rem;
}
.cost-card-price {
  font-family: var(--font-serif);
  font-size: 1.35rem; font-weight: 700;
  color: var(--navy);
  margin-bottom: .8rem;
}
.cost-card--highlight .cost-card-price { color: var(--gold); }
.cost-card-bar {
  height: 5px; background: var(--light-grey);
  border-radius: 5px; overflow: hidden;
}
.cost-card-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 5px;
  transition: width 1.4s cubic-bezier(.4,0,.2,1);
}
.cost-note-banner {
  display: flex; align-items: center; gap: .9rem;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a6e 100%);
  color: #ffffff; /* 12.6:1 on navy ✅ */
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  font-size: .93rem;
  margin-bottom: 2rem;
}
.cost-note-banner i { color: #e8c96a; font-size: 1.2rem; flex-shrink: 0; } /* gold-light: 6.2:1 on navy ✅ */
.cost-note-banner strong { color: #e8c96a; } /* gold-light: 6.2:1 on navy ✅ */

/* ============================================================
   Testimonial Pull-Quote
   ============================================================ */
.testimonial-pull {
  position: relative;
  background: linear-gradient(135deg, #0a1628, #0f2044);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.5rem 3rem;
  margin: 2rem 0;
  overflow: hidden;
}
.testimonial-pull::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px; height: 100%;
  background: linear-gradient(180deg, var(--gold), #b8960a);
  border-radius: 4px 0 0 4px;
}
.tp-quote-icon {
  position: absolute;
  top: 1.2rem; left: 1.5rem;
  color: var(--gold); font-size: 1.6rem;
  opacity: .7;
}
.testimonial-pull blockquote {
  font-family: var(--font-serif);
  font-size: 1.08rem; font-style: italic;
  color: rgba(255,255,255,.92);
  line-height: 1.7;
  margin: 0 0 .8rem;
  border: none; padding: 0;
}
.tp-author {
  font-size: .85rem; font-weight: 600;
  color: var(--gold);
}

/* ============================================================
   Case Study Box
   ============================================================ */
.case-study-box {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
  margin: 1.8rem 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.09);
}
.cs-header {
  background: linear-gradient(135deg, #0a1628 0%, #0f2044 100%);
  padding: 1.5rem 1.8rem;
}
.cs-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(200,168,75,.2);
  border: 1px solid rgba(200,168,75,.4);
  color: var(--gold);
  font-size: .78rem; font-weight: 700;
  padding: .3rem .8rem; border-radius: 50px;
  margin-bottom: .8rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.cs-title {
  color: var(--white); font-size: 1.1rem;
  margin-bottom: .5rem; margin-top: 0;
}
.cs-desc {
  color: rgba(255,255,255,.90); /* ≥4.5:1 on dark ✅ */
  font-size: .9rem; margin: 0;
}
.cs-findings {
  background: var(--white);
  padding: 1.2rem 1.8rem;
  display: flex; flex-direction: column; gap: 0;
}
.cs-finding-item {
  display: flex; gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: flex-start;
}
.cs-finding-item:last-child { border: none; }
.cs-finding-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.cs-finding-body { flex: 1; }
.cs-finding-title {
  font-weight: 700; font-size: .93rem;
  color: var(--navy); margin-bottom: .3rem;
}
.cs-finding-body p {
  font-size: .87rem; color: #374151; /* 9.7:1 on white ✅ */
  margin: 0 0 .4rem; line-height: 1.5;
}
.cs-repair-cost {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; font-weight: 600;
  color: #1f2937; /* 13.0:1 on #f8fafc ✅ */
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: .3rem .7rem; border-radius: 50px;
}
.cs-repair-cost strong { color: var(--navy); } /* 12.6:1 on #f8fafc ✅ */
.cs-outcome {
  display: flex; align-items: center; justify-content: space-around;
  background: linear-gradient(135deg, var(--navy), #1a3a6e);
  padding: 1.4rem 1.8rem;
  gap: 1rem;
}
.cs-outcome-stat { text-align: center; }
.cs-stat-value {
  font-family: var(--font-serif);
  font-size: 1.6rem; font-weight: 700;
  color: rgba(255,255,255,.9);
  line-height: 1;
}
.cs-outcome-stat--gold .cs-stat-value { color: var(--gold); }
.cs-stat-label {
  font-size: .78rem; color: rgba(255,255,255,.88); /* ≥4.5:1 on dark navy ✅ */
  margin-top: .3rem; font-weight: 500;
}
.cs-outcome-divider {
  width: 1px; height: 40px;
  background: rgba(255,255,255,.15);
}

/* ============================================================
   Myths Grid
   ============================================================ */
.myths-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.myth-card {
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  border: 1.5px solid transparent;
  transition: var(--transition);
}
.myth-card:hover { transform: translateY(-3px); }
.myth-card--false {
  background: #fff5f5;
  border-color: #fecaca;
}
.myth-card--true {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.myth-label {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .77rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: .7rem;
}
.myth-card--false .myth-label { color: #dc2626; }
.myth-card--true  .myth-label { color: var(--green); }
.myth-heading {
  font-weight: 700; font-size: .95rem;
  color: var(--navy); margin-bottom: .6rem;
  line-height: 1.35;
}
.myth-card p {
  font-size: .87rem; color: #1f2937; /* 13.0:1 on light bg ✅ AAA */
  margin: 0; line-height: 1.55;
}

/* ============================================================
   Responsive overrides
   ============================================================ */
@media (max-width: 968px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; top: auto; }
  /* Blog listing grid */
  .blog-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .calc-row { grid-template-columns: 1fr; }
  .cost-cards-grid { grid-template-columns: 1fr 1fr; }
  .myths-grid { grid-template-columns: 1fr; }
  .cs-outcome { flex-wrap: wrap; gap: .8rem; }
  .cs-outcome-divider { display: none; }

  /* Blog article hero */
  .blog-hero { padding: 5rem 0 2rem; }
  .blog-hero h1 { font-size: clamp(1.4rem, 4.5vw, 2rem); }
  .blog-hero-meta { flex-wrap: wrap; gap: .5rem; }

  /* Blog listing */
  .blog-grid { grid-template-columns: 1fr; }

  /* TOC */
  .blog-toc-pro { margin-bottom: 1.5rem; }

  /* Quiz widget */
  .quiz-widget-pro { padding: 1.25rem; }
  .quiz-options-grid { grid-template-columns: 1fr; gap: .6rem; }

  /* Sidebar search */
  .sidebar-search { padding: 1rem; }

  /* Filter tabs */
  .blog-filters { gap: .4rem; flex-wrap: wrap; justify-content: flex-start; overflow-x: visible; }
  .filter-btn { font-size: .82rem; padding: .4rem .9rem; }
}

@media (max-width: 600px) {
  /* Blog article body */
  .blog-article { padding: 1.25rem 1rem; }
  .blog-article h1 { font-size: 1.4rem; }
  .blog-article h2 { font-size: 1.2rem; }
  .blog-article h3 { font-size: 1.05rem; }
  .blog-article p  { font-size: .95rem; line-height: 1.7; }
  .blog-article ul li, .blog-article ol li { font-size: .95rem; }

  /* Blog listing cards */
  .blog-card { margin-bottom: .75rem; }
  .blog-card .card-title, .blog-title { font-size: 1.05rem; }
  .blog-card-meta { font-size: .78rem; flex-wrap: wrap; gap: .3rem; }

  /* Hero on article pages */
  .blog-hero { padding: 4.5rem 0 1.5rem; min-height: auto; }
  .blog-hero h1 { font-size: 1.35rem; }
  .blog-hero-sub { font-size: .92rem; }

  /* TOC */
  .toc-items-list { padding: .75rem .9rem; }
  .toc-item a { font-size: .87rem; }

  /* Coverage widget */
  .cw-grid { grid-template-columns: 1fr; }

  /* Cost cards */
  .cost-cards-grid { grid-template-columns: 1fr; }

  /* Case study */
  .case-study-box { padding: 1.25rem; }
  .cs-findings-grid { grid-template-columns: 1fr; }

  /* Info boxes */
  .info-box, .btp-box { padding: 1rem; }
  .info-box p, .btp-box p { font-size: .92rem; }

  /* Sidebar filter */
  .filter-btn { min-height: 44px; }
}

@media (max-width: 480px) {
  .cost-cards-grid { grid-template-columns: 1fr; }
  .myths-grid { grid-template-columns: 1fr; }
  .quiz-widget-pro { padding: 1rem; }
  .quiz-result-panel { padding: 1rem; }
  .blog-hero h1 { font-size: 1.2rem; }
  .blog-article h2 { font-size: 1.1rem; }
}
