/* Product case studies, dark layout (Digital Enrolment, Ely, Sidequest).
   Left: a sticky project panel with the numbered contents. Right: five chapters,
   each block a red DM Mono label, an Anton title, a short paragraph and the work.
   Loads after case-study.css and case-study-final.css. The colour tokens are
   flipped inside main.dk only, so the site header, menu and footer stay as they are.
   Red text uses a lighter red (#E0574A) that passes WCAG AA on the dark grounds;
   red fills behind white text keep the site red (#AE2D23). */

body.cs-dark { background: #0E0D0C; }
.dk {
  --c-paper: #0E0D0C; --c-paper-2: #1F1D1C; --c-card: #171615; --c-ink: #F2F0ED; --c-ink-2: #DAD5CF;
  --c-body: #D6D1CB; --c-muted: #A39D96; --c-line: #2E2B29; --c-border: #6F6963;
  --c-art: #E0574A; --c-art-deep: #AE2D23; --c-art-tint: rgba(224, 87, 74, .14); --c-on-art: #fff;
  --dk-surf: #171615; --dk-surf-2: #1F1D1C; --dk-surf-3: #282624; --dk-glow: rgba(224, 87, 74, .16);
  --rule: 1px solid var(--c-line); --rule-dashed: 1px dashed var(--c-border);
  --shadow-card: 0 24px 48px -28px rgba(0, 0, 0, .9);
  color: var(--c-ink); background: var(--c-paper);
}
.dk ::selection { background: var(--c-art-deep); color: #fff; }
.dk a { color: inherit; }
.dk :focus-visible { outline: 2px solid var(--c-art); outline-offset: 3px; }

.dk-grid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 0 clamp(40px, 5vw, 80px); max-width: 1440px; margin: 0 auto; padding: 28px max(clamp(20px, 5vw, 80px), env(safe-area-inset-right, 0px)) 0 max(clamp(16px, 2.5vw, 40px), env(safe-area-inset-left, 0px)); }

/* ---------- the project panel ---------- */
.dk-panel { position: relative; }
.dk-panel__in { position: sticky; top: calc(var(--nb-h, 72px) + 20px); max-height: calc(100vh - var(--nb-h, 72px) - 40px); overflow-y: auto; scrollbar-width: thin; padding: 24px; border-radius: 24px; background: var(--dk-surf); }
.dk-crumb { display: flex; gap: 8px; margin: 0; font-size: 14px; }
.dk-crumb a, .dk-crumb span { padding: 5px 12px; border-radius: 999px; background: var(--dk-surf-3); color: var(--c-muted); text-decoration: none; }
.dk-crumb a:hover { color: var(--c-ink); }
.dk-name { margin: 20px 0 0; font-family: var(--f-sign); font-weight: 400; font-size: clamp(40px, 3.6vw, 52px); line-height: .95; text-transform: uppercase; text-wrap: balance; }
.dk-issue { margin: 10px 0 0; font-family: var(--f-mono); font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--c-art); }
.dk-sum { margin: 14px 0 0; font-size: 16px; line-height: 1.55; color: var(--c-muted); }
.dk-sum b { color: var(--c-ink); font-weight: 600; }
.dk-team { margin-top: 20px; font-size: 14px; }
.dk-team p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--c-line); }
.dk-team p span:last-child { color: var(--c-muted); text-align: right; }
.dk-team__h { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.dk-team__more summary { padding: 8px 0; color: var(--c-muted); cursor: pointer; list-style: none; border-bottom: 1px solid var(--c-line); }
.dk-team__more summary::-webkit-details-marker { display: none; }
.dk-team__more summary::after { content: " +"; color: var(--c-art); }
.dk-team__more[open] summary::after { content: " −"; }
.dk-team__more p { display: block; color: var(--c-muted); line-height: 1.5; }
.dk-team__more a { text-decoration: underline; text-underline-offset: 3px; }
.dk-facts { margin: 14px 0 0; }
.dk-facts div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--c-line); }
.dk-facts dt { padding-top: 2px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.dk-facts dd { margin: 0; font-size: 14px; line-height: 1.45; text-align: right; }
.dk-facts .is-status dd { color: var(--c-art); font-weight: 600; }
.dk-facts .is-status dd::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%; background: currentColor; }
.dk-notice { display: flex; gap: 8px; margin: 16px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--dk-surf-2); font-size: 13px; line-height: 1.45; color: var(--c-muted); }
.dk-notice svg { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--c-art); }

