/* Work pages. Loaded after styles.css. */
:root {
  --accent: #ffd60a;
  --accent-ink: #151200;
  --accent-text: #806500;
  --surface: #fdfcfa;
  --phone: #151514;
  --phone-edge: #151514;
  --good-bg: #dcf3e5;
  --good-ink: #17603a;
  --warn: #b8392a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent-text: #ffd60a;
    --surface: #181817;
    --phone: #0a0a09;
    --phone-edge: #34332f;
    --good-bg: #173a28;
    --good-ink: #7fe0ab;
    --warn: #ff7a66;
  }
}

.chip {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 99px;
  white-space: nowrap;
}

/* Work index */
.work-list { list-style: none; }
.work-list li + li { margin-top: 12px; }
.work-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
}
.work-list li:last-child .work-entry { border-bottom: 1px solid var(--border); }
.work-entry .name { font-size: 17px; font-weight: 500; color: var(--strong); }
.work-entry .desc { grid-column: 1; color: var(--muted); }
.work-entry .meta { grid-column: 2; grid-row: 1; color: var(--muted); font-size: 13px; }
.work-entry .go { grid-column: 2; grid-row: 2; justify-self: end; color: var(--strong); transition: transform .25s ease; }
.work-entry:hover .go { transform: translateX(3px); }
.work-entry:hover .name { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.work-index h2 { margin-bottom: 4px; }

/* Phone frames */
.phone { margin: 0; }
.phone img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--phone);
  padding: 6px;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--phone-edge);
}
.phone figcaption { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* Case study */
body.case main { padding-top: 40px; }
body.case section:first-child { padding-top: 24px; padding-bottom: 48px; }
body.case h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--strong);
  margin-bottom: 18px;
}
body.case h2 .num {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
}
body.case h3 { font-size: 15px; font-weight: 600; margin: 26px 0 6px; }
body.case .label { font-size: 12px; letter-spacing: .4px; color: var(--muted); margin-bottom: 10px; }
body.case h1 { max-width: none; margin-bottom: 14px; font-size: clamp(34px, 7vw, 48px); letter-spacing: -1px; }
body.case p, body.case li, body.case dd, body.case dt { line-height: 1.7; }
body.case ul.plain { list-style: none; display: grid; gap: 10px; }
body.case ul.plain li { padding-left: 16px; position: relative; }
body.case ul.plain li::before { content: ""; position: absolute; left: 0; top: .8em; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
body.case .sub-label { margin-top: 28px; }

.hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
body.case .hero-top .label { margin: 0; line-height: 1; }
.hero .lead { max-width: 560px; color: var(--text); font-size: 17px; }
.hero .role { margin-top: 14px; color: var(--muted); max-width: 560px; }
.hero .more { margin-top: 22px; }
.hero-phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; }
.hero-phones .phone:nth-child(2) { margin-top: 18px; }

