/* getkeysolutions.com homepage, Oct 31 2026. Casebook grammar on the KEY black-and-white identity.
   One accent: KEY lime, used as a highlighter for what was found or fixed. Fonts are the site's own subsets. */
@font-face { font-family: 'DM Sans Fallback'; src: local('Arial'), local('Liberation Sans'); size-adjust: 104.33%; ascent-override: 95%; descent-override: 25%; line-gap-override: 0%; }
@font-face { font-family: 'Manrope Fallback'; src: local('Arial'), local('Liberation Sans'); size-adjust: 103.09%; ascent-override: 98%; descent-override: 25%; line-gap-override: 0%; }
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/dm-sans-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; src: url('/assets/fonts/manrope-latin.woff2') format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #ffffff; --mist: #f4f5f2; --line: #d9deda; --line-2: #c3cac5;
  --ink: #17191b; --ink-2: #3f4643; --ink-3: #5a625d;
  --night: #17191b; --night-2: #1f2325; --night-3: #2a2f31; --night-line: #3a403d;
  --on-night: #ffffff; --on-night-2: #c5ccc7;
  --lime: #cfed9b; --lime-2: #b7dc78;
  --font: 'DM Sans', 'DM Sans Fallback', Arial, sans-serif;
  --display: Manrope, 'Manrope Fallback', Arial, sans-serif;
  --bar-h: 64px;
  --gutter: clamp(1rem, 4.4vw, 4.5rem);
  --maxw: 80rem;
  --r: 14px; --r-sm: 10px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow-1: 0 1px 2px rgb(23 25 27 / 0.10), 0 4px 12px -2px rgb(23 25 27 / 0.12);
  --shadow-2: 0 2px 4px rgb(23 25 27 / 0.10), 0 14px 32px -8px rgb(23 25 27 / 0.28);
  --shadow-3: 0 4px 10px rgb(23 25 27 / 0.12), 0 30px 60px -18px rgb(23 25 27 / 0.40);

  /* Scrollcraft engine tokens, themed (the engine itself is unmodified). */
  --sc-canvas: #ffffff; --sc-surface: #f4f5f2; --sc-ink: #17191b; --sc-ink-soft: #5a625d;
  --sc-accent: #17191b; --sc-accent-ink: #ffffff;
  --sc-font-display: var(--display); --sc-font-text: var(--font);
}

/* No script, or a script that failed: every reveal is simply visible (boot.js removes .sc-js after 2.5 s). */
html:not(.sc-js) :is([data-sc-cue], [data-sc-in], [data-sc-stagger] > *) { opacity: 1 !important; transform: none !important; }
html:not(.sc-js) [data-sc-reveal] { clip-path: none !important; }
.sc-now { transition: none !important; }

