/* ==========================================================================
   Case Study Detail — redesign
   Reusable across any industry/service vertical. Content is data-driven from
   the $case object built at the top of casedetail-redesign.php — swap that
   block for CMS output once the new fields exist and nothing here changes.
   Namespaced under .csd- so it never collides with global site classes.
   ========================================================================== */

:root {
  --csd-blue: #023575;
  --csd-blue-deep: #041c3f;
  --csd-dark: #092032;
  --csd-red: #d33536;
  --csd-muted: #5f6b7a;
  --csd-line: #e4e7ec;
  --csd-line-strong: #c7ccd3;
  --csd-panel: #f6f8fa;
  --csd-up: #1a7a4c;
  --csd-down: #b23b2e;

  --csd-radius-sm: 6px;
  --csd-radius-md: 8px;
  --csd-shadow-sm: 0 1px 3px rgba(9, 32, 50, 0.06);
}

.csd-root {
  color: #333;
}

/* This page already ends in its own CTA (and a "Request More Info" form),
   so the site-wide mobile sticky bottom bar is redundant here and competes
   with the in-page CTA for the same screen space. This file only loads on
   this page, so it's safe to hide it unconditionally rather than relying on
   the #JDDPageid-N pattern used elsewhere (this page has no CMS page id). */
.fixedCta {
  display: none !important;
}

.csd-root .container {
  max-width: 1180px;
}

/* ---------- hero ---------- */
.csd-hero {
  position: relative;
  padding: 90px 0 78px;
  color: #fff;
  background: #0d1b2a;
  overflow: hidden;
}

.csd-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.csd-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(5, 7, 12, 0.92) 0%,
    rgba(5, 7, 12, 0.8) 35%,
    rgba(5, 7, 12, 0.25) 55%,
    rgba(5, 7, 12, 0) 80%
  );
  pointer-events: none;
}

.csd-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 75%);
  pointer-events: none;
}

.csd-hero .container {
  position: relative;
}

/* breadcrumb */
.csd-breadcrumb {
  --bs-breadcrumb-divider: "/";
  margin: 0 0 22px;
  padding: 0;
}

.csd-breadcrumb .breadcrumb-item,
.csd-breadcrumb .breadcrumb-item a {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
}

.csd-breadcrumb .breadcrumb-item a:hover {
  color: #fff;
}

.csd-breadcrumb .breadcrumb-item.active {
  color: #fff;
  font-weight: 600;
}

.csd-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.35);
}

.csd-hero-head {
  max-width: 760px;
}

.csd-hero h1 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(2rem, 3.8vw, 3.05rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.csd-hero .csd-dek {
  font-size: 1.14rem;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
  max-width: 58ch;
  margin: 0;
}

.csd-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 64px;
}

.csd-metric {
  padding: 30px 28px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.csd-metric:first-child {
  padding-left: 15px;
}

.csd-metric:last-child {
  border-right: none;
  padding-right: 0;
}

.csd-metric .csd-num {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.csd-metric .csd-label {
  margin-top: 9px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.62);
  max-width: 24ch;
}

/* ---------- sound-familiar symptoms ---------- */
.csd-symptoms {
  background: var(--csd-panel);
  padding: 48px 0;
  border-bottom: 1px solid var(--csd-line);
}

.csd-symptoms-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.csd-symptoms-head h2 {
  color: var(--csd-dark);
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0;
}

.csd-symptoms-head span {
  font-size: 0.86rem;
  color: var(--csd-muted);
}

.csd-symptoms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.csd-symptom {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.96rem;
  color: var(--csd-dark);
  line-height: 1.45;
}

.csd-symptom .csd-mark {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--csd-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  margin-top: 2px;
}

/* ---------- problem / fix / result triad ---------- */
.csd-triad {
  margin: 26px 0 30px;
  border: 1px solid var(--csd-line);
  border-radius: var(--csd-radius-md);
  box-shadow: var(--csd-shadow-sm);
  overflow: hidden;
}

.csd-triad-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  padding: 18px 20px;
}

.csd-triad-row + .csd-triad-row {
  border-top: 1px solid var(--csd-line);
}

.csd-triad-row .csd-triad-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.csd-triad-row .csd-p .csd-triad-label {
  color: var(--csd-down);
}
.csd-triad-row .csd-f .csd-triad-label {
  color: var(--csd-blue);
}
.csd-triad-row .csd-r .csd-triad-label {
  color: var(--csd-up);
}

