/* Case studies: shared foundations. Loaded on every case study after site.css and before the page's own file.
   Bioanalysis is the reference; page files only add what is specific to that page. */

/* Named base styles (from the old export). Zero specificity, so every rule below can override them. */
:where(.bio-title-grid) { display: grid !important; grid-template-columns: repeat(12, 1fr) !important; gap: 32px !important; max-width: 960px !important; margin-left: auto !important; margin-right: auto !important; }
:where(.bio-title-block) { grid-column: 1 / -1 !important; padding: 5.5rem 0px 0px !important; }
:where(.case-eyebrow) { font-family: Sohne, -apple-system, system-ui, sans-serif !important; font-size: 12px !important; font-weight: 500 !important; letter-spacing: 0.09em !important; text-transform: uppercase !important; color: rgb(6, 136, 240) !important; }
:where(.case-h1) { font-family: Sohne, -apple-system, system-ui, sans-serif !important; font-size: clamp(30px, 3.2vw, 46px) !important; font-weight: 500 !important; line-height: 1.08 !important; letter-spacing: -0.03em !important; margin: 18px 0px 0px !important; text-wrap: balance !important; }
:where(.intro-wrap) { grid-area: 1 / 1 / auto / -1 !important; padding-bottom: 1.5rem !important; }
:where(.intro) { display: grid !important; grid-template-columns: minmax(0px, 1.35fr) minmax(280px, 0.85fr) !important; gap: 20px clamp(36px, 4vw, 56px) !important; align-items: start !important; padding: 40px 0px 96px !important; }
:where(.case-column) { max-width: 600px !important; min-width: 0px !important; }
:where(.case-column-main) { grid-column: 2 !important; max-width: 600px !important; min-width: 0px !important; }
:where(.outcomes-card) { grid-column: 1 / -1 !important; margin: 1.5rem 0px 0px !important; padding: 1.75rem 2rem !important; background: rgb(251, 250, 249) !important; border: 1px solid rgb(228, 224, 216) !important; border-radius: 10px !important; }
:where(.outcomes-label) { font-size: 0.85rem !important; font-weight: 500 !important; text-transform: uppercase !important; letter-spacing: 0.1em !important; color: rgb(107, 104, 99) !important; font-family: Sohne, -apple-system, system-ui, sans-serif !important; margin-bottom: 1rem !important; }
:where(.stat-row) { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 2rem !important; }
:where(.stat) { font-family: Sohne, -apple-system, system-ui, sans-serif !important; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem) !important; font-weight: 500 !important; letter-spacing: -0.03em !important; line-height: 1.1 !important; margin: 0px 0px 0.35rem !important; }
:where(.stat-caption) { font-family: Sohne, -apple-system, system-ui, sans-serif !important; font-size: 14px !important; line-height: 1.45 !important; color: rgb(107, 104, 99) !important; margin: 0px !important; }
:where(.stat-source) { margin: 1rem 0px 0px !important; font-size: 0.85rem !important; color: rgb(107, 104, 99) !important; }
:where(.hero-media) { grid-column: 1 / -1 !important; margin: 1.5rem 0px 0px !important; }
:where(.case-section) { display: grid !important; grid-template-columns: 150px minmax(0px, 1fr) !important; gap: 20px 48px !important; align-items: start !important; padding: 96px 0px !important; border-top: 1px solid rgb(229, 229, 229) !important; }
:where(.case-section, .case-section-end) > .case-column { grid-column: 2; }
:where(.case-section-end) { display: grid !important; grid-template-columns: 150px minmax(0px, 1fr) !important; gap: 20px 48px !important; align-items: start !important; padding: 96px 0px 40px !important; border-top: 1px solid rgb(229, 229, 229) !important; }
:where(.sub-wrap) { grid-column: 2 !important; max-width: 600px !important; min-width: 0px !important; margin-top: 3.5rem !important; }
:where(.span-full) { grid-column: 1 / -1 !important; }
:where(.case-cell) { min-width: 0px !important; }
:where(.case-body) { grid-area: 2 / 1 / auto / -1 !important; }
:where(.case-h3) { font-family: Sohne, -apple-system, system-ui, sans-serif !important; font-size: clamp(20px, 1.7vw, 25px) !important; font-weight: 500 !important; line-height: 1.3 !important; letter-spacing: -0.015em !important; margin: 0px 0px 0.6rem !important; }
:where(.case-h3-first) { font-family: Sohne, -apple-system, system-ui, sans-serif !important; font-size: clamp(20px, 1.7vw, 25px) !important; font-weight: 500 !important; line-height: 1.3 !important; letter-spacing: -0.015em !important; margin: 0px 0px 0.6rem !important; margin-top: 24px !important; }
:where(.case-h3-next) { font-family: Sohne, -apple-system, system-ui, sans-serif !important; font-size: clamp(20px, 1.7vw, 25px) !important; font-weight: 500 !important; line-height: 1.3 !important; letter-spacing: -0.015em !important; margin: 0px 0px 0.6rem !important; margin-top: var(--r-sub) !important; }
:where(.bio-shell h2) { font-family: Sohne, -apple-system, system-ui, sans-serif !important; font-size: clamp(23px, 2.1vw, 30px) !important; font-weight: 500 !important; line-height: 1.25 !important; letter-spacing: -0.02em !important; margin: 0px 0px 0.85rem !important; text-wrap: balance !important; }
:where(.case-p) { margin: 0px 0px 1rem !important; }
:where(.bio-shell figure) { margin:0 !important; }
:where(.bio-shell img) { width: 100% !important; height: auto !important; display: block !important; }

