/* ===== Maria Gordienko — editorial PMM site ===== */

:root {
  --bg: #F7F5F1;
  --ink: #1E1E2E;
  --ink-2: #6B7280;
  --card: #EDE9E3;
  --white: #FFFFFF;
  --accent: #C05A3A;
  --accent-ink: #FFFFFF;
  --rule: rgba(30, 30, 46, 0.12);
  --rule-soft: rgba(30, 30, 46, 0.06);

  --f-serif: 'Fraunces', 'Times New Roman', serif;
  --f-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv11";
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; text-decoration: none; }

/* ---------- Grain overlay ---------- */
.grain::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 1;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 10px;
}
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-2px);
}
.nav-links {
  display: flex; gap: 28px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-links a { white-space: nowrap; }
.nav-links a {
  color: var(--ink-2);
  transition: color .2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--ink); color: var(--bg); }

@media (max-width: 780px) {
  .nav-links { display: none; }
}

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 2; }
section { position: relative; }

.section-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 12px;
}
.section-label .num {
  color: var(--accent);
  font-weight: 500;
}
.section-label .line {
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 120px;
}

h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  font-variation-settings: "opsz" 96, "SOFT" 30;
}
h2.section-h {
  font-size: clamp(40px, 6vw, 84px);
  margin: 24px 0 32px;
}

.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  max-width: 62ch;
  color: var(--ink);
}

.muted { color: var(--ink-2); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(60px, 12vh, 140px) 0 clamp(40px, 8vh, 80px);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.hero .meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 56px;
}
.hero-name {
  font-family: var(--f-sans);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: clamp(44px, 8.5vw, 132px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  margin-bottom: 40px;
}
.hero-title .it {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero-sub {
  max-width: 56ch;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 44px;
}
.hero-ctas {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-bottom: 56px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.rotating {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--ink-2);
  min-height: 1.6em;
  position: relative;
  max-width: 60ch;
}
.rotating .phrase {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
}
.rotating .phrase.is-in { opacity: 1; position: relative; }

/* ---------- Hero metrics row ---------- */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  margin-top: clamp(60px, 10vh, 100px);
}
.hero-metric {
  padding: 28px 16px;
  border-right: 1px solid var(--rule);
  min-width: 0;
}
.hero-metric:last-child { border-right: none; }
.hero-metric .n {
  font-family: var(--f-serif);
  font-size: clamp(22px, 2.4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 10px;
  font-variation-settings: "opsz" 96, "SOFT" 50;
  white-space: nowrap;
}
.hero-metric .n .unit { color: var(--accent); }
.hero-metric .d {
  font-family: var(--f-mono);
  font-size: clamp(9px, 0.8vw, 11px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 560px) {
  .hero-metric { padding: 18px 8px; }
  .hero-metric .d { letter-spacing: 0.04em; }
}

/* ---------- About ---------- */
.about {
  padding: clamp(80px, 14vh, 160px) 0;
  border-bottom: 1px solid var(--rule);
}
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
  margin-top: 40px;
}
.about-text p {
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 1.65;
  max-width: 62ch;
}
.about-text p:first-child::first-letter {
  font-family: var(--f-serif);
  font-size: 4.5em;
  float: left;
  line-height: 0.85;
  padding: 8px 12px 0 0;
  color: var(--accent);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.portrait {
  position: sticky;
  top: 100px;
  aspect-ratio: 3/4;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.portrait .tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: absolute;
  bottom: 16px; left: 16px;
}
.portrait .tag2 {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: absolute;
  top: 16px; right: 16px;
}
.portrait .monogram {
  font-family: var(--f-serif);
  font-size: clamp(80px, 12vw, 180px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.05em;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  line-height: 1;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 360px; }
}

/* ---------- How I Work cards ---------- */
.how {
  padding: clamp(80px, 14vh, 160px) 0;
  border-bottom: 1px solid var(--rule);
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 40px;
}
.how-card {
  background: var(--bg);
  padding: 36px 32px 40px;
  transition: background .3s;
  position: relative;
}
.how-card:hover { background: var(--card); }
.how-card .n {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 24px;
}
.how-card h3 {
  font-size: 26px;
  margin: 0 0 16px;
  line-height: 1.1;
}
.how-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}
@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; }
}

