/* ============================================================================
   Case study — detail page
   ---------------------------------------------------------------------------
   The evidence block, the metric figures, the outcome cells and the quote
   moved here from results.css. They were only ever used inside the homepage
   card; now that the card is a summary they belong to this page, and leaving
   them behind would have meant a stylesheet full of rules nothing matched.

   `cid--*` on the root supplies `--cid-ink`, the per-client accent defined in
   graphics/clientmark.css. It colours the metric bars, the outcome labels and
   the hero wash — so each study reads as that agency's page without any of
   them getting a different layout.
   ========================================================================= */

.csp-hero__inner > *,
.csp-body__grid > *,
.csp-foot__grid > * { min-width: 0; }

/* --- Masthead --------------------------------------------------------------
   Deliberately quieter than a product page hero: this is evidence, not a
   pitch, and a case study that opens like an advert undercuts itself. */

.csp-hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(6.5rem, 4.5rem + 8vw, 10rem);
  padding-bottom: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  background: var(--page);
  border-bottom: 1px solid var(--border);
}
.csp-hero__field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 46% at 82% 10%, color-mix(in srgb, var(--cid-ink, var(--blue-500)) 14%, transparent) 0%, transparent 70%),
    radial-gradient(40% 34% at 12% 0%, rgba(245, 245, 114, .18) 0%, transparent 72%);
}
.csp-hero__inner { position: relative; }

.csp-hero__back { margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.csp-hero__back a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--d-fast) var(--ease-out-soft);
}
.csp-hero__back a:hover { color: var(--blue-600); }
.csp-hero__back svg { flex: none; }

.csp-hero__id { margin-bottom: clamp(1.25rem, 1rem + 1.5vw, 2rem); }
.csp-hero__headline {
    max-width: 24ch;
    font-size: 30px !important;
}
article.csp.cid--wilmette .csp-hero {
    background: url(../../../../uploads/2026/09/willmette-banner-2.jpg);
    background-size: cover;
    background-blend-mode: lighten;
    background-position: top left;
    background-repeat: no-repeat;
    background-color: inherit;
        padding: 6% 0;
}
article.csp.cid--oakpark .csp-hero {
    background: url(../../../../uploads/2026/09/pdop-banner-csp.jpg);
         background-size: cover;
    background-blend-mode: lighten;
    background-position: top left;
    background-repeat: no-repeat;
    background-color: inherit;
        padding: 6% 0;
}
article.csp.cid--lancaster .csp-hero
{
        background: url(../../../../uploads/2026/09/lancaster-banner-csps.jpg);
             background-size: cover;
    background-blend-mode: lighten;
    background-position: top left;
    background-repeat: no-repeat;
    background-color: inherit;
        padding: 6% 0;
}
article.csp.cid--racine .csp-hero
{
    background: url(../../../../uploads/2026/09/cor-banner-csp.jpg);
         background-size: cover;
    background-blend-mode: lighten;
    background-position: top left;
    background-repeat: no-repeat;
    background-color: inherit;
        padding: 6% 0;
}
/* The figure the card promised, restated at the top of the page the card led
   to. Set on a baseline with its label so it reads as one statement rather
   than as a stat block that happens to be here. */
.csp-hero__lead-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  padding-top: clamp(1.25rem, 1rem + 1.5vw, 1.75rem);
  border-top: 1px solid var(--border);
}
.csp-hero__lead-stat b {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 96, 'wdth' 100;
  font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--cid-ink, var(--blue-600));
}
.csp-hero__lead-stat span {
  font-size: var(--fs-lead);
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 26ch;
}

/* --- The argument ----------------------------------------------------------- */

.csp-body { background: var(--white); }
.csp-body__grid { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 4rem); align-items: start; }

.csp-block__k {
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--cid-ink, var(--blue-600));
}
.csp-block__d { max-width: 62ch; }

@media (min-width: 900px) {
  .csp-body__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Evidence ---------------------------------------------------------------
   Moved wholesale from results.css. Both kinds of evidence — measured figures
   and qualitative outcomes — are drawn in the same bordered container, so a
   client with numbers never looks like the stronger client.                  */

.csp-ev-wrap { background: var(--page); }
.csp-ev__title { margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.25rem); }

.csp-ev {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
}
.metric, .outcome {
  background: var(--surface);
  padding: clamp(1.1rem, 0.9rem + 1vw, 1.75rem);
  min-width: 0;
}

