/* ============================================================
   Case Study Detail — Editorial Design
   Scoped under .cs-editorial to avoid conflicts with site CSS
   ============================================================ */

.cs-editorial {
  --bg: #ECE9E1;
  --bg-2: #E2DED4;
  --ink: #0A0908;
  --ink-2: #221F1B;
  --mute: #6F6A60;
  --max: 1280px;

  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.cs-editorial .marquee { overflow: hidden; }

.cs-editorial *,
.cs-editorial *::before,
.cs-editorial *::after {
  box-sizing: border-box;
}

.cs-editorial ::selection { background: #0A0908; color: #ECE9E1; }

/* Typography utilities */
.cs-editorial .display {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  letter-spacing: .005em;
  line-height: .9;
  text-transform: uppercase;
}
.cs-editorial .mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
}

/* ============ LAYOUT ============ */
.cs-editorial .wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ META + TITLE ============ */
.cs-editorial header.cs-intro { padding: 48px 0 12px; }

.cs-editorial .meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(10,9,8,0.15);
  margin-bottom: 32px;
}
.cs-editorial .meta-cell {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cs-editorial .meta-cell .k {
  font-family: "JetBrains Mono", monospace;
  opacity: .55;
  font-size: 10px;
}
.cs-editorial .meta-cell .v {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 11px;
}
.cs-editorial .meta-cell + .meta-cell {
  border-left: 1px solid #0A09081A;
  padding-left: 24px;
}

.cs-editorial h1.cs-title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(72px, 14vw, 220px);
  margin: 0;
  line-height: .86;
  letter-spacing: -.005em;
  text-transform: uppercase;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  color: var(--ink);
}
.cs-editorial h1.cs-title .reg {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .5;
  padding-bottom: 18px;
}

.cs-editorial .cs-subtitle {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(10,9,8,0.15);
}
.cs-editorial .cs-subtitle p {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
  color: var(--ink-2);
}
.cs-editorial .cs-subtitle .stamp {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-align: right;
  opacity: .65;
  line-height: 1.6;
}

/* ============ HERO COVER ============ */
.cs-editorial .cs-cover {
  margin-top: 24px;
  position: relative;
  aspect-ratio: 16/9;
  background: #1A1815;
  overflow: hidden;
  border: 1px solid var(--ink);
}
.cs-editorial .cs-cover .placeholder {
  position: absolute;
  inset: 0;
  background: #0D0B09;
}
.cs-editorial .cs-cover .grain {
  position: absolute;
  inset: 0;
  mix-blend-mode: overlay;
  opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='.45'/></svg>");
}
.cs-editorial .cs-cover .vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, #050403 95%);
}
.cs-editorial .cs-cover .center-stamp {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: #ECE9E1;
}
.cs-editorial .cs-cover .center-stamp .num {
  font-family: "Anton", sans-serif;
  font-size: clamp(48px, 8vw, 100px);
  line-height: .85;
  opacity: .95;
  letter-spacing: .02em;
}
.cs-editorial .cs-cover .center-stamp .lbl {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .32em;
  opacity: .6;
}
.cs-editorial .cs-cover .corner {
  position: absolute;
  color: #ECE9E1;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .6;
}
.cs-editorial .cs-cover .corner { display: none; }
.cs-editorial .cs-cover .pcap {
  position: absolute;
  left: 24px;
  bottom: 20px;
  color: #ECE9E1;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .65;
}

/* ============ MARQUEE ============ */
.cs-editorial .marquee {
  border-top: 1px solid rgba(10,9,8,0.15);
  border-bottom: 1px solid rgba(10,9,8,0.15);
  padding: 10px 0;
  margin-top: 20px;
  overflow: hidden;
  white-space: nowrap;
}
.cs-editorial .marquee .track {
  display: inline-flex;
  gap: 32px;
  animation: cs-scroll 38s linear infinite;
}
.cs-editorial .marquee span {
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  font-size: 22px;
  letter-spacing: .04em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 32px;
}
.cs-editorial .marquee .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-block;
}

