/* ═══════════════════════════════════════════════════════════
   PAST WORK · ONE READING COLUMN
   Shared by Re-KYC (dark, like the Baazi studies) and the Technicals
   Dashboard (light, like Streak). Same system as the other case studies:
   a centred 760 px column, heading → text → visual → caption.
   Each page sets its colours on <body class="theme-dark | theme-light">.
   ═══════════════════════════════════════════════════════════ */
.theme-light { --c-surface: #F6F3EE; --c-ink: #23211E; --c-accent: #557056; }
.theme-dark  { --c-surface: #141414; --c-ink: #EDEDED; --c-accent: #EDEDED; }
:root, body {
  --c-ink-2: color-mix(in srgb, var(--c-ink) 78%, transparent);
  --c-ink-3: color-mix(in srgb, var(--c-ink) 56%, transparent);
  --c-line:  color-mix(in srgb, var(--c-ink) 14%, transparent);
  --c-line-2: color-mix(in srgb, var(--c-ink) 26%, transparent);
  --f-display: 'Maison Neue', 'Inter', system-ui, sans-serif;
  --f-text: 'Inter', system-ui, sans-serif;
  --col: 760px; --pad: 24px;
  --t-title: clamp(2rem, 1.7rem + 1.2vw, 2.75rem);
  --t-h2: clamp(1.625rem, 1.45rem + .7vw, 2rem);
  --t-h3: clamp(1.1875rem, 1.12rem + .3vw, 1.375rem);
  --t-lead: clamp(1.125rem, 1.06rem + .25vw, 1.25rem);
  --t-body: clamp(1.0625rem, 1.03rem + .12vw, 1.125rem);
  --t-caption: .875rem; --t-label: .75rem;
  --r-chapter: 128px; --r-section: 72px; --r-head: 14px; --r-visual: 32px;
}
@media (max-width: 760px) { body { --r-chapter: 96px; --r-section: 56px; --r-visual: 24px; } }

html { background: #141414; }
body { margin: 0; background: var(--c-surface); color: var(--c-ink); -webkit-font-smoothing: antialiased; }
html:has(.theme-light) { background: #F6F3EE; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; width: 100%; height: auto; }

.col { width: min(var(--col), 100% - 2 * var(--pad)); margin-inline: auto; }
.wide { width: min(1040px, 100% - 2 * var(--pad)); margin-inline: auto; }

/* type */
.t-title { font: 400 var(--t-title)/1.12 var(--f-display); letter-spacing: -.012em; }
.t-h2 { font: 400 var(--t-h2)/1.2 var(--f-display); letter-spacing: -.008em; }
.t-h3 { font: 500 var(--t-h3)/1.3 var(--f-display); }
.t-lead { font: 300 var(--t-lead)/1.6 var(--f-text); color: var(--c-ink-2); }
.t-body { font: 400 var(--t-body)/1.75 var(--f-text); color: var(--c-ink-2); }
.t-body + .t-body { margin-top: 1em; }
figcaption { font: 400 var(--t-caption)/1.5 var(--f-text); color: var(--c-ink-3); }
.t-label { font: 500 var(--t-label)/1.4 var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink-3); }
.dlabel { display: block; font: 600 12px/1.4 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent); }

/* site bar */
.bar { display: flex; justify-content: space-between; align-items: center; padding: 28px 40px; }
.bar a { font: 500 var(--t-label)/1.4 var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink-3); text-decoration: none; }
.bar a:hover, .bar a:focus-visible { color: var(--c-ink); }
.bar nav { display: flex; gap: 32px; }

/* opening */
.open { padding-top: 96px; }
.open .t-lead { margin-top: 16px; }
.cover { margin-top: 40px; }
.cover img { border-radius: 6px; }
.facts { margin-top: 32px; display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 24px; border-top: 1px solid var(--c-line); padding-top: 18px; }
.facts dt { margin-bottom: 6px; }
.facts dd { font: 400 var(--t-body)/1.5 var(--f-text); color: var(--c-ink); }

/* chapters */
.chapter { margin-top: var(--r-chapter); }
.eyebrow { display: block; padding-top: 28px; border-top: 1px solid var(--c-line); margin-bottom: 10px; color: var(--c-accent); }
.chapter > .t-h2 + * { margin-top: 20px; }
.section { margin-top: var(--r-section); }
.section > .t-h3 + * { margin-top: var(--r-head); }
.fig { margin-top: var(--r-visual); }
.fig > figcaption { margin-top: 14px; }

/* quiet list: label + line, divided by hairlines */
.list { margin-top: 20px; border-top: 1px solid var(--c-line); }
.list li { padding: 16px 0; border-bottom: 1px solid var(--c-line); font: 400 var(--t-body)/1.55 var(--f-text); color: var(--c-ink-2); }
.list li b { display: block; margin-bottom: 4px; font-weight: 500; color: var(--c-ink); }

/* a statement given emphasis: a rule, not a card */
.statement { margin-top: 28px; font: 400 clamp(1.25rem, 1.15rem + .4vw, 1.5rem)/1.42 var(--f-display); color: var(--c-ink); border-left: 2px solid var(--c-accent); padding-left: 24px; }

/* two or more findings side by side */
.ins { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--c-line); }
.ins li { padding: 22px 28px 24px 0; border-bottom: 1px solid var(--c-line); }
.ins li:nth-child(even) { padding: 22px 0 24px 28px; border-left: 1px solid var(--c-line); }
.ins .n { display: block; margin-bottom: 10px; font: 500 12px/1 var(--f-text); color: var(--c-accent); letter-spacing: .06em; }
.ins h4 { font: 500 17px/1.3 var(--f-display); color: var(--c-ink); }
.ins p { margin-top: 8px; font: 400 15px/1.6 var(--f-text); color: var(--c-ink-2); }

