:root {
  --ground: #f7f8fa;
  --surface: #ffffff;
  --ink: #0e1116;
  --muted: #4f5662;
  --line: #dde1e7;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-soft: #8fb0ff;
  --radius: 14px;
  --bar-h: 56px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* fallback */
  overflow-x: clip; /* clip does not create a scroll container, so sticky cards keep working */
}
img, video { max-width: 100%; }

a { color: var(--accent); }
a:hover { color: #1e3a8a; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }

.skip { position: absolute; left: -999px; top: 12px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 12px; }

.section-label { margin: 0 0 12px; font-family: var(--mono); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.section-title { font-family: var(--display); font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { color: var(--ink); background: var(--surface); transform: translateY(-2px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:active { transform: translateY(0) scale(.98); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 15;
  background: rgba(247,248,250,.88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%); visibility: hidden;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), visibility 0s linear .45s;
}
.topbar.is-visible { transform: none; visibility: visible; transition-delay: 0s; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--bar-h); }
.topbar-brand { font-family: var(--mono); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); text-decoration: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.topbar-nav { display: flex; gap: 2px; }
.topbar-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none;
}
.topbar-nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.topbar-nav a:hover, .topbar-nav a.is-active { color: var(--ink); }
.topbar-nav a.is-active::after { transform: scaleX(1); }
@media (max-width: 480px) {
  .topbar-brand { display: none; }
  .topbar-nav { width: 100%; justify-content: space-between; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(72px, 12vw, 140px) 0 clamp(48px, 7vw, 80px); border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; -webkit-mask-image: radial-gradient(ellipse 75% 85% at 85% 15%, #000 0%, transparent 72%); mask-image: radial-gradient(ellipse 75% 85% at 85% 15%, #000 0%, transparent 72%); }
.hero-grid {
  position: absolute; inset: -48px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 48px;
  animation: grid-drift 14s linear infinite;
}
@keyframes grid-drift { to { transform: translate3d(48px, 48px, 0); } }
.hero-glow {
  position: absolute; right: -140px; top: -180px; width: min(560px, 120vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(29,78,216,.20), transparent 65%);
  animation: glow-float 12s ease-in-out infinite alternate;
}
@keyframes glow-float { to { transform: translate3d(-90px, 70px, 0) scale(1.15); } }

.eyebrow { margin: 0 0 20px; font-size: 13px; text-transform: uppercase; color: var(--muted); }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6.4vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  max-width: 16ch;
}
.intro { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 60ch; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 36px; }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; font-size: 14px; color: var(--muted); }
.legend-text { margin-right: 16px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.tag--experiment { border: 1px solid var(--ink); color: var(--ink); }
.tag--practice { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; background: var(--ink); color: #fff; }
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker-group { display: flex; flex-shrink: 0; list-style: none; margin: 0; padding: 0; }
.ticker-item { display: inline-flex; align-items: center; padding: 15px 0; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.ticker-item::after { content: "§"; margin: 0 22px; color: var(--accent-soft); }
@keyframes ticker { to { transform: translate3d(-25%, 0, 0); } }

/* ---------- About ---------- */
.about { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.about-lead { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.28; letter-spacing: -0.015em; margin: 0 0 22px; max-width: 24ch; }
.about-body p { color: var(--muted); margin: 0 0 16px; max-width: 62ch; }
.about-body p:last-child { margin-bottom: 0; }

.record { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(14,17,22,.04), 0 18px 48px -22px rgba(14,17,22,.22); }
.record-photo { position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: var(--ink); }
.record-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform: scale(1.08); transition: transform 1.6s cubic-bezier(.2,.8,.2,1); }
.record.in .record-photo img { transform: none; }
.record-inner { padding: 22px 24px 24px; }
.record-head { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; }
.monogram { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 19px; }
.record-name { margin: 0; font-weight: 600; font-size: 19px; line-height: 1.25; }
.record-role { margin: 2px 0 0; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.record-list { margin: 0 0 20px; }
.record-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.record-row dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-top: 3px; }
.record-row dd { margin: 0; font-size: 15px; line-height: 1.45; }
.record .btn { width: 100%; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); margin-top: clamp(40px, 6vw, 64px); border-top: 2px solid var(--ink); }
.fact { padding-top: 22px; }
.fact-value { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(44px, 5.4vw, 68px); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.fact-label { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 30ch; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-lead { max-width: none; }
}
@media (max-width: 640px) {
  .facts { grid-template-columns: minmax(0, 1fr); border-top: 0; margin-top: 36px; }
  .fact { border-top: 2px solid var(--ink); padding: 18px 0 22px; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 4px 18px; align-items: center; }
  .fact-value { font-size: 44px; min-width: 2ch; }
  .fact-label { margin: 0; max-width: none; }
}
@media (max-width: 380px) {
  .record-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .fact { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Practice map ---------- */
.uses { padding: clamp(56px, 8vw, 104px) 0; background: var(--ink); color: #fff; }
.uses :focus-visible { outline-color: var(--accent-soft); }
.uses .section-label { color: var(--accent-soft); }
.uses-intro { margin: 0; color: #b9c0cc; max-width: 60ch; }
.uses-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px); margin-top: clamp(32px, 5vw, 52px); }
.uses-col h3 { margin: 0; padding-bottom: 14px; font-family: var(--mono); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-soft); border-bottom: 1px solid rgba(255,255,255,.34); }
.uses-list { list-style: none; margin: 0; padding: 0; }
.use { position: relative; display: block; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.use::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent-soft); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
a.use:hover { color: #fff; }
a.use:hover::after, a.use:focus-visible::after { transform: scaleX(1); }
.use-text { display: block; font-size: clamp(17px, 1.5vw, 20px); font-weight: 500; line-height: 1.35; }
.use-exhibit { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #b9c0cc; }
.use-exhibit::after { content: "→"; transition: transform .25s ease; }
a.use:hover .use-exhibit { color: #fff; }
a.use:hover .use-exhibit::after { transform: translateX(4px); }
@media (max-width: 760px) { .uses-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Docket index ---------- */
.docket { padding: 48px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.docket-title { font-size: 13px; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 16px; }
.docket-note { margin: 0 0 20px; max-width: 68ch; font-size: 16px; line-height: 1.5; color: var(--ink); padding-left: 14px; border-left: 2px solid var(--accent); }
.docket-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0 32px; }
.docket-list a {
  display: flex; gap: 14px; align-items: baseline;
  padding: 12px 0; min-height: 44px;
  border-top: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.docket-list a:hover .docket-name { color: var(--accent); }
.docket-num { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 28px; }
.docket-name { font-weight: 600; }
.docket-phase { margin-left: auto; font-size: 13px; color: var(--muted); text-align: right; }

/* ---------- Phases ---------- */
.phase { padding: clamp(64px, 9vw, 112px) 0 0; }
.phase-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-bottom: clamp(32px, 5vw, 56px); padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.phase-label { font-family: var(--mono); font-size: 13px; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.phase-title { font-family: var(--display); font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.phase-blurb { flex-basis: 100%; margin: 4px 0 0; color: var(--muted); max-width: 60ch; }

/* ---------- Entry ---------- */
/* Each exhibit is a card that pins at the top while you scroll, so the next one slides over it
   like a deck. Cards are sized to fit the screen. If one is still taller than the screen
   (an opened case file, a very short window) it pins at its bottom edge so nothing is cut off. */
.entry {
  --stick: calc(var(--bar-h) + 16px + var(--stack-i, 0) * 12px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-areas: "preview head" "preview body";
  grid-template-rows: auto 1fr;
  column-gap: clamp(28px, 4vw, 56px);
  align-items: start;
  position: sticky;
  top: var(--stick);
  top: min(var(--stick), calc(100vh - var(--card-h, 0px) - 12px));
  top: min(var(--stick), calc(100svh - var(--card-h, 0px) - 12px));
  padding: clamp(20px, 2.6vw, 34px);
  margin-bottom: clamp(20px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 -22px 46px -30px rgba(14,17,22,.45), 0 1px 2px rgba(14,17,22,.04);
  transform: scale(calc(1 - var(--cover, 0) * 0.05));
  transform-origin: 50% 0;
}
.entry--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); grid-template-areas: "head preview" "body preview"; }
.entry--tall { transform-origin: 50% 100%; }
.entry::after { content: ""; position: absolute; inset: 0; z-index: 6; border-radius: inherit; background: var(--ink); opacity: calc(var(--cover, 0) * 0.34); pointer-events: none; }
.entry:last-child { margin-bottom: 0; }
/* An opened case file reads like a normal page section, so it stops pinning. */
.entry.is-open { position: relative; top: auto; }

.entry-head { grid-area: head; min-width: 0; }
.entry-preview { grid-area: preview; min-width: 0; align-self: center; }
.entry-body { grid-area: body; min-width: 0; display: flex; flex-direction: column; }
/* The preview is sized from the window height so the whole card fits on screen. */
.entry-preview .frame { width: 100%; max-width: max(340px, calc((100svh - 410px) * 1.6)); margin: 0 auto; }

.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.entry-num { font-family: var(--mono); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.entry-date { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.entry-title { font-family: var(--display); font-size: clamp(30px, 3vw, 40px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 6px; }
.entry-summary { margin: 0 0 18px; color: var(--muted); font-size: 17px; line-height: 1.4; }

.narrative { margin: 0 0 18px; display: grid; gap: 13px; font-size: 16px; line-height: 1.5; }
.narrative dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 2px; }
.narrative dd { margin: 0; }
.narrative .value { padding-left: 14px; border-left: 2px solid var(--accent); }
.narrative .value dt { color: var(--accent); }
.how-steps { margin: 0; padding: 0; list-style: none; counter-reset: how; display: grid; gap: 7px; }
.how-steps li { counter-increment: how; position: relative; padding-left: 30px; }
.how-steps li::before { content: counter(how, decimal-leading-zero); position: absolute; left: 0; top: 3px; font-family: var(--mono); font-size: 12px; color: var(--muted); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; font-weight: 600; text-decoration: none;
}
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(4px); }
.link-pending { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-family: var(--mono); }
.entry-more { order: 1; }
.entry-actions { order: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.entry-toggle {
  display: none; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; white-space: nowrap; flex-shrink: 0;
  border: 1px solid var(--ink); border-radius: 10px; background: transparent; color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.entry-toggle[aria-expanded="true"] { background: var(--ink); color: #fff; }
.entry-toggle-icon { position: relative; width: 12px; height: 12px; }
.entry-toggle-icon::before, .entry-toggle-icon::after { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 2px; background: currentColor; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.entry-toggle-icon::after { transform: rotate(90deg); }
.entry-toggle[aria-expanded="true"] .entry-toggle-icon::after { transform: rotate(0deg); }

/* ---------- Preview frames ---------- */
.frame { position: relative; }
.frame-stage { position: relative; }
.frame-browser {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(14,17,22,.04), 0 18px 48px -18px rgba(14,17,22,.22);
}
.frame-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.frame-dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: #d4d8de; }
.frame-url {
  flex: 1; min-width: 0; margin-left: 10px; height: 24px; border-radius: 6px; background: #eef0f3;
  font-family: var(--mono); font-size: 12px; line-height: 24px; color: var(--muted);
  padding: 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.frame-url.typing::after { content: ""; display: inline-block; width: 1px; height: 12px; margin-left: 2px; vertical-align: -1px; background: var(--muted); animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.screen { position: relative; overflow: hidden; background: #eef0f3; }
.frame-browser .screen { aspect-ratio: 16 / 10; }

.frame-phone-stage {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  aspect-ratio: 16 / 10.6;
  background: #e9ecf1;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 24px;
}
/* The phone is the owner's iPhone 18 Pro Max model, rendered square-on in Blender (tools/phone-shell.py): body 476 x 992 pt with
   an 80 pt corner, display 440 x 956 pt with a 62 pt corner. The box is the body; the render sits over it with the display cut
   out, and the screen fills the cut-out. Every size here is a share of the body, so the phone can be any size. */
.frame-phone {
  position: relative; flex: 0 0 auto;
  height: 100%; aspect-ratio: 476 / 992;
  border-radius: 16.807% / 8.065%;
  box-shadow: 0 22px 48px -18px rgba(14,17,22,.45);
}
.frame-phone::before {
  content: ""; position: absolute; z-index: 30; pointer-events: none;
  inset: -0.806% -1.681%;
  background: url("previews/shell/iphone-18-pro-max.webp") center / 100% 100% no-repeat;
}
.frame-phone .screen {
  position: absolute; left: 3.6%; top: 1.73%; width: 92.8%; height: 96.54%;
  border-radius: 14.2% / 6.54%; overflow: hidden; background: #000;
}
.frame-phone-stage:not(.frame-phone-stage--demo) .frame-phone .screen img, .frame-phone-stage:not(.frame-phone-stage--demo) .frame-phone .screen video { object-position: 50% 50%; }

/* A browser frame with a phone standing in front of it */
.frame-stage--duo { padding-bottom: 7%; }
.frame-stage--duo .frame-browser { width: 88%; }
.frame-phone--float {
  position: absolute; right: 0; bottom: 0; z-index: 3;
  width: 23%; height: auto;
}

.screen iframe, .screen video, .screen img {
  position: absolute; top: 0; left: 0; border: 0; display: block;
}
.screen iframe { transform-origin: 0 0; pointer-events: none; background: #fff; }
.screen video, .screen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

.screen-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 14px;
  text-decoration: none;
}
.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(14,17,22,.86); color: #fff; padding: 6px 10px; border-radius: 999px;
}
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.screen-overlay:hover .live-badge, .screen-overlay:focus-visible .live-badge { background: var(--accent); }

.placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    #f3f5f8;
  color: var(--muted); text-align: center; padding: 20px;
}
.placeholder-mark { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3vw, 40px); color: var(--ink); letter-spacing: -0.03em; }
.placeholder-note { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }

/* An interactive phone demo needs a phone large enough to use, so its stage grows to fit it */
.frame-phone-stage.frame-phone-stage--demo, .views .frame-phone-stage.frame-phone-stage--demo { aspect-ratio: auto; height: auto; padding: 16px; }
.frame-phone-stage--demo .frame-phone { height: auto; width: min(100%, 300px); }
/* The phone is drawn as a 3D object: a brushed titanium band round a black bezel, side buttons, an edge with real thickness,
   and a slight turn in perspective. On wide screens it turns to face you when you point at it or use it; on phones it sits
   almost square-on so every control stays easy to tap. */
.frame-phone-stage { perspective: 1500px; }
.frame-phone {
  box-shadow:
    1px 0 0 #9b9ea5, 2px 1px 0 #8d9097, 3px 1px 0 #7f8289, 4px 2px 0 #71747b, 5px 2px 0 #63666d, 6px 3px 0 #565960,
    26px 34px 50px -22px rgba(14,17,22,.5), 8px 12px 18px -8px rgba(14,17,22,.3);
  transform: rotateY(-13deg) rotateX(3deg) rotateZ(.4deg);
  transform-origin: 50% 50%;
  will-change: transform;
}
/* A soft highlight across the glass */
.frame-phone .screen::after { content: ""; position: absolute; inset: 0; z-index: 20; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 28%); opacity: 1; transition: opacity .4s ease; }
@media (hover: hover) {
  .frame-phone-stage:hover .frame-phone, .frame-phone-stage:focus-within .frame-phone, .entry-preview:hover .frame-phone--float {
    transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg);
    box-shadow: 0 1px 0 #8d9097, 0 2px 0 #71747b, 0 30px 54px -22px rgba(14,17,22,.5), 0 10px 18px -8px rgba(14,17,22,.28);
  }
  .frame-phone-stage:hover .frame-phone .screen::after, .frame-phone-stage:focus-within .frame-phone .screen::after { opacity: 0; }
}
@media (max-width: 720px) {
  /* Phones: nearly square-on, a thinner edge, and no glare over the controls */
  .frame-phone { transform: rotateY(-3deg) rotateX(1.5deg);
    box-shadow: 1px 0 0 #9b9ea5, 2px 1px 0 #7f8289, 3px 1px 0 #63666d, 14px 22px 34px -18px rgba(14,17,22,.5); }
  .frame-phone-stage--demo .frame-phone .screen::after { opacity: .5; }
}
@media (prefers-reduced-motion: reduce) { .frame-phone { transform: none !important; } }
@media (max-width: 720px) {
  .frame-phone-stage.frame-phone-stage--demo, .views .frame-phone-stage.frame-phone-stage--demo { padding: 0; background: transparent; border: 0; }
  .frame-phone-stage--demo .frame-phone { width: min(100%, 340px); }
}

/* Expanders under a preview: "Site screens" and "Case file" share one row and one look.
   Only one is open at a time, and what it opens appears below the row. */
.entry-site-toggle, .demo-note .entry-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.entry-site-toggle:hover, .demo-note .entry-toggle:hover { border-color: var(--ink); }
.entry-site-toggle[aria-expanded="true"], .demo-note .entry-toggle[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.entry-site-toggle[aria-expanded="true"] .entry-toggle-icon::after { transform: rotate(0deg); }
.demo-note .entry-toggle { display: none; } /* wide screens show the case file beside the preview */
.entry-site { margin: 0; }
.entry-preview .entry-site-box { margin-top: 26px; }
.entry-site-box[hidden] { display: none; }
.entry-actions:empty { display: none; }

/* Interactive demos: a taller window, sized from the screen height so the card still fits */
.frame-browser .screen.screen--demo { aspect-ratio: auto; height: clamp(400px, calc(100svh - 310px), 540px); background: #f3efe6; }
.demo-loading { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.demo-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.demo-note .demo-replay { margin-left: auto; }
.demo-replay-icon { display: none; }
.demo-note-text { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.demo-replay { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.demo-replay:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 720px) { .frame-browser .screen.screen--demo { height: 440px; } .demo-note { margin-top: 10px; } }

/* Switch between two previews of one project (iPhone app / Website) */
.views { width: 100%; }
.views-tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 0 auto 12px; padding: 4px; border-radius: 999px; background: #eef0f3; border: 1px solid var(--line); }
.views-tab {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.views-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(14,17,22,.18); }
.views-panel[hidden] { display: none; }
.screen--gallery video.slide { cursor: zoom-in; background: #0e1116; }
.screen--gallery iframe.slide { width: 100%; height: 100%; border: 0; background: #F2EFE9; }
.screen--gallery iframe.slide:not(.is-active) { pointer-events: none; }
.screen--gallery iframe.slide--scaled { inset: 0 auto auto 0; transform-origin: 0 0; max-width: none; }
/* Walkthrough videos get a taller stage so the phone is large enough to read */
@media (min-width: 901px) {
  .views .frame-phone-stage { aspect-ratio: auto; height: clamp(340px, calc(100svh - 350px), 600px); padding: 14px; }
}
.stage-zoom {
  position: absolute; z-index: 5; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(14,17,22,.12);
  background: rgba(255,255,255,.94); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 18px rgba(14,17,22,.2);
}
.stage-zoom-icon { width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 3px; }

/* Previous / next buttons that sit on the preview. Shown on small screens, where they replace the row below. */
.stage-nav { display: none; position: absolute; z-index: 5; left: 8px; right: 8px; bottom: 8px; justify-content: space-between; pointer-events: none; }
.stage-nav button {
  pointer-events: auto; width: 46px; height: 46px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(14,17,22,.12); background: rgba(255,255,255,.94); color: var(--ink);
  font: inherit; font-size: 17px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(14,17,22,.28);
  transition: transform .2s ease;
}
.stage-nav button:active { transform: scale(.9); }
.frame-phone-stage .stage-nav { bottom: 50%; transform: translateY(50%); }
.frame-stage--duo .stage-nav { right: 30%; }

/* ---------- Reels: a set of real screens with captions ---------- */
.screen--gallery .slide { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity .8s ease; }
.screen--gallery .slide.is-active { opacity: 1; z-index: 1; }
.screen--gallery picture.slide img { transform-origin: 50% 0; }
.screen--gallery picture.slide.is-active img { animation: slide-in var(--dur, 6s) cubic-bezier(.2,.7,.2,1) both; }
@keyframes slide-in { from { transform: scale(1.07); } to { transform: scale(1); } }
.screen--gallery { touch-action: pan-y; }

.reel { margin-top: 16px; }
.reel-bars { display: flex; gap: 6px; }
.reel-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.reel-bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.reel-bar.is-done i { transform: scaleX(1); }
.reel-bar.is-active i { animation: reel-fill var(--dur, 6s) linear forwards; animation-play-state: paused; }
.reel.is-playing .reel-bar.is-active i { animation-play-state: running; }
.reel--manual .reel-bar.is-active i { animation: none; transform: scaleX(1); }
/* A walkthrough video fills its own bar as it plays */
.reel-bar.is-video.is-active i { animation: none; transform: scaleX(var(--p, 0)); transition: transform .25s linear; }
@keyframes reel-fill { to { transform: scaleX(1); } }

.reel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.reel-count { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.reel-nav { display: flex; gap: 8px; }
.reel-nav button {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; padding: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 17px; line-height: 1; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.reel-nav button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.reel-nav button:active { transform: scale(.92); }
.reel-caption { margin: 6px 0 0; font-size: 15px; line-height: 1.5; min-height: 3em; }
.reel-text { display: block; }
.reel-caption.swap .reel-text { animation: cap-in .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cap-in { from { opacity: 0; transform: translateY(8px); } }

/* Pipeline: numbered steps that light up in order */
.flow-box { min-height: 84px; margin-bottom: 14px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); counter-reset: step; }
.flow li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; counter-increment: step; }
.flow li + li::before, .flow li + li::after { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; }
.flow li + li::before { background: var(--line); }
.flow li + li::after { background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; animation: flow-line var(--step) linear forwards; animation-delay: calc((var(--k) - 1) * var(--step) + .25s); }
.flow-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.flow-dot::before { content: counter(step); }
.flow-dot::after {
  content: counter(step); position: absolute; inset: -2px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff;
  opacity: 0; transform: scale(.5);
  animation: flow-on .5s cubic-bezier(.2,.9,.3,1.3) forwards; animation-delay: calc(var(--k) * var(--step));
}
.flow-label { padding: 0 4px; font-family: var(--mono); font-size: 11px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); opacity: .4; animation: flow-label .4s ease forwards; animation-delay: calc(var(--k) * var(--step)); }
.flow-now { display: none; }
@keyframes flow-line { to { transform: scaleX(1); } }
@keyframes flow-on { to { opacity: 1; transform: scale(1); } }
@keyframes flow-label { to { opacity: 1; } }

/* ---------- Before / after ---------- */
.screen--compare { touch-action: pan-y; }
/* The whole page fits the slider at every width: the box keeps the captures' own shape (16:10), so nothing is cropped or zoomed. */
.frame-browser .screen.screen--compare { aspect-ratio: 16 / 10; }
.compare { position: absolute; inset: 0; display: none; cursor: ew-resize; --pos: 50%; user-select: none; -webkit-user-select: none; }
.compare.is-active { display: block; }
.compare picture { position: absolute; inset: 0; display: block; }
.compare img { pointer-events: none; -webkit-user-drag: none; }
.compare-before { z-index: 1; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(14,17,22,.25); pointer-events: none; }
.compare-handle span { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; box-shadow: 0 6px 18px rgba(14,17,22,.35); display: grid; place-items: center; }
.compare-handle span::before { content: "‹ ›"; font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: 0.04em; }
.compare-tag { position: absolute; z-index: 2; top: 12px; font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 10px; border-radius: 999px; background: rgba(14,17,22,.86); color: #fff; pointer-events: none; }
.compare-tag--before { left: 12px; }
.compare-tag--after { right: 12px; background: var(--accent); }
/* On wide cards the labels sit at the bottom so each page’s header and logo stay in view. */
@media (min-width: 721px) { .compare-tag { top: auto; bottom: 12px; } }
.compare-range { position: absolute; z-index: 4; left: 0; bottom: 0; width: 100%; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.compare:focus-within .compare-handle span { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Video and ads ---------- */
.videos { padding: clamp(56px, 8vw, 104px) 0 0; }
.videos-intro { margin: 0; color: var(--muted); max-width: 60ch; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 28px 24px; margin-top: 36px; align-items: start; }
.video-card { margin: 0; }
.video-card[hidden] { display: none; }
.video-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.video-filter-btn { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.video-filter-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.video-filter-count { font-family: var(--mono); font-size: 12px; opacity: .65; }
.video-kicker { margin: 14px 0 0; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.video-kicker + .video-title { margin-top: 4px; }
/* Phone feed */
.vfeed { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; margin-top: 32px; }
.vfeed-stage.frame-phone-stage--demo { padding: clamp(20px, 3vw, 36px) clamp(28px, 6vw, 84px); }
.vfeed-stage .vfeed-phone { width: 290px; max-width: 100%; }
.vfeed-phone .vfeed-screen { touch-action: pan-y; }
.vfeed-screen .vfeed-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; opacity: 0; }
.frame-phone .vfeed-screen.vfeed-screen::after { content: ""; position: absolute; z-index: 6; inset: 1.4% auto auto 50%; width: 28.6%; height: 3.87%; margin-left: -14.3%; border-radius: 999px; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.06); pointer-events: none; opacity: 1 !important; }
.vfeed-screen.is-in .vfeed-video { opacity: 1; transform: none; animation: vfeed-in .35s cubic-bezier(.2,.8,.2,1); }
@keyframes vfeed-in { from { opacity: 0; transform: translateY(6%); } }
.vfeed-zone { position: absolute; top: 0; bottom: 0; z-index: 2; border: 0; padding: 0; background: transparent; cursor: pointer; }
.vfeed-zone--prev { left: 0; width: 28%; } .vfeed-zone--mid { left: 28%; width: 44%; } .vfeed-zone--next { right: 0; width: 28%; }
.vfeed-play { position: absolute; z-index: 3; left: 50%; top: 50%; margin: -32px 0 0 -32px; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.vfeed-screen.is-paused .vfeed-play { opacity: 1; }
.vfeed-bars { position: absolute; z-index: 4; left: 14px; right: 14px; top: 38px; display: flex; gap: 4px; pointer-events: none; }
.vfeed-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.38); overflow: hidden; }
.vfeed-bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }
.vfeed-bar.is-done i { transform: none; }
.vfeed-tag, .vfeed-cap { position: absolute; z-index: 4; left: 14px; right: 64px; margin: 0; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); pointer-events: none; }
.vfeed-tag { bottom: 30px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.vfeed-cap { bottom: 9px; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vfeed-sound { position: absolute; z-index: 5; right: 8px; bottom: 3px; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: grid; place-items: center; }
.vfeed-sound-icon { width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--snd-off) center / contain no-repeat; mask: var(--snd-off) center / contain no-repeat;
  --snd-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5z'/%3E%3Cpath d='m22 9-6 6M16 9l6 6'/%3E%3C/svg%3E");
  --snd-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E"); }
.vfeed-sound.is-on .vfeed-sound-icon { -webkit-mask-image: var(--snd-on); mask-image: var(--snd-on); }
.vfeed-info { min-width: 0; max-width: 46ch; }
.vfeed-info .video-kicker { margin-top: 0; }
.vfeed-title { margin: 6px 0 8px; font-family: var(--display); font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.vfeed-info .video-caption { font-size: 17px; line-height: 1.5; }
.vfeed-how { margin-top: 20px; font-size: 16px; line-height: 1.5; }
.vfeed-how:empty { display: none; }
.vfeed-how-label { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.vfeed-nav { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.vfeed-nav[hidden] { display: none; }
.vfeed-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; cursor: pointer; transition: background .2s ease, color .2s ease; }
.vfeed-btn:hover { background: var(--ink); color: #fff; }
.vfeed-count { margin-left: 8px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .vfeed { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 24px; }
  .vfeed-stage .vfeed-phone { width: min(100%, 300px); }
  .vfeed-nav { margin-top: 16px; }
  .vfeed-btn { transform: rotate(-90deg); }
}
@media (prefers-reduced-motion: reduce) { .vfeed-screen.is-in .vfeed-video { animation: none; } }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); box-shadow: 0 18px 48px -22px rgba(14,17,22,.4); }
.video-card[data-aspect="9:16"] .video-frame { aspect-ratio: 9 / 16; }
.video-card[data-aspect="1:1"] .video-frame { aspect-ratio: 1; }
.video-card[data-aspect="4:5"] .video-frame { aspect-ratio: 4 / 5; }
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; background: linear-gradient(transparent 45%, rgba(14,17,22,.45)); }
.video-play-icon { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(14,17,22,.4); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.video-play-icon::before { content: ""; margin-left: 4px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent var(--ink); }
.video-play:hover .video-play-icon { transform: scale(1.1); }
.video-title { margin: 14px 0 2px; font-weight: 600; }
.video-caption { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Closing + footer ---------- */
.closing { margin-top: clamp(64px, 9vw, 112px); padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.closing-title { font-family: var(--display); font-size: clamp(30px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 16px; max-width: 20ch; }
.closing-text { margin: 0 0 28px; color: var(--muted); max-width: 56ch; }

.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 32px; padding-bottom: 32px; color: var(--muted); font-size: 15px; }
.footer p { margin: 0; }

/* ---------- Compact cards: tablets and phones ---------- */
@media (max-width: 900px) {
  .entry, .entry--flip {
    --stick: 10px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "preview" "body";
    grid-template-rows: auto;
    padding: 16px;
    border-radius: 18px;
  }
  .entry-preview .frame { max-width: none; }
  .entry-summary { margin-bottom: 12px; }
  .entry-body { margin-top: 10px; }
  /* The case file sits behind a toggle so the card fits on one screen. */
  .entry-toggle, .demo-note .entry-toggle { display: inline-flex; }
  .entry.has-case-open .entry-body { margin-top: 14px; }
  .entry-actions { order: 1; }
  .entry-more { order: 2; display: none; padding-top: 16px; }
  .entry.has-case-open .entry-more { display: block; }
}

/* ---------- Phones ---------- */
@media (max-width: 720px) {
  .docket-phase { display: none; }
  .hero-actions .btn { flex: 1 1 140px; padding: 0 14px; white-space: nowrap; }
  .entry { margin-left: -8px; margin-right: -8px; padding: 14px; }
  .entry-date { display: none; }
  .entry-actions { flex-wrap: wrap; gap: 4px 10px; }
  .entry-toggle { padding: 0 13px; font-size: 15px; }
  .entry-actions .link-arrow { font-size: 15px; white-space: nowrap; }
  .stage-zoom-text { display: none; }
  .stage-zoom { padding: 0; width: 44px; justify-content: center; }
  .entry-meta { margin-bottom: 8px; }
  .entry-title { font-size: 30px; margin-bottom: 4px; }
  .entry-summary { font-size: 16px; }
  /* Squarer frames so a phone-width capture stays readable and the card still fits */
  .frame-bar { height: 32px; }
  .frame-url { height: 20px; line-height: 20px; font-size: 11px; }
  .entry-site-toggle, .demo-note .entry-toggle { font-size: 14px; padding: 0 12px; gap: 8px; }
  .demo-replay { padding: 0; width: 44px; justify-content: center; font-size: 18px; }
  .demo-replay-text { display: none; }
  .demo-replay-icon { display: inline; }
  .frame-browser .screen { aspect-ratio: 1 / 0.88; }
  .frame-phone-stage { aspect-ratio: 1 / 1.08; padding: 14px; }
  .views-tabs { margin-bottom: 8px; }
  .views-tab { flex: 1 1 auto; min-width: 0; padding: 0 12px; font-size: 14px; }
  .views .frame-phone-stage { aspect-ratio: 1 / 1.02; padding: 10px; }
  .frame-stage--duo { padding-bottom: 5%; }
  .frame-stage--duo .frame-browser { width: 90%; }
  .frame-phone--float { width: 29%; }
  /* Controls move onto the preview */
  .stage-nav { display: flex; }
  .reel-head { display: none; }
  .reel { margin-top: 12px; }
  .reel-caption { min-height: 4.35em; margin-top: 8px; }
  /* Pipeline: dots only, with the current step named underneath */
  .flow-box { min-height: 58px; margin-bottom: 10px; }
  .flow-label { display: none; }
  .flow-now { display: block; position: relative; height: 1.4em; margin: 8px 0 0; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; text-align: center; }
  .flow-now span { position: absolute; inset: 0; opacity: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: flow-now var(--step) ease both; animation-delay: calc(var(--k) * var(--step)); }
  .flow-now span.is-last { animation-name: flow-now-last; }
}
@keyframes flow-now { 0% { opacity: 0; transform: translateY(6px); } 14%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes flow-now-last { 0% { opacity: 0; transform: translateY(6px); } 14%, 100% { opacity: 1; transform: none; } }

/* Reels and pipelines only run while on screen, and hold while the pointer is over them.
   These come after every rule that sets an animation so the paused state is not reset. */
.reel .flow li + li::after, .reel .flow-dot::after, .reel .flow-label, .reel .flow-now span { animation-play-state: paused; }
.reel.is-playing .flow li + li::after, .reel.is-playing .flow-dot::after, .reel.is-playing .flow-label, .reel.is-playing .flow-now span { animation-play-state: running; }
@media (hover: hover) {
  .entry-preview:hover .reel .reel-bar.is-active i,
  .entry-preview:hover .reel .flow li + li::after, .entry-preview:hover .reel .flow-dot::after,
  .entry-preview:hover .reel .flow-label, .entry-preview:hover .reel .flow-now span { animation-play-state: paused; }
}

/* ================= Motion ================= */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 20; background: transparent; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* Headings: each letter fades in, slides up, and sharpens from a blur, landing from the accent color */
.letters .lw { display: inline-block; white-space: nowrap; }
.letters .lc {
  display: inline-block; opacity: 0; color: var(--accent);
  transform: translateY(0.7em) scale(1.15); filter: blur(14px);
  transition: opacity .9s ease, transform 1s cubic-bezier(.16,.84,.24,1), filter .9s ease, color 1.1s ease .25s;
  transition-delay: calc(var(--i) * 42ms + var(--d, 0ms));
}
.uses .letters .lc { color: var(--accent-soft); }
.letters.in .lc { opacity: 1; color: inherit; transform: none; filter: blur(0); }
.hero h1.letters .lc { transition-delay: calc(var(--i) * 34ms + 150ms); }
/* Exhibit titles shift to the accent color while their card is hovered */
.entry-title { transition: color .45s ease; }
@media (hover: hover) { .entry:hover .entry-title { color: var(--accent); } }
.hero .eyebrow, .hero .intro, .hero .hero-actions, .hero .legend { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.hero .intro { transition-delay: 1.35s; } .hero .hero-actions { transition-delay: 1.5s; } .hero .legend { transition-delay: 1.65s; }
.is-loaded .hero .eyebrow, .is-loaded .hero .intro, .is-loaded .hero .hero-actions, .is-loaded .hero .legend { opacity: 1; transform: none; }

/* Scroll reveals */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.entry .entry-preview.reveal { transform: translateY(48px) scale(.97); }
.entry .entry-preview.reveal.in { transform: none; }
.uses-list li.reveal { transform: translateX(-20px); }
.uses-list li.reveal.in { transform: none; }

/* Phase rule draws across */
.phase-head { border-bottom: 0; position: relative; }
.phase-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s cubic-bezier(.2,.8,.2,1) .15s; }
.phase-head.in::after { transform: scaleX(1); }

/* Preview frames: drift on scroll, lift on hover */
.entry-preview .frame { transform: translateY(var(--drift, 0px)); will-change: transform; }
.frame-browser, .frame-phone { transition: box-shadow .5s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) {
  .entry-preview:hover .frame-browser { transform: translateY(-6px); box-shadow: 0 1px 2px rgba(14,17,22,.04), 0 30px 60px -20px rgba(14,17,22,.32); }
}

/* Live dot pulse */
.live-badge::before { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); } 100% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }

/* Placeholder: slow scan line so empty previews still feel alive */
.placeholder::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; top: 0; transform: translateY(-100%); background: linear-gradient(to bottom, transparent, rgba(29,78,216,.08), transparent); animation: scan 4.5s linear infinite; }
@keyframes scan { to { transform: translateY(334%); } }

/* Docket rows: underline slides in on hover */
.docket-list a { position: relative; }
.docket-list a::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s ease; }
.docket-list a:hover::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero .eyebrow, .hero .intro, .hero .hero-actions, .hero .legend, .letters .lc { opacity: 1 !important; transform: none !important; filter: none !important; }
  .phase-head::after { transform: scaleX(1); }
  .entry-preview .frame { transform: none !important; }
  .entry { position: relative; top: auto; transform: none; }
  .entry::after { display: none; }
  .letters .lc { color: inherit; }
  .record-photo img { transform: none; }
  .reel-bar.is-active i { transform: scaleX(1); }
  .flow li + li::after { transform: scaleX(1); }
  .flow-dot::after { opacity: 1; transform: none; }
  .flow-label { opacity: 1; display: block; }
  .flow-now { display: none; }
  /* The ticker becomes a plain wrapped list */
  .ticker-track { width: auto; }
  .ticker-group { flex-wrap: wrap; padding: 8px clamp(20px, 4vw, 48px); }
  .ticker-group[aria-hidden="true"] { display: none; }
  .ticker-item { padding: 6px 0; }
}

/* Very narrow phones: tighter expander buttons so the row stays on one line */
@media (max-width: 360px) {
  .entry-site-toggle, .demo-note .entry-toggle { font-size: 13px; padding: 0 10px; gap: 6px; }
  .demo-note { gap: 6px; }
}

/* ---------- Spiral gallery placements (sizes live here so the space is reserved before its code loads) ---------- */
/* Placement: in the docket section */
.spiral-mount { position: relative; }
.docket.has-spiral .spiral-mount { height: clamp(460px, 72vh, 680px); margin-bottom: 20px; }
.docket.has-spiral .docket-list { opacity: .85; }

/* Placement: in the hero */
.hero.has-spiral .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 3vw, 48px); align-items: center; }
.hero.has-spiral .spiral-mount { height: clamp(460px, 68vh, 640px); }
.hero.has-spiral h1 { font-size: clamp(38px, 4.6vw, 64px); }
.hero.has-spiral { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(32px, 5vw, 56px); }

@media (max-width: 860px) {
  .hero.has-spiral .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero.has-spiral .spiral-mount, .docket.has-spiral .spiral-mount { height: 440px; }
}