/* ---------- Working Style ---------- */
.wstyle {
  padding: clamp(80px, 14vh, 160px) 0;
  border-bottom: 1px solid var(--rule);
}
.wstyle-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
  margin-top: 40px;
}
.wstyle-text p { font-size: 17px; line-height: 1.7; margin: 0 0 20px; max-width: 60ch; }
.pullquote {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 28px;
  color: var(--ink);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.pullquote .lead {
  display: block;
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
@media (max-width: 900px) { .wstyle-grid { grid-template-columns: 1fr; } }

/* ---------- Quotes ---------- */
.quotes {
  padding: clamp(80px, 14vh, 160px) 0;
  border-bottom: 1px solid var(--rule);
}
.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.quote-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 36px 36px 32px;
  border-radius: 2px;
  position: relative;
}
.quote-card::before {
  content: "\201C";
  font-family: var(--f-serif);
  font-size: 120px;
  color: var(--accent);
  opacity: 0.15;
  position: absolute;
  top: -10px; left: 24px;
  line-height: 1;
}
.quote-card .q {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-weight: 300;
  font-variation-settings: "opsz" 96, "SOFT" 80;
  margin: 0 0 24px;
  position: relative;
}
.quote-card .who {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-2);
}
@media (max-width: 780px) { .quote-grid { grid-template-columns: 1fr; } }

/* ---------- AI section ---------- */
.ai {
  padding: clamp(80px, 14vh, 160px) 0;
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.ai .wrap { max-width: 900px; }
.ai p {
  font-size: 18px;
  line-height: 1.7;
  margin: 0 0 22px;
}
.ai .ai-lead {
  font-family: var(--f-serif);
  font-size: clamp(28px, 3.2vw, 40px);
  font-style: italic;
  line-height: 1.15;
  color: var(--ink);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.ai .ai-lead .accent { color: var(--accent); }

/* ---------- Results marquee + grid ---------- */
.results {
  padding: clamp(80px, 14vh, 160px) 0 0;
  border-bottom: 1px solid var(--rule);
}
.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
}
.results .subline {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--accent);
  line-height: 1.3;
  max-width: 40ch;
  font-weight: 300;
  font-variation-settings: "opsz" 96, "SOFT" 100;
}
.marquee {
  margin: 32px 0 56px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
  overflow: hidden;
  position: relative;
  background: var(--bg);
}
.marquee .track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: slide 40s linear infinite;
  font-family: var(--f-serif);
  font-size: 22px;
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "opsz" 96, "SOFT" 100;
}
.marquee .track span { display: inline-flex; align-items: center; gap: 56px; }
.marquee .track .sep {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
}
.result-card {
  background: var(--bg);
  padding: 40px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
  transition: background .25s;
  position: relative;
}
.result-card:hover { background: var(--card); }
.result-card .num {
  font-family: var(--f-serif);
  font-size: clamp(48px, 5.5vw, 78px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.result-card .num .u { color: var(--accent); }
.result-card .desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.result-card .idx {
  position: absolute;
  top: 16px; right: 20px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--ink-2);
  opacity: 0.6;
}
@media (max-width: 900px) { .results-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .results-grid { grid-template-columns: 1fr; } }

/* ---------- Case studies ---------- */
.cases {
  padding: clamp(80px, 14vh, 160px) 0;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.cases .subline {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(22px, 2.3vw, 32px);
  color: var(--accent);
  line-height: 1.25;
  max-width: 40ch;
  margin-bottom: 24px;
  font-weight: 300;
  font-variation-settings: "opsz" 96, "SOFT" 100;
}
.cases-intro {
  max-width: 55ch;
  color: var(--ink);
  font-size: 18px;
  margin: 0 0 56px;
}
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  position: relative;
}
.case-card {
  background: var(--bg);
  padding: 40px 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 340px;
  position: relative;
  cursor: pointer;
  transition: background .3s;
}
.case-card:hover { background: var(--card); }
.case-card .idx {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}
.case-card .title {
  font-family: var(--f-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.case-card .how {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink-2);
  font-weight: 300;
  font-variation-settings: "opsz" 96, "SOFT" 100;
  max-width: 45ch;
}
.case-card ul {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.case-card ul li {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding-left: 20px;
  position: relative;
}
.case-card ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 10px; height: 1px;
  background: var(--accent);
}
.case-card .tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: auto;
  padding-top: 16px;
}
.chip {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--bg);
}
.case-card:hover .chip { border-color: var(--ink-2); }
.case-card .arrow-link {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 8px;
}
.case-card .arrow-link svg { transition: transform .3s; }
.case-card:hover .arrow-link svg { transform: translateX(4px); }
@media (max-width: 780px) { .cases-grid { grid-template-columns: 1fr; } .case-card { padding: 32px 24px; } }