.csd-triad-row p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--csd-dark);
}

.csd-triad-head {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  padding: 12px 20px;
  background: var(--csd-panel);
  border-bottom: 1px solid var(--csd-line);
}

.csd-triad-head span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--csd-muted);
}

/* ---------- trust / compliance strip ---------- */
.csd-trust {
  position: relative;
  background: var(--csd-dark);
  overflow: hidden;
}

.csd-trust::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      480px 200px at 12% 0%,
      rgba(79, 191, 138, 0.1),
      transparent 65%
    ),
    radial-gradient(
      480px 220px at 90% 100%,
      rgba(2, 53, 117, 0.28),
      transparent 60%
    );
  pointer-events: none;
}

.csd-trust .container {
  position: relative;
  padding-top: 30px;
  padding-bottom: 30px;
}

.csd-trust-head {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 14px;
}

.csd-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.csd-trust-badge {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.csd-trust-badge:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 191, 138, 0.35);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.04)
  );
}

.csd-trust-badge .csd-check {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    rgba(79, 191, 138, 0.32),
    rgba(79, 191, 138, 0.12)
  );
  box-shadow: 0 0 0 1px rgba(79, 191, 138, 0.25) inset;
  color: #4fbf8a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.csd-trust-badge span.csd-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

/* ---------- what's included ---------- */
.csd-includes-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 16px;
  padding: 18px 24px;
  box-shadow: 0 24px 48px -30px rgba(15, 23, 42, 0.18);
}

.csd-includes-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #ff5a52, #d33536, #0c4f9c);
}

.csd-includes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 24px;
}

.csd-includes-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.87rem;
  color: var(--csd-dark);
  line-height: 1.4;
  padding: 8px 6px;
  margin: 0 -6px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.csd-includes-item:hover {
  background-color: var(--csd-panel);
}

.csd-includes-item .csd-check {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(211, 53, 54, 0.1);
  border: 1px solid rgba(211, 53, 54, 0.28);
  color: var(--csd-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
}

@media (min-width: 576px) and (max-width: 991px) {
  .csd-includes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .csd-includes-card {
    padding: 14px 18px;
    border-radius: 14px;
  }

  .csd-includes-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- section scaffolding ---------- */
.csd-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--csd-line);
}

.csd-section:last-of-type {
  border-bottom: none;
}

.csd-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--csd-red);
  margin: 0 0 10px;
}

.csd-grid-main {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
}

.csd-rail {
  position: sticky;
  top: 116px;
  align-self: start;
}

.csd-rail dl {
  margin: 0;
}

.csd-rail .csd-fact {
  padding: 14px 0;
  border-bottom: 1px solid var(--csd-line);
}

.csd-rail .csd-fact:first-child {
  padding-top: 0;
}

.csd-rail dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--csd-muted);
  margin-bottom: 4px;
  font-weight: 700;
}

.csd-rail dd {
  margin: 0;
  font-size: 0.93rem;
  color: var(--csd-dark);
  font-weight: 500;
}

.csd-prose {
  max-width: 68ch;
}

.csd-prose h2 {
  color: var(--csd-dark);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  margin: 0 0 20px;
}

.csd-prose p {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.7;
  color: #3d4553;
}

.csd-prose p:last-child {
  margin-bottom: 0;
}

.csd-pullquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--csd-red);
  background: var(--csd-panel);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--csd-dark);
  border-radius: 0 6px 6px 0;
}

/* ---------- results ledger ---------- */
.csd-results-card {
  position: relative;
  overflow: hidden;
  background: transparent;
  border-radius: 16px;
}

.csd-ledger-scroll {
  overflow-x: auto;
}

.csd-ledger {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.csd-ledger th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--csd-muted);
  font-weight: 700;
  padding: 0 0 10px;
}

.csd-ledger th.csd-num,
.csd-ledger td.csd-num {
  text-align: right;
}

.csd-ledger td {
  padding: 14px 0;
  border-bottom: 1px solid var(--csd-line);
  vertical-align: middle;
}

/* Gradient divider — a full-width spacer row right under the header, instead
   of a bar along the top of the card. A real colspan row (rather than an
   absolutely-positioned bar) so the gradient renders as one continuous line
   across the table, not clipped per-cell. Declared after `.csd-ledger td`
   so it wins on the shared padding/border properties. */
.csd-ledger-divider td {
  padding: 0;
  height: 3px;
  border: none;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff5a52, #d33536, #0c4f9c);
}