/* Spacing scale: 12 heading→text · 16 paragraph · 40 text↔figure · 72 repeated block · 96 subsection · 144 section; bands 96 outside, 80 inside */
:root {
  --r-h: 12px;
  --r-p: 16px;
  --r-fig: clamp(28px, 2.9vw, 40px);
  --r-rep: clamp(48px, 5.1vw, 72px);
  --r-sub: clamp(64px, 6.9vw, 96px);
  --r-sec: clamp(96px, 10.3vw, 144px);
  --band-pad: clamp(56px, 5.7vw, 80px);
  --band-out: clamp(64px, 6.9vw, 96px);
}

/* Section headings */
h2 {
  font-size: clamp(30px, 3vw, 40px) !important;
  font-weight: 400 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.12 !important;
}

/* Neutral rules, borders, links and images */
:is([style*="border-top: 1px solid rgb(229, 229, 229)"], .i82, .case-section, .case-section-end),
:is([style*="border-top: 1px solid rgb(228, 224, 216)"], .i41, .site-footer),
:is([style*="border-bottom: 1px solid rgb(228, 224, 216)"], .i42),
:is([style*="border-top: 1px solid rgb(215, 210, 199)"], .i32, .i69) { border-color: var(--rule) !important; }
:is([style*="border: 1px solid rgb(228, 224, 216)"], .i23, .i31, .i43, .i51, .i74, .i80, .i110, .outcomes-card, .outcomes-photo) { border-color: var(--rule) !important; }
.expandable-image-wrap { border-radius: 12px !important; }
:is([style*="color: rgb(6, 136, 240)"], .i62, .case-eyebrow, .text-link) { color: var(--accent) !important; }

/* ---------- Intro: role stack and Outcomes ---------- */
.v-role {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px clamp(20px, 3vw, 32px);
  margin-top: calc(var(--r-rep) - 20px);
  font-family: var(--body-face);
}
.v-role .k, .v-outcomes .v-label.v-label {
  font-size: 14px; line-height: 1.4; font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--ink-3);
  margin: 0 0 6px;
}
.v-role .v { font-size: 17px; line-height: 1.4; color: var(--ink); letter-spacing: -0.006em; }
.v-role .d { font-size: 14px; line-height: 1.45; color: var(--ink-2); margin-top: 6px; }
.v-outcomes .v-label.v-label { display: block !important; margin: 0 0 16px !important; font-size: 14px !important; font-weight: 400 !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--ink-3) !important; }
@media (max-width: 900px) {
  .v-role { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop: the role sits to the right of the intro paragraph as a vertical stack; Outcomes and the hero image run beneath */
@media (min-width: 901px) {
  #overview#overview { grid-template-columns: calc(150px + 48px) minmax(0, 560px) minmax(0, 1fr) !important; column-gap: 0 !important; }
  #overview#overview > .v-role { grid-column: 3 !important; grid-row: 1 !important; grid-template-columns: minmax(0, 1fr) !important; gap: 22px !important; margin: 0 0 0 clamp(24px, 3vw, 40px) !important; align-self: start; padding-top: 4px; }
  #overview#overview > .v-outcomes { grid-column: 2 / -1 !important; grid-row: 2 !important; }
  #overview#overview > .hero-media { grid-column: 1 / -1 !important; grid-row: 3 !important; }
}

/* Outcome figures: one step down the scale (about 38px at most) */
#overview#overview .v-outcomes :is([style*="clamp(1.75rem"], .i77, .i120, .stat) { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.375rem) !important; }

/* Smaller screens: keep the section row gap at 20px. The spacing rules subtract 20px for it, and the page's
   own stacked layout used 8px, which shrank every gap by 12px on phones. */
@media (max-width: 1100px) { :is(#overview, #background, #problem, #solution-preview, #approach, #solution, #outcomes, #reflections) { row-gap: 20px !important; } }

/* Smaller screens: the page's own stacked layout pads every section 56px top and bottom, which made
   section-to-section gaps 112px instead of the 96px section step. Sections own only their top gap. */
@media (max-width: 1100px) {
  :is(#background, #solution, #outcomes, #reflections) { padding-top: var(--r-sec) !important; padding-bottom: 0 !important; }
  #approach { padding-bottom: 0 !important; }
  #background { padding-bottom: 0 !important; }
}