/* Cursor follower */
.cursor-blob {
  position: fixed;
  top: 0; left: 0;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 70%, transparent) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  mix-blend-mode: multiply;
  transition: transform .35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity .3s;
  z-index: 50;
  opacity: 0;
}
.cursor-blob.active { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }

/* ---------- Contact ---------- */
.contact {
  padding: clamp(100px, 18vh, 200px) 0 clamp(80px, 14vh, 140px);
  position: relative;
  overflow: hidden;
}
.contact h2 {
  font-size: clamp(54px, 10vw, 160px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.contact h2 .it {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.contact .subline {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--accent);
  line-height: 1.3;
  max-width: 42ch;
  font-weight: 300;
  margin: 40px 0 32px;
  font-variation-settings: "opsz" 96, "SOFT" 100;
}
.contact p {
  font-size: 18px;
  line-height: 1.6;
  max-width: 55ch;
  margin: 0 0 40px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--rule);
  margin-top: 56px;
}
.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 4px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--f-serif);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96, "SOFT" 50;
  transition: padding .3s, color .3s;
}
.contact-link:hover { padding-left: 20px; color: var(--accent); }
.contact-link .kind {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.contact-link .arrow { opacity: 0; transition: opacity .3s, transform .3s; }
.contact-link:hover .arrow { opacity: 1; transform: translateX(4px); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--rule);
  padding: 48px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
@media (max-width: 640px) { footer { flex-direction: column; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 18px 20px;
  border-radius: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  display: none;
  flex-direction: column;
  gap: 14px;
  min-width: 240px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.tweaks-panel.on { display: flex; }
.tweaks-panel h4 {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0;
}
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw {
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s, transform .2s;
  position: relative;
}
.sw.active { border-color: var(--bg); }
.sw:hover { transform: scale(1.08); }
.sw-label {
  font-size: 10px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Case study pages ---------- */
.cs-back {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 24px 0 40px;
}
.cs-back:hover { color: var(--accent); }
.cs-header {
  padding: clamp(40px, 8vh, 80px) 0 clamp(60px, 10vh, 100px);
  border-bottom: 1px solid var(--rule);
}
.cs-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.cs-title {
  font-family: var(--f-serif);
  font-size: clamp(40px, 6.5vw, 88px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  margin-bottom: 28px;
  max-width: 18ch;
}
.cs-how {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.3;
  color: var(--ink-2);
  max-width: 50ch;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  margin-bottom: 48px;
}
.cs-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-company {
  margin: 0 0 24px;
  padding: 20px 22px;
  background: var(--card);
  border-left: 2px solid var(--accent);
  max-width: 62ch;
}
.cs-company-name {
  font-family: var(--f-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  font-variation-settings: "opsz" 48, "SOFT" 50;
}
.cs-company-link {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.cs-company-link:hover { border-bottom-color: var(--accent); }
.cs-company-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1.6;
}
.cs-company-line {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  margin: 12px 0 0;
  font-variation-settings: "opsz" 24, "SOFT" 50;
}
.cs-chip {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  line-height: 1.4;
}
.cs-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(32px, 5vw, 72px);
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 80px) 0;
}
.cs-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  border-left: 1px solid var(--rule);
  padding-left: 18px;
}
.cs-toc-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.cs-toc ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  counter-reset: toc;
}
.cs-toc a {
  display: flex;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1.3;
  padding: 2px 0;
  transition: color .2s ease;
  counter-increment: toc;
}
.cs-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.cs-toc a:hover { color: var(--ink); }
.cs-toc a.is-active { color: var(--ink); }
.cs-toc a.is-active::before { color: var(--ink); }

@media (max-width: 900px) {
  .cs-body { grid-template-columns: 1fr; }
  .cs-toc { display: none; }
}
.cs-section { padding: 32px 0; border-top: 1px solid var(--rule); scroll-margin-top: 100px; }
.cs-section:first-child { border-top: none; padding-top: 0; }
.cs-section-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.cs-section h3 {
  font-size: 34px;
  margin: 0 0 20px;
}
.cs-section p { font-size: 17px; line-height: 1.7; margin: 0 0 16px; max-width: 62ch; }
.cs-figure {
  margin: 40px 0 32px;
  max-width: 760px;
}
.cs-figure-wide {
  max-width: none;
  width: calc(100% + 80px);
  margin-left: -40px;
}
@media (max-width: 900px) {
  .cs-figure-wide { width: 100%; margin-left: 0; }
}
.cs-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--card);
}
.cs-figure figcaption {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-top: 14px;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 62ch;
  font-variation-settings: "opsz" 18, "SOFT" 50;
}
.cs-figure .fc-num {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 2px;
}
.cs-figure .fc-note {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
  padding: 10px 14px;
  border-left: 2px solid var(--rule);
  background: color-mix(in oklab, var(--ink) 3%, transparent);
  border-radius: 1px;
  font-style: normal;
  margin-top: 2px;
}
.cs-figure .fc-note a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed currentColor; }
.cs-figure .fc-note a:hover { border-bottom-style: solid; }