.csd-ledger tr:last-child td {
  border-bottom: none;
}

.csd-ledger .csd-metric-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--csd-dark);
  padding-right: 20px;
}

.csd-ledger .csd-metric-name .csd-sub {
  display: block;
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--csd-muted);
  margin-top: 2px;
}

.csd-impact-bar {
  display: block;
  margin-top: 6px;
  width: 100%;
  max-width: 180px;
  height: 3px;
  border-radius: 2px;
  background: var(--csd-panel);
  overflow: hidden;
}

.csd-impact-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--csd-up);
}

.csd-impact-fill.csd-down {
  background: var(--csd-down);
}

.csd-ledger td.csd-num {
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  white-space: nowrap;
}

.csd-ledger .csd-before {
  color: var(--csd-muted);
  text-decoration-color: var(--csd-line-strong);
  text-decoration-thickness: 1px;
}

.csd-ledger .csd-after {
  color: var(--csd-dark);
  font-weight: 700;
}

.csd-delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  white-space: nowrap;
}

.csd-delta-pill i {
  font-size: 0.76rem;
}

.csd-delta-pill.csd-up {
  color: var(--csd-up);
  background: rgba(26, 122, 76, 0.1);
}

.csd-delta-pill.csd-down {
  color: var(--csd-down);
  background: rgba(178, 59, 46, 0.1);
}

@media (max-width: 767px) {
  .csd-results-card {
    padding: 0;
    border-radius: 14px;
  }

  .csd-impact-bar {
    max-width: 110px;
  }

  /* The table needed a horizontal scroll on narrow screens, and nothing
       told a mobile user that scroll existed — so instead of a table, each
       row becomes its own stacked card here. No scrolling to discover, and
       every value gets an inline label since the header row is gone. */
  .csd-ledger-scroll {
    overflow-x: visible;
  }

  .csd-ledger {
    display: block;
    min-width: 0;
  }

  .csd-ledger thead {
    display: none;
  }

  .csd-ledger tbody {
    display: block;
  }

  /* Needs to out-specificity `.csd-ledger tbody tr` below (which also
       matches this row) — otherwise that rule's display:block wins and the
       divider shows up as an empty bordered card instead of disappearing. */
  .csd-ledger tbody tr.csd-ledger-divider {
    display: none;
  }

  .csd-ledger tbody tr {
    display: block;
    border: 1px solid var(--csd-line);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fff;
  }

  .csd-ledger tbody tr:last-child {
    margin-bottom: 0;
  }

  .csd-ledger td {
    display: block;
    padding: 0;
    border-bottom: none;
  }

  .csd-ledger .csd-metric-name {
    padding-right: 0;
    margin-bottom: 10px;
  }

  .csd-ledger td.csd-num {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 0;
    border-top: 1px solid var(--csd-line);
    font-size: 0.92rem;
  }

  .csd-ledger td.csd-num::before {
    content: attr(data-label);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--csd-muted);
  }
}

/* ---------- testimonial: compact, white-bg, one horizontal row instead of
   a stacked block — icon and quote sit side by side, attribution wraps to
   its own row underneath. ---------- */
#in-their-words.csd-testimonial-section {
  padding: 32px 0;
  text-align: left;
  background: #fff;
}

#in-their-words .csd-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
}

.csd-testimonial-inner {
  max-width: none;
  margin: 0;
}

.csd-testimonial-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
}

.csd-testimonial-quote-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(211, 53, 54, 0.3);
  background: rgba(211, 53, 54, 0.08);
  color: var(--csd-red);
  font-size: 1.1rem;
  flex: none;
}

.csd-testimonial-quote {
  margin: 0;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--csd-dark);
  letter-spacing: -0.01em;
}

.csd-testimonial-who {
  grid-column: 2 / -1;
  margin-top: 4px;
  font-size: 0.86rem;
  color: var(--csd-muted);
}

.csd-testimonial-who b {
  color: var(--csd-dark);
  font-weight: 700;
}

@media (max-width: 575px) {
  #in-their-words.csd-testimonial-section {
    padding: 24px 0;
  }

  .csd-testimonial-row {
    grid-template-columns: 1fr;
  }

  .csd-testimonial-who {
    grid-column: 1;
  }

  .csd-trust .container {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

/* ---------- final CTA ---------- */
.csd-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--csd-blue-deep) 0%,
    var(--csd-blue) 58%,
    #0c4f9c 100%
  );
  padding: 58px 0;
}

