/* Shared styles for case study pages (case-*.html). Same tokens as index.html. */
  /* Same tokens as index.html */
  :root {
    --bg: #F4F3F0; --bg-alt: #EAE8E3; --ink: #111111; --gray: #6E6E6E; --light: #9A9A9A;
    --line: #E2E0DA; --panel: #0B0B0B; --panel-dim: #7A7A7A; --panel-soft: #BDBDBD; --accent: #0E7C7B;
    --todo: #FFF1B8;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --edge: 40px; --menu-w: 300px; --content-left: 400px; --content-right: 120px;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.3; }
  .muted { color: var(--gray); }

  /* Draft placeholders — things Yohanes still needs to fill in. Remove the highlight before publishing. */
  mark.todo { background: var(--todo); color: var(--ink); padding: 0 .2em; border-radius: 2px; }

  .grid-lines { position: fixed; inset: 0 var(--edge); display: grid; grid-template-columns: repeat(11, 1fr); pointer-events: none; z-index: 0; }
  .grid-lines span { border-left: 1px dashed var(--line); }
  .grid-lines span:last-child { border-right: 1px dashed var(--line); }

  /* Top bar */
  .topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 24px var(--edge) 0; }
  .topbar nav { display: flex; align-items: center; gap: 28px; }
  .topbar a { text-decoration: none; }
  .topbar a:hover { text-decoration: underline; }
  .pill { background: var(--panel); color: #fff; padding: 6px 10px; }
  .pill:hover { text-decoration: none !important; background: #2a2a2a; }

  /* Floating "on this page" panel (same look as the home menu) */
  .side {
    position: fixed; z-index: 20; left: var(--edge); top: 96px; width: var(--menu-w);
    background: var(--panel); color: #fff; border-radius: 8px; padding: 20px;
    display: flex; flex-direction: column; gap: 40px;
    box-shadow: 0 24px 48px rgba(0,0,0,.18);
  }
  .side-head { display: flex; justify-content: space-between; font-size: 11px; }
  .side-head a { text-decoration: none; color: var(--panel-dim); }
  .side-head a:hover { color: #fff; }
  .side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .side li a { display: flex; align-items: baseline; gap: 14px; text-decoration: none; color: var(--panel-soft); transition: color .2s ease, transform .2s ease; }
  .side li a .num { font-size: 11px; color: var(--panel-dim); width: 18px; }
  .side li a .label { font-size: 24px; font-weight: 500; letter-spacing: -.03em; line-height: 1.35; }
  .side li a:hover { color: #fff; transform: translateX(4px); }
  .side li a[aria-current="true"], .side li a[aria-current="true"] .num { color: #fff; }
  .side-foot { font-size: 10px; color: var(--panel-dim); }
  .side-foot a { text-decoration: none; color: #fff; }
  .side-foot a:hover { text-decoration: underline; }

  main, footer, .next { position: relative; z-index: 1; } /* keep content above the fixed grid lines */
  .wrap { padding: 0 var(--content-right) 0 var(--content-left); }

  /* Case hero */
  .case-hero { padding-top: 160px; }
  .eyebrow { color: var(--gray); margin: 0 0 28px; }
  h1 { font-size: clamp(44px, 5vw, 72px); font-weight: 500; letter-spacing: -.045em; line-height: 1; margin: 0 0 28px; max-width: 15ch; }
  .lede { font-size: 22px; line-height: 1.5; color: var(--gray); margin: 0; max-width: 46ch; }
  .meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 56px 0 0; }
  .meta div { border-top: 1px solid var(--line); padding-top: 16px; }
  .meta dt { color: var(--light); font-size: 11px; margin-bottom: 8px; }
  .meta dd { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.4; }

  figure { margin: 0; }
  .shot {
    margin-top: 72px; aspect-ratio: 16 / 9; background: var(--bg-alt); border-radius: 4px;
    display: grid; place-items: center; text-align: center; padding: 24px;
    border: 1px dashed #CFCBC2;
  }
  figcaption { margin-top: 12px; color: var(--light); font-size: 13px; }

  /* Body sections */
  .block { padding-top: 120px; scroll-margin-top: 40px; }
  .block h2 { font-size: 40px; font-weight: 500; letter-spacing: -.04em; line-height: 1.05; margin: 0 0 32px; }
  .block p { font-size: 18px; line-height: 1.65; color: var(--gray); margin: 0 0 20px; max-width: 64ch; }
  .block p strong { color: var(--ink); font-weight: 500; }
  .block .label { color: var(--gray); margin: 0 0 20px; }

  .pull { font-size: 28px; line-height: 1.35; letter-spacing: -.02em; font-weight: 500; color: var(--ink); margin: 48px 0; max-width: 32ch; padding-left: 24px; border-left: 2px solid var(--ink); }

  .list { list-style: none; margin: 8px 0 0; padding: 0; max-width: 64ch; }
  .list li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.55; color: var(--gray); }
  .list li:last-child { border-bottom: 1px solid var(--line); }
  .list li .n { color: var(--light); font-size: 12px; padding-top: 4px; }
  .list li strong { color: var(--ink); font-weight: 500; }

  .steps { display: grid; gap: 0; margin-top: 8px; }
  .step { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 28px 0; border-top: 1px solid var(--line); }
  .step:last-child { border-bottom: 1px solid var(--line); }
  .step h3 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
  .step p { font-size: 17px; margin: 0; }

  .decisions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
  .decision { background: #fff; border-radius: 6px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
  .decision h3 { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
  .decision p { margin: 0; font-size: 15px; line-height: 1.6; }
  .decision .tradeoff { border-top: 1px solid var(--line); padding-top: 14px; color: var(--ink); }

  .metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
  .metric { border-top: 2px solid var(--ink); padding-top: 18px; }
  .metric .big { font-size: 56px; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
  .metric .what { margin-top: 10px; font-size: 15px; color: var(--gray); line-height: 1.5; }

  /* Next case */
  .next { display: block; margin-top: 160px; padding: 80px var(--content-right) 80px var(--content-left); background: var(--bg-alt); text-decoration: none; }
  .next .mono { color: var(--gray); }
  .next .title { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-top: 18px; font-size: clamp(36px, 5vw, 72px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
  .next .arrow { transition: transform .25s ease; }
  .next:hover .arrow { transform: translateX(8px); }
  footer { background: var(--bg-alt); display: flex; justify-content: space-between; padding: 0 var(--content-right) 36px var(--content-left); color: var(--light); font-size: 14px; }

  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .js .reveal { opacity: 1; transform: none; transition: none; } }

  @media (max-width: 1200px) {
    :root { --menu-w: 240px; --content-left: 320px; --content-right: 64px; }
    .decisions, .metrics { grid-template-columns: 1fr 1fr; }
    .step { grid-template-columns: 1fr; gap: 8px; }
  }
  @media (max-width: 900px) {
    :root { --edge: 20px; --content-left: 20px; --content-right: 20px; }
    .grid-lines { grid-template-columns: repeat(4, 1fr); }
    .grid-lines span:nth-child(n+5) { display: none; }
    .topbar .hide-sm { display: none; }
    .side { display: none; }
    .case-hero { padding-top: 112px; }
    .lede { font-size: 18px; }
    .meta { grid-template-columns: 1fr 1fr; }
    .block { padding-top: 88px; }
    .block h2 { font-size: 30px; }
    .pull { font-size: 22px; }
    .decisions, .metrics { grid-template-columns: 1fr; }
    .metric .big { font-size: 44px; }
    .next { margin-top: 112px; padding: 56px 20px; }
    footer { flex-direction: column; gap: 4px; }
  }