/* Waterfall vs Agile — visual diagram */
.cs-wfa-v2 {
  border: 1px solid var(--rule);
  background: var(--card);
  border-radius: 2px;
  overflow: hidden;
}
.cs-wfa-v2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.wfa-side { padding: 32px 30px; min-width: 0; }
.wfa-side + .wfa-side { border-left: 1px solid var(--rule); }
.wfa-side.is-after { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.wfa-side-head .eyebrow {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.wfa-side.is-after .wfa-side-head .eyebrow { color: var(--accent); }
.wfa-side-head h4 {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 400;
  margin: 6px 0 6px;
  color: var(--ink);
  font-variation-settings: "opsz" 28, "SOFT" 50;
  letter-spacing: -0.01em;
}
.wfa-side.is-after .wfa-side-head h4 { color: var(--accent); }
.wfa-side-head p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 22px;
  max-width: 40ch;
}
.wfa-waterfall, .wfa-loop {
  margin: 0 -6px;
}
.wfa-waterfall svg, .wfa-loop svg { width: 100%; height: auto; display: block; }
.wfa-anno {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.45;
}
.wfa-anno .k {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.wfa-anno-bad {
  background: color-mix(in oklab, #b94c4c 6%, transparent);
  border-left: 2px solid #b94c4c;
  color: var(--ink-2);
}
.wfa-anno-bad .k { color: #b94c4c; }
.wfa-anno-good {
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
}
.wfa-anno-good .k { color: var(--accent); }
.wfa-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  background: color-mix(in oklab, var(--paper) 50%, var(--card));
}
.wfa-bar > div {
  padding: 18px 22px;
  border-right: 1px solid var(--rule);
}
.wfa-bar > div:last-child { border-right: none; }
.wfa-bar .k {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.wfa-bar .v {
  font-family: var(--f-display);
  font-size: 18px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.wfa-bar .old { color: #b94c4c; text-decoration: line-through; text-decoration-thickness: 1px; }
.wfa-bar .arr { color: var(--ink-3); font-family: var(--f-mono); font-size: 14px; }
.wfa-bar .new { color: var(--accent); font-weight: 500; }

@media (max-width: 820px) {
  .cs-wfa-v2-grid { grid-template-columns: 1fr; }
  .wfa-side + .wfa-side { border-left: none; border-top: 1px solid var(--rule); }
  .wfa-bar { grid-template-columns: 1fr; }
  .wfa-bar > div { border-right: none; border-bottom: 1px solid var(--rule); }
  .wfa-bar > div:last-child { border-bottom: none; }
}

/* Waterfall vs Agile (legacy — unused) */
.cs-wfa {
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--card);
  border-radius: 2px;
  overflow: hidden;
}
.cs-wfa-row {
  padding: 28px 30px 32px;
  border-bottom: 1px solid var(--rule);
}
.cs-wfa-row:last-child { border-bottom: none; }
.cs-wfa-row.is-after {
  background: color-mix(in oklab, var(--accent) 4%, transparent);
}
.cs-wfa-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cs-wfa-title {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  font-variation-settings: "opsz" 24, "SOFT" 50;
  letter-spacing: -0.01em;
}
.cs-wfa-row.is-after .cs-wfa-title { color: var(--accent); }
.cs-wfa-title .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-3px);
}
.cs-wfa-row.is-after .cs-wfa-title .dot { background: var(--accent); }
.cs-wfa-meta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cs-wfa-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: 8px;
  padding: 8px 0 0;
}
.cs-wfa-phase {
  position: relative;
  padding: 14px 14px 16px;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.cs-wfa-row.is-after .cs-wfa-phase {
  background: #fff;
  border-color: color-mix(in oklab, var(--accent) 30%, var(--rule));
}
.cs-wfa-phase .n {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.cs-wfa-row.is-after .cs-wfa-phase .n { color: var(--accent); }
.cs-wfa-phase .t {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.cs-wfa-phase .d {
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.45;
}
.cs-wfa-phase .flag {
  position: absolute;
  top: -10px;
  right: -6px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 1px;
  white-space: nowrap;
}
.cs-wfa-row.is-after .cs-wfa-phase .flag {
  background: var(--accent);
  color: #fff;
}
.cs-wfa-phase.is-pain {
  border-color: color-mix(in oklab, #b94c4c 60%, var(--rule));
  background: color-mix(in oklab, #b94c4c 5%, var(--paper));
}
.cs-wfa-phase.is-pain .flag {
  background: #b94c4c;
  color: #fff;
}
.cs-wfa-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cs-wfa-axis .mark { display: flex; align-items: center; gap: 8px; }
.cs-wfa-axis .mark::before {
  content: "";
  width: 1px; height: 8px;
  background: var(--ink-3);
}
.cs-wfa-loop {
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px dashed color-mix(in oklab, var(--accent) 40%, var(--rule));
  border-radius: 2px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cs-wfa-loop .arrow {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--accent);
}
@media (max-width: 900px) {
  .cs-wfa-line { grid-template-columns: repeat(var(--cols, 5), minmax(140px, 1fr)); overflow-x: auto; }
}

/* Funnel diagram (case-study — before/after lead flow) */
.cs-funnel {
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--card);
  border-radius: 2px;
}
.cs-funnel-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}
.cs-funnel-head > div {
  padding: 22px 28px 18px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cs-funnel-head > div:first-child { border-right: 1px solid var(--rule); }
.cs-funnel-head .tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-transform: none;
  font-weight: 500;
  margin-left: auto;
}
.cs-funnel-head .is-after { color: var(--accent); }
.cs-funnel-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.cs-funnel-col {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-funnel-col + .cs-funnel-col { border-left: 1px solid var(--rule); }
.cs-stage {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
}
.cs-stage:last-child { border-bottom: none; }
.cs-stage .bar {
  height: 10px;
  background: color-mix(in oklab, var(--ink-2) 18%, transparent);
  border-radius: 1px;
  position: relative;
}
.cs-funnel-col.is-after .cs-stage .bar {
  background: color-mix(in oklab, var(--accent) 26%, transparent);
}
.cs-stage .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink-2);
  border-radius: 1px;
  transform-origin: left;
  transform: scaleX(var(--w, 0.5));
  transition: transform 0.6s ease;
}
.cs-funnel-col.is-after .cs-stage .bar::after {
  background: var(--accent);
}
.cs-stage .n {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.cs-stage .v {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.cs-stage .label {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
}
.cs-stage .sub {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
.cs-funnel-foot {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--rule);
  background: color-mix(in oklab, var(--paper) 50%, var(--card));
}
.cs-funnel-foot > div {
  padding: 20px 24px;
  border-right: 1px solid var(--rule);
}
.cs-funnel-foot > div:last-child { border-right: none; }
.cs-funnel-foot .k {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.cs-funnel-foot .n {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  font-variation-settings: "opsz" 40, "SOFT" 50;
  letter-spacing: -0.01em;
}
.cs-funnel-foot .n .u {
  font-size: 20px;
  color: var(--ink-2);
  margin-left: 2px;
}
.cs-funnel-foot .d {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.45;
}
@media (max-width: 780px) {
  .cs-funnel-head, .cs-funnel-body { grid-template-columns: 1fr; }
  .cs-funnel-head > div:first-child { border-right: none; border-bottom: 1px solid var(--rule); }
  .cs-funnel-col + .cs-funnel-col { border-left: none; border-top: 1px solid var(--rule); }
  .cs-funnel-foot { grid-template-columns: 1fr; }
  .cs-funnel-foot > div { border-right: none; border-bottom: 1px solid var(--rule); }
  .cs-funnel-foot > div:last-child { border-bottom: none; }
}

/* Before / After comparison (case-study evidence) */
.cs-beforeafter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  margin: 0;
}
.cs-beforeafter .ba-slot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.cs-beforeafter .ba-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.cs-beforeafter .ba-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: none;
}
.cs-beforeafter .ba-slot.is-after .ba-label { color: var(--accent); }
.cs-beforeafter .ba-slot.is-after .ba-label::before { background: var(--accent); }
.cs-beforeafter img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: #fff;
}
.cs-beforeafter .ba-note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
}
@media (max-width: 720px) {
  .cs-beforeafter { grid-template-columns: 1fr; }
}

/* External references (case-study — links to press / published posts) */
.cs-refs {
  margin: 36px 0 8px;
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 4%, transparent);
  border-radius: 2px;
}
.cs-refs-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.cs-refs ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cs-refs li { padding: 0; }
.cs-refs a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: baseline;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.45;
  padding: 6px 0;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.cs-refs a:hover { color: var(--accent); border-bottom-color: currentColor; }
.cs-refs .src {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.cs-refs .arrow {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-3);
  transition: transform 0.2s ease, color 0.2s ease;
}
.cs-refs a:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }

/* Speaker grid (case-study evidence — panels of guest experts) */
.cs-speakers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
}
.cs-speakers img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.cs-speakers img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(30, 30, 46, 0.18);
}
@media (max-width: 780px) {
  .cs-speakers { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.cs-section p strong,
.cs-section li strong {
  font-weight: 500;
  color: var(--ink);
  background-image: linear-gradient(transparent 60%, color-mix(in oklab, var(--accent) 22%, transparent) 60%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.cs-section ul.dots { list-style: none; padding: 0; margin: 0; }
.cs-section ul.dots li {
  padding-left: 28px;
  position: relative;
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 10px;
  max-width: 60ch;
}
.cs-section ul.dots li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.cs-bq {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.2;
  padding: 16px 0 16px 32px;
  border-left: 3px solid var(--accent);
  font-weight: 300;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--ink);
  margin: 32px 0;
  max-width: 42ch;
}
.cs-process {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.cs-process .step {
  background: var(--card);
  padding: 10px 16px;
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 10px;
}
.cs-process .step .n {
  color: var(--accent);
  font-weight: 500;
}
.cs-taxonomy {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 20px;
}
.cs-tax-row { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: start; border-top: 1px solid var(--rule); padding-top: 16px; }
.cs-tax-row .lbl {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: 4px;
}
.cs-tax-row .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-qra {
  margin-top: 56px;
  scroll-margin-top: 100px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(36px, 6vw, 64px);
  border-radius: 4px;
}
.cs-qra .qra-label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 20px;
}
.cs-qra .qra-text {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  max-width: 22ch;
}
.cs-nav {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--rule);
}
.cs-nav a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
}
.cs-nav a:hover { color: var(--accent); }
.cs-nav .kind {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.cs-nav .lbl {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 300;
  font-variation-settings: "opsz" 96, "SOFT" 100;
}
.cs-nav a.next { text-align: right; }
@media (max-width: 900px) {
  .cs-body { grid-template-columns: 1fr; }
  .cs-tax-row { grid-template-columns: 1fr; }
}


/* ======================================================================
   Case-study figures & diagrams
   ====================================================================== */

.cs-figure {
  margin: 36px 0;
  display: block;
}
.cs-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--card);
}
.cs-figure figcaption {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
  font-style: italic;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 62ch;
}
.cs-figure .fc-num {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 2px;
}
.cs-figure .fc-note {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
  padding: 10px 14px;
  border-left: 2px solid var(--rule);
  background: color-mix(in oklab, var(--ink) 3%, transparent);
  border-radius: 1px;
  font-style: normal;
  margin-top: 2px;
}
.cs-figure .fc-note a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed currentColor; }
.cs-figure .fc-note a:hover { border-bottom-style: solid; }
.cs-figure-wide figcaption { max-width: 72ch; }

