/* ---- case-study-specific ---- */
  .cs-hero {
    padding: 150px var(--pad) 0;
  }
  .cs-kicker {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 40px;
  }
  .cs-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(64px, 12vw, 190px);
    line-height: 0.95;
    letter-spacing: -0.025em;
    text-transform: uppercase;
  }
  .cs-sub {
    font-size: clamp(18px, 1.9vw, 24px);
    color: var(--ink-2);
    max-width: 640px;
    margin-top: 20px;
    text-wrap: pretty;
  }
  .cs-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: clamp(64px, 10vh, 112px);
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }
  .cs-meta dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 6px;
  }
  .cs-meta dd { font-size: 14.5px; font-weight: 500; }
  .cs-hero-media {
    margin-top: 120px;
    background: var(--accent-soft);
    border-radius: 4px;
    overflow: hidden;
    padding: clamp(28px, 5vw, 80px) clamp(28px, 7vw, 120px) 0;
  }
  .cs-hero-media .mock { border-radius: 10px 10px 0 0; box-shadow: 0 -20px 80px -40px rgba(38,69,232,0.4); }

  .cs-body {
    max-width: 1100px;
    margin: 0 auto;
  }
  .cs-section { padding: clamp(72px, 11vh, 140px) var(--pad) 0; }
  .cs-section:has(+ .cs-carousel-wrap) { padding-bottom: 0; }
  .cs-label-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: clamp(24px, 4vw, 64px);
  }
  .cs-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
    padding-top: 8px;
  }
  .cs-label em { font-style: normal; color: var(--accent); margin-right: 8px; }
  .cs-prose h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(28px, 3.4vw, 48px);
    letter-spacing: -0.015em;
    line-height: 1.05;
    margin-bottom: 22px;
  }
  .cs-prose p {
    font-size: clamp(16.5px, 1.5vw, 19px);
    color: var(--ink-2);
    margin-bottom: 18px;
    max-width: 640px;
    text-wrap: pretty;
  }
  .cs-prose p strong { color: var(--ink); font-weight: 600; }

  .problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 36px;
  }
  .problem-card {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 24px;
    background: var(--surface);
    transition: transform 0.4s var(--ease-out), border-color 0.3s ease;
  }
  .problem-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
  .problem-card .pc-num {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--accent);
    display: block;
    margin-bottom: 32px;
  }
  .problem-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
  .problem-card p { font-size: 14px; color: var(--ink-2); margin: 0; }

  .artifact-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
  }
  .artifact {
    border-radius: 4px;
    padding: 22px 22px 52px;
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
  }
  .artifact .a-label {
    position: absolute;
    bottom: 14px; left: 18px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  /* ---- process viz ---- */
  .process-viz { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; }
  .artifact-wide { aspect-ratio: auto; padding: 30px 30px 52px; }
  .process-viz .artifact-strip { margin-top: 0; }
  .process-viz .artifact-strip .artifact { aspect-ratio: auto; min-height: 220px; }

  /* validation & feasibility loop (wide) */
  .vloop { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; flex-wrap: nowrap; padding: 6px 0 2px; width: 100%; }
  .vstep { display: contents; }
  .vstep:last-child { flex: none; }
  .vnode { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1; min-width: 0; }
  .vnode .vbox { width: 100%; height: 58px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line-strong); display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 0 14px; flex: none; }
  .vnode .vbox .vbar { height: 6px; border-radius: 3px; background: var(--line-strong); }
  .vnode .vbox .vbar.s { width: 56%; }
  .vnode .vname { font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); text-align: center; line-height: 1.2; min-height: 24px; }
  .vnode.is-key .vbox { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .vnode.is-key .vbox .vbar { background: var(--accent); }
  .vnode.is-key .vname { color: var(--accent); }
  .varrow { color: var(--ink-3); font-size: 14px; line-height: 1; flex: none; margin-top: 22px; }
  .vloop-return { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; color: var(--ink-3); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
  .vloop-return::before, .vloop-return::after { content: ''; height: 1px; width: 60px; background: var(--line-strong); }

  /* workflow breakdown (tree) */
  .tree { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 6px; }
  .tree .troot { width: 96px; height: 30px; border-radius: 6px; background: var(--accent-soft); border: 1px solid transparent; }
  .tree .tstem { width: 1.5px; height: 14px; background: var(--line-strong); }
  .tree .tbranch { display: flex; justify-content: space-between; width: 100%; position: relative; }
  .tree .tbranch::before { content: ''; position: absolute; top: 0; left: 16%; right: 16%; height: 1.5px; background: var(--line-strong); }
  .tree .tcol { display: flex; flex-direction: column; align-items: center; flex: 1; }
  .tree .tcol .tstem { height: 12px; }
  .tree .tleaf { width: 100%; max-width: 64px; height: 24px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line-strong); }
  .tree .tcol .tsub { width: 70%; height: 6px; border-radius: 3px; background: var(--line-strong); margin-top: 8px; }
  .tree .tcol .tsub.short { width: 46%; }

  /* heuristic scorecard */
  .score { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
  .scorerow { display: flex; align-items: center; gap: 10px; }
  .scorerow .sname { width: 12px; height: 12px; border-radius: 3px; background: var(--line-strong); flex: none; }
  .scorerow .strack { flex: 1; height: 8px; border-radius: 4px; background: rgba(0,0,0,0.06); overflow: hidden; }
  .scorerow .sfill { height: 100%; border-radius: 4px; background: var(--line-strong); }
  .scorerow.crit .sfill { background: var(--accent); }
  .scorerow.crit .sname { background: var(--accent); }

  /* interaction state machine */
  .smachine { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
  .smrow { display: flex; align-items: center; justify-content: center; gap: 9px; }
  .smstate { width: 60px; height: 38px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; }
  .smstate i { width: 22px; height: 5px; border-radius: 3px; background: var(--line-strong); }
  .smstate.is-on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .smstate.is-on i { background: var(--accent); }
  .smarrow { color: var(--ink-3); font-size: 15px; line-height: 1; flex: none; }
  .smloop { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-3); font-size: 14px; }
  .smloop::before, .smloop::after { content: ''; height: 1px; width: 40px; background: var(--line-strong); }

  /* accessibility: stronger contrast for process viz on dark bg */
  .process-viz .a-label,
  .process-viz .vnode:not(.is-key) .vname,
  .process-viz .vloop-return { color: var(--ink-2); }
  .process-viz .varrow,
  .process-viz .smarrow,
  .process-viz .smloop { color: #9494A4; }
  .process-viz .vnode:not(.is-key) .vbar,
  .process-viz .tstem,
  .process-viz .tbranch::before,
  .process-viz .tsub,
  .process-viz .scorerow:not(.crit) .sname,
  .process-viz .scorerow:not(.crit) .sfill,
  .process-viz .smstate:not(.is-on) i { background: #6E6E80; }
  .process-viz .vnode:not(.is-key) .vbox,
  .process-viz .tleaf,
  .process-viz .smstate:not(.is-on) { border-color: #5E5E70; }
  .process-viz .vloop-return::before,
  .process-viz .vloop-return::after,
  .process-viz .smloop::before,
  .process-viz .smloop::after { background: #5E5E70; }
  .process-viz .strack { background: rgba(255,255,255,0.10); }
  .process-viz .troot { background: var(--accent-soft); border-color: var(--accent); }

  .cs-img-block {
    margin-top: 44px;
    border-radius: 4px;
    overflow: hidden;
    padding: clamp(24px, 4vw, 64px);
    display: flex;
    justify-content: center;
  }

  /* full-bleed image carousel */
  .cs-carousel-wrap {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    margin-top: clamp(40px, 6vh, 72px);
    margin-bottom: 0;
  }
  .cs-carousel-wrap::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
    right: 0;
    background: none;
  }
  .cs-carousel-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: marquee 30s linear infinite;
  }
  .cs-carousel-wrap:hover .cs-carousel-track { animation-play-state: paused; }
  .cs-carousel-item {
    flex: none;
    width: 440px;
    height: 777px;
    border-radius: 16px;
    border: 1px solid #45474D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--ink-3);
    font-family: var(--font-display);
    overflow: hidden;
  }
  .cs-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;
  }

  .metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    margin-top: 40px;
  }
  .metric { padding: 28px 28px 0 0; }
  .metric + .metric { padding-left: 28px; border-left: 1px solid var(--line); }
  .metric .num {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(44px, 6vw, 84px);
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--accent);
  }
  .metric .lbl {
    font-size: 13px;
    color: var(--ink-2);
    margin-top: 12px;
    max-width: 220px;
  }

  .cs-quote {
    margin-top: clamp(64px, 10vh, 120px);
    padding: 0 var(--pad);
    text-align: center;
  }
  .cs-quote blockquote {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(24px, 3.2vw, 44px);
    letter-spacing: -0.015em;
    line-height: 1.2;
    max-width: 880px;
    margin: 0 auto;
    text-wrap: balance;
  }
  .cs-quote cite {
    display: block;
    font-family: var(--font-body);
    font-style: normal;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-top: 24px;
  }

  .next-project {
    margin-top: clamp(80px, 13vh, 160px);
    border-top: 1px solid var(--line);
    padding: clamp(48px, 8vh, 90px) var(--pad);
    display: block;
    text-align: center;
  }
  .next-project .np-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
    display: block;
    margin-bottom: 18px;
  }
  .next-project .np-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(56px, 10vw, 150px);
    letter-spacing: -0.025em;
    line-height: 1;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ink);
    transition: color 0.45s ease;
    display: inline-block;
  }
  .next-project:hover .np-title { color: var(--ink); }

  @media (max-width: 920px) {
    .cs-meta { grid-template-columns: repeat(2, 1fr); }
    .cs-label-row { grid-template-columns: 1fr; gap: 16px; }
    .problem-grid, .artifact-strip { grid-template-columns: 1fr; }
    .artifact { aspect-ratio: auto; min-height: 180px; }
    .metric-row { grid-template-columns: 1fr; }
    .metric + .metric { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  }

  /* ---- DRTWRK hero treatment: dark cinematic background w/ blueprint grid ---- */
  .cs-hero {
    background:
      linear-gradient(to bottom, transparent 0%, transparent 35%, var(--bg) 65%),
      linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.7) 100%),
      url('/assets/drtwrk-hero-bg.png') top right / 100% auto no-repeat #050810;
    color: #fff;
  }
  .cs-hero .eyebrow { color: rgba(255,255,255,0.7); }
  .cs-hero .eyebrow::before { background: #5B9BFF; }
  .cs-hero .hero-index { color: rgba(255,255,255,0.55); }
  .cs-hero .cs-title { color: #fff; }
  .cs-hero .cs-sub { color: rgba(255,255,255,0.78); }
  .cs-hero .cs-meta { border-top-color: rgba(255,255,255,0.18); }
  .cs-hero .cs-meta dt { color: rgba(255,255,255,0.55); }
  .cs-hero .cs-meta dd { color: #fff; }
  /* Nav always light — hero bg is always dark regardless of theme */
  .nav.scrolled {
    background: rgba(0, 0, 0, 0.35) !important;
    border-bottom-color: rgba(255,255,255,0.08) !important;
  }
  .nav-links .u-link {
    color: rgba(255,255,255,0.75) !important;
  }
  .nav-links .u-link:hover {
    color: #fff !important;
  }
  .nav-cta {
    color: #fff !important;
    border-color: rgba(255,255,255,0.55) !important;
  }
  .nav-cta:hover {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
  }
  .theme-toggle {
    color: rgba(255,255,255,0.75) !important;
  }
  .theme-toggle:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.1) !important;
  }

  .cs-hero .cs-hero-media {
    background: transparent;
    padding: 0;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
  }
  .cs-hero .cs-hero-media .mock {
    border-radius: 10px 10px 0 0;
    overflow: hidden;
  }
  .cs-hero .cs-hero-media .mock img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    vertical-align: top;
  }

  /* ---- MacBook mockup + carousel ---- */
  .mb-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vw, 28px);
    max-width: 1240px;
    margin: clamp(40px, 6vh, 72px) auto 0;
    padding: 0 var(--pad);
    position: relative;
    padding-bottom: 36px;
  }
  .macbook { flex: 1 1 auto; min-width: 0; max-width: 1080px; }
  .mb-arrow {
    flex: none;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.05);
    color: #e9e9ee;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .18s, border-color .18s, transform .18s;
    -webkit-tap-highlight-color: transparent;
  }
  .mb-arrow:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.32); }
  .mb-arrow:active { transform: scale(0.92); }
  .mb-dots {
    position: absolute;
    left: 0; right: 0; bottom: -28px;
    display: flex; justify-content: center; gap: 8px;
  }
  .mb-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.22);
    border: 0; padding: 0; cursor: pointer;
    transition: background .2s, width .2s;
  }
  .mb-dot.is-active { background: #e9e9ee; width: 20px; border-radius: 4px; }
  .mb-screen {
    position: relative;
    background: linear-gradient(180deg, #4a4a4e 0%, #2c2c30 6%, #2c2c30 94%, #1c1c1f 100%);
    border-radius: 22px 22px 6px 6px;
    padding: 14px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 22px 50px -18px rgba(0,0,0,0.6);
  }
  .mb-bezel {
    position: relative;
    background: #060607;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.6) inset;
  }
  .mb-notch {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 150px; height: 12px;
    background: #060607;
    border-radius: 0 0 8px 8px;
    z-index: 2;
  }
  .mb-display {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 2px;
    overflow: hidden;
    background: #000;
  }
  .mb-track {
    display: flex;
    width: 100%; height: 100%;
    transition: transform .55s cubic-bezier(.55,.06,.18,1);
    will-change: transform;
  }
  .mb-slide { flex: 0 0 100%; width: 100%; height: 100%; }
  .mb-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .mb-base {
    position: relative;
    width: 106%;
    margin: 0 auto;
    margin-left: -3%;
    height: 16px;
    background: linear-gradient(180deg, #d9dadd 0%, #b6b8bd 30%, #8d9095 70%, #6f7176 100%);
    border-radius: 0 0 11px 11px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 14px 22px -12px rgba(0,0,0,0.5);
  }
  .mb-notch-cut {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 130px; height: 8px;
    background: linear-gradient(180deg, #5b5d61, #75777c);
    border-radius: 0 0 9px 9px;
  }