.ins.three { grid-template-columns: repeat(3, 1fr); }
.ins.three li { padding: 22px 22px 24px 0; border-left: 0; }
.ins.three li + li { padding-left: 22px; border-left: 1px solid var(--c-line); }

/* Re-KYC: the three nudge levels, in order */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--c-line); }
.steps li { padding: 22px 22px 24px 0; border-bottom: 1px solid var(--c-line); }
.steps li + li { padding-left: 22px; border-left: 1px solid var(--c-line); }
.steps .when { display: flex; align-items: center; gap: 8px; font: 600 12px/1.4 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: var(--c-ink); }
.steps .when i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); flex: none; }
.steps .blink i { animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { opacity: .15; } }
.steps h4 { margin-top: 12px; font: 500 17px/1.3 var(--f-display); color: var(--c-ink); }
.steps p { margin-top: 8px; font: 400 15px/1.6 var(--f-text); color: var(--c-ink-2); }

/* diagrams exported as white cards */
.plate img { border-radius: 10px; }

/* screens: one row per surface, every phone the same width */
.surface { margin-top: 56px; }
.surface > .t-body { margin-top: 6px; }
.phones { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 28px; margin-top: 24px; }
.phone img { width: 100%; }
.phone .dlabel { margin-top: 12px; }
.phone p { margin-top: 4px; font: 400 13px/1.45 var(--f-text); color: var(--c-ink-2); }

/* a tall design shown inside a frame that scrolls */
.scroller { max-height: 900px; overflow-y: auto; border: 1px solid var(--c-line); border-radius: 6px; overscroll-behavior: contain; }
.scroller:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; }

/* impact */
.impact { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; row-gap: 40px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--c-line); }
.impact.one { grid-template-columns: 1fr; }
.impact dt { font: 400 clamp(2.5rem, 2rem + 2vw, 3.5rem)/1 var(--f-display); color: var(--c-accent); letter-spacing: -.01em; }
.impact dd { margin-top: 14px; font: 400 15px/1.6 var(--f-text); color: var(--c-ink-2); }
.impact dd b { display: block; margin-bottom: 6px; font: 500 var(--t-body)/1.4 var(--f-text); color: var(--c-ink); }

/* launch film: YouTube loads only when asked */
.yt { position: relative; aspect-ratio: 16 / 9; background: #1d1c1a; border-radius: 4px; overflow: hidden; }
.yt button { all: unset; position: absolute; inset: 0; cursor: pointer; display: grid; place-items: end start; padding: 20px; }
.yt button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.yt button span { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px; border-radius: 999px; background: var(--c-surface); color: var(--c-ink); font: 500 14px/1 var(--f-text); }
.yt button span::before { content: ""; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--c-accent); }
.yt button:focus-visible span { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* next case study */
.next { margin-top: var(--r-chapter); padding-block: 28px 96px; border-top: 1px solid var(--c-line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.next a { color: var(--c-ink); text-decoration: none; font: 400 var(--t-h3)/1.3 var(--f-display); }
.next a:hover, .next a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.next .t-label { display: block; margin-bottom: 6px; }

@media (max-width: 760px) {
  .bar { padding: 20px 24px; } .bar nav { gap: 18px; }
  .open { padding-top: 64px; }
  .facts { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .ins, .steps { grid-template-columns: 1fr; }
  .ins.three { grid-template-columns: 1fr; }
  .ins li, .ins li:nth-child(even), .ins.three li + li, .steps li, .steps li + li { padding: 20px 0; border-left: 0; }
  .phones { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); scroll-padding-inline: var(--pad); scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex: 0 0 58%; scroll-snap-align: start; }
  .scroller { max-height: 70vh; }
  .impact { grid-template-columns: 1fr; row-gap: 32px; }
}
@media (prefers-reduced-motion: reduce) { .steps .blink i { animation: none; } }