/* Numbered contents: a red underline grows across the chapter you're reading */
.dk-team { margin-top: 18px; }
.dk-status { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 6px 12px; border-radius: 999px; background: var(--c-art-tint); color: var(--c-art); font-size: 14px; font-weight: 600; }
.dk-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* the right-side dots are replaced by the panel on wide screens; phones keep the Sections pill */
.cs-dark .qnav__rail { display: none; }

/* ---------- the right column ---------- */
.dk-main { min-width: 0; padding-bottom: 24px; }
.dk-hero { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 2vw, 26px); min-height: clamp(320px, 38vw, 560px); padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px) 0; border-radius: 28px; overflow: hidden;
  background: radial-gradient(70% 90% at 70% 0%, var(--dk-glow) 0%, rgba(224, 87, 74, 0) 60%), radial-gradient(60% 70% at 0% 100%, var(--dk-surf-3) 0%, rgba(40, 38, 36, 0) 60%), var(--dk-surf); }
.dk-hero--phones img { width: clamp(110px, 17%, 250px); height: auto; border-radius: clamp(18px, 2.2vw, 32px); border: clamp(3px, .4vw, 6px) solid #000; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .9); margin-bottom: -40px; }
.dk-hero--phones img:nth-child(2) { width: clamp(120px, 19%, 270px); margin-bottom: -10px; }
.dk-hero--demo { align-items: center; padding-bottom: clamp(24px, 4vw, 48px); }
.dk-hero--demo .cs-demo { width: min(100%, 420px); margin: 0; }
.dk-hero--demo figcaption { color: var(--c-muted); }
.dk-hero .dk-hero__img { width: 100%; margin-bottom: 0; border-radius: 18px 18px 0 0; }

/* product scene hero: the scene plays once on a soft glow of the product's own colours (assets/js/scenes.js) */
.dk-hero--scene { display: block; padding: 0; min-height: clamp(340px, 40vw, 580px); background: #141212; }
.dk-replay { position: absolute; right: 16px; bottom: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(23, 22, 21, .72); color: var(--c-ink); font: 500 13px var(--f-mono); cursor: pointer; transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out); }
.dk-replay svg { width: 12px; height: 12px; }
.dk-replay:hover { background: rgba(40, 38, 36, .9); }
.dk-replay:active { transform: scale(.97); }

/* the coded product moment (Digital Enrolment) */
.dk-moment { width: min(100%, 600px); margin: 0 0 clamp(24px, 4vw, 48px); padding: 26px 28px 22px; border-radius: 24px; background: #fff; color: #161413; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
.dk-moment__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dk-moment__top b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.dk-moment__top span { font-family: var(--f-mono); font-size: 12px; color: #6E6A66; }
.dk-moment__rows { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.dk-moment__rows li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 104px; align-items: center; gap: 12px; min-height: 54px; padding: 0 12px; border-radius: 14px; background: #F4F4F4; }
.dk-av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #E4E4E4; font-family: var(--f-mono); font-size: 12px; color: #57514A; }
.dk-moment__who strong { display: block; font-size: 15px; font-weight: 600; }
.dk-moment__who small { display: block; font-size: 13px; color: #6E6A66; }
.dk-pill { position: relative; display: block; height: 28px; }
.dk-pill span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 999px; font-size: 12px; font-weight: 600; }
.dk-pill__a { background: #E8E8E8; color: #57514A; }
.dk-pill__b { background: #F7E2DF; color: #8E271D; opacity: 0; }
.dk-moment__foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.dk-moment__foot b { font-family: var(--f-sign); font-weight: 400; font-size: 40px; line-height: 1; color: #AE2D23; }
.dk-moment__foot span { font-size: 14px; color: #6E6A66; }
/* plays once, 1.2 s after load, then rests on Enrolled */
@media (prefers-reduced-motion: no-preference) {
  .dk-moment .dk-pill__b { animation: dk-flip 420ms var(--ease-out) forwards; animation-delay: calc(1200ms + var(--d, 0ms)); }
  .dk-moment li:nth-child(2) { --d: 260ms; } .dk-moment li:nth-child(3) { --d: 520ms; } .dk-moment li:nth-child(4) { --d: 780ms; }
}
@media (prefers-reduced-motion: reduce) { .dk-moment .dk-pill__b { opacity: 1; } }
@keyframes dk-flip { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* chapters and blocks */
.dk-ch { scroll-margin-top: calc(var(--nb-h, 72px) + 16px); }
.dk-div { display: flex; align-items: center; gap: 16px; margin: clamp(112px, 12vw, 176px) 0 0; font-family: var(--f-mono); font-weight: 400; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.dk-div::after { content: ""; flex: 1; border-top: 1px solid var(--c-line); }
.dk-blk { margin-top: clamp(88px, 9vw, 128px); } /* room to breathe between sections; chapters get more (.dk-div) */
.dk-div + .dk-blk { margin-top: 48px; }
.dk-kicker { margin: 0; font-family: var(--f-mono); font-size: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--c-art); }
.dk-kicker--gap { margin-top: 44px; }
.dk-h { margin: 10px 0 0; font-family: var(--f-sign); font-weight: 400; font-size: clamp(34px, 4vw, 54px); line-height: 1; text-transform: uppercase; text-wrap: balance; color: var(--c-ink); }
.dk-blk > .dk-h:first-child { margin-top: 0; }
.dk-t { max-width: 64ch; margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: var(--c-muted); }
.dk-t b, .dk-t a { color: var(--c-ink); font-weight: 600; }
.dk-t a { text-decoration: underline; text-underline-offset: 3px; }
.dk-note { max-width: 64ch; margin: 16px 0 0; font-family: var(--f-mono); font-size: 13px; line-height: 1.55; color: var(--c-muted); }
.dk-soft { padding: 22px; border-radius: 22px; background: var(--dk-surf); }
.dk-soft h4 { margin: 0; font-family: var(--f-sign); font-weight: 400; font-size: 24px; line-height: 1.05; text-transform: uppercase; }
.dk-soft p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--c-muted); }
.dk-chip { display: inline-block; margin-bottom: 12px; padding: 3px 10px; border-radius: 999px; background: var(--dk-surf-3); font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink); }
.dk-shot { margin-top: 28px; padding: clamp(16px, 2.5vw, 30px); border-radius: 24px; background: radial-gradient(60% 80% at 50% 0%, var(--dk-glow) 0%, rgba(224, 87, 74, 0) 60%), var(--dk-surf); }
.dk-shot .cs-demo, .dk-shot .cs-yt { margin: 0; }
.dk-shot .ph { border: 0; border-radius: 12px; overflow: hidden; }

.dk-facts3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 30px 0 0; }
.dk-facts3 > div { padding-top: 14px; border-top: 1px solid var(--c-line); }
.dk-facts3 dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.dk-facts3 dd { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }
.dk-facts3 dd b { font-weight: 600; }
.dk-facts3 .dk-sub { color: var(--c-muted); font-size: 14px; }
.dk-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 14px 0 0; padding: 0; list-style: none; }
.dk-nums li { padding-top: 14px; border-top: 1px solid var(--c-line); }
.dk-nums b { display: block; font-family: var(--f-sign); font-weight: 400; font-size: clamp(42px, 4.6vw, 62px); line-height: 1; color: var(--c-art); }
.dk-nums span { display: block; margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--c-muted); }
.dk-nums--sm { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; margin-top: 28px; }
.dk-nums--sm b { color: var(--c-ink); }

.dk-cards, .dk-quotes { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.dk-cards--rules ul { margin: 10px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.55; color: var(--c-muted); }
.dk-cards--rules li li + li { margin-top: 4px; }
.dk-cards--rules > li:first-child h4 { color: var(--c-art); }
.dk-quote { margin: 0 !important; font-size: 19px !important; font-style: italic; line-height: 1.4 !important; color: var(--c-ink) !important; }
.dk-quote.is-plain { font-style: normal; }
.dk-cite { margin-top: 10px !important; font-family: var(--f-mono); font-size: 12px !important; color: var(--c-muted); }
.dk-changed { margin-top: 16px !important; padding-top: 14px; border-top: 1px solid var(--c-line); color: var(--c-ink) !important; font-size: 16px !important; }
.dk-changed span { display: block; margin-bottom: 4px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-art); }

.dk-chain { display: flex; justify-content: space-between; gap: 10px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: none; }
.dk-chain li { position: relative; flex: 1 1 0; text-align: center; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--c-ink); }
.dk-chain li + li::before { content: "→"; position: absolute; left: -10px; top: 14px; transform: translateX(-50%); color: var(--c-muted); }
.dk-chain i { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; background: var(--dk-surf-2); font-style: normal; font-family: var(--f-mono); font-size: 14px; color: var(--c-muted); }
.dk-chain li.is-pain { color: var(--c-art); }
.dk-chain li.is-pain i { background: var(--c-art-tint); color: var(--c-art); }

.dk-step { margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.dk .fr-walk { margin-top: 32px; }
.dk .fr-walk__item h4 { margin: 6px 0 0; font-family: var(--f-sign); font-weight: 400; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.05; text-transform: uppercase; color: var(--c-muted); transition: color var(--dur-ui) ease; }
.dk .fr-walk__item.is-on h4 { color: var(--c-art); }
.dk .fr-walk__item > p:not(.dk-step) { color: var(--c-muted); }
.dk .fr-walk__item { border-left-color: var(--c-line); }
.dk .fr-walk__item.is-on { border-left-color: var(--c-art); }

/* tradeoffs: what we tried first beside what shipped */
.dk-trade { margin-top: 44px; }
.dk-trade:first-of-type { margin-top: 32px; }
.dk-trade__h { display: flex; align-items: baseline; gap: 12px; margin: 0; font-family: var(--f-sign); font-weight: 400; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.05; text-transform: uppercase; }
.dk-trade__h span { font-family: var(--f-mono); font-size: 16px; color: var(--c-art); }
.dk-trade__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); margin-top: 16px; border-radius: 24px; overflow: hidden; background: var(--dk-surf); }
.dk-trade__fig { display: grid; justify-items: center; align-content: start; gap: 12px; margin: 0; padding: 22px; }
.dk-trade__fig.is-chosen { background: var(--dk-surf-2); }
.dk-trade__fig figcaption { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.dk-trade__fig.is-chosen figcaption { color: var(--c-art); }
.dk-trade__fig .ph { width: min(100%, 190px); }
.dk-trade__why { align-self: center; padding: 24px; }
.dk-trade__why p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--c-muted); }
.dk-trade__why p + p { margin-top: 6px; }
.dk-trade__why b { color: var(--c-ink); }
.dk-trade__k { margin-top: 16px !important; font-family: var(--f-mono); font-size: 12px !important; letter-spacing: .06em; text-transform: uppercase; color: var(--c-art) !important; }