html { scroll-padding-top: calc(var(--bar-h) + 12px); }
body { background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; letter-spacing: -0.003em; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
img { height: auto; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.on-night :focus-visible, .cases :focus-visible, .range :focus-visible, .intake :focus-visible, .foot :focus-visible { outline-color: var(--lime); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: 10px; z-index: 100; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: var(--r-sm); transform: translateY(-160%); transition: transform 160ms var(--ease); }
.skip:focus { transform: none; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.ico { width: 1.05em; height: 1.05em; flex: none; }

/* highlighter: the one accent, marking what was found or fixed */
.hi { background: linear-gradient(transparent 56%, var(--lime) 56%, var(--lime) 93%, transparent 93%); color: inherit; padding-inline: 0.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: #fff; font: 700 0.72rem/1.5 var(--font); letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 0.12em; }
.tag--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; text-decoration-color: var(--lime-2); transition: text-decoration-color 160ms var(--ease); }
.link:hover { text-decoration-color: currentColor; }

/* buttons: rectangular, equal height, one label per intent */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: var(--r-sm); border: 0; font: 700 0.98rem/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease), transform 120ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #2b3033; }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--line:hover { background: var(--mist); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--lime); }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 1.05rem; }
.btn--wide { width: 100%; min-height: 54px; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 0.9rem; }

/* ---------------------------------------------------------------- bar -- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--bar-h); display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); padding-inline: var(--gutter); background: #fff; box-shadow: 0 1px 0 var(--line); }
.bar__mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-height: 44px; }
.kmark { width: 34px; height: 34px; flex: none; }
.bar__name { display: grid; line-height: 1.12; }
.bar__name strong { font: 800 1.02rem/1.1 var(--display); letter-spacing: -0.02em; }
.bar__name span { font-size: 0.8rem; color: var(--ink-3); }
.bar__nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.bar__nav a { position: relative; text-decoration: none; font-weight: 600; font-size: 0.95rem; padding-block: 10px; color: var(--ink-2); transition: color 160ms var(--ease); }
.bar__nav a:hover, .bar__nav a.is-here { color: var(--ink); }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; border-radius: 2px; background: var(--lime-2); transform: scaleX(0); transform-origin: 0 50%; transition: transform 220ms var(--ease); }
.bar__nav a.is-here::after { transform: scaleX(1); }
.bar__menu { display: none; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--ink); background: #fff; font-weight: 700; cursor: pointer; }
.bar__cta { min-height: 44px; }
@media (max-width: 899px) {
  :root { --bar-h: 58px; }
  .bar__menu { display: inline-flex; align-items: center; }
  .bar__nav { position: absolute; top: var(--bar-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px; background: #fff; box-shadow: 0 1px 0 var(--line), 0 18px 30px -18px rgb(23 25 27 / 0.3); display: none; }
  .bar.is-open .bar__nav { display: flex; }
  .bar__nav a { padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .bar__nav a::after { display: none; }
  .bar__name span { display: none; }
}
@media (max-width: 520px) {
  .bar { gap: 8px; }
  .bar__name strong { font-size: 0.96rem; white-space: nowrap; }
  .bar__menu { padding: 0 12px; }
  .bar__cta { padding: 0 14px; }
}
@media (max-width: 359px) { .bar__name { display: none; } }

/* --------------------------------------------------------------- hero --
   Planes: far (ruled casebook page), focal (photo window + head that breaks its top edge), near (plaque, phone).
   Each plane reads the act's --sc-p; the copy never moves with scroll. */
.hero { --hp: clamp(0, calc((var(--sc-p, 0.5) - 0.5) * 2), 1);
  --win-w: min(36rem, 38vw, calc((100svh - var(--bar-h)) * 0.68));
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr); gap: 2rem;
  min-height: max(640px, 100svh); padding: var(--bar-h) var(--gutter) 0; background: var(--paper); overflow: clip; }
.hero__copy { align-self: center; max-width: 41rem; padding-block: 3.5rem 5.5rem; }
.hero__title { margin-top: 0; font: 800 clamp(2.6rem, 1.25rem + 4.1vw, 5.2rem)/0.98 var(--display); letter-spacing: -0.042em; text-wrap: balance; }
.hero__turn { display: block; margin-top: 0.08em; }
.hero__title .hi { background-repeat: no-repeat; background-size: 100% 100%; }
.hero__intro { margin-top: 1.4rem; max-width: 38ch; font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero__scene { position: relative; min-height: 520px; }
.plane { position: absolute; inset: 0; will-change: transform; }
.lean { position: absolute; inset: 0; }
.plane--far { transform: translate3d(0, calc(var(--hp) * 80px), 0); }
.plane--focal { transform: translate3d(0, calc(var(--hp) * 36px), 0); z-index: 1; }
.plane--near { transform: translate3d(0, calc(var(--hp) * -130px), 0); z-index: 2; pointer-events: none; }
.hero__sheet { position: absolute; right: calc(4% + var(--win-w) * 0.42); bottom: 9%; width: calc(var(--win-w) * 0.86); aspect-ratio: 1;
  border-radius: 21%; background-color: var(--mist);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, #e3e7e3 31px 32px);
  box-shadow: inset 0 0 0 1px #e6e9e6; }
.settle--focal { position: absolute; right: 4%; bottom: 0; width: var(--win-w); aspect-ratio: 1700 / 1996; }
.window { position: absolute; inset: 0; border-radius: 21%; overflow: hidden; background: #2c3a2b; box-shadow: var(--shadow-2); }
/* The window shows the photo from mid-hair down (crop rows 280 to 2276 of 2276); the head image is the same photo's
   cutout, aligned pixel for pixel, opaque above the window edge and fading out just below it. */
.window__photo, .window__head { position: absolute; left: -10%; top: -14.03%; width: 120%; max-width: none; }
.window__head { -webkit-mask-image: linear-gradient(to bottom, #000 0 28%, transparent 31%); mask-image: linear-gradient(to bottom, #000 0 28%, transparent 31%); pointer-events: none; }
.window__dot { position: absolute; right: 8%; top: 7%; width: 8%; aspect-ratio: 1; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px var(--ink); }
.artifact { position: absolute; }
.artifact img { width: 100%; }
.artifact--plaque { width: calc(var(--win-w) * 0.36); right: calc(4% + var(--win-w) * 0.8); bottom: 7%; filter: drop-shadow(0 18px 22px rgb(23 25 27 / 0.32)) drop-shadow(0 2px 3px rgb(23 25 27 / 0.25)); }
.artifact--phone { width: calc(var(--win-w) * 0.27); right: calc(4% - var(--win-w) * 0.02); bottom: -6%; padding: 5px; border-radius: 22px; background: #0e1011; box-shadow: var(--shadow-3); }
.artifact--phone img { border-radius: 17px; }
@media (hover: hover) and (pointer: fine) {
  .lean--focal { transform: translate3d(calc(var(--mx, 0) * -7px), calc(var(--my, 0) * -5px), 0); }
  .lean--near { transform: translate3d(calc(var(--mx, 0) * 16px), calc(var(--my, 0) * 10px), 0); }
}
@keyframes settle-up { from { opacity: 0; transform: translate3d(0, 30px, 0) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes marker { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
@keyframes dot-tap { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
.hero.is-intro .settle--focal { animation: settle-up 900ms var(--ease) both; }
.hero.is-intro .settle--a { animation: settle-up 900ms 200ms var(--ease) both; }
.hero.is-intro .settle--b { animation: settle-up 900ms 320ms var(--ease) both; }
.hero.is-intro .hi { animation: marker 650ms 700ms var(--ease) both; }
.hero.is-intro .window__dot { animation: dot-tap 600ms 1000ms var(--ease) both; }
@media (max-width: 899px) {
  .hero { --win-w: min(84vw, 25rem); grid-template-columns: 1fr; gap: 0; min-height: 0; padding-top: calc(var(--bar-h) + 1.4rem); }
  .hero__copy { padding-block: 0.4rem 1.2rem; }
  .hero__title { font-size: clamp(2.15rem, 1.2rem + 4.6vw, 3.4rem); }
  .hero__intro { margin-top: 1rem; }
  .hero__actions { margin-top: 1.4rem; }
  .hero__actions .btn { flex: 1 1 10rem; }
  .hero__scene { min-height: 0; height: calc(var(--win-w) * 1.36); margin-top: 0.5rem; }
  .settle--focal { right: auto; left: 50%; translate: -46% 0; }
  .hero__sheet { right: auto; left: 0; bottom: 14%; width: calc(var(--win-w) * 0.7); }
  .artifact--plaque { right: auto; left: max(0px, calc(50% - var(--win-w) * 0.62)); width: calc(var(--win-w) * 0.34); bottom: 5%; }
  .artifact--phone { right: max(0px, calc(50% - var(--win-w) * 0.6)); width: calc(var(--win-w) * 0.26); bottom: -4%; }
}

/* -------------------------------------------------------------- cases --
   Recognition: six problems in an owner's words on a dark page, ruled like a case index. */
.cases { position: relative; z-index: 3; background: var(--night); color: var(--on-night); padding-top: clamp(4.5rem, 9vw, 8.5rem); }
.cases__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 1.5rem 3rem; align-items: end; }
.cases__title { font: 800 clamp(2.8rem, 1.7rem + 4.4vw, 6rem)/0.95 var(--display); letter-spacing: -0.045em; }
.cases__lede { max-width: 36ch; color: var(--on-night-2); font-size: 1.08rem; }
.cases__list { list-style: none; padding: 0; margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--night-line); }
.case { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: clamp(1.5rem, 4vw, 4rem); row-gap: 0.55rem; padding-block: clamp(1.5rem, 2.6vw, 2.2rem); border-bottom: 1px solid var(--night-line); align-items: start; }
.case__problem { grid-row: 1 / span 2; font: 700 clamp(1.45rem, 1rem + 1.5vw, 2.35rem)/1.08 var(--display); letter-spacing: -0.025em; text-wrap: balance; }
.case__fix { grid-column: 2; color: var(--on-night); line-height: 1.5; text-wrap: pretty; }
.case__with { grid-column: 2; color: var(--on-night-2); font-size: 0.86rem; letter-spacing: 0.01em; }
.me { grid-column: 3; grid-row: 1 / span 2; align-self: center; min-height: 44px; min-width: 9.5rem; padding: 0 16px; border-radius: var(--r-sm); border: 1.5px solid var(--on-night-2); background: transparent; color: var(--on-night); font: 700 0.92rem/1 var(--font); cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease); }
.me:hover { border-color: #fff; }
.me[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.cases__quiet { padding: clamp(8rem, 22vh, 13rem) 0 clamp(9rem, 25vh, 15rem); margin-left: auto; max-width: 17ch; text-align: right; font: 700 clamp(1.7rem, 1.2rem + 2vw, 3.1rem)/1.08 var(--display); letter-spacing: -0.03em; color: var(--on-night); }
@media (max-width: 899px) {
  .cases__head { grid-template-columns: 1fr; }
  .case { grid-template-columns: 1fr; grid-template-rows: none; }
  .case__problem, .case__fix, .case__with, .me { grid-column: 1; grid-row: auto; }
  .case__fix { margin-top: 0.3rem; }
  .me { justify-self: start; margin-top: 0.6rem; }
  .cases__quiet { max-width: 14ch; }
}

/* -------------------------------------------------------------- trail --
   The peak. Pile on the left, four-state board on the right; the summary lands where the pile was. */
.trail { background: var(--mist); }
.trail__stage { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.3fr); grid-template-rows: auto minmax(0, 1fr);
  column-gap: clamp(1.5rem, 3.5vw, 4rem); row-gap: 1rem; padding: calc(var(--bar-h) + 1.2rem) var(--gutter) 1.4rem; background: var(--mist); }
.trail__head { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 0.7rem 2rem; }
.trail__title { font: 800 clamp(1.7rem, 1.05rem + 2.2vw, 3rem)/1 var(--display); letter-spacing: -0.035em; }
.trail__choose { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.trail__choose button { min-height: 44px; padding: 0 16px; border-radius: var(--r-sm); border: 1.5px solid var(--ink); background: #fff; color: var(--ink); font: 700 0.92rem/1 var(--font); cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.trail__choose button:hover { background: var(--lime); }
.trail__choose button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.trail__case { grid-column: 1 / -1; font-size: 0.93rem; color: var(--ink-2); }
.trail__case [data-trail-title] { font-weight: 700; color: var(--ink); }
.trail__pile { grid-column: 1; grid-row: 2; position: relative; z-index: 4; min-height: 0; }
.trail__board { grid-column: 2; grid-row: 2; align-self: center; z-index: 2; display: grid; gap: 9px; }
.trail__fallback { max-width: 52ch; color: var(--ink-2); }
.tb-row { display: grid; grid-template-columns: minmax(0, 1.15fr) repeat(4, minmax(0, 1fr)); gap: 9px; }
.tb-row--head { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.tb-row--head > * { padding-inline: 0.5rem; }
.tb-job { align-self: center; display: grid; gap: 0.1rem; font-weight: 700; font-size: 1rem; line-height: 1.2; padding-right: 0.4rem; }
.tb-job small { font-weight: 500; font-size: 0.88rem; color: var(--ink-2); }
.tb-job--head { font-size: inherit; font-weight: inherit; }
.tb-cell { position: relative; display: flex; align-items: center; min-height: 5.2rem; padding: 0.55rem 0.7rem; border-radius: var(--r-sm); background: #fff; border: 1px dashed var(--line-2); font-size: 0.9rem; line-height: 1.25; overflow: hidden; }
.tb-cell.is-filled { border-style: solid; border-color: var(--line); }
.tb-stamp { position: relative; display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; opacity: 0; }
.tb-cell--waiting .tb-stamp { opacity: 1; color: var(--ink-3); font-weight: 500; }
.tb-cell--gap { border: 1.5px dashed var(--ink); }
.tb-cell--gap::before { content: ""; position: absolute; inset: 0; background: var(--lime); transform: scaleX(var(--lit, 0)); transform-origin: 0 50%; }
.tb-gap { position: relative; display: grid; gap: 0.3rem; opacity: 0; }
.tb-gap__label { font-size: 0.82rem; line-height: 1.25; color: var(--ink); }
.tb-gap__flag { justify-self: start; padding: 3px 8px; border-radius: 5px; background: var(--ink); color: #fff; font-weight: 700; font-size: 0.8rem; }
.trail__end { grid-column: 1; grid-row: 2; align-self: center; z-index: 3; display: grid; gap: 0.6rem; max-width: 26rem; opacity: 0; padding-bottom: 0.4rem; }
.trail__summary { display: grid; gap: 0.2rem; font: 800 clamp(1.6rem, 1.05rem + 1.8vw, 2.8rem)/1.05 var(--display); letter-spacing: -0.035em; }
.trail__summary span { display: block; }
.trail__owner { color: var(--ink-2); font-size: 1.08rem; max-width: 34ch; }
.scrap { position: absolute; width: clamp(11rem, 15.5vw, 14.5rem); padding: 0.65rem 0.8rem 0.7rem; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); font-size: 0.88rem; line-height: 1.32; transform-origin: 50% 50%; will-change: transform, opacity; }
.scrap__from { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.25rem; font-weight: 700; font-size: 0.74rem; color: var(--ink-2); }
.scrap__time { margin-left: auto; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scrap--text, .scrap--message { background: #e8ecea; border-color: transparent; border-radius: 16px 16px 16px 5px; }
.scrap--note { background: #f0efe6; border-color: #e0ded0; border-radius: 4px; }
.scrap--invoice, .scrap--quote { border-top: 3px solid var(--ink); border-radius: 6px; }
.scrap--calendar { border-radius: 8px; box-shadow: var(--shadow-1), inset 0 3px 0 var(--line-2); }
/* reduced motion: no pin and no travel. The pile and the finished board both show, in reading order. */
html.trail-static .trail__stage { grid-template-rows: auto auto auto; padding-block: clamp(4rem, 8vw, 6rem); }
html.trail-static .trail__pile { display: flex; flex-wrap: wrap; gap: 10px; align-content: start; }
html.trail-static .scrap { position: static; transform: none !important; opacity: 1 !important; }
html.trail-static .tb-stamp, html.trail-static .tb-gap, html.trail-static .trail__end { opacity: 1 !important; transform: none !important; }
html.trail-static .tb-cell--gap { --lit: 1; }
html.trail-static .trail__end { grid-column: 1 / -1; grid-row: 3; max-width: none; }
@media (max-width: 759px) {
  .trail__stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; row-gap: 0.7rem; padding-top: calc(var(--bar-h) + 0.8rem); padding-bottom: 1rem; }
  .trail__head { grid-template-columns: 1fr; gap: 0.55rem; }
  .trail__title { font-size: 1.55rem; }
  .trail__choose { justify-content: flex-start; gap: 6px; }
  .trail__choose button { min-height: 40px; padding: 0 10px; font-size: 0.82rem; }
  .trail__case { font-size: 0.82rem; }
  .trail__pile { grid-column: 1; grid-row: 2; }
  .trail__board { grid-column: 1; grid-row: 3; gap: 5px; }
  .trail__end { grid-column: 1; grid-row: 2; max-width: none; }
  .trail__summary { font-size: 1.3rem; }
  .trail__owner { font-size: 0.92rem; }
  .tb-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .tb-row--head { font-size: 0.68rem; letter-spacing: 0.02em; }
  .tb-row--head > * { padding-inline: 0.25rem; }
  .tb-job { grid-column: 1 / -1; display: block; font-size: 0.88rem; padding-top: 0.2rem; }
  .tb-job small { font-size: 0.82rem; margin-left: 0.35rem; }
  .tb-job--head { display: none; }
  .tb-cell { min-height: 3rem; padding: 0.35rem 0.4rem; font-size: 0.74rem; }
  .tb-stamp .ico { display: none; }
  .tb-gap__label { display: none; }
  .tb-gap__flag { font-size: 0.72rem; padding: 2px 6px; }
  .scrap { width: 9.6rem; padding: 0.45rem 0.55rem; font-size: 0.72rem; }
  .scrap__from { font-size: 0.66rem; }
  html.trail-static .tb-gap__label { display: block; }
}
@media (max-width: 759px) {
  html.trail-static .trail__stage { grid-template-rows: auto auto auto auto; }
  html.trail-static .trail__end { grid-row: 4; }
}

/* ---------------------------------------------------------------- aps --
   Evidence. One reported figure set still, the story, and real app screens revealed by a wipe. */
.aps { position: relative; z-index: 3; background: var(--paper); padding-block: clamp(4.5rem, 8vw, 7rem); }
.aps__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.aps__label { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.7rem; font-size: 0.92rem; color: var(--ink-2); }
.aps__figure { margin-top: 1.2rem; font: 800 clamp(2.3rem, 1.3rem + 3.9vw, 5rem)/1 var(--display); letter-spacing: -0.04em; text-wrap: balance; }
.aps__num { display: inline; background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.aps__fine { margin-top: 0.9rem; font-size: 0.9rem; color: var(--ink-3); }
.aps__story { display: grid; gap: 1rem; margin-top: 2rem; max-width: 60ch; color: var(--ink-2); }
.aps__built { list-style: none; padding: 0; margin-top: 2rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.aps__built li { padding: 0.8rem 0.8rem 0.8rem 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.aps__built li::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.6rem; border-radius: 2px; background: var(--ink); vertical-align: 0.08em; }
.aps__more { margin-top: 1.8rem; }
.aps__screens { position: sticky; top: calc(var(--bar-h) + 4vh); display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); align-items: start; padding-top: 1rem; }
.shot--a { grid-column: 1 / span 5; grid-row: 1; z-index: 1; }
.shot--b { grid-column: 4 / span 5; grid-row: 1; z-index: 2; }
.shot--c { grid-column: 7 / span 4; grid-row: 1; z-index: 3; }
.shot { padding: 5px; border-radius: 20px; background: #0e1011; box-shadow: var(--shadow-2); }
.shot img { width: 100%; border-radius: 15px; }
.shot figcaption { padding: 0.5rem 0.3rem 0.25rem; color: #fff; font-size: 0.8rem; font-weight: 700; text-align: center; }
.shot--b { margin-top: 3rem; }
.shot--c { margin-top: 6rem; }
.aps__screens-note { grid-column: 1 / -1; grid-row: 2; margin-top: 1.2rem; font-size: 0.86rem; color: var(--ink-3); }
@media (max-width: 899px) {
  .aps__grid { grid-template-columns: 1fr; }
  .aps__built { grid-template-columns: 1fr; }
  .aps__screens { position: relative; top: 0; padding-top: 0; }
  .shot--b { margin-top: 1.4rem; }
  .shot--c { margin-top: 2.8rem; }
}

/* -------------------------------------------------------------- range --
   The rest of the casebook on a dark desk, travelling sideways. Each file says what it is. */
.range { background: var(--night); color: var(--on-night); }
.range__stage { background: var(--night); }
.range__rail { display: flex; align-items: center; gap: clamp(1rem, 1.8vw, 1.6rem); height: 100%; padding: calc(var(--bar-h) + 2rem) var(--gutter) 2.5rem; width: max-content; }
.range__lead { flex: none; width: clamp(16rem, 26vw, 24rem); padding-right: 1rem; }
.range__title { font: 800 clamp(2.2rem, 1.4rem + 3vw, 4.2rem)/0.98 var(--display); letter-spacing: -0.04em; }
.range__lead p { margin-top: 1rem; color: var(--on-night-2); max-width: 28ch; }
.file { position: relative; flex: none; width: clamp(16.5rem, 23vw, 21rem); align-self: stretch; max-height: 34rem; display: flex; flex-direction: column; gap: 0.8rem; padding: 1.4rem 1.3rem 1.3rem; border-radius: var(--r); background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 24px 50px -24px rgb(0 0 0 / 0.6); }
.file--wide { width: clamp(20rem, 34vw, 32rem); }
.file__status { align-self: flex-start; padding: 3px 9px; border-radius: 6px; background: var(--mist); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.file__name { font: 800 clamp(1.5rem, 1.2rem + 0.9vw, 2rem)/1.05 var(--display); letter-spacing: -0.03em; }
.file__art { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--mist); overflow: hidden; }
.file__art--plaque img { width: 62%; filter: drop-shadow(0 10px 14px rgb(23 25 27 / 0.28)); }
.file__art--sites { grid-template-columns: 1fr; gap: 8px; padding: 10px; place-items: stretch; }
.file__art--sites img { width: 100%; border-radius: 8px; box-shadow: var(--shadow-1); }
.file__what { color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.file__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-top: auto; font-weight: 700; font-size: 0.92rem; }
.file__links a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em; text-decoration-color: var(--lime-2); min-height: 44px; display: inline-flex; align-items: center; }
.range__end { flex: none; width: clamp(15rem, 22vw, 20rem); display: grid; gap: 1.2rem; justify-items: start; padding-left: 1rem; }
.range__end p { font: 700 clamp(1.3rem, 1.05rem + 0.9vw, 1.8rem)/1.15 var(--display); letter-spacing: -0.02em; }
@media (max-width: 759px) {
  .range__rail { padding-top: calc(var(--bar-h) + 1.2rem); padding-bottom: 1.6rem; }
  .file { width: 78vw; max-height: none; }
  .file--wide { width: 84vw; }
  .range__lead { width: 72vw; }
  .range__end { width: 70vw; }
}
/* reduced motion: not pinned; the rail is an ordinary sideways scroll region (joe.js turns the act into flow) */
html.range-static .range__stage { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
html.range-static .range__rail { height: auto; padding-block: clamp(4rem, 8vw, 6rem); }
html.range-static .range__rail > * { scroll-snap-align: start; }
html.range-static .file { max-height: none; }
.aps__site { margin-top: 1.6rem; max-width: 60ch; color: var(--ink-2); }
.file__state { font-size: 0.86rem; font-weight: 600; color: var(--ink); padding: 0.5rem 0.7rem; border-radius: 8px; background: var(--mist); }

/* ------------------------------------------------------------- method --
   Four plain steps on a line that draws itself as the section passes. */
.method { position: relative; z-index: 3; background: var(--paper); padding-block: clamp(4.5rem, 8vw, 6.5rem); --mp: clamp(0, calc((var(--sc-p, 1) - 0.18) / 0.42), 1); }
.method__title { font: 800 clamp(2.1rem, 1.4rem + 2.8vw, 3.9rem)/1 var(--display); letter-spacing: -0.04em; max-width: 16ch; }
.method__track { position: relative; margin-top: clamp(2.5rem, 5vw, 4rem); }
.method__line { position: absolute; left: 0; right: 0; top: 9px; width: 100%; height: 20px; overflow: visible; }
.method__line path { fill: none; stroke: var(--ink); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--mp)); }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.2rem, 2.5vw, 2.5rem); }
.steps li { position: relative; padding-top: 3rem; }
.steps li::before { content: ""; position: absolute; left: 0; top: 7px; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px var(--ink); }
.steps h3 { font: 800 clamp(1.4rem, 1.1rem + 0.9vw, 1.9rem)/1.1 var(--display); letter-spacing: -0.03em; }
.steps p { margin-top: 0.6rem; color: var(--ink-2); max-width: 32ch; }
@media (prefers-reduced-motion: reduce) { .method__line path { stroke-dashoffset: 0; } }
html:not(.sc-js) .method__line path { stroke-dashoffset: 0; }
@media (max-width: 899px) {
  .method__line { display: none; }
  .steps { grid-template-columns: 1fr; gap: 0; border-left: 3px solid var(--ink); margin-left: 10px; }
  .steps li { padding: 0 0 2rem 2rem; }
  .steps li::before { left: -14px; top: 4px; }
}

/* ------------------------------------------------------------- intake --
   The close: Joe, the direct lines, and the intake sheet that already holds the visitor's picks. */
.intake { position: relative; z-index: 3; background: var(--night); color: var(--on-night); padding-block: clamp(5rem, 9vw, 8rem); }
.intake__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.intake__face { width: 112px; height: 112px; border-radius: 26%; object-fit: cover; box-shadow: 0 0 0 3px var(--lime); }
.intake__title { margin-top: 1.6rem; font: 800 clamp(2.2rem, 1.4rem + 3vw, 4.2rem)/0.98 var(--display); letter-spacing: -0.042em; text-wrap: balance; }
.intake__bio { margin-top: 1.2rem; max-width: 44ch; color: var(--on-night-2); font-size: 1.08rem; }
.direct { margin-top: 2rem; display: grid; gap: 1rem; justify-items: start; }
.direct__lines { font-weight: 700; font-size: 1.1rem; line-height: 1.9; }
.direct__lines a { text-decoration: none; border-bottom: 2px solid var(--night-line); }
.direct__lines a:hover { border-color: var(--lime); }
.direct__note { color: var(--on-night-2); font-size: 0.92rem; max-width: 40ch; }
.sheet { position: relative; display: grid; gap: 1.05rem; padding: clamp(1.4rem, 3vw, 2.2rem); padding-top: clamp(1.8rem, 3.4vw, 2.6rem); border-radius: var(--r); background: var(--paper); color: var(--ink); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7); }
.sheet__tab { position: absolute; left: clamp(1.4rem, 3vw, 2.2rem); top: -15px; padding: 5px 12px; border-radius: 8px 8px 0 0; background: var(--lime); color: var(--ink); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.field label, .choices legend { font-weight: 700; font-size: 0.93rem; }
.optional { font-weight: 500; color: var(--ink-3); font-size: 0.85rem; margin-left: 0.3rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 0.7rem 0.85rem; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); font-size: 1rem; transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.field textarea { min-height: 7rem; resize: vertical; line-height: 1.45; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-error { color: #9f1d17; font-size: 0.88rem; font-weight: 600; }
.field-help { margin-top: -0.6rem; color: var(--ink-3); font-size: 0.86rem; }
.choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choices legend { padding: 0; margin-bottom: 0.45rem; float: left; width: 100%; }
.picks-note { width: 100%; margin-bottom: 0.2rem; font-size: 0.86rem; color: var(--ink-2); }
.picks-note::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.45rem; border-radius: 2px; background: var(--lime-2); vertical-align: 0.05em; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 13px; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); font-size: 0.92rem; font-weight: 600; transition: background-color 140ms var(--ease), border-color 140ms var(--ease); }
.choice input:hover + span { border-color: var(--ink); }
.choice input:checked + span { background: var(--lime); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-fine { color: var(--ink-3); font-size: 0.86rem; }
.form-fine a { color: var(--ink); }
.form-status { padding: 0.9rem 1rem; border-radius: var(--r-sm); font-weight: 600; }
.form-status.is-ok { background: #eef6e2; box-shadow: inset 0 0 0 1.5px var(--lime-2); }
.form-status.is-error { background: #fbeceb; box-shadow: inset 0 0 0 1.5px #d9a19d; }
.form-status a { font-weight: 800; }
@media (max-width: 899px) {
  .intake__grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------- foot -- */
.foot { position: relative; z-index: 3; background: #101213; color: var(--on-night-2); padding-block: 2.6rem 3rem; font-size: 0.92rem; }
.foot__grid { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 1rem 2rem; }
.foot__mark { display: inline-flex; align-items: center; gap: 10px; color: #fff; font: 800 1.05rem var(--display); }
.foot__mark .kmark { width: 30px; height: 30px; }
.foot__nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem 1.3rem; }
.foot__nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot__nav a:hover { color: #fff; }
.foot__fine { grid-column: 1 / -1; color: #9aa39d; font-size: 0.84rem; }
@media (max-width: 899px) { .foot__grid { grid-template-columns: 1fr; } .foot__nav { justify-content: flex-start; } }

/* --------------------------------------------------------------- chat -- */
.chat { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70; display: grid; justify-items: end; }
.chat-launcher { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 16px; border: 0; border-radius: var(--r-sm); background: var(--ink); color: #fff; font: 700 0.94rem/1 var(--font); cursor: pointer; box-shadow: var(--shadow-2); transition: transform 220ms var(--ease), opacity 220ms var(--ease); }
.chat-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); }
.chat.is-away .chat-launcher, .chat.is-scrolling .chat-launcher, .chat.is-covering .chat-launcher { opacity: 0; transform: translateY(14px); pointer-events: none; visibility: hidden; transition: transform 220ms var(--ease), opacity 220ms var(--ease), visibility 0s linear 220ms; }
.chat-panel { width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100svh - 120px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; margin-bottom: 10px; border-radius: var(--r); background: #fff; color: var(--ink); box-shadow: var(--shadow-3); overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: 1rem 1.1rem 0.8rem; border-bottom: 1px solid var(--line); }
.chat-title { font: 800 1.05rem var(--display); }
.chat-sub { font-size: 0.84rem; color: var(--ink-3); }
.chat-close { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--line-2); background: #fff; font-weight: 700; cursor: pointer; }
.chat-log { overflow-y: auto; padding: 0.9rem 1.1rem; display: grid; gap: 0.6rem; align-content: start; }
.msg { max-width: 88%; padding: 0.55rem 0.8rem; border-radius: 12px; font-size: 0.93rem; line-height: 1.45; white-space: pre-wrap; }
.msg-bot { background: var(--mist); justify-self: start; }
.msg-user { background: var(--ink); color: #fff; justify-self: end; }
.msg-typing { color: var(--ink-3); }
.msg-action { justify-self: start; min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--ink); background: var(--lime); font-weight: 700; cursor: pointer; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 1.1rem 0.8rem; }
.chat-suggest[hidden] { display: none; }
.chat-suggest button { min-height: 38px; padding: 0 10px; border-radius: 8px; border: 1.5px solid var(--line-2); background: #fff; font-size: 0.84rem; font-weight: 600; cursor: pointer; text-align: left; }
.chat-form { display: flex; gap: 8px; align-items: end; padding: 0.7rem 1.1rem; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; min-height: 40px; max-height: 120px; padding: 0.55rem 0.7rem; border-radius: 8px; border: 1.5px solid var(--line-2); resize: none; font-size: 0.95rem; }
.chat-fine { padding: 0 1.1rem 0.9rem; font-size: 0.78rem; color: var(--ink-3); }

/* ------------------------------------------------------ reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  .plane, .lean, .settle { transform: none !important; animation: none !important; }
  .hero.is-intro .hi, .hero .hi { animation: none !important; }
  .btn, .me, .choice span { transition: none; }
}