@keyframes cs-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ STORY TIMELINE ============ */
.cs-editorial section.story {
  position: relative;
  padding: 72px 0 48px;
}
.cs-editorial .story-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(10,9,8,0.15);
  align-items: end;
}
.cs-editorial .story-head h2 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 72px);
  line-height: .9;
  letter-spacing: .005em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}
.cs-editorial .story-head .lede {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mute);
  max-width: 520px;
  margin: 0 0 0 auto;
}

.cs-editorial .story-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  margin-top: 40px;
  position: relative;
}

/* RAIL */
.cs-editorial aside.rail {
  position: sticky;
  top: 96px;
  align-self: start;
  height: calc(100vh - 128px);
  max-height: 720px;
  display: flex;
  flex-direction: column;
}
.cs-editorial .rail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(10,9,8,0.15);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.cs-editorial .rail-head .pct {
  font-family: "Anton", sans-serif;
  font-size: 28px;
  letter-spacing: .01em;
  line-height: 1;
}
.cs-editorial .rail-head .pct-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  opacity: .7;
}

.cs-editorial .rail-list {
  position: relative;
  margin-top: 24px;
  flex: 1;
}
.cs-editorial .rail-list::before {
  content: "";
  position: absolute;
  left: 10px; top: 8px; bottom: 8px;
  width: 1px;
  background: rgba(10,9,8,0.12);
}
.cs-editorial .rail-list::after {
  content: "";
  position: absolute;
  left: 10px; top: 8px;
  width: 1px;
  background: var(--ink);
  height: var(--progress, 0%);
  transition: height .35s cubic-bezier(.22,.61,.36,1);
}

.cs-editorial .phase {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 10px 0;
  align-items: start;
  cursor: pointer;
  opacity: .4;
  transition: opacity .25s;
  text-decoration: none;
  color: var(--ink);
}
.cs-editorial .phase.active { opacity: 1; }
.cs-editorial .phase.past   { opacity: .78; }

.cs-editorial .phase .marker {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid rgba(10,9,8,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  font-weight: 500;
  position: relative;
  z-index: 1;
  transition: background .25s, color .25s, transform .25s, border-color .25s;
}
.cs-editorial .phase.active .marker,
.cs-editorial .phase.past   .marker {
  background: var(--ink);
  color: var(--bg);
}
.cs-editorial .phase.active .marker { transform: scale(1.06); }

.cs-editorial .phase .lbl {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 2px;
}
.cs-editorial .phase .lbl .name {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: uppercase;
  line-height: 1.1;
}
.cs-editorial .phase .lbl .when {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .65;
}

.cs-editorial .rail-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(10,9,8,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.cs-editorial .rail-foot .dur {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .02em;
}

/* STAGE / STEPS */
.cs-editorial .stage { display: flex; flex-direction: column; gap: 72px; }

.cs-editorial .step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
  scroll-margin-top: 112px;
}
.cs-editorial .step .num {
  font-family: "Anton", sans-serif;
  font-size: clamp(56px, 6vw, 84px);
  line-height: .82;
  letter-spacing: -.01em;
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--ink);
  opacity: .18;
}
.cs-editorial .step .num .tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .18em;
  font-weight: 400;
  opacity: .55;
  text-transform: uppercase;
  line-height: 1;
}
.cs-editorial .step .body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.cs-editorial .step h3 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 3vw, 44px);
  line-height: .95;
  letter-spacing: .005em;
  text-transform: uppercase;
  margin: 0;
  max-width: 14ch;
  color: var(--ink);
}
.cs-editorial .step p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
  max-width: 60ch;
}
.cs-editorial .step p.kicker {
  font-size: 14px;
  color: var(--mute);
  max-width: 60ch;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Deliverables grid */
.cs-editorial .deliverables {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid rgba(10,9,8,0.12);
  margin-top: 8px;
}
.cs-editorial .deliverables .d {
  background: transparent;
  padding: 12px 0;
  border-bottom: 1px solid rgba(10,9,8,0.08);
  border-right: 1px solid rgba(10,9,8,0.08);
  padding-right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cs-editorial .deliverables .d:nth-child(even) { border-right: none; padding-left: 16px; padding-right: 0; }
.cs-editorial .deliverables .d span:last-child { opacity: .45; font-size: 9px; }

/* Placeholder blocks */
.cs-editorial .ph {
  border: 1px solid var(--ink);
  background: #1A1815;
  color: #857d70;
  position: relative;
  overflow: hidden;
  display: flex;
}
.cs-editorial .ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, #1A1815 0 14px, #0F0D0A 14px 28px);
}
.cs-editorial .ph .cap {
  position: absolute;
  left: 14px; bottom: 12px;
  color: #ECE9E1;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .14em;
  opacity: .7;
  z-index: 2;
}
.cs-editorial .ph .tag {
  position: absolute;
  top: 12px; right: 14px;
  color: #ECE9E1;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .14em;
  opacity: .6;
  z-index: 2;
}
.cs-editorial .ph .glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ECE9E1;
  font-family: "Anton", sans-serif;
  font-size: 120px;
  opacity: .18;
  z-index: 1;
  line-height: 1;
}

