  :root {
    --bg: #000;
    --fg: #fff;
    --muted: #9a9aa3;
    --line: #1f1f24;
    --accent: #3b6cff;
    --measure: 40rem;
  }
  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 400 1.0625rem/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  .wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

  header.top {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: 1.75rem 0;
    font-size: .875rem; color: var(--muted);
  }
  header.top strong { color: var(--fg); font-weight: 500; }
  .links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
  .links a { color: var(--fg); text-decoration: none; border-bottom: 1px solid #44444c; padding-bottom: 1px; }
  .links a:hover, .links a:focus-visible { border-bottom-color: var(--fg); }

  .hero { padding: 4.5rem 0 3rem; }
  .eyebrow {
    font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted); margin: 0 0 1.25rem;
  }
  h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: 1.02; letter-spacing: -.035em; font-weight: 600;
    margin: 0 0 1.75rem; text-wrap: balance;
  }
  .lede {
    font-size: clamp(1.1875rem, 2.2vw, 1.5rem); line-height: 1.4;
    max-width: 44rem; margin: 0; color: var(--muted); text-wrap: pretty;
  }
  .lede b { color: var(--fg); font-weight: 500; }

  .stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    margin: 3rem 0;
  }
  .stat { padding: 1.75rem 1.5rem 1.75rem 0; }
  .stat + .stat { padding-left: 1.5rem; border-left: 1px solid var(--line); }
  .stat .n {
    display: block; font-size: clamp(2rem, 4.5vw, 3.25rem);
    line-height: 1; letter-spacing: -.03em; font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .stat .l { display: block; margin-top: .6rem; font-size: .9375rem; color: var(--muted); }

  figure { margin: 0; }
  figure img {
    display: block; width: 100%; height: auto;
    border-radius: 10px; border: 1px solid var(--line); background: #0d0e14;
  }
  figcaption { margin-top: .7rem; font-size: .8125rem; color: var(--muted); }

  dl.facts {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
    margin: 3rem 0 0; padding: 0;
  }
  dl.facts dt {
    font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted); margin-bottom: .4rem;
  }
  dl.facts dd { margin: 0; font-size: .9375rem; line-height: 1.45; }

  section {
    display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 2rem;
    padding: 4.5rem 0; border-top: 1px solid var(--line); margin-top: 4.5rem;
  }
  section > h2 {
    font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase;
    font-weight: 500; color: var(--muted); margin: .35rem 0 0;
  }
  .body > * { max-width: var(--measure); }
  .body > .wide { max-width: none; }
  .body p { margin: 0 0 1.1rem; }
  .body p.big {
    font-size: clamp(1.375rem, 2.6vw, 1.875rem); line-height: 1.28;
    letter-spacing: -.015em; margin-bottom: 1.75rem; text-wrap: balance;
  }
  .body ul { margin: 0 0 1.5rem; padding: 0; list-style: none; }
  .body ul li {
    padding: .7rem 0 .7rem 1.25rem; border-top: 1px solid var(--line); position: relative;
  }
  .body ul li::before {
    content: ""; position: absolute; left: 0; top: 1.3rem;
    width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  }
  .question {
    border-left: 2px solid var(--accent); padding-left: 1.25rem; margin-top: 2rem;
    font-size: 1.1875rem; line-height: 1.45;
  }

  .decisions { margin: 2.5rem 0 0; padding: 0; list-style: none; counter-reset: d; }
  .decisions > li {
    counter-increment: d; padding: 1.75rem 0 0 3rem; margin-top: 1.75rem;
    border-top: 1px solid var(--line); position: relative;
  }
  .decisions > li::before {
    content: "0" counter(d); position: absolute; left: 0; top: 1.85rem;
    font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums;
  }
  .decisions h3 { margin: 0 0 .4rem; font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; }
  .decisions p { color: #c9c9d1; }

  .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.5rem 0 0; }
  .shot { margin: 2.5rem 0 0; }
  .pair { row-gap: 1.75rem; }
  .trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .trio figcaption span {
    display: inline-block; min-width: 1.25rem; color: var(--fg); font-variant-numeric: tabular-nums;
  }
  h3.sub {
    font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase;
    font-weight: 500; color: var(--muted); margin: 3rem 0 1rem;
  }

  footer {
    border-top: 1px solid var(--line); margin-top: 4.5rem; padding: 2rem 0 3rem;
    font-size: .875rem; color: var(--muted);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  }

  figure img { cursor: zoom-in; }
  figure img:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

  dialog.zoom {
    border: 0; padding: 0; margin: 0; background: #000; color: var(--fg); outline: none;
    width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  }
  dialog.zoom::backdrop { background: #000; }
  dialog.zoom .pan {
    width: 100%; height: 100%; overflow: auto; display: flex;
    cursor: zoom-out; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  dialog.zoom img {
    margin: auto; display: block; flex: none;
    max-width: 96vw; max-height: 86vh; width: auto; height: auto; border-radius: 8px;
  }
  dialog.zoom .bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: rgba(0,0,0,.8); font-size: .8125rem; color: var(--muted);
  }
  dialog.zoom button {
    flex: none; font: inherit; color: var(--fg); background: #1c1c21; border: 1px solid #33333a;
    border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer;
  }
  dialog.zoom .hint { display: none; }

  @media (max-width: 760px) {
    dialog.zoom img { max-width: none; max-height: none; width: 240vw; border-radius: 0; }
    dialog.zoom img.tall { width: 150vw; }
    dialog.zoom .hint { display: inline; }
    .hero { padding: 2.5rem 0 2rem; }
    .stats { grid-template-columns: 1fr; }
    .stat, .stat + .stat { padding: 1.25rem 0; border-left: 0; }
    .stat + .stat { border-top: 1px solid var(--line); }
    dl.facts { grid-template-columns: 1fr 1fr; }
    section { grid-template-columns: 1fr; gap: 1rem; padding: 3rem 0; margin-top: 3rem; }
    .pair, .trio { grid-template-columns: 1fr; }
    .decisions > li { padding-left: 0; }
    .decisions > li::before { position: static; display: block; margin-bottom: .5rem; }
    header.top { flex-direction: column; gap: .75rem; padding: 1.25rem 0; }
    .links { gap: .25rem 1.5rem; }
    .links a { padding-top: .5rem; padding-bottom: .35rem; }
    footer { flex-direction: column; }
  }

  /* case study nav */
  header.top { align-items: baseline; }
  .work { display: flex; gap: 1.25rem; margin-right: auto; margin-left: 1.5rem; }
  .work a { color: var(--muted); text-decoration: none; padding-bottom: 1px; border-bottom: 1px solid transparent; }
  .work a:hover, .work a:focus-visible { color: var(--fg); }
  .work a[aria-current] { color: var(--fg); border-bottom-color: var(--fg); }
  a.next {
    display: block; margin-top: 4.5rem; padding: 2.5rem 0; border-top: 1px solid var(--line);
    color: var(--fg); text-decoration: none;
  }
  a.next + footer { margin-top: 0; }
  a.next span {
    display: block; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted); margin-bottom: .6rem;
  }
  a.next strong {
    font-size: clamp(1.375rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.02em; font-weight: 600;
    text-wrap: balance;
  }
  a.next i { font-style: normal; display: inline-block; transition: transform .2s; }
  a.next:hover i { transform: translateX(.3rem); }
  .decisions figure { margin-top: 1.5rem; }
  .decisions .pair { margin-top: 1.5rem; }
  .decisions .pair figure { margin-top: 0; }
  @media (max-width: 760px) {
    .work { margin-left: 0; }
    a.next { margin-top: 3rem; padding: 2rem 0; }
  }

  /* tech stack list */
  dl.stack { margin: 1.5rem 0 0; padding: 0; max-width: var(--measure); }
  dl.stack > div {
    display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem;
    padding: .8rem 0; border-top: 1px solid var(--line);
  }
  dl.stack dt { font-weight: 600; }
  dl.stack dd { margin: 0; color: #c9c9d1; }
  @media (max-width: 760px) {
    dl.stack > div { grid-template-columns: 1fr; gap: .15rem; }
  }

  /* quote */
  .body blockquote {
    margin: 2.5rem 0 0; padding: 0 0 0 1.25rem; border-left: 2px solid var(--accent);
  }
  .body blockquote p {
    font-size: clamp(1.1875rem, 2.2vw, 1.5rem); line-height: 1.4; letter-spacing: -.01em;
    margin: 0 0 .9rem; text-wrap: pretty;
  }
  .body blockquote footer {
    border: 0; margin: 0; padding: 0; display: block; font-size: .875rem; color: var(--muted);
  }

  /* header: keep items on one line each, stack earlier */
  header.top > span, header.top a { white-space: nowrap; }
  @media (max-width: 920px) {
    header.top { flex-direction: column; gap: .75rem; padding: 1.25rem 0; }
    .work { margin-left: 0; }
  }

  /* header v2: name + case study nav; menu button on phones */
  header.top { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .75rem 1.5rem; padding: 1.75rem 0; }
  .work { margin: 0 0 0 auto; }
  .menu-btn { display: none; }
  @media (max-width: 760px) {
    header.top { align-items: center; padding: 1rem 0; gap: 0 1rem; }
    .js .menu-btn {
      display: inline-block; margin-left: auto; font: inherit; font-size: .875rem; color: var(--fg);
      background: none; border: 1px solid #33333a; border-radius: 999px; padding: .5rem 1rem; cursor: pointer;
    }
    .work { flex-basis: 100%; margin: .75rem 0 0; flex-direction: column; gap: 0; }
    .js .work { display: none; }
    .js header.top.open .work { display: flex; }
    .work a {
      display: flex; justify-content: space-between; align-items: center;
      padding: .9rem 0; font-size: 1.25rem; letter-spacing: -.01em;
      border-bottom: 0; border-top: 1px solid var(--line);
    }
    .work a[aria-current] { border-bottom: 0; border-top-color: var(--line); }
    .work a[aria-current]::after { content: "Viewing"; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
    header.top.open { border-bottom: 1px solid var(--line); }
  }
  @media (max-width: 760px) {
    header.top .who { flex: 1; min-width: 0; line-height: 1.35; }
    header.top .sep { display: none; }
    header.top .title { display: block; }
  }
  @media (max-width: 760px) { .work a { color: var(--fg); } }