.dk-lessons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 28px 0 0; padding: 0; list-style: none; }
.dk-lessons > li { padding-top: 14px; border-top: 1px solid var(--c-line); }
.dk-lessons h4 { margin: 0; font-family: var(--f-sign); font-weight: 400; font-size: 22px; line-height: 1.1; text-transform: uppercase; color: var(--c-art); }
.dk-lessons ul { margin: 10px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.55; color: var(--c-muted); }
.dk-lessons li li + li { margin-top: 6px; }
.dk-callout { margin-top: 24px; }
.dk-ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.dk-ledger__h { margin: 0 !important; font-family: var(--f-mono); font-size: 13px !important; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted) !important; }
.dk-ledger__h.is-done { color: var(--c-art) !important; }
.dk-ledger ul { margin: 10px 0 0; padding-left: 18px; font-size: 16px; line-height: 1.5; }
.dk-ledger li + li { margin-top: 6px; }

/* next issue */
.dk-next { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; max-width: 1440px; margin: clamp(80px, 9vw, 120px) auto 0; padding: 0 max(clamp(20px, 5vw, 80px), env(safe-area-inset-right, 0px)) clamp(64px, 8vw, 100px) max(clamp(16px, 2.5vw, 40px), env(safe-area-inset-left, 0px)); }
.dk-next__go { display: grid; grid-template-columns: 1fr auto; align-items: end; padding: clamp(24px, 3vw, 40px); border-radius: 24px; background: var(--dk-surf); text-decoration: none; transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out); }
.dk-next__go small { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.dk-next__go b { margin-top: 10px; font-family: var(--f-sign); font-weight: 400; font-size: clamp(36px, 4.6vw, 64px); line-height: 1; text-transform: uppercase; }
.dk-next__go svg { width: 28px; height: 28px; color: var(--c-art); }
.dk-next__btn { display: grid; place-items: center; padding: 0 22px; border-radius: 24px; background: var(--dk-surf); color: var(--c-muted); text-decoration: none; font-size: 15px; transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out); }
.dk-next__go:active, .dk-next__btn:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .dk-next__go:hover, .dk-next__btn:hover { background: var(--dk-surf-2); color: var(--c-ink); }
}