/* Waterfall vs Agile — visual diagram */
.cs-wfa-v2 {
  border: 1px solid var(--rule);
  background: var(--card);
  border-radius: 2px;
  overflow: hidden;
}
.cs-wfa-v2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.wfa-side { padding: 32px 30px; min-width: 0; }
.wfa-side + .wfa-side { border-left: 1px solid var(--rule); }
.wfa-side.is-after { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.wfa-side-head .eyebrow {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.wfa-side.is-after .wfa-side-head .eyebrow { color: var(--accent); }
.wfa-side-head h4 {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 400;
  margin: 6px 0 6px;
  color: var(--ink);
  font-variation-settings: "opsz" 28, "SOFT" 50;
  letter-spacing: -0.01em;
}
.wfa-side.is-after .wfa-side-head h4 { color: var(--accent); }
.wfa-side-head p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 22px;
  max-width: 40ch;
}
.wfa-waterfall, .wfa-loop { margin: 0 -6px; }
.wfa-waterfall svg, .wfa-loop svg { width: 100%; height: auto; display: block; }
.wfa-anno {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.45;
}
.wfa-anno .k {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.wfa-anno-bad {
  background: color-mix(in oklab, #b94c4c 6%, transparent);
  border-left: 2px solid #b94c4c;
  color: var(--ink-2);
}
.wfa-anno-bad .k { color: #b94c4c; }
.wfa-anno-good {
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
}
.wfa-anno-good .k { color: var(--accent); }
.wfa-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  background: color-mix(in oklab, var(--paper) 50%, var(--card));
}
.wfa-bar > div {
  padding: 18px 22px;
  border-right: 1px solid var(--rule);
}
.wfa-bar > div:last-child { border-right: none; }
.wfa-bar .k {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.wfa-bar .v {
  font-family: var(--f-display);
  font-size: 18px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.wfa-bar .old { color: #b94c4c; text-decoration: line-through; text-decoration-thickness: 1px; }
.wfa-bar .arr { color: var(--ink-3); font-family: var(--f-mono); font-size: 14px; }
.wfa-bar .new { color: var(--accent); font-weight: 500; }

@media (max-width: 820px) {
  .cs-wfa-v2-grid { grid-template-columns: 1fr; }
  .wfa-side + .wfa-side { border-left: none; border-top: 1px solid var(--rule); }
  .wfa-bar { grid-template-columns: 1fr; }
  .wfa-bar > div { border-right: none; border-bottom: 1px solid var(--rule); }
  .wfa-bar > div:last-child { border-bottom: none; }
}