/* Figures stay brand blue on every card. The client accent lives in the seal,
   the kind label and the bar; running it through the headline number too would
   have put a 2.4rem word in olive on one study and green on another. */
.metric__value {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 96, 'wdth' 100;
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--blue-600);
  margin-bottom: 0.6rem;
}
.metric__word { font-size: 0.62em; letter-spacing: -0.02em; color: var(--text); }
.metric__label {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
  text-wrap: pretty;
}
.metric__bar {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--ink-200);
  margin-top: 0.85rem;
  overflow: hidden;
}
.metric__bar i { display: block; height: 100%; border-radius: 2px; background: var(--cid-ink, var(--blue-500)); }

.outcome__k {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cid-ink, var(--text-muted));
  margin-bottom: 0.5rem;
}
.outcome__d {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
  text-wrap: pretty;
}

/* --- Quote ------------------------------------------------------------------ */

.csp-quote {
  margin: clamp(1.5rem, 1rem + 2vw, 2.25rem) 0 0;
  padding: clamp(1.5rem, 1.2rem + 2vw, 2.5rem);
  border-radius: var(--r-2xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cid-ink, var(--blue-500));
}
.csp-quote p {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 72, 'wdth' 100;
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: pretty;
  max-width: 62ch;
}
.csp-quote footer {
  margin-top: 1rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
}

/* --- Next, and the ask ------------------------------------------------------- */

.csp-foot { background: var(--white); }
.csp-foot__grid { display: grid; gap: clamp(1rem, 0.75rem + 1.5vw, 1.75rem); align-items: stretch; }
.csp-foot__grid > * { display: grid; }

.csp-next {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  height: 100%;
  padding: clamp(1.6rem, 1.2rem + 2vw, 2.5rem);
  border-radius: var(--r-2xl);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition:
    box-shadow var(--d-slow) var(--ease-out-soft),
    border-color var(--d-slow) var(--ease-out-soft),
    transform var(--d-slow) var(--ease-out-expo);
}
.csp-next:hover { box-shadow: var(--e-2); border-color: var(--border-strong); transform: translateY(-3px); }
.csp-next__k {
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--cid-ink, var(--blue-600));
}
.csp-next__client {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 48, 'wdth' 100;
  font-size: var(--fs-h3);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 0.3rem;
}
.csp-next__headline { font-size: var(--fs-sm); line-height: 1.5; color: var(--text-secondary); text-wrap: pretty; }
.csp-next__go {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-top: 1rem;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-600);
  transition: background-color var(--d-base) var(--ease-out-soft), color var(--d-base) var(--ease-out-soft);
}
.csp-next:hover .csp-next__go { background: var(--blue-500); color: #fff; }

.csp-ask {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.7rem;
  height: 100%;
  padding: clamp(1.6rem, 1.2rem + 2vw, 2.5rem);
  border-radius: var(--r-2xl);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(35, 105, 210, .5) 0%, transparent 60%),
    var(--blue-900);
  box-shadow: var(--e-3);
}
.csp-ask__k { color: var(--text-on-ink); }
.csp-ask__d { color: var(--text-on-ink-2); max-width: 42ch; }
.csp-ask .btn { margin-top: 0.5rem; }

@media (min-width: 860px) {
  .csp-foot__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}

/* --- Breakpoints -------------------------------------------------------------- */

@media (max-width: 1023px) {
  .csp-ev { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 519px) {
  .csp-ev { grid-template-columns: minmax(0, 1fr); }
  .metric__value { font-size: 2rem; }
}

/* --- Project summary -----------------------------------------------------------
   The source document's own one-paragraph framing, above the two columns. */

.csp-summary {
  max-width: 62ch;
  margin: 0 0 clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  color: var(--text-secondary);
}

/* --- What we delivered ---------------------------------------------------------
   Two columns of ticked items on the page grey, so the itemised detail reads as
   a distinct band between the argument and the evidence. */

.csp-deliv { background: var(--page); }
.csp-deliv.section.section--flow { padding-top: var(--section-y); }
.csp-deliv__title { margin: 0 0 clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); }

.csp-deliv__list {
  display: grid;
  gap: clamp(0.7rem, 0.6rem + 0.5vw, 1.1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 880px) { .csp-deliv__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.csp-deliv__item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
  padding: clamp(0.9rem, 0.8rem + 0.5vw, 1.25rem);
  border-radius: var(--r-xl);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-secondary);
}
.csp-deliv__mark { flex: none; margin-top: 0.1rem; color: var(--blue-600); }