/* ---------- reused blocks, reshaped for the dark layout ---------- */
.dk .ph { border: 1px dashed var(--c-border); border-radius: 18px; background: var(--dk-surf-2); color: var(--c-muted); }
.dk .ph::before { opacity: .25; }
.dk .ph--img { border: 0; background: none; }
.dk .ph--phone.ph--img img { border-radius: 22px; }
.dk .cs-lane { margin-top: 28px; border: 0; border-radius: 22px; overflow: hidden; background: var(--dk-surf); }
.dk .cs-lane__label, .dk .cs-lane__head, .dk .cs-lane__cell { border-color: var(--c-line); }
.dk .cs-persona { margin-top: 28px; border: 0; border-radius: 22px; background: var(--dk-surf); }
.dk .cs-chips li { border-color: var(--c-line); background: var(--dk-surf-2); }
.dk .br__root { border-radius: 12px; background: var(--dk-surf-3); color: var(--c-ink); }
.dk .br__label { border-color: var(--c-line); border-radius: 10px; background: var(--dk-surf-2); }
.dk .fr-grid2 { margin-top: 28px; }
.dk .fr-grid2 > li { border-radius: 18px; }
.dk .cs-yt__btn { border-radius: 16px; overflow: hidden; }
.dk .cs-demo figcaption { color: var(--c-muted); }
.dk .chat__controls .cs-loop__btn { background: var(--dk-surf-3); color: var(--c-ink); border: 0; border-radius: 999px; }
.dk .cs-transcript summary { color: var(--c-muted); }

