/* Case study five-beat components — .cs namespace (shared static HTML + globals.css) */
.cs {
  --cs-bg: var(--color-bg, #f5f5f5);
  --cs-ink: var(--color-fg, #0a0b0c);
  --cs-teal: var(--color-deep-teal, #0d3d3a);
  --cs-muted: var(--color-grey-mid, #1a7a73);
  --cs-line: var(--color-border, #e5e5e5);
  --cs-amber-bd: var(--warn, #c98a2e);
  --cs-amber-bg: color-mix(in srgb, var(--warn, #f0a35e), var(--color-bg, #f5f5f5) 88%);
  --cs-amber-ink: var(--warn-deep, #7a5212);
  --cs-surface: var(--color-white, #fff);
  --cs-src: color-mix(in srgb, var(--color-fg, #0a0b0c), transparent 55%);
  color: var(--cs-ink);
}

.cs section {
  padding: 64px 0;
  border-bottom: 1px solid var(--cs-line);
}

.cs section:last-child {
  border-bottom: none;
}

.cs .cs-eyebrow {
  font-family: var(--font-label, "nexa", system-ui, sans-serif);
  font-weight: 500;
  font-size: var(--size-150, 12px);
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cs-teal);
  margin-bottom: 18px;
  max-width: none;
}

/* 1. Problem + constraints */
.cs .cs-problem {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}

.cs .cs-problem h2 {
  font-family: var(--font-display, "termina", "nexa", system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  margin: 0 0 14px;
  max-width: none;
}

.cs .cs-problem p {
  font-size: 18px;
  color: var(--cs-ink);
  max-width: 52ch;
}

.cs .cs-constraints {
  border: 1px solid var(--cs-line);
  border-radius: 4px;
  padding: 22px;
  background: var(--cs-surface);
}

.cs .cs-constraints h3 {
  font-family: var(--font-label, "nexa", system-ui, sans-serif);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cs-muted);
  margin: 0 0 14px;
}

.cs .cs-constraints ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs .cs-constraints li {
  padding: 10px 0;
  border-top: 1px solid var(--cs-line);
  font-size: 14.5px;
  color: var(--cs-ink);
  max-width: none;
}

.cs .cs-constraints li:first-child {
  border-top: none;
}

/* 2. Tension band */
.cs .cs-tension {
  text-align: center;
  max-width: 30ch;
  margin: 0 auto;
}

.cs .cs-tension .cs-vs {
  font-family: var(--font-display, "termina", "nexa", system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.3;
  max-width: none;
}

.cs .cs-tension .cs-vs em {
  font-style: normal;
  color: var(--cs-teal);
}

/* Full-bleed deep-teal band — problem beat */
.problem-sec {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-top: 64px;
  padding-bottom: 64px;
  background: var(--color-deep-teal);
  box-sizing: border-box;
  color: var(--color-white);
}

.problem-sec .cs {
  --cs-ink: var(--color-white);
  --cs-teal: var(--color-cyan-light);
  --cs-muted: var(--color-steel);
  color: var(--color-white);
}

.problem-sec .cs .cs-eyebrow {
  color: var(--color-cyan-strike);
}

.problem-sec .cs .cs-problem h2,
.problem-sec .cs .cs-problem p {
  color: var(--color-white);
}

.problem-sec .cs .cs-constraints {
  background: var(--color-white);
  border-color: color-mix(in srgb, var(--color-white), transparent 65%);
}

.problem-sec .cs .cs-constraints h3 {
  color: var(--color-grey-mid);
}

.problem-sec .cs .cs-constraints li {
  color: var(--color-fg);
}

.problem-sec > .page-shell,
.problem-sec > .dr-wrap {
  position: relative;
  z-index: 1;
}

.problem-sec > .dr-wrap {
  padding-inline: clamp(20px, 6vw, 96px);
  box-sizing: border-box;
}

/* Full-bleed white band — design tension beat */
.cs-tension-sec {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-top: 64px;
  padding-bottom: 64px;
  background: #ffffff;
  box-sizing: border-box;
}

.cs-tension-sec > .page-shell,
.cs-tension-sec > .dr-wrap {
  position: relative;
  z-index: 1;
}

.cs-tension-sec > .dr-wrap {
  padding-inline: clamp(20px, 6vw, 96px);
  box-sizing: border-box;
}

/* 3. Rejected path */
.cs .cs-rejected {
  border: 1px solid var(--cs-amber-bd);
  border-left-width: 3px;
  background: var(--cs-amber-bg);
  border-radius: 4px;
  padding: 22px 24px;
  margin: 24px 0;
}

.cs .cs-rejected h3 {
  font-family: var(--font-label, "nexa", system-ui, sans-serif);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cs-amber-ink);
  margin: 0 0 10px;
}

.cs .cs-rejected p {
  color: var(--cs-amber-ink);
  font-size: 15px;
  margin: 0;
  max-width: 64ch;
}

/* 4. Outcomes metrics */
.cs .cs-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--cs-line);
  border: 1px solid var(--cs-line);
  border-radius: 4px;
  overflow: hidden;
}

.cs .cs-metric {
  background: var(--cs-surface);
  padding: 26px 22px;
}

.cs .cs-metric .cs-fig {
  font-family: var(--font-display, "termina", "nexa", system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  color: var(--cs-teal);
}

.cs .cs-metric .cs-lbl {
  font-size: 13.5px;
  color: var(--cs-muted);
  margin-top: 10px;
  line-height: 1.45;
  max-width: none;
}

.cs .cs-metric .cs-src {
  font-family: var(--font-label, "nexa", system-ui, sans-serif);
  font-weight: 500;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-src);
  margin-top: 12px;
  max-width: none;
}

.cs .cs-metric--todo .cs-fig {
  font-size: clamp(18px, 2.5vw, 22px);
  letter-spacing: 0.04em;
  color: var(--cs-amber-ink);
}

/* TL;DR skim layer */
.cs .tldr {
  border: 1px solid var(--cs-line);
  border-left: 3px solid var(--cs-teal);
  border-radius: 6px;
  background: var(--cs-surface);
  padding: 26px 28px;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}

.cs .tldr .k {
  font-family: var(--font-label, "nexa", system-ui, sans-serif);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cs-teal);
  margin: 0;
  max-width: none;
}

.cs .tldr .thesis {
  font-family: var(--font-display, "termina", "nexa", system-ui, sans-serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  color: var(--cs-ink);
  margin: 0;
  max-width: none;
}

.cs .tldr p:not(.k):not(.thesis):not(.result) {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--cs-ink);
  margin: 0;
  max-width: 64ch;
}

.cs .tldr .result {
  font-family: var(--font-label, "nexa", system-ui, sans-serif);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cs-src);
  padding-top: 12px;
  border-top: 1px solid var(--cs-line);
  margin: 0;
  max-width: none;
}

.cs .tldr .jump {
  font-family: var(--font-label, "nexa", system-ui, sans-serif);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  color: var(--cs-teal);
  text-decoration: none;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: fit-content;
}

.cs .tldr .jump:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .cs .cs-problem {
    grid-template-columns: 1fr;
  }
}
