/* Case-study pages (work/*). Loaded after styles.css: reuses its tokens and only adds the long-read pieces. */
.cs { padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px)); }
.cs-col { max-width: 760px; }

.cs-head h1 { font-size: var(--title-hero); }
.cs-lede { font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-soft); margin-top: 20px; max-width: 640px; }

.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px clamp(32px, 4vw, 56px);
  margin-block: clamp(32px, 4vw, 48px);
  padding-block: 24px;
  border-block: var(--stroke-md) solid var(--paper-3);
}
.cs-meta dt { font-family: var(--font-pixel); font-size: 12px; text-transform: uppercase; color: var(--ink-soft); }
.cs-meta dd { margin: 6px 0 0; font-weight: 700; }
.cs-meta a { text-underline-offset: 3px; }

.cs-figure { margin: 0; }
.cs-figure img { border-radius: var(--radius-lg); border: var(--stroke-md) solid var(--paper-3); width: 100%; height: auto; }
.cs-figure figcaption { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); margin-top: 10px; }

.cs-section { margin-top: clamp(64px, 9vw, 120px); padding-block: 0; }
.cs-section .ribbon { margin-bottom: 18px; }
.cs-section h2 { font-size: var(--title-section); margin-bottom: 24px; }
.cs-section p + p { margin-top: 16px; }
.cs-section p, .cs-section li { font-size: 18px; line-height: 1.55; }

.cs-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 20px; }
.cs-list li { padding-left: 20px; border-left: var(--stroke-lg) solid var(--accent); }
.cs-list strong { display: block; font-size: 19px; margin-bottom: 4px; }

.cs-wire {
  margin: 48px 0 0; padding: clamp(16px, 3vw, 36px);
  background: var(--paper-2); border-radius: var(--radius-lg);
}
.cs-wire svg { display: block; width: 100%; height: auto; overflow: visible; }
.w-ink { fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.w-ink rect, .w-ink circle { fill: var(--paper); }
.w-ink line { stroke: var(--paper-3); stroke-width: 6; }
.w-ink > rect:first-child { stroke: var(--ink); }
.w-ink .w-thin { stroke-width: 6; }
.w-ink .w-rule { stroke: var(--ink-soft); stroke-width: 2; }
.w-ink .w-thick { stroke-width: 10; stroke: var(--ink-soft); }
.w-ink .w-heavy { stroke-width: 16; stroke: var(--ink-soft); }
.w-ink .w-hero { stroke-width: 28; stroke: var(--ink); }
.w-ink .w-focus { stroke: var(--ink); stroke-width: 3; }
.w-ink .w-fill { fill: var(--ink-soft); stroke: none; }
.w-ink .w-dash { stroke-dasharray: 2 14; }
.w-ink .w-arc { fill: none; stroke: var(--accent); stroke-width: 12; }
.w-ink .w-bar { fill: var(--accent); stroke: none; }
.w-ink g.w-thin rect { stroke: var(--paper-3); stroke-width: 2; }
.w-ink g.w-thin line { stroke-width: 6; }
.w-badge circle { fill: var(--accent); stroke: var(--paper-2); stroke-width: 5; }
.w-badge text {
  fill: var(--on-accent); font-family: var(--font-pixel); font-size: 24px; text-anchor: middle;
}
.cs-wire-key {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: flex; flex-wrap: wrap; gap: 12px 32px; font-weight: 700;
}
.cs-wire-key b {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px;
  border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-family: var(--font-pixel); font-size: 12px; font-weight: 400;
}
.cs-wire figcaption { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); margin-top: 16px; }

.cs-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }

/* A single phone screenshot, at roughly device width. */
.cs-phone { max-width: 320px; margin: 36px 0 8px; }

.cs-states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.cs-states figure { margin: 0; }
.cs-states img {
  width: 100%; aspect-ratio: 7 / 4; object-fit: cover;
  border-radius: var(--radius-md); background: #0a0e14;
}
.cs-states figcaption { font-family: var(--font-pixel); font-size: 12px; text-transform: uppercase; margin-top: 8px; }

.cs-quote {
  font-weight: 900; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25;
  margin: 36px 0 0; padding: 0;
}

.cs-next {
  margin-top: clamp(64px, 9vw, 120px); padding-block: 40px 80px;
  border-top: var(--stroke-md) solid var(--paper-3);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}

@media (max-width: 900px) {
  .cs-states { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .cs-pair { grid-template-columns: 1fr; }
}