/* ---------- smaller screens: the panel becomes a block at the top ---------- */
@media (max-width: 1099px) {
  .dk-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 20px; }
  .dk-panel__in { position: static; max-height: none; overflow: visible; }
    .dk-next { padding-bottom: 120px; }  /* room so the floating pill never covers these links */
}
@media (max-width: 760px) {
  .dk-facts3, .dk-nums, .dk-lessons, .dk-ledger { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dk-cards, .dk-quotes { grid-template-columns: minmax(0, 1fr); }
  .dk-chain { flex-direction: column; gap: 14px; }
  .dk-chain li { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; text-align: left; }
  .dk-chain li + li::before { display: none; }
  .dk-chain i { width: 44px; height: 44px; margin: 0; }
  .dk-trade__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dk-trade__why { grid-column: 1 / -1; padding-top: 4px; }
  .dk-next { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dk-next__go { grid-column: 1 / -1; }
  .dk-next__btn { min-height: 52px; }
  .dk-moment { padding: 18px; }
  .dk-moment__rows li { grid-template-columns: 30px minmax(0, 1fr) 88px; gap: 10px; }
  .dk-hero--phones img:nth-child(1), .dk-hero--phones img:nth-child(3) { display: none; }
  .dk-hero--phones img:nth-child(2) { width: 58%; }
}
@media (max-width: 760px) { .dk-hero--scene { min-height: 440px; } .dk-replay { right: 10px; bottom: 10px; } }

/* Gallery block (brand posts, photo series): every piece at its own shape, in columns */
.cs-dark .dk-gal { columns: var(--cols, 3) 220px; column-gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; }
.cs-dark .dk-gal li { break-inside: avoid; margin: 0 0 14px; }
.cs-dark .dk-gal img { display: block; width: 100%; height: auto; border-radius: 6px; background: #1C1A19; }
.cs-dark .dk-gal span { display: block; margin-top: 6px; font-family: var(--f-mono, "DM Mono", monospace); font-size: 12px; color: #C9C2B6; }
/* photo series: one photograph after another, each fitted to the screen */
.cs-dark .dk-gal--scroll { columns: auto; margin-top: 0; }
.cs-dark .dk-gal--scroll li { margin: 0 0 clamp(28px, 5vh, 56px); text-align: center; }
.cs-dark .dk-gal--scroll img { width: auto; max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); margin: 0 auto; }
.cs-dark .dk-gal--scroll span { margin-top: 10px; }
.cs-dark .dk-ch--flat { padding-top: 0; }
.cs-dark .dk-ch--flat, .cs-dark .dk-ch--flat .dk-blk { margin-top: 0; padding-top: 0; border-top: 0; }

/* Section bar (chosen 14 Nov, option B): the chapters run in a full-width bar that sticks under the site header,
   lined up with the page grid (the tabs start at the content column). The chapter in view is lit with a red
   underline; a thin line under the tabs fills as you read (assets/js/case-study.js). */
.dk-bar { position: sticky; top: var(--nb-h, 72px); z-index: 30; background: #0E0D0C; border-bottom: 1px solid var(--c-line); }
.dk-bar__in { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 0 clamp(40px, 5vw, 80px); max-width: 1440px; margin: 0 auto; padding: 0 max(clamp(20px, 5vw, 80px), env(safe-area-inset-right, 0px)) 0 max(clamp(16px, 2.5vw, 40px), env(safe-area-inset-left, 0px)); }
.dk-bar__track { grid-column: 2; position: relative; min-width: 0; }
.dk-bar ol { display: flex; gap: clamp(20px, 2.6vw, 40px); height: 52px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.dk-bar li { flex: none; }
.dk-bar a { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 100%; min-height: 44px; color: var(--c-muted); text-decoration: none; font-size: 15px; white-space: nowrap; transition: color var(--dur-hover) ease; }
.dk-bar a b { font-family: var(--f-mono); font-weight: 400; font-size: 12px; color: var(--c-muted); }
.dk-bar a:hover { color: var(--c-ink); }
.dk-bar a[aria-current] { color: var(--c-ink); font-weight: 600; }
.dk-bar a[aria-current] b { color: #E0705F; }
.dk-bar a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; transition: background-color 160ms ease; }
.dk-bar a[aria-current]::after { background: var(--c-art); }
.dk-bar a:focus-visible { outline: 2px solid var(--c-ink); outline-offset: -4px; }
.dk-bar__prog { position: absolute; left: 0; bottom: -1px; height: 1px; width: var(--prog, 0%); background: #E0705F; }
.cs-dark .dk-panel__in { top: calc(var(--nb-h, 72px) + 52px + 20px); max-height: calc(100vh - var(--nb-h, 72px) - 52px - 40px); }
/* the panel fits a laptop screen without scrolling inside itself: tighter rows, same padding inside the card */
@media (min-width: 861px) {
  .cs-dark .dk-panel__in { padding: 22px 22px 20px; }
  .cs-dark .dk-name { margin-top: 16px; font-size: clamp(36px, min(3.4vw, 5.4vh), 50px); }
  .cs-dark .dk-issue { margin-top: 8px; }
  .cs-dark .dk-sum { margin-top: 10px; font-size: 15px; line-height: 1.5; }
  .cs-dark .dk-facts { margin-top: 12px; }
  .cs-dark .dk-facts div { gap: 10px; padding: 6px 0; grid-template-columns: 70px minmax(0, 1fr); }
  .cs-dark .dk-facts dd { font-size: 13.5px; line-height: 1.38; }
  .cs-dark .dk-notice { margin-top: 12px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; }
}
/* the walkthrough screen pins below the header and the section bar, not under them */
.cs-dark .fr-walk__fig { top: calc(var(--nb-h, 72px) + 52px + 24px); }
/* each screen sits inside its frame: without this a tall screenshot takes its own height and the bottom is cut off */
.cs-dark .fr-walk .ph--img img { position: absolute; inset: 0; }
.cs-dark .dk-ch { scroll-margin-top: calc(var(--nb-h, 72px) + 52px + 16px); }
@media (max-width: 1099px) { .dk-bar { display: none; } }

/* brand pages: the launch posts scroll sideways in the overview, like the Work page's Brand design card.
   Pointing at it pauses it so a post can be read; Pause motion and reduced motion hold it still. */
.dk-hero--reel { display: block; min-height: 0; height: clamp(300px, 36vw, 500px); padding: 0; margin: 0; background: var(--dk-surf); }
.dk-reel { position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden; }
.dk-reel__track { display: flex; height: 84%; width: max-content; animation: dk-reel var(--dur, 30s) linear infinite; will-change: transform; }
.dk-reel__track img { display: block; flex: none; height: 100%; width: auto; max-width: none; margin-right: 14px; border-radius: 10px; }
@keyframes dk-reel { to { transform: translateX(-50%); } }
.dk-hero--reel:hover .dk-reel__track, [data-motion="off"] .dk-reel__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .dk-reel__track { animation: none; } }

/* Ely's mascot and speech bubble: a wider first column so the bubble's words stay readable */
@media (min-width: 861px) { .dk .cs-persona { grid-template-columns: 280px minmax(0, 1fr); } }
.dk .cs-persona__img { --ar: 330 / 310; }
.dk .cs-persona__img img { object-fit: contain; object-position: center; }
/* the issue line only breaks at a dot: "U of T project" never splits */
.dk-issue span { white-space: nowrap; }