.csd-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(
    ellipse 65% 70% at 28% 30%,
    rgba(0, 0, 0, 0.6),
    transparent 75%
  );
  pointer-events: none;
}

.csd-cta::after {
  content: "";
  position: absolute;
  inset: -90px auto auto -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(211, 53, 54, 0.28);
  filter: blur(70px);
  pointer-events: none;
}

.csd-cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: center;
}

.csd-cta-copy h2 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  line-height: 1.25;
  margin: 0 0 10px;
}

.csd-cta-copy p {
  color: rgba(255, 255, 255, 0.74);
  max-width: 46ch;
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.csd-cta-bullets {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}

.csd-cta-bullets li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.csd-cta-bullets .csd-check {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
}

.csd-cta-copy .btnRed-bg {
  display: inline-block;
  box-shadow: 0 16px 32px -14px rgba(211, 53, 54, 0.7);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.csd-cta-copy .btnRed-bg:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px -14px rgba(211, 53, 54, 0.8);
}

.csd-cta-form {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 26px 54px -18px rgba(2, 12, 28, 0.5);
  padding: 26px 24px 22px;
}

.csd-cta-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #ff5a52, #d33536, #0c4f9c);
}

/* The card wrapper above already handles background/border/padding — strip
   the global .php-email-form box styling so the form isn't nested inside
   a second visible border. */
.csd-cta-form form.php-email-form {
  border: none;
  border-top: none;
  background: none;
  padding: 0;
  margin: 0;
  text-align: left;
  border-radius: 0;
}

.csd-cta-form .csd-form-title {
  font-weight: 800;
  color: var(--csd-dark);
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 5px;
}

.csd-cta-form .csd-form-sub {
  font-size: 0.84rem;
  color: var(--csd-muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.csd-cta-form .form-row {
  display: flex;
  flex-direction: column;
}

.csd-cta-form .form-group {
  margin-bottom: 10px;
}

.csd-cta-form .form-control {
  border-color: var(--csd-line-strong);
  border-radius: var(--csd-radius-sm);
}

.csd-cta-form .form-control:focus {
  border-color: var(--csd-blue);
  box-shadow: 0 0 0 3px rgba(2, 53, 117, 0.12);
  outline: none;
}

.csd-cta-form textarea.form-control {
  min-height: 70px;
  resize: vertical;
}

.csd-cta-form .btnRed-bg {
  width: 100%;
  text-align: center;
  margin-top: 2px;
  padding: 11px 22px;
}

.csd-cta-form .msg:not(:empty) {
  margin-top: 12px;
}

.csx-case-stat-num {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(90deg, #023575, #0c4f9c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.csx-case-stat-label {
  display: block;
  margin-top: 3px;
  font-size: 0.66rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.csx-case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 16px;
  box-shadow: 0 12px 30px -20px rgba(9, 32, 50, 0.18);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.csx-case-card:hover {
  transform: translate3d(0, -10px, 0);
  box-shadow: 0 34px 60px -22px rgba(9, 32, 50, 0.28);
  border-color: #dde1e6;
}

.csx-case-card-media {
  position: relative;
  height: 165px;
  background: linear-gradient(135deg, #eef1f5, #dde3ea);
  overflow: hidden;
}

.csx-case-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    transform 0.6s ease,
    filter 0.6s ease;
  filter: saturate(1);
}

.csx-case-card:hover .csx-case-card-media img {
  transform: scale(1.08);
  filter: saturate(1.12);
}

.csx-case-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    190deg,
    rgba(9, 32, 50, 0) 45%,
    rgba(9, 32, 50, 0.55) 100%
  );
  pointer-events: none;
}

.csx-case-stat-badge {
  position: absolute;
  left: 16px;
  top: 131px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 8px 13px;
  border-radius: 11px;
  box-shadow: 0 12px 22px -12px rgba(9, 32, 50, 0.28);
  transition: transform 0.35s ease;
}

.csx-case-card:hover .csx-case-stat-badge {
  transform: translateY(-4px);
}

.csx-case-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 45px 18px 16px;
}

.csx-case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.csx-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  line-height: 1.5;
}

.csx-badge-industry {
  color: #d33536;
  background: rgba(211, 53, 54, 0.08);
}

.csx-badge-service {
  color: #0c4f9c;
  background: rgba(2, 53, 117, 0.07);
}

