.back-link { display: inline-block; padding-top: var(--space-40); font: 600 14px/1 var(--font-text); color: var(--text-muted); text-decoration: none; }
.back-link:hover { color: var(--text-primary); }

/* Snapshot */
.cs-snapshot { display: flex; flex-direction: column; gap: var(--space-28); padding-block: var(--space-32) var(--space-56); }
.cs-snapshot h1 { max-width: 16ch; font-size: clamp(44px, 5.6vw, 76px); line-height: .98; }
.cs-snapshot .lead { max-width: 56ch; }
.cs-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-20); padding-block: 22px; border-block: 1px solid var(--border-default); }
.cs-meta div { display: flex; flex-direction: column; gap: var(--space-4); }
.cs-meta dd { margin: 0; font-weight: 500; line-height: 1.45; }
.cs-hero-image { border-radius: var(--radius-2xl); overflow: hidden; aspect-ratio: 2.4 / 1; background: var(--bg-subtle); }
.cs-hero-image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
  .cs-snapshot { gap: var(--space-20); padding-block: var(--space-20) var(--space-40); }
  .cs-meta { grid-template-columns: 1fr 1fr; gap: var(--space-16); }
  .cs-hero-image { aspect-ratio: 16 / 10; border-radius: var(--radius-xl); }
}

/* Body layout: sticky table of contents + article */
.cs-body { display: flex; align-items: flex-start; gap: var(--space-48); padding-bottom: var(--space-88); }
.cs-toc { flex: 0 0 180px; position: sticky; top: 92px; display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.cs-toc .label { margin: 0 0 8px 12px; }
.cs-toc a { padding: 7px 12px; border-radius: var(--radius-full); font: 600 14px/1 var(--font-text); color: var(--text-muted); text-decoration: none; transition: padding .4s var(--ease-spring), background .25s, color .25s; }
.cs-toc a:hover { color: var(--text-primary); }
.cs-toc a.is-active { padding: 9px 18px; background: var(--bg-brand); color: var(--text-on-brand); }
.cs-article { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-88); }
.cs-section { display: flex; flex-direction: column; gap: var(--space-24); scroll-margin-top: 96px; }
.cs-section > p, .cs-section .body-l { max-width: 66ch; }
.cs-section .statement { max-width: 30ch; }
@media (max-width: 899px) {
  .cs-body { flex-direction: column; gap: 0; }
  .cs-toc { position: sticky; top: 61px; z-index: 10; flex-direction: row; align-items: center; flex-basis: auto; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter); overflow-x: auto; scrollbar-width: none; background: var(--bg-page); border-block: 1px solid var(--border-subtle); }
  .cs-toc .label { display: none; }
  .cs-toc a { flex: none; }
  .cs-article { gap: var(--space-64); padding-top: var(--space-40); }
}

/* Bullets and quote */
.cs-list { display: flex; flex-direction: column; gap: var(--space-12); max-width: 66ch; }
.cs-list li { position: relative; padding-left: 21px; }
.cs-list li::before { content: ''; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--text-brand); }
.cs-quote { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-28); border-radius: var(--radius-xl); background: var(--bg-brand-subtle); }
.cs-quote blockquote { font: 700 clamp(24px, 2.6vw, 30px)/1.25 var(--font-display); letter-spacing: -.02em; }
.cs-quote figcaption { color: var(--text-brand-strong); }
.cs-pullquote { max-width: 24ch; font: 800 clamp(30px, 3.4vw, 42px)/1.1 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }

/* Numbered approach steps */
.step-rows { display: flex; flex-direction: column; }
.step-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-16); padding-block: var(--space-24); border-top: 1px solid var(--border-default); }
.step-row__index { font: 800 28px/1 var(--font-display); color: var(--text-brand); }
.step-row h3 { font-size: 21px; margin-bottom: var(--space-8); }
.step-row p { max-width: 62ch; font-size: 17px; line-height: 1.6; color: var(--text-secondary); }
@media (max-width: 767px) { .step-row { grid-template-columns: 36px minmax(0, 1fr); } .step-row__index { font-size: 22px; } }

/* Cards: decisions and features */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-16); }
.card { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-24); border-radius: var(--radius-xl); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border-default); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--border-input), var(--shadow-hover); }
.card p { color: var(--text-secondary); }
.card__trade { display: flex; flex-wrap: wrap; gap: 6px; }

/* Results */
.result-rows { display: flex; flex-direction: column; }
.result-row { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: var(--space-20); align-items: baseline; padding-block: var(--space-20); border-top: 1px solid var(--border-default); }
.result-row__value { font: 800 32px/1 var(--font-display); letter-spacing: -.03em; }
.result-row__value--brand { color: var(--text-brand); }
.result-row p { font-size: 17px; line-height: 1.55; color: var(--text-body); }
@media (max-width: 767px) { .result-row { grid-template-columns: 1fr; gap: 6px; } }