.cs-editorial .ph.light { background: #D7D2C7; color: #8a8270; border-color: var(--ink); }
.cs-editorial .ph.light::before { background: repeating-linear-gradient(135deg, #D7D2C7 0 14px, #CBC5B8 14px 28px); }
.cs-editorial .ph.light .cap  { color: #0A0908; }
.cs-editorial .ph.light .tag  { color: #0A0908; }
.cs-editorial .ph.light .glyph { color: #0A0908; }

.cs-editorial .media-1        { aspect-ratio: 16/10; }
.cs-editorial .media-2-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cs-editorial .media-2-row .ph { aspect-ratio: 4/5; }
.cs-editorial .media-3-row    { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.cs-editorial .media-3-row .ph { aspect-ratio: 1/1; }
.cs-editorial .media-3-row .ph:first-child { aspect-ratio: 4/5; }

/* Inline media image */
.cs-editorial .media-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Quote */
.cs-editorial .quote {
  padding: 18px 0;
  border-top: 1px solid rgba(10,9,8,0.12);
  border-bottom: 1px solid rgba(10,9,8,0.12);
  font-family: "DM Sans", sans-serif;
  font-size: clamp(17px, 1.8vw, 24px);
  font-weight: 300;
  font-style: italic;
  text-transform: none;
  line-height: 1.4;
  letter-spacing: 0;
  max-width: 36ch;
  color: var(--ink-2);
}
.cs-editorial .quote .by {
  display: block;
  margin-top: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .14em;
  opacity: .6;
  text-transform: uppercase;
}

/* Data row (stats) */
.cs-editorial .data-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid rgba(10,9,8,0.12);
  border-bottom: 1px solid rgba(10,9,8,0.12);
}
.cs-editorial .data-cell .val {
  font-family: "Anton", sans-serif;
  font-size: 40px;
  line-height: .9;
  letter-spacing: .005em;
  color: var(--ink);
}
.cs-editorial .data-cell .val small {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 500;
  vertical-align: top;
  margin-left: 4px;
  opacity: .6;
}
.cs-editorial .data-cell .lab {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .6;
  margin-top: 6px;
}

/* Color swatches */
.cs-editorial .swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid rgba(10,9,8,0.15);
}
.cs-editorial .sw {
  aspect-ratio: 1/1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
  border-right: 1px solid rgba(10,9,8,0.12);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.cs-editorial .sw:last-child { border-right: none; }
.cs-editorial .sw .nm { font-weight: 500; }
.cs-editorial .sw .hx { opacity: .65; }

/* Type spec */
.cs-editorial .typespec { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cs-editorial .typespec .ts {
  border: 1px solid rgba(10,9,8,0.12);
  padding: 16px;
  background: var(--bg-2);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cs-editorial .typespec .ts .big {
  font-family: "Anton", sans-serif;
  font-size: 56px;
  line-height: .85;
  letter-spacing: 0;
  color: var(--ink);
}
.cs-editorial .typespec .ts .big.body {
  font-family: "DM Sans", sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.cs-editorial .typespec .ts .meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .7;
  display: flex;
  justify-content: space-between;
}

/* Checklist */
.cs-editorial .checklist { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--ink); }
.cs-editorial .checklist .li {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid #0A09082A;
  align-items: baseline;
}
.cs-editorial .checklist .li .id {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .1em;
  opacity: .5;
  text-transform: uppercase;
}
.cs-editorial .checklist .li .nm {
  font-family: "Anton", sans-serif;
  font-size: 24px;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
}
.cs-editorial .checklist .li .st {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-editorial .checklist .li .st .ok {
  width: 8px; height: 8px;
  background: var(--ink);
  border-radius: 50%;
}

/* ============ OUTCOME ============ */
.cs-outcome-video {
  width: 100%;
  margin-bottom: 48px;
  overflow: hidden;
  border-radius: 28px;
  will-change: transform, border-radius;
}
.cs-outcome-video video {
  width: 100%;
  height: auto;
  display: block;
}
.cs-editorial section.outcome {
  margin-top: 24px;
  padding: 72px 0;
  border-top: 1px solid rgba(10,9,8,0.15);
}
.cs-editorial .outcome-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: end;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(10,9,8,0.15);
}
.cs-editorial .outcome-head h2 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(44px, 6vw, 80px);
  line-height: .9;
  letter-spacing: .005em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}
.cs-editorial .outcome-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.cs-editorial .stat .v {
  font-family: "Anton", sans-serif;
  font-size: 52px;
  line-height: .85;
  color: var(--ink);
}
.cs-editorial .stat .v small {
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
  font-weight: 500;
  margin-left: 6px;
  opacity: .6;
  vertical-align: top;
}
.cs-editorial .stat .l {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .65;
  margin-top: 6px;
}

.cs-editorial .nextcase {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}
.cs-editorial .nextcase .btn-next {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--ink);
  color: var(--bg);
  padding: 18px 28px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.cs-editorial .nextcase .btn-next .arr {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.cs-editorial .nextcase .next-info {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .6;
  text-align: right;
  line-height: 1.7;
  text-decoration: none;
  color: inherit;
  transition: opacity .2s;
}
.cs-editorial .nextcase .next-info:hover { opacity: 1; }
.cs-editorial .nextcase .next-info b {
  font-family: "Anton", sans-serif;
  font-size: 22px;
  display: block;
  margin-top: 4px;
  opacity: 1;
  letter-spacing: .02em;
  color: var(--ink);
}

/* ============ PROGRESS BUBBLE ============ */
.progress-bubble {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 60;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #0A0908;
  color: #ECE9E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Anton", sans-serif;
  font-size: 22px;
  letter-spacing: .02em;
  box-shadow: 0 4px 24px #0A090822;
  transform: scale(0);
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.progress-bubble.show { transform: scale(1); }
.progress-bubble svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.progress-bubble circle { fill: none; stroke-width: 2; }
.progress-bubble circle.bg { stroke: #ECE9E122; }
.progress-bubble circle.fg {
  stroke: #ECE9E1;
  stroke-dasharray: 188.5;
  stroke-dashoffset: 188.5;
  transition: stroke-dashoffset .35s;
}

/* ============ REAL PHOTO SUPPORT ============ */
.cs-editorial .cs-cover .cover-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.cs-editorial .cs-cover .cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5,4,3,0.38);
}
.cs-editorial .ph img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* ============ MOBILE TIMELINE BAR (hidden on desktop) ============ */
.cs-editorial .tl-bar { display: none; }

/* ============ RESPONSIVE – tablet ============ */
@media (max-width: 1024px) {
  .cs-editorial .meta-row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cs-editorial .meta-cell + .meta-cell { border-left: none; padding-left: 0; }
  .cs-editorial .meta-cell:nth-child(3) { border-top: 1px solid #0A09081A; padding-top: 14px; }
  .cs-editorial .meta-cell:nth-child(4) { border-top: 1px solid #0A09081A; padding-top: 14px; }
  .cs-editorial .story-grid { grid-template-columns: 1fr; gap: 32px; }
  .cs-editorial aside.rail { position: relative; top: 0; height: auto; max-height: none; }
  .cs-editorial .step { grid-template-columns: 1fr; gap: 20px; }
  .cs-editorial .step .num { position: relative; top: 0; }
  .cs-editorial .outcome-head { grid-template-columns: 1fr; }
  .cs-editorial .typespec { grid-template-columns: 1fr; }
}

/* ============ RESPONSIVE – mobile ============ */
@media (max-width: 768px) {
  /* hide desktop sidebar rail, show horizontal bar */
  .cs-editorial aside.rail { display: none; }
  .cs-editorial .story-grid { grid-template-columns: 1fr; gap: 0; margin-top: 0; }

  /* horizontal sticky timeline bar — liquid glass pill */
  .cs-editorial .tl-bar {
    display: block;
    position: sticky;
    top: 80px; /* 72px nav + 8px float gap */
    z-index: 35;
    margin: 0 12px;
    border-radius: 18px;
    padding: 10px 14px 12px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(232,229,218,0.78) 0%, rgba(206,202,191,0.64) 100%);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.48);
    box-shadow:
      0 1px 0 0 rgba(255,255,255,0.68) inset,
      0 -1px 0 0 rgba(0,0,0,0.04) inset,
      0 1px 3px rgba(17,24,39,0.06),
      0 14px 36px -8px rgba(17,24,39,0.16);
    transition: top 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  }
  /* inner specular shimmer */
  .cs-editorial .tl-bar::before {
    content: "";
    position: absolute;
    left: 14px; right: 14px; top: 0;
    height: 46%;
    background: linear-gradient(to bottom, rgba(255,253,248,0.52) 0%, rgba(255,255,255,0) 100%);
    mix-blend-mode: overlay;
    border-radius: 18px 18px 0 0;
    pointer-events: none;
  }
  /* nav slides away → pill floats near top */
  body.nav-scrolled .cs-editorial .tl-bar {
    top: 8px;
  }
  .cs-editorial .tl-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 4px 8px;
    position: relative;
  }
  .cs-editorial .tl-head .pct-m {
    font-family: "Anton", sans-serif;
    font-size: 18px;
    letter-spacing: .02em;
    line-height: 1;
  }
  .cs-editorial .tl-head .of {
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .6;
  }
  .cs-editorial .tl-rail-m {
    position: relative;
    margin: 0 4px;
    height: 24px;
  }
  .cs-editorial .tl-rail-m::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 11px;
    height: 1px;
    background: rgba(10,9,8,0.18);
  }
  .cs-editorial .tl-fill {
    position: absolute;
    left: 0; top: 11px;
    height: 1px;
    background: var(--ink);
    width: var(--p, 0%);
    transition: width .35s cubic-bezier(.22,.61,.36,1);
  }
  .cs-editorial .tl-dots {
    position: relative;
    display: flex;
    justify-content: space-between;
    height: 24px;
    align-items: center;
  }
  .cs-editorial .tl-dot {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.38);
    border: 1px solid rgba(10,9,8,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "JetBrains Mono", monospace;
    font-size: 8.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background .25s, color .25s, transform .25s, border-color .25s;
    position: relative;
    z-index: 1;
  }
  .cs-editorial .tl-dot.past,
  .cs-editorial .tl-dot.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .cs-editorial .tl-dot.active { transform: scale(1.12); }

  .cs-editorial .tl-current {
    padding: 10px 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    position: relative;
  }
  .cs-editorial .tl-current .tl-name {
    font-family: "Anton", sans-serif;
    font-size: 18px;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1;
  }
  .cs-editorial .tl-current .tl-when {
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .6;
  }

  /* story head */
  .cs-editorial .story-head {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 36px 20px 24px;
  }
  .cs-editorial .story-head .lede { margin: 0; max-width: 100%; }

  /* steps — mobile layout */
  .cs-editorial .step {
    padding: 48px 20px;
    border-bottom: 1px solid var(--ink);
    scroll-margin-top: 170px; /* nav 72px + glass pill ~90px + 8px gap */
    display: block;
  }
  body.nav-scrolled .cs-editorial .step {
    scroll-margin-top: 100px; /* glass pill ~90px + 8px gap */
  }
  .cs-editorial .step .num {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 14px;
    font-size: 72px;
    line-height: .82;
    position: static;
    opacity: .18;
  }
  .cs-editorial .step .num .tag {
    text-align: right;
    line-height: 1.7;
    font-size: 9px;
  }
  .cs-editorial .step .body { gap: 18px; }
  .cs-editorial .step h3 { font-size: clamp(22px, 6.5vw, 34px); }
  .cs-editorial .step p   { font-size: 14px; }
  .cs-editorial .step p.kicker { font-size: 9.5px; }

  /* wrap/hero padding */
  .cs-editorial .wrap { padding: 0 20px; }
  .cs-editorial .cs-cover { aspect-ratio: 4/5; margin-top: 20px; }
  .cs-editorial header.cs-intro { padding: 32px 0 16px; }

  /* meta */
  .cs-editorial .meta-row { grid-template-columns: 1fr 1fr; gap: 14px 24px; }
  .cs-editorial .meta-cell { flex-direction: column; gap: 3px; }
  .cs-editorial .meta-cell + .meta-cell { border-left: none; padding-left: 0; }
  .cs-editorial .meta-cell:nth-child(n) { border-top: none; padding-top: 0; }
  .cs-editorial .meta-cell .k { font-size: 9px; }
  .cs-editorial .meta-cell .v { font-size: 11px; }

  /* title */
  .cs-editorial h1.cs-title { font-size: clamp(64px, 18vw, 96px); flex-direction: column; align-items: flex-start; gap: 8px; }
  .cs-editorial h1.cs-title .reg { padding-bottom: 0; }

  .cs-editorial .cs-subtitle { flex-direction: column; align-items: flex-start; }
  .cs-editorial .cs-subtitle .stamp { text-align: left; }
  .cs-editorial .cs-subtitle p { font-size: 14px; }

  /* marquee smaller */
  .cs-editorial .marquee span { font-size: 16px; gap: 18px; }
  .cs-editorial .marquee .track { gap: 18px; }
  .cs-editorial .marquee .dot { width: 5px; height: 5px; }

  /* deliverables */
  .cs-editorial .deliverables { grid-template-columns: 1fr; }
  .cs-editorial .deliverables .d,
  .cs-editorial .deliverables .d:nth-child(even) {
    padding: 10px 0;
    border-right: none;
    padding-left: 0; padding-right: 0;
    font-size: 10px;
  }

  /* ph blocks */
  .cs-editorial .media-2-row .ph { aspect-ratio: 4/5; }
  .cs-editorial .media-3-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cs-editorial .media-3-row .ph:first-child { grid-column: 1/-1; aspect-ratio: 16/10; }

  /* data row */
  .cs-editorial .data-row { grid-template-columns: 1fr 1fr 1fr; padding: 14px 0; }
  .cs-editorial .data-cell .val { font-size: 36px; }
  .cs-editorial .data-cell .val small { font-size: 12px; }

  /* outcome */
  .cs-editorial .outcome-head { grid-template-columns: 1fr; }
  .cs-editorial .outcome-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--ink);
  }
  .cs-editorial .stat {
    padding: 18px 14px;
    border-right: 1px solid #0A09082A;
    border-bottom: 1px solid #0A09082A;
  }
  .cs-editorial .stat:nth-child(2n) { border-right: none; }
  .cs-editorial .stat:nth-last-child(-n+2) { border-bottom: none; }
  .cs-editorial .stat .v { font-size: 44px; }
  .cs-editorial .stat .v small { font-size: 13px; }

  .cs-editorial .nextcase { flex-direction: column; align-items: flex-start; gap: 24px; }
  .cs-editorial .nextcase .next-info { text-align: left; }

  /* swatches */
  .cs-editorial .swatches { grid-template-columns: repeat(3, 1fr); }
  .cs-editorial .sw { border-bottom: 1px solid #0A09082A; }

  /* typespec stacked */
  .cs-editorial .typespec { grid-template-columns: 1fr; }

  /* section padding */
  .cs-editorial section.story { padding: 0 0 32px; }
  .cs-editorial section.outcome { padding: 36px 0; }
}