/* Breakout for wide galleries and grids */
.wrap .breakout {
  width: min(1040px, calc(100vw - 48px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 24px; }
.facts dt { font-size: 12px; color: var(--muted); letter-spacing: .3px; }
.facts dd { font-size: 14px; color: var(--strong); line-height: 1.5; }
body.case section.facts-section { padding: 28px 0; }

/* Feature grid */
.features { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; margin-top: 8px; }
.features li { display: block; }
.features .phone { max-width: 220px; margin-bottom: 14px; }
.features h3 { margin: 0 0 4px; }
.features p { color: var(--muted); font-size: 14px; }
.pro { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.pro h3 { margin: 0 0 4px; }
.pro p { color: var(--muted); }

/* Timeline */
.tracks { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; margin-top: 10px; }
.tracks p { font-size: 12px; color: var(--muted); line-height: 1; }
.tl-strip { display: flex; gap: 3px; height: 10px; }
.tl-test { height: 22px; }
.tl-strip.tl-test span { display: flex; align-items: center; padding: 0 8px; font-size: 11px; font-weight: 600; color: var(--good-ink); background: var(--good-bg); white-space: nowrap; overflow: hidden; }
.tl-strip.tl-test .tl-tf { box-shadow: inset 0 0 0 1.5px var(--good-ink); }
.tl-strip span { flex: var(--d) 1 0; background: var(--accent); border-radius: 3px; }
.tl-strip .tl-quiet { background: var(--border); }
.tl-strip .tl-hot { background: var(--accent-ink); box-shadow: inset 0 0 0 2px var(--accent); }
.tl-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.timeline { list-style: none; margin-top: 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline li { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 4px 16px; padding: 0 0 22px 30px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.timeline li.quiet::before { background: var(--bg); box-shadow: inset 0 0 0 2px var(--faint), 0 0 0 3px var(--bg); }
.timeline li.hot::before { width: 16px; height: 16px; left: -2px; top: 4px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.timeline time { font-size: 13px; color: var(--accent-text); font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 1px; }
.timeline strong { display: block; font-weight: 500; color: var(--strong); }
.timeline div span { display: block; color: var(--muted); font-size: 14px; }

/* Process tools */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; margin: 24px 0 36px; }
.tools figcaption { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.tools figcaption strong { color: var(--strong); font-weight: 500; }
.tools img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--border); }
.note-after { margin-top: 14px; }
.note { font-size: 12px; color: var(--muted); margin-top: -18px; }
.shot { margin-top: 18px; }
.shot img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--border); }
.shot figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); }
.pending-box { aspect-ratio: 16 / 10; border-radius: 10px; border: 1px dashed var(--faint); background: var(--surface); display: grid; place-items: center; }
.pending-box span { font-size: 12px; color: var(--muted); letter-spacing: .3px; }

/* Long-form text pieces */
.stats.stats-3 { grid-template-columns: repeat(3, 1fr); }
.tiles-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.closing { margin-top: 28px; }
.experiments figcaption span { display: block; margin-top: 6px; }
.lessons li strong { font-weight: 600; color: var(--strong); }
.card > p + p:not(.tag) { margin-top: 8px; }
.timeline li:not(:has(time)) { grid-template-columns: 1fr; }
.concept-text p + p { margin-top: 10px; }
body.case section > p + p { margin-top: 12px; }