.csx-case-title {
  flex: 1 1 auto;
  font-size: 1.02rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.36;
  margin: 0 0 12px;
  transition: color 0.3s ease;
}

.csx-case-card:hover .csx-case-title {
  color: #023575;
}

.csx-case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #111827;
  padding-top: 12px;
  border-top: 1px solid #f0f1f4;
}

.csx-case-link i {
  display: inline-flex;
  font-size: 1.3rem;
  line-height: 1;
  color: #111827;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.csx-case-card:hover .csx-case-link i {
  color: #d33536;
  transform: translateX(3px) translateY(-2px);
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .csd-hero {
    padding-top: 120px;
  }

  #header .call-toggle {
    margin-top: 6px;
  }

  #header .nav-toggle {
    top: 50%;
    transform: translateY(-50%);
  }

  #header .mob-menu {
    margin-top: 6px;
  }
  
  #header .nav-toggle:before {
    background-color: #fff;
    box-shadow:
      0 0.5em 0 0 #fff,
      0 1em 0 0 #fff;
  }

  #header .call-toggle img {
    filter: invert(1);
    margin-top: 5px;
  }

  .header-scrolled .call-toggle {
    filter: invert();
  }

  .left-side-wrapper-mob-quote {
    margin-top: -45px;
  }

  .csd-grid-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .csd-rail {
    position: static;
  }

  .csd-rail dl {
    display: flex;
    flex-direction: column;
  }

  .csd-rail .csd-fact {
    flex: 1 1 100%;
  }

  .csd-metrics {
    grid-template-columns: 1fr;
  }

  .csd-metric {
    border-right: none;
    border-bottom: 1px solid var(--csd-line);
    padding: 16px 0;
  }

  .csd-metric:last-child {
    border-bottom: none;
  }

  .csd-cta {
    padding: 40px 0;
  }

  .csd-cta-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .csd-symptoms-grid,
  .csd-cta-bullets {
    grid-template-columns: 1fr;
  }

  .csd-trust-grid {
    grid-template-columns: 1fr 1fr;
  }

  .csd-triad-row,
  .csd-triad-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .csd-triad-row + .csd-triad-row {
    border-top: 2px solid var(--csd-line);
  }

  .csd-triad-head {
    display: none;
  }
}

@media (max-width: 575px) {
  .csd-hero {
    padding-top: 96px;
  }

  .csd-trust-grid {
    grid-template-columns: 1fr;
  }

  .csd-cta {
    padding: 28px 0;
  }
}

@media (max-width: 991px) {
  .csd-ledger-divider {
    display: none;
  }
}

/* ==========================================================================
   Shared page-level components
   Used identically across all case-studies/*.php detail pages (chiropractic,
   dental, healthcare-website-maintenance, mental-health-digital-growth) but
   previously duplicated in each page's own inline <style> block. Moved here
   from chiropractic-platform-migration.php so it's defined once.
   ========================================================================== */

.csd-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 16px;
}

.csd-hero-head h1 {
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 16px;
}

.csd-dek {
  font-size: 1.06rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.82);
  max-width: 64ch;
}

.csd-metric:hover {
  transform: translateY(-3px);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.09)
  );
  border-color: rgba(255, 255, 255, 0.26);
}

.csd-metric::before {
  content: "";
  position: absolute;
  inset: auto -14px -28px auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.csd-metric::after {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  width: 22px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #ff6b6b, #d33536);
}

.csd-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #d33536, #ff6f61);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  margin-top: 1px;
}

.csd-symptom span:not(.csd-mark) {
  color: #304156;
  line-height: 1.55;
  font-size: 0.92rem;
}