/* --- Project at a glance -------------------------------------------------------
   Scope on the left, platforms and where it lives on the right. */

.csp-glance { background: var(--white); }
.csp-glance.section.section--flow { padding-top: var(--section-y); }
.csp-glance__title { margin: 0 0 clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); }

.csp-glance__panel {
  display: grid;
  gap: clamp(1.5rem, 1.2rem + 2vw, 3rem);
  padding: clamp(1.35rem, 1.1rem + 1.2vw, 2rem);
  border-radius: var(--r-2xl);
  background: var(--blue-50);
  box-shadow: inset 0 0 0 1px var(--blue-200);
}
.csp-glance__panel > * { min-width: 0; }
@media (min-width: 880px) {
  .csp-glance__panel { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}

.csp-facts { display: grid; gap: 0.85rem; margin: 0; }
.csp-fact {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--blue-200);
}
.csp-fact:last-child { padding-bottom: 0; border-bottom: 0; }
.csp-fact dt { font-size: var(--fs-sm); font-weight: 700; color: var(--blue-700); }
.csp-fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem);
  font-weight: 700;
  color: var(--ink-900);
}

.csp-glance__side { display: grid; align-content: start; gap: 1.35rem; }
.csp-tech__k {
  margin: 0 0 0.6rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--blue-700);
}
.csp-tech__list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.csp-tech__list li {
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-pill);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--blue-200);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--blue-700);
}

.csp-live { display: grid; gap: 0.35rem; margin: 0; }
.csp-live__k { font-size: var(--fs-sm); font-weight: 700; color: var(--blue-700); }
.csp-live a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: max-content;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--blue-600);
  text-decoration: underline;
  text-decoration-color: var(--blue-300);
  text-underline-offset: 3px;
}
.csp-live a:hover { text-decoration-color: currentColor; }
/* A site that is not public yet says so, rather than linking a UAT address. */
.csp-live--pending span:last-child {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ============================================================================
   Case studies — index (/case-studies)
   ---------------------------------------------------------------------------
   One card per client, carrying the four things the detail page opens with, so
   the card and the page it leads to agree.
   ========================================================================= */

.csx-hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(7rem, 5rem + 8vw, 11rem);
  padding-bottom: clamp(2.5rem, 2rem + 3vw, 4rem);
  background: var(--page);
}
.csx-hero__field { position: absolute; inset: 0; background: var(--page-wash); pointer-events: none; }
.csx-hero > .container { position: relative; }
.csx-hero__eyebrow {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-600);
}
.csx-hero__title { margin: 1rem 0 0; max-width: 18ch; }
.csx-hero__lead { margin: 1.35rem 0 0; max-width: 56ch; color: var(--text-secondary); }

.csx-list-wrap { background: var(--white); }
.csx-list {
  display: grid;
  gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px)  { .csx-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .csx-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.csx-card {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  height: 100%;
  padding: clamp(1.25rem, 1rem + 1vw, 1.85rem);
  border-radius: var(--r-2xl);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--border), var(--e-1);
  text-decoration: none;
  transition: box-shadow var(--d-base) var(--ease-out-soft),
              transform var(--d-base) var(--ease-out-soft);
}
.csx-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--blue-300), var(--e-2);
}
.csx-card__headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink-900);
}
.csx-card__stat { display: grid; gap: 0.1rem; margin: 0; }
.csx-card__stat b {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--blue-600);
}
.csx-card__stat span { font-size: var(--fs-sm); color: var(--text-secondary); }

.csx-card__state { margin: 0; min-height: 1.5rem; }
.csx-card__live,
.csx-card__pending {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.csx-card__live { background: #E4F5EA; color: #1E7A44; }
/* Not live yet — the card says so rather than implying a link exists. */
.csx-card__pending { background: #FDF6E0; color: #7A5A05; }

.csx-card__go {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--blue-600);
}
.csx-card:hover .csx-card__go { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .csx-card, .csx-card:hover { transition: none; transform: none; }
}

/* Below this the label column squeezes values like "Independent municipal
   body" into three wrapped lines, so the pairs stack instead. */
@media (max-width: 559px) {
  .csp-fact { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}

/* Only ever seen in wp-admin before the Setup screen has run. */
.csx-empty { margin: 0; font-size: var(--fs-md); color: var(--text-secondary); }