/* Pro features */
.pro-feats { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.pro-feats h3 { margin-top: 0; }
.pro-feats ul { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 14px; }
.pro-feats img { display: block; width: 100%; max-width: 120px; height: auto; margin-bottom: 10px; }
.pro-feats strong { display: block; font-size: 14px; font-weight: 600; color: var(--strong); line-height: 1.4; }
.pro-feats span { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Flow: steps joined by arrows */
.flow { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 28px; margin: 16px 0 6px; }
.flow li { position: relative; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 14px; line-height: 1.45; }
.flow li + li::before { content: ""; position: absolute; left: -19px; top: 50%; width: 8px; height: 8px; border-top: 2px solid var(--faint); border-right: 2px solid var(--faint); transform: translateY(-50%) rotate(45deg); }
.flow strong { display: block; font-size: 14px; font-weight: 600; color: var(--strong); }
.flow span { display: block; font-size: 13px; color: var(--muted); }
.flow svg { display: block; width: 22px; height: 22px; margin-bottom: 8px; fill: none; stroke: var(--accent-text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.flow .key { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.flow .off { background: none; border-style: dashed; border-color: var(--faint); }
.flow .off strong { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--muted); font-weight: 500; }
.flow .off::before { display: none; }
.flow.steps .off + li::before { display: block; }
.flow.loop { margin-bottom: 4px; }
.flow.loop + h3 { margin-top: 34px; }

/* Gamification concepts */
.concept { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px; align-items: center; padding: 26px 0; border-top: 1px solid var(--border); }
.concept:first-of-type { margin-top: 24px; }
body.case .concept h3 { margin: 0 0 6px; font-size: 17px; }
.concept-n { font-size: 12px; font-weight: 600; letter-spacing: .3px; color: var(--accent-text); margin-bottom: 4px; }
.concept figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.xp dl { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 6px 14px; }
.xp dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.xp dl div + div { border-top: 1px solid var(--border); }
.xp dt { color: var(--muted); }
.xp dd { color: var(--strong); font-weight: 500; font-variant-numeric: tabular-nums; }
.xp .sum dt { color: var(--strong); font-weight: 500; }
.xp .sum dd { background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 0 8px; border-radius: 99px; }
.chart svg { display: block; width: 100%; height: auto; }
.c-axis { stroke: var(--border); stroke-width: 1.5; }
.c-zone { fill: var(--border); opacity: .55; }
.c-rust { fill: var(--warn); opacity: .12; }
.c-line { fill: none; stroke: var(--accent-text); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.c-down { stroke: var(--warn); stroke-dasharray: 5 4; }
.c-dot { fill: var(--accent); stroke: var(--accent-text); stroke-width: 1.5; }
.c-t { font-size: 12px; fill: var(--muted); }
.c-warn { fill: var(--warn); font-weight: 600; }
.ladder ol { list-style: none; display: grid; gap: 5px; }
.ladder li { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; }
.ladder li::before { content: ""; flex: none; width: calc(var(--w) * .42); min-width: 6px; height: 14px; border-radius: 3px; background: var(--faint); }
.ladder li.top::before { background: var(--accent); }
.ladder span { color: var(--strong); white-space: nowrap; }
.ladder em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pair-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; padding-top: 28px; border-top: 1px solid var(--border); }
body.case h3.first { margin-top: 8px; }

/* Illustration grids */
.trio ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.trio img { display: block; width: 100%; height: auto; }
.trio strong { display: block; font-size: 13px; font-weight: 600; color: var(--strong); margin-top: 4px; }
.trio span { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trio .top span { color: var(--accent-text); font-weight: 600; }
.badges { list-style: none; display: grid; gap: 22px 12px; margin: 8px 0 28px; }
.badges.ranks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.badges.targets { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.badges li { text-align: center; }
.badges img { display: block; width: 100%; max-width: 150px; height: auto; margin: 0 auto 6px; }
.badges span { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.badges em { display: block; font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 1px; }
.badges strong { display: block; font-size: 13px; font-weight: 500; color: var(--strong); line-height: 1.3; }
.badges.ranks li:last-child strong, .badges.targets li:last-child strong { color: var(--accent-text); }

/* Tags */
.tag { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: 6px; margin: 14px 0 8px; }
.tag-bad { background: var(--accent); color: var(--accent-ink); }
.tag-good { background: var(--good-bg); color: var(--good-ink); }
.tag-off { background: none; box-shadow: inset 0 0 0 1px var(--faint); color: var(--muted); margin-top: 0; }
.card h3 + .tag { margin-top: 0; }
.card > p:not(.tag) { font-size: 14.5px; }
.card .flow { gap: 22px; margin: 14px 0 4px; }
.card .flow li { padding: 10px 12px; background: var(--bg); }
.card .flow li + li::before { left: -16px; }
.tiles { margin: 16px 0 4px; display: grid; gap: 6px; }
.tiles p { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.tiles span { flex: none; width: 44px; }
.tiles i { display: block; height: 16px; width: calc(var(--n) * 8px - 2px); background: repeating-linear-gradient(90deg, var(--faint) 0 6px, transparent 6px 8px); }
.tiles i.on { background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 8px); }
.tiles b { font-weight: 600; color: var(--strong); font-variant-numeric: tabular-nums; }
.pills-ba { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin: 14px 0 2px; }
.pills-ba > div { border: 1px solid var(--border); background: var(--bg); border-radius: 10px; padding: 10px 12px 12px; }
.pills-ba p { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.pp { display: flex; flex-wrap: wrap; gap: 5px; }
.pp i { height: 18px; width: 46px; border-radius: 99px; border: 1px solid var(--faint); }
.pp i:nth-child(3n) { width: 62px; }
.pp i:nth-child(4n+1) { width: 34px; background: var(--accent); border-color: var(--accent); }
.pp i:nth-child(5) { background: var(--border); }
.dd { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--faint); }
.dd span { width: 64px; height: 8px; border-radius: 4px; background: var(--faint); }
.dd svg { width: 12px; height: 12px; fill: none; stroke: var(--strong); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Section contents */
.toc { position: sticky; top: 0; z-index: 20; margin: 0 -24px; padding: 0 24px; background: var(--bg); border-bottom: 1px solid var(--border); }
.toc-toggle { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; font-size: 14px; color: var(--strong); }
.toc-toggle:focus-visible { outline: 2px solid var(--faint); outline-offset: 2px; }
.toc-now { display: flex; align-items: center; gap: 10px; }
.toc-n { font-size: 11px; font-weight: 600; min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.toc-of { font-size: 12px; color: var(--muted); }
.toc-of::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
.toc.open .toc-of::after { transform: translateY(0) rotate(-135deg); }
.toc-title { display: none; }
.toc ol { list-style: none; display: none; padding: 0 0 12px; }
.toc.open ol { display: grid; }
.toc ol a { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; color: var(--muted); text-decoration: none; }
.toc ol a span { font-size: 11px; min-width: 18px; color: var(--faint); font-variant-numeric: tabular-nums; }
.toc ol a[aria-current] { color: var(--strong); }
.toc ol a[aria-current] span { color: var(--accent-text); font-weight: 600; }
.toc-bar { height: 2px; margin: 0 -24px; background: transparent; overflow: hidden; }
.toc-bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
body.case main section[id] { scroll-margin-top: 64px; }

@media (min-width: 1120px) {
  .toc { position: fixed; top: 50%; left: 32px; transform: translateY(-50%); width: 168px; margin: 0; padding: 0; background: none; border: 0; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .toc.is-active { opacity: 1; pointer-events: auto; }
  .toc-toggle { display: none; }
  .toc-title { display: block; font-size: 12px; letter-spacing: .4px; color: var(--muted); margin-bottom: 10px; }
  .toc ol { display: grid; gap: 0; padding: 0; border-left: 1px solid var(--border); }
  .toc ol a { padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13px; }
  .toc ol a:hover { color: var(--strong); }
  .toc ol a[aria-current] { border-left-color: var(--accent); }
  .toc-bar { display: none; }
  body.case main section[id] { scroll-margin-top: 24px; }
  .wrap .breakout { width: min(1040px, calc(100vw - 416px)); }
}

/* Problem cards */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 8px; }
.card { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 20px 22px; }
.card h3 { margin: 0 0 12px; }
.card dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 16px; }
.card dt { font-size: 12px; letter-spacing: .3px; color: var(--muted); padding-top: 3px; }
.card dd + dt { margin-top: 10px; }
.card dd { font-size: 14.5px; }
.card .shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.card .shots .phone img { padding: 4px; border-radius: 14px; }

/* Table */
.table-scroll { overflow-x: auto; margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.table-scroll caption { text-align: left; font-size: 13px; color: var(--muted); padding: 0 0 8px; caption-side: top; }
.table-scroll th, .table-scroll td { text-align: left; padding: 11px 14px; vertical-align: top; border-top: 1px solid var(--border); }
.table-scroll thead th { border-top: 0; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .3px; }
.table-scroll tbody th { font-weight: 500; color: var(--strong); width: 30%; }
.table-scroll td:last-child { white-space: nowrap; color: var(--strong); }
.table-note { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Decisions */
.decisions { list-style: none; margin-top: 8px; }
.decisions li { display: grid; grid-template-columns: 220px 1fr; gap: 6px 24px; padding: 14px 0; border-top: 1px solid var(--border); }
.decisions li:last-child { border-bottom: 1px solid var(--border); }
.decisions strong { font-weight: 500; color: var(--strong); }
.decisions span { color: var(--muted); }
.dropped { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.dropped article { border: 1px dashed var(--faint); border-radius: 12px; padding: 16px 18px 18px; }
.dropped .wide { grid-column: 1 / -1; }
.experiments { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin: 16px 0 10px; }
.experiments figcaption { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.experiments figcaption strong { color: var(--strong); font-weight: 500; }
.experiments svg { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.x-floor { stroke: var(--faint); stroke-width: 2; fill: none; }
.x-line { stroke: var(--strong); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.x-thick { stroke-width: 9; }
.x-bar { stroke-width: 4; }
.x-fill { fill: var(--surface); stroke: var(--strong); stroke-width: 3; }
.x-thick-s { stroke-width: 3; }
.x-plate { fill: var(--accent); stroke: var(--strong); stroke-width: 2.5; }
.x-gaze { stroke: var(--accent-text); stroke-width: 2.5; stroke-dasharray: 4 4; fill: none; }
.x-arrow { stroke: var(--accent-text); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.x-phone { fill: var(--phone); stroke: var(--phone-edge); stroke-width: 2; }
.x-ring { fill: none; stroke: var(--accent); stroke-width: 3; }
.x-ring2 { fill: var(--accent); }
.x-note { font-size: 11px; fill: var(--muted); }
.x-key { fill: var(--accent-text); font-weight: 600; }
.x-cup { fill: var(--accent); stroke: var(--strong); stroke-width: 3; }
.x-dot { fill: var(--strong); }
.x-beep { fill: none; stroke: var(--accent-text); stroke-width: 3; stroke-linecap: round; }
.x-wave { fill: none; stroke: var(--faint); stroke-width: 2.5; stroke-linecap: round; }
.x-spike { fill: none; stroke: var(--accent-text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dropped h4 { font-size: 15px; font-weight: 600; color: var(--strong); margin: 10px 0 4px; }
.dropped p:not(.tag) { font-size: 14px; color: var(--muted); }
.decisions + h3 { margin-top: 34px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 8px 0 28px; }
.stats div { border-top: 2px solid var(--accent); padding-top: 12px; }
.stats strong { display: block; font-size: 34px; line-height: 1.1; font-weight: 500; letter-spacing: -1px; color: var(--strong); font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--muted); line-height: 1.4; display: block; margin-top: 4px; }

/* Gallery */
.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 16px;
  margin-top: 32px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}
.gallery .phone { flex: 0 0 200px; scroll-snap-align: start; }
.gallery:focus-visible { outline: 2px solid var(--faint); outline-offset: 2px; }
.gallery-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Before / after */
.ba { margin-top: 48px; }
.ba .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 24px; margin-top: 14px; }
.ba .tagline { font-size: 12px; font-weight: 500; letter-spacing: .3px; color: var(--accent-text); margin-bottom: 8px; }

/* Lessons */
.lessons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; margin-top: 20px; }
.lessons h3 { margin-top: 0; }

.end { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.end .more { margin-top: 0; }

@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  body.case main { padding-top: 24px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .features { gap: 32px 16px; }
  .pro { grid-template-columns: 96px 1fr; gap: 16px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .tools { grid-template-columns: 1fr; gap: 24px; }
  .badges.ranks, .badges.targets { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 8px; }
  .badges strong { font-size: 12px; }
  .stats.stats-3 { grid-template-columns: 1fr 1fr 1fr; gap: 16px 12px; }
  .pro-feats ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .flow { grid-auto-flow: row; gap: 22px; }
  .flow li + li::before, .card .flow li + li::before { left: 50%; top: -15px; transform: translateX(-50%) rotate(135deg); }
  .card .flow { gap: 20px; }
  .concept { grid-template-columns: 1fr; padding: 22px 0; }
  .pair-shots { gap: 8px; }
  .dropped { grid-template-columns: 1fr; }
  .experiments { grid-template-columns: 1fr; }
  .tiles p { flex-wrap: wrap; gap: 4px 8px; }
  .tiles span { width: 100%; }
  .tiles i { width: calc(var(--n) * 7px - 2px); background: repeating-linear-gradient(90deg, var(--faint) 0 5px, transparent 5px 7px); }
  .tiles i.on { background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 7px); }
  .pills-ba { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 18px; }
  .card dl { grid-template-columns: 1fr; }
  .card dd + dt { margin-top: 12px; }
  .card .shots { grid-template-columns: repeat(2, 1fr); }
  .decisions li { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .stats strong { font-size: 30px; }
  .gallery .phone { flex-basis: 170px; }
  .ba .pair { gap: 14px; }
  .lessons { grid-template-columns: 1fr; gap: 0; }
  .work-entry { grid-template-columns: 1fr; }
  .work-entry .meta, .work-entry .go { grid-column: 1; grid-row: auto; justify-self: start; }
  .hero-phones { gap: 8px; }
}