.csd-section .csd-eyebrow {
  display: inline-block;
  background: linear-gradient(90deg, #fff2f2, #eef6ff);
  color: #d14242;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.csd-triad-row .csd-p,
.csd-triad-row .csd-f,
.csd-triad-row .csd-r {
  padding: 0;
}
.csd-triad-label {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 6px;
}

@media (max-width: 575px) {
  .csd-hero-badge {
    padding: 5px 9px;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    gap: 5px;
    margin-bottom: 10px;
  }

  .csd-metric::before {
    width: 40px;
    height: 40px;
  }
}

/* ---------- #tech-stack: rail + content split. Left ("Tech Stack") is a
   sticky glass card so it stays in view while the page scrolls the right
   column — no separate internal scroller, the section just scrolls with the
   page like every other section. Icons use Bootstrap Icons (`bi-*`), the
   icon set actually loaded on this site. ---------- */
#tech-stack.csd-section {
  /* No `overflow: hidden` here on purpose — that would clip the decor
       below fine, but it also makes this section the nearest scrolling
       ancestor for `position: sticky`, which kills the sticky rail (the
       bug: this section had overflow:hidden, the Challenge section above
       doesn't, and that's the only reason its rail stickies correctly).
       The soft radial highlights (::before) and the gradient in
       `background` are already contained to this box on their own, so
       nothing actually needs the clip. */
  position: relative;
  padding: 80px 0;
  background: linear-gradient(180deg, #e6f1ff, #ffffff, #e6f1ff);
}

#tech-stack.csd-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(2, 53, 117, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 53, 117, 0.05) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(
    ellipse 70% 65% at 50% 20%,
    rgba(0, 0, 0, 0.5),
    transparent 75%
  );
  pointer-events: none;
}

#tech-stack .container {
  position: relative;
  z-index: 1;
}

#tech-stack .csd-grid-main {
  grid-template-columns: 292px 1fr;
  gap: 48px;
  align-items: start;
}

/* left: sticky card — a top accent bar and colored icon chips give it
   presence instead of a bare text list */
#tech-stack .csd-rail {
  position: sticky;
  top: 120px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 54px -26px rgba(2, 53, 117, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  min-height: 0;
}

#tech-stack .csd-rail::after {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #ff5a52, #d33536, #0c4f9c);
}

#tech-stack .csd-rail > * {
  position: relative;
  z-index: 1;
}

.csd-tech-copy {
  color: #0f172a;
  font-size: 0.87rem;
  line-height: 1.6;
  margin: 12px 0 20px;
}

.csd-tech-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.csd-tech-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  margin: 0 -4px;
  border-radius: 8px;
  border-top: 1px solid rgba(2, 53, 117, 0.1);
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  transition: background 0.2s ease;
}

.csd-tech-list li:hover {
  background: rgba(2, 53, 117, 0.04);
}

.csd-tech-list li:first-child {
  border-top: none;
  padding-top: 4px;
}

.csd-tech-list li:last-child {
  padding-bottom: 4px;
}

.csd-tech-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.15);
}

/* right: heading, then the phase list flows normally with the page */
#tech-stack .csd-prose h2 {
  color: #0f172a;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
}

.csd-approach-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.csd-approach-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 32px 0;
  border-top: 1px solid rgba(2, 53, 117, 0.1);
}

.csd-approach-step:first-child {
  border-top: none;
  padding-top: 0;
}

.csd-approach-step:last-child {
  padding-bottom: 0;
}

.csd-approach-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
  font-size: 1.1rem;
}

.csd-approach-num {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f172a;
  margin-bottom: 8px;
}

.csd-approach-body h3 {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.csd-approach-body p {
  color: #5b6b82;
  font-size: 0.89rem;
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 991px) {
  #tech-stack .csd-grid-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  #tech-stack .csd-rail {
    position: static;
  }
}

@media (max-width: 767px) {
  #tech-stack.csd-section {
    padding: 56px 0;
  }

  .csd-approach-step {
    padding: 24px 0;
  }
}

@media (max-width: 575px) {
  #tech-stack.csd-section {
    padding: 40px 0;
  }

  .csd-approach-step {
    padding: 16px 0;
  }
}

/* ---------- The Work: pure image showcase — no captions, no cropping. Each
   screenshot keeps its natural aspect ratio so the full screen is visible,
   not a cover-cropped slice of it. ---------- */
.csd-work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
  margin-top: 26px;
}

.csd-work-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px -26px rgba(15, 23, 42, 0.16);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.csd-work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -18px rgba(15, 23, 42, 0.22);
  border-color: rgba(15, 23, 42, 0.12);
}

.csd-work-card img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 1199px) {
  .csd-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .csd-work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .csd-work-grid {
    gap: 14px;
    margin-top: 16px;
  }
}

/* ---------- The Results: section background ---------- */
#the-results.csd-section {
  background: linear-gradient(
    60deg,
    rgba(229, 241, 255, 1) 0%,
    rgba(255, 244, 244, 1) 100%
  );
}

/* ---------- "related case study" card: identical markup/CSS to the
   .csx-case-card used on case-studies-demo.php ---------- */
.csx-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ff8f88;
  margin-bottom: 10px;
}