/* Cool Estate Case Studies (review build). Loaded after coolestate.css + site.css.
   White-anchored pages: the header sits on its solid ink bar (body.header-solid),
   heroes are white with images beside the copy, never under it. */

.cs-page { background: var(--bg-page); }

/* ---------- hero ---------- */
.cs-hero { padding: calc(84px + clamp(40px, 6vw, 88px)) 0 clamp(56px, 7vw, 96px); background: var(--bg-page); border-bottom: 1px solid var(--line-hair); }
.cs-hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.cs-hero__copy { display: grid; gap: 22px; align-content: center; }
.cs-hero h1 { font-family: var(--ff-display); font-weight: 500; margin: 0; color: var(--fg-primary);
  font-size: clamp(38px, 3.4vw + 0.9rem, 68px); line-height: 1.04; letter-spacing: -0.03em; max-width: 17ch; text-wrap: balance; }
.cs-hero .lede { max-width: 44ch; color: var(--fg-secondary); }
.cs-hero .eyebrow { color: var(--fg-secondary); }
.cs-crumb { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-secondary); display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.cs-crumb a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.cs-crumb a:hover { text-decoration-thickness: 2px; }

/* mosaic of contextual images; caption sits below, nothing overlays */
.cs-mosaic { margin: 0; display: grid; gap: 12px; }
.cs-mosaic__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; aspect-ratio: 16 / 10; }
.cs-mosaic__grid img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-3); display: block; background: var(--ce-ink-100); }
.cs-mosaic__grid img:first-child { grid-row: 1 / span 2; }
.cs-cap { font-size: 13.5px; line-height: 1.5; color: var(--fg-secondary); margin: 0; }

.cs-figure { margin: 0; display: grid; gap: 12px; }
.cs-figure img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-3); display: block; background: var(--ce-ink-100); }

/* ---------- attribution band ---------- */
.cs-read { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.cs-read li { border-top: 2px solid var(--ce-blue-600); padding-top: 18px; display: grid; gap: 8px; }
.cs-read b { font-size: 18px; font-weight: 500; color: var(--fg-primary); letter-spacing: -0.01em; }
.cs-read span { font-size: 16px; line-height: 1.55; color: var(--fg-secondary); }

/* ---------- library toolbar ---------- */
.cs-tools { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 20px 32px; align-items: end; padding: 24px; border: 1px solid var(--line-soft); border-radius: var(--r-3); background: var(--bg-elev-1, #fff); }
.cs-field { display: grid; gap: 8px; }
.cs-label { font-family: var(--ff-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-secondary); }
.cs-search { width: 100%; min-height: 48px; padding: 10px 14px 10px 44px; font: inherit; font-size: 16px; color: var(--fg-primary);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px 50% / 18px 18px;
  border: 1px solid rgba(10,14,23,0.42); border-radius: var(--r-2); }
.cs-search:focus-visible { outline: 2px solid var(--ce-blue-600); outline-offset: 2px; border-color: var(--ce-blue-600); }
.cs-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.cs-filters legend { padding: 0; margin-bottom: 8px; }
.cs-chip { min-height: 44px; padding: 8px 16px; border-radius: var(--r-2); border: 1px solid rgba(10,14,23,0.42); background: #fff; color: var(--fg-primary);
  font-family: var(--ff-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.1em; cursor: pointer; transition: background var(--d-base) var(--ease-out), border-color var(--d-base) var(--ease-out); }
.cs-chip:hover { border-color: var(--ce-blue-600); background: color-mix(in oklch, var(--ce-blue-600) 7%, white); }
.cs-chip[aria-pressed="true"] { background: var(--ce-ink-050); border-color: var(--ce-ink-050); color: #fff; }
.cs-chip:focus-visible, .cs-reset:focus-visible { outline: 2px solid var(--ce-blue-600); outline-offset: 3px; }
.cs-status { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-hair); padding-top: 16px; }
.cs-count { margin: 0; font-size: 15px; color: var(--fg-primary); }
.cs-count b { font-weight: 600; }
.cs-reset { min-height: 44px; padding: 8px 4px; background: none; border: 0; color: var(--accent-ink); font-family: var(--ff-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.cs-reset[hidden] { display: none; }

/* ---------- cards ---------- */
.cs-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2vw, 28px); }
.cs-grid > li[hidden] { display: none; }
.cs-card { height: 100%; display: grid; grid-template-rows: auto 1fr; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-3); overflow: hidden; transition: border-color var(--d-base) var(--ease-out), box-shadow var(--d-base) var(--ease-out); }
.cs-card:hover { border-color: var(--ce-blue-600); box-shadow: var(--sh-2); }
.cs-card__media { margin: 0; }
.cs-card__media img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--ce-ink-100); }
.cs-card__media figcaption { padding: 8px 20px 0; font-size: 12.5px; line-height: 1.45; color: var(--fg-secondary); }
.cs-card__body { padding: 18px clamp(20px, 2vw, 26px) clamp(22px, 2vw, 28px); display: grid; gap: 14px; align-content: start; grid-template-rows: auto auto auto auto auto 1fr auto; }
.cs-badge-row { margin: -4px 0 0; }
.cs-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; font-family: var(--ff-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-secondary); }
.cs-tag b { color: var(--ce-blue-600); font-weight: 600; }
.cs-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: var(--r-pill, 999px); background: var(--ce-bone-100, #F3F2EC); border: 1px solid var(--line-soft); font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-primary); }
.cs-card h3 { margin: 0; font-size: clamp(20px, 0.6vw + 0.95rem, 24px); font-weight: 500; letter-spacing: -0.015em; line-height: 1.22; color: var(--fg-primary); text-wrap: balance; }
.cs-customer { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--fg-secondary); }
.cs-stat { margin: 0; display: grid; gap: 4px; padding: 14px 0; border-block: 1px solid var(--line-hair); }
.cs-stat__n { font-family: var(--ff-display); font-size: clamp(30px, 1.6vw + 1rem, 40px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--ce-blue-600); font-variant-numeric: tabular-nums; }
.cs-stat__l { font-size: 14px; line-height: 1.45; color: var(--fg-secondary); }
.cs-syn { margin: 0; display: grid; gap: 12px; }
.cs-syn dt { font-family: var(--ff-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-secondary); }
.cs-syn dd { margin: 4px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--fg-primary); text-wrap: pretty; }
.cs-go { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 0; color: var(--accent-ink); font-family: var(--ff-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.cs-go:hover { text-decoration-thickness: 2px; }
.cs-go:focus-visible { outline: 2px solid var(--ce-blue-600); outline-offset: 3px; }
.cs-go .ic { width: 16px; height: 16px; }

.cs-empty { margin-top: 32px; padding: clamp(28px, 4vw, 48px); border: 1px dashed rgba(10,14,23,0.3); border-radius: var(--r-3); text-align: left; display: grid; gap: 12px; justify-items: start; }
.cs-empty[hidden] { display: none; }
.cs-empty h3 { margin: 0; font-size: 22px; font-weight: 500; }
.cs-empty p { margin: 0; color: var(--fg-secondary); }

/* ---------- detail pages ---------- */
.cs-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.cs-facts div { padding: 18px 20px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: grid; gap: 6px; }
.cs-facts dt { font-family: var(--ff-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-secondary); }
.cs-facts dd { margin: 0; font-size: 18px; font-weight: 500; color: var(--fg-primary); }
.cs-detail { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 72px); padding-block: clamp(36px, 4vw, 56px); border-top: 1px solid var(--line-hair); }
.cs-detail:first-child { border-top: 0; padding-top: 0; }
.cs-detail h2 { margin: 0; font-size: clamp(26px, 1.6vw + 1rem, 38px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; color: var(--fg-primary); }
.cs-detail .stack { display: grid; gap: 16px; max-width: 68ch; }
.cs-detail p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--fg-primary); text-wrap: pretty; }
.cs-result { display: flex; flex-wrap: wrap; gap: 16px 48px; padding: 20px 0; border-block: 1px solid var(--line-soft); }
.cs-result > div { display: grid; gap: 6px; }
.cs-result small { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-secondary); }
.cs-result .n { font-family: var(--ff-display); font-size: clamp(40px, 3vw + 1rem, 64px); font-weight: 500; letter-spacing: -0.035em; line-height: 1; color: var(--ce-blue-600); font-variant-numeric: tabular-nums; }
.cs-result .l { font-size: 15px; color: var(--fg-secondary); }
.cs-qual { margin: 0; padding: 18px 20px; list-style: none; display: grid; gap: 10px; background: var(--bg-warm); border-radius: var(--r-3); }
.cs-qual li { font-size: 15.5px; line-height: 1.55; color: var(--fg-primary); padding-left: 18px; position: relative; }
.cs-qual li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 1px; background: var(--fg-primary); }
.cs-src { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.cs-src:hover { text-decoration-thickness: 2px; }
.cs-src:focus-visible, .cs-detail a:focus-visible { outline: 2px solid var(--ce-blue-600); outline-offset: 3px; }
.cs-src .ic { width: 16px; height: 16px; }
.cs-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- testimonials ---------- */
.cs-quotes { list-style: none; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; columns: 2 380px; column-gap: clamp(20px, 2vw, 28px); }
.cs-quotes > li { break-inside: avoid; margin: 0 0 clamp(20px, 2vw, 28px); }
.cs-quote { margin: 0; padding: clamp(22px, 2.4vw, 32px); border: 1px solid var(--line-soft); border-radius: var(--r-3); background: #fff; display: grid; gap: 16px; }
.cs-quote__k { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-family: var(--ff-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-secondary); }
.cs-quote blockquote { margin: 0; padding-left: 18px; border-left: 2px solid var(--ce-blue-600); }
.cs-quote blockquote p { margin: 0; font-size: 16.5px; line-height: 1.62; color: var(--fg-primary); }
.cs-quote blockquote p + p { margin-top: 12px; }
.cs-quote figcaption { display: grid; gap: 2px; font-size: 15px; line-height: 1.45; }
.cs-quote figcaption b { font-weight: 600; color: var(--fg-primary); }
.cs-quote figcaption span { color: var(--fg-secondary); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .cs-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .cs-hero h1 { max-width: 18ch; }
  .cs-tools { grid-template-columns: minmax(0, 1fr); }
  .cs-read { grid-template-columns: minmax(0, 1fr); }
  .cs-detail { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 640px) {
  .cs-hero { padding-top: calc(100px + 32px); }
  .cs-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-mosaic__grid { aspect-ratio: 4 / 3; }
  .cs-hero .actions .btn, .cs-links .btn { width: 100%; }
  .cs-tools { padding: 18px; }
  .cs-quotes { columns: 1; }
}

/* Footer column labels: shared #5D7188 is 4.03:1 on the footer ink. Page-scoped lift to
   #8FA5BD (7.98:1), the same value already used on about.html. Shared site.css untouched. */
.cs-page .site-footer__contact h2, .cs-page .site-footer__links h2 { color: #8FA5BD; }

/* Quiet attribution note at the foot of the library (1 Nov 2026) */
.cs-footnote { margin: 40px 0 0; padding-top: 16px; border-top: 1px solid var(--line-hair); max-width: 72ch; font-size: 13.5px; line-height: 1.5; color: var(--fg-secondary); }