/* Up next */
.next-card { display: flex; align-items: center; justify-content: space-between; gap: var(--space-20); margin-top: var(--space-20); padding: var(--space-28); border-radius: var(--radius-2xl); background: var(--bg-brand-subtle); color: var(--text-primary); text-decoration: none; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.next-card:hover { transform: translateY(-4px); color: var(--text-primary); }
.next-card__title { font: 800 26px/1.1 var(--font-display); letter-spacing: -.02em; }
.next-card__arrow { font: 700 28px/1 var(--font-display); color: var(--text-brand); }
@media (max-width: 767px) { .next-card { padding: var(--space-20); } .next-card__title { font-size: 22px; } }

/* Design-system case study extras */
.cs-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; padding: clamp(20px, 4vw, 48px); border-radius: var(--radius-2xl); background: var(--bg-subtle); }
.stack { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; }
.stack__card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); padding: 18px 20px; border-radius: var(--radius-lg); background: var(--bg-surface); box-shadow: var(--shadow-card); }
.stack__card + .stack__card { margin-top: -6px; }
.stack__card:nth-child(1) { z-index: 3; }
.stack__card:nth-child(2) { z-index: 2; margin-inline: 14px; }
.stack__card:nth-child(3) { z-index: 1; margin-inline: 28px; }
.stack__card b { display: block; margin-top: 4px; font: 700 18px/1.2 var(--font-display); }
.swatches { display: flex; gap: 4px; }
.swatches span { width: 16px; height: 16px; border-radius: 50%; }
.stat-grid { flex: 1 1 300px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-24) var(--space-20); min-width: 0; }
.stat-grid .stat__value { font-size: clamp(32px, 3.4vw, 44px); }
@media (max-width: 767px) { .stack__card:nth-child(2) { margin-inline: 10px; } .stack__card:nth-child(3) { margin-inline: 20px; } .stack__visual { display: none; } }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); }
.compare > div { display: flex; flex-direction: column; gap: 6px; padding: var(--space-24); border-radius: var(--radius-xl); background: var(--bg-subtle); }
.compare strong { font: 800 52px/1 var(--font-display); letter-spacing: -.03em; color: var(--text-subtle); text-decoration: line-through; text-decoration-thickness: 3px; }
.compare > div:last-child { background: var(--bg-brand); color: var(--text-on-brand); }
.compare > div:last-child strong { color: var(--text-on-brand); text-decoration: none; }
.compare > div:last-child .label { color: var(--text-on-brand); opacity: .8; }

.before-after { display: flex; flex-direction: column; gap: 14px; }
.before-after__frames { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.ba-frame { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: flex-end; padding: 14px; border-radius: 20px; background: repeating-linear-gradient(135deg, #fdecec 0 10px, #f6dcdc 10px 11px); }
.ba-frame--after { background: repeating-linear-gradient(135deg, #e3e9ff 0 10px, #d9e2ff 10px 11px); }
.ba-marker { position: absolute; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-surface); box-shadow: 0 0 0 2.5px var(--text-error); color: var(--text-error); font: 700 13px/1 var(--font-display); }
.before-after figcaption { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--text-secondary); }
.before-after figcaption b { color: var(--text-error); }

.try-it { display: flex; flex-direction: column; gap: 22px; padding: clamp(20px, 3.5vw, 36px); border-radius: 26px; background: var(--bg-inverse); color: var(--text-on-inverse); }
.try-it__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); }
.try-it__head b { display: block; margin-top: 6px; font: 700 22px/1.2 var(--font-display); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #1a2236; color: #9aa3b8; font: 600 13px/1.25 var(--font-text); transition: background .25s, color .25s, transform .4s var(--ease-spring); }
.check__dot { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #2a3550; color: #fff; font: 700 11px/1 var(--font-mono); }
.check.is-done { background: #142a6e; color: #fff; }
.check.is-done .check__dot { background: var(--bg-brand); }
.check.is-flagged { background: var(--bg-error-inverse); color: #ffb4ab; transform: scale(1.04); }
.check.is-flagged .check__dot { background: var(--text-error); }
.try-it__msg { min-height: 44px; display: flex; align-items: center; font: 400 14px/1.5 var(--font-mono); color: #9aa3b8; }
.try-it__msg.is-flagged { color: #ffb4ab; }
.try-it__msg.is-done { color: var(--text-on-inverse-accent); }
@media (max-width: 767px) { .checks { grid-template-columns: 1fr 1fr; } .try-it__head .btn { width: 100%; } }

.two-readers { display: flex; flex-wrap: wrap; gap: 14px; }
.two-readers > div { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius-xl); background: var(--bg-subtle); }
.two-readers > div:last-child { background: var(--bg-inverse); }
.catalogue-entry { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 18px; border-radius: 16px; background: var(--bg-surface); }
.two-readers pre { margin: 0; font: 13px/1.7 var(--font-mono); color: #e8e6e1; white-space: pre-wrap; }
.two-readers pre span { color: var(--text-on-inverse-accent); }
