/* The demo plays by itself: one screen at a time, no scrolling. Loaded after scroll.css and overrides it.
   Left: the lifecycle, the screen's words, the conversation. Right: the firm's CRM. */
html, body { height: 100%; overflow: hidden; }
.layout { height: 100vh; align-items: stretch; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); }

/* ── The story column ── */
.story { position: relative; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 66px 0 18px; }
.beats { position: relative; flex: 1 1 auto; min-height: 160px; }
.beat { position: absolute; inset: 0; min-height: 0; padding: 0; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s; }
.beat.active, body.ended .beat.endcard { opacity: 1; visibility: visible; transition: opacity 0.6s var(--ease) 0.15s; }
body.ended .beat:not(.endcard) { opacity: 0; visibility: hidden; }
.beat:not(.hero) > *, .beat > * { opacity: 1; transform: none; transition: none; }
.beat.active > * { animation: rise 0.7s var(--ease) both; }
.beat.active > :nth-child(2) { animation-delay: 0.08s; }
.beat.active > :nth-child(3) { animation-delay: 0.16s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.beat h2 { font-size: clamp(1.5rem, 2.5vw, 2.3rem); }
.beat p { font-size: 1.05rem; margin-bottom: 0.6em; }
.beat .when { margin-bottom: 0.4em !important; }
.beat h1 { font-size: clamp(2.1rem, 4vw, 3.6rem); }
body[data-beat='0'] .now, body.ended .now { display: none; }

/* Where we are in the film */
.segs { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; gap: 3px; padding: 0; height: 4px; }
.seg { flex: 1; background: var(--line); }
.seg.past, .seg.on { background: var(--ink); }
body.ended .segs, body.gated .segs { display: none; }
.bar { top: 4px; }
.bar-right { display: flex; align-items: center; gap: 10px; }
.sound.skip { font-weight: 600; }
body.ended .skip, body.ended #sound, body.gated .skip, body.gated #sound { display: none; }
.paused-tag { display: none; font-size: 0.86rem; font-weight: 600; color: var(--ink-soft); }
body.paused .paused-tag { display: inline; }
body.paused .stage, body.paused .now { opacity: 0.6; }
.stage, .now { cursor: pointer; }
body.ended .stage { cursor: default; }

/* One click, when the browser asks for it */
.gate { display: none; position: fixed; inset: 0; z-index: 50; background: var(--paper); align-items: center; padding: 0 clamp(20px, 8vw, 120px); }
body.gated .gate { display: flex; }
.gate-box { max-width: 720px; }
.gate h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 0.4em; }
.gate .lede { font-size: 1.3rem; margin: 0 0 1em; }
.gate .kicker { font-size: 0.98rem; font-weight: 600; color: var(--agent-ink); margin: 0 0 0.7em; }
.btn.big { font-size: 1.15rem; padding: 18px 30px; display: inline-flex; align-items: center; gap: 12px; }
.tri { width: 0; height: 0; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }

/* ── The lifecycle: big when a new step opens, a thin line of dots the rest of the time ── */
.life { --dot: 12px; flex: none; padding: 4px 0 2px; transition: padding 0.5s var(--ease); }
.life-track { display: flex; align-items: flex-start; }
.life-step, .life-rule { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; }
.life-rule { flex: 0.55 1 0; }
.life-step + *::before, .life-rule::before { content: ''; position: absolute; top: calc(var(--dayh, 0px) + var(--dot) / 2 - 1px); right: 50%; width: 100%; height: 2px; background: var(--line); transition: background 0.4s; }
.life .done::before, .life .here::before { background: var(--ink); }
.life-day { display: block; height: var(--dayh, 0); overflow: hidden; font-size: 0.66rem; font-weight: 600; color: var(--ink-soft); line-height: 1.4; white-space: nowrap; }
.life-dot { position: relative; z-index: 1; width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; transition: width 0.5s var(--ease), height 0.5s var(--ease), background 0.4s, box-shadow 0.4s; }
.life-dot i { display: none; font-style: normal; }
.life-step .life-dot i::after { content: ''; display: block; width: 13px; height: 13px; background: var(--ink-soft); }
.life-step.call .life-dot i::after { clip-path: polygon(18% 0, 42% 0, 50% 28%, 34% 40%, 60% 68%, 74% 52%, 100% 60%, 100% 84%, 82% 100%, 40% 84%, 0 30%); }
.life-step.text .life-dot i::after { clip-path: polygon(0 8%, 100% 8%, 100% 74%, 46% 74%, 22% 100%, 22% 74%, 0 74%); }
/* a person's decision or a signature: a check mark, in the firm's ink */
.life-step.event .life-dot i::after { clip-path: polygon(14% 52%, 30% 38%, 44% 54%, 76% 18%, 90% 32%, 44% 84%); }
.life .life-step.event.done .life-dot, .life .life-step.event.here .life-dot { box-shadow: inset 0 0 0 2.5px var(--other); }
.now-ico.event::after { clip-path: polygon(14% 52%, 30% 38%, 44% 54%, 76% 18%, 90% 32%, 44% 84%); }
.now-ico.event { background: var(--other); }
/* the signature, in the panel */
.say.click { align-self: stretch; text-align: left; background: var(--stage-2); border: 1px solid var(--other); color: var(--on-stage); font-weight: 500; }
.say.click b { color: var(--other) !important; }
body[data-beat='16'] .now, body[data-beat='17'] .now { display: none; }
.life-rule .life-dot { border-radius: 3px; transform: rotate(45deg) scale(0.8); box-shadow: inset 0 0 0 2px var(--rule); }
.life-rule .life-dot i { transform: rotate(-45deg); font-size: 0.78rem; font-weight: 700; color: var(--rule-ink); }
.life-label { display: none; margin-top: 5px; font-size: 0.7rem; line-height: 1.2; color: var(--ink-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.life .done .life-dot { background: var(--ink); box-shadow: none; }
.life .done .life-dot i::after { background: #fff; }
.life .life-rule.done .life-dot { background: var(--rule); }
.life .life-rule.done .life-dot i { color: #3a2500; }
.life .here .life-dot { background: #fff; box-shadow: inset 0 0 0 2.5px var(--agent), 0 0 0 5px rgba(43, 184, 163, 0.18); animation: here 1.6s ease-in-out infinite; }
.life .here .life-dot i::after { background: var(--agent-ink); }
.life .here .life-label { color: var(--ink); font-weight: 700; }
@keyframes here { 50% { box-shadow: inset 0 0 0 2.5px var(--agent), 0 0 0 9px rgba(43, 184, 163, 0.08); } }
.life.big { --dot: 34px; --dayh: 18px; padding: 10px 0 8px; }
.life.big .life-dot i, .life.big .life-label { display: block; }
.life.big .life-rule .life-dot { transform: rotate(45deg) scale(0.74); }
.life.hl .life-track { animation: hl 2.8s var(--ease); border-radius: 12px; }
.life [data-k].hl .life-dot { animation: hl 2.8s var(--ease) !important; }

/* ── The conversation (left, under the words) ── */
.story .now { flex: none; max-height: 40vh; min-height: 0; padding: 14px 18px; }
.say { font-size: 0.88rem; padding: 7px 12px; }
.say .wrote { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.say .wrote span { font-size: 0.7rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: var(--agent); animation: grow 0.5s var(--ease) 0.4s both; }
.say .wrote span:first-child::before { content: '✎ '; }
.say .wrote span.add { color: #8fe6d8; }
.say .wrote span.del { color: var(--bad); }
.say.quick { font-size: 0.76rem; padding: 4px 10px; max-width: 86%; transition-duration: 0.15s; }
.say.quick.in { opacity: 0.85; }
.say.quick b { display: inline; margin-right: 5px; }
.say.quick .wrote { margin-top: 3px; }
.now.ff .now-meta::before { content: '⏩ '; }
.now.ff .now-meta { color: var(--rule); }
.now-body .say.in:not(.speaking):not(.sys) { opacity: 0.5; }
.say.speaking { transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.say.agent.speaking { background: #1b5248; box-shadow: 0 0 0 1.5px var(--agent); }
.say.other.speaking { background: #36336f; box-shadow: 0 0 0 1.5px var(--other); }
.say.kar .w { color: inherit; opacity: 0.4; transition: opacity 0.18s linear; }
.say.kar .w.said { opacity: 1; }
.say.kar:not(.speaking) .w { opacity: 1; }
/* a level meter next to the name of whoever is talking, while the recording plays */
.now.live .say.speaking b::after { content: ''; display: inline-block; vertical-align: -1px; width: 13px; height: 10px; margin-left: 7px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 3px 40% no-repeat, linear-gradient(currentColor, currentColor) 5px 100% / 3px 90% no-repeat, linear-gradient(currentColor, currentColor) 10px 100% / 3px 60% no-repeat;
  animation: eq 0.9s linear infinite; }
@keyframes eq { 0%, 100% { background-size: 3px 40%, 3px 90%, 3px 60%; } 33% { background-size: 3px 90%, 3px 45%, 3px 85%; } 66% { background-size: 3px 60%, 3px 75%, 3px 35%; } }
body.paused .now.live .say.speaking b::after { animation-play-state: paused; }
@keyframes grow { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── The CRM (right) ── */
.stage { height: 100vh; padding: 66px 0 18px; justify-content: flex-start; gap: 12px; overflow: hidden; }
.crm.board { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0; gap: 0; background: #fff; color: var(--ink); border: 1px solid #b9c2d3; border-radius: 14px; box-shadow: 0 30px 70px -20px rgba(20, 33, 61, 0.35), 0 4px 14px rgba(20, 33, 61, 0.08); overflow: hidden; }
.crm-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--ink); color: #fff; font-size: 0.8rem; }
.crm-dots { display: flex; gap: 5px; }
.crm-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--stage-line); }
.crm-app { font-weight: 700; }
.crm-crumb { color: var(--on-stage-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-crumb b { color: #fff; }
.pen { margin-left: auto; font-size: 0.74rem; font-weight: 600; color: var(--agent); opacity: 0; transition: opacity 0.3s var(--ease); white-space: nowrap; }
.pen::before { content: '✎ '; }
.board.live .pen { opacity: 1; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.45; } }
.crm-body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 12px; background: #e3e8f0; }
.crm-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 10px; align-items: start; }

.card { background: #fff; border: 1px solid #cdd4e0; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(20, 33, 61, 0.06); }
.card.wide { grid-column: 1 / -1; }
.card-h { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid #e3e7ee; background: #f7f9fc; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.card-h .ico { width: 14px; height: 14px; border-radius: 4px; background: var(--ink-soft); flex: none; }
.k-contact .ico { background: var(--other); }
.k-matter .ico { background: var(--ink); }
.k-claim .ico { background: var(--rule); }
.k-person .ico { background: var(--other); border-radius: 50%; }
.k-office .ico { background: #7c8aa5; }
.k-rule .ico { background: var(--rule); transform: rotate(45deg) scale(0.8); border-radius: 2px; }
.count { margin-left: auto; min-width: 22px; text-align: center; background: #eef1f6; color: var(--ink); border-radius: 999px; padding: 1px 7px; font-size: 0.7rem; letter-spacing: 0; }
.count.fresh { animation: bump 0.9s var(--ease); }
@keyframes bump { 0% { transform: scale(1); background: var(--agent); color: #fff; } 30% { transform: scale(1.35); background: var(--agent); color: #fff; } 100% { transform: none; } }

/* A record: label / value */
.fr { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; padding: 4px 10px; font-size: 0.8rem; line-height: 1.35; border-top: 1px solid #f1f3f6; align-items: baseline; }
.card-h + .fr { border-top: 0; }
.fl { color: var(--ink-soft); }
.fv { color: var(--ink); font-weight: 500; border-radius: 4px; padding: 0 4px; margin: 0 -4px; min-width: 0; overflow-wrap: anywhere; }
.fv.empty { color: #a1abbd; font-weight: 400; }
.fv.warn { color: #b3261e; }
.fv[data-side='us'] { background: #dcf4ef; color: var(--agent-ink); font-weight: 600; padding: 0 6px; margin: 0; }
.fv[data-side='them'] { background: #e9e5ff; color: #4b3cb8; font-weight: 600; padding: 0 6px; margin: 0; }

/* A list: header, rows that come and go */
.lst { font-size: 0.79rem; line-height: 1.3; }
.lst-h, .lst-r { display: grid; grid-template-columns: var(--cols); gap: 8px; padding: 5px 10px; align-items: center; }
.lst-h { padding-top: 4px; padding-bottom: 4px; background: #fafbfc; border-bottom: 1px solid #eef0f4; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.lst-r { display: none; border-top: 1px solid #f1f3f6; position: relative; }
.lst-h + .lst-empty + .lst-r, .lst-h + .lst-r { border-top: 0; }
.lst-r.on { display: grid; }
.lc { min-width: 0; overflow-wrap: anywhere; }
.lc b { font-weight: 600; }
.lst-empty { display: none; padding: 7px 10px; color: #9aa3b5; font-style: italic; }
.lst-empty.on { display: block; }
.lst-r.added { animation: rowin 2.2s var(--ease); }
.lst-r.added::after { content: 'NEW'; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 0.56rem; font-weight: 800; letter-spacing: 0.06em; color: #fff; background: var(--agent); border-radius: 4px; padding: 1px 5px; animation: newtag 2.6s var(--ease) forwards; }
@keyframes rowin { 0% { transform: translateY(-6px); background: #c8f0e7; box-shadow: inset 3px 0 0 var(--agent); } 15% { transform: none; background: #c8f0e7; box-shadow: inset 3px 0 0 var(--agent); } 100% { background: transparent; } }
@keyframes newtag { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
.lst-r.cut .lc:not(:last-child) { text-decoration: line-through; color: #b48a86; }
.lst-r.del { animation: rowdel 2s var(--ease); }
@keyframes rowdel { 0%, 60% { background: #ffe0dc; } 100% { background: transparent; } }
.lst-r.done .lc:first-child b::before { content: '✓ '; color: var(--agent-ink); }
.lst-r.gone { opacity: 0.35; }
.lst-r.gone .lc:not(:last-child) { text-decoration: line-through; }
.st { display: inline-block; font-size: 0.66rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.st.wait { background: #fff1d1; color: var(--rule-ink); }
.st.done { background: #dcf4ef; color: var(--agent-ink); }
.st.live { background: var(--agent); color: #fff; animation: blink 1.4s ease-in-out infinite; }
.st.cut { background: #ffe3df; color: #b3261e; }
.st.gone { background: #eef0f4; color: var(--ink-soft); }

/* Added (green), changed (old value struck, amber), cleared (struck, red) */
.fv.fresh, .st.fresh { animation: inked 1.6s var(--ease); }
.fv.mod { animation: changed 2.6s var(--ease); }
.fv s { color: #c0392b; opacity: 0.8; margin-right: 4px; font-weight: 400; }
.fv.del, .st.del { animation: cleared 1.8s var(--ease); }
@keyframes inked { 0% { background: #b6ecdf; box-shadow: 0 0 0 2px var(--agent); } 100% { } }
@keyframes changed { 0%, 70% { background: #ffe6b3; box-shadow: 0 0 0 2px var(--rule); } 100% { } }
@keyframes cleared { 0%, 70% { background: #ffd9d3; box-shadow: 0 0 0 2px var(--bad); } 100% { } }

/* What the narrator is talking about */
.hl { animation: hl 2.8s var(--ease) !important; position: relative; z-index: 1; }
@keyframes hl { 0%, 78% { box-shadow: 0 0 0 2.5px var(--rule), 0 0 16px rgba(240, 169, 46, 0.5); background-color: #fff6df; } 100% { } }
.lst-r.hl, .fr .hl { border-radius: 6px; }
.now.hl, .now .say.hl { animation: hld 2.8s var(--ease) !important; }
@keyframes hld { 0%, 78% { box-shadow: 0 0 0 3px var(--rule), 0 0 26px rgba(240, 169, 46, 0.45); } 100% { } }
.say .w.hl { animation: hlw 2.8s var(--ease) !important; border-radius: 3px; opacity: 1 !important; }
@keyframes hlw { 0%, 82% { background: var(--rule); color: #2a1a00; box-shadow: 0 0 0 2px var(--rule); } 100% { } }

/* The usual way (beat 12) uses the old form, on the right */
.form { margin-top: 0; }

@media (max-width: 900px) {
  html, body { overflow: auto; }
  .layout { height: auto; grid-template-columns: 1fr; }
  .story { height: auto; padding-top: 56px; }
  .beats { min-height: 260px; }
  .stage { height: 80vh; padding-top: 0; }
  .life.big { --dot: 26px; }
  .life-label { font-size: 0.6rem; }
  .paused-tag { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { .beat.active > *, .lst-r.added, .fv.fresh, .fv.mod, .now.live .say.speaking b::after { animation: none !important; } .say.kar .w { opacity: 1; } }

/* ── The usual way (beats 15–16): the same call in an intake form. Grey, cramped, a timer; then a stamp. ── */
.old, .rulebook { display: none; }
body[data-beat='15'] .old { display: flex; }
body[data-beat='15'] .board, body[data-beat='16'] .board, body[data-beat='17'] .board { display: none; }
body[data-beat='15'] .stage, body[data-beat='16'] .stage, body[data-beat='17'] .stage { justify-content: center; }
.old { flex-direction: column; background: #eceef1; color: #3b4150; border: 1px solid #c3c8d1; border-radius: 6px; box-shadow: 0 18px 40px -18px rgba(20, 33, 61, 0.3); overflow: hidden; font-family: Arial, Helvetica, sans-serif; position: relative; }
.old-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #5b6372; color: #fff; font-size: 0.78rem; }
.old-app { font-weight: 700; }
.old-crumb b { font-weight: 700; }
.old-timer { margin-left: auto; font-variant-numeric: tabular-nums; background: #2b303a; padding: 1px 8px; border-radius: 3px; }
.old-body { position: relative; padding: 16px; display: grid; gap: 14px; }
.old-form { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 0.92rem; }
.old-form dt { color: #6b7280; }
.old-form dd { margin: 0; background: #fff; border: 1px solid #c9ced6; border-radius: 2px; padding: 4px 8px; }
.old-notes { font-family: 'Courier New', monospace; font-size: 0.8rem; line-height: 1.4; color: #4b5161; min-height: 4.5em; }
.old-check { display: inline-block; width: 1.1em; font-weight: 700; }
.old-check.on { color: #b3261e; }
.stamp { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-8deg) scale(1.6); opacity: 0; pointer-events: none;
  border: 4px solid #c62828; color: #c62828; border-radius: 8px; padding: 8px 22px; font: 800 2rem/1 var(--font); letter-spacing: 0.02em; text-transform: uppercase; text-align: center; background: rgba(255, 255, 255, 0.82); }
.stamp small { display: block; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.08em; margin-top: 4px; }
.old.stamped .stamp { animation: stamp 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.8); } 100% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }
.old.stamped .old-form { filter: grayscale(1); opacity: 0.55; transition: opacity 0.6s, filter 0.6s; }
ol.ghost { list-style: none; margin: 0; padding: 0; display: none; gap: 8px; }
body[data-beat='16'] ol.ghost { display: grid; }
body[data-beat='16'] .stamp { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(0.62); top: 14%; left: 78%; animation: none; }
body[data-beat='16'] .old-form { filter: grayscale(1); opacity: 0.45; }
.ghost li { background: #fff; border: 1px dashed #b4bac4; border-radius: 4px; padding: 8px 12px; font-size: 0.92rem; opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.ghost li.on { opacity: 1; transform: none; }
.ghost li b { color: #3b4150; }
.ghost li span { display: block; color: #b3261e; font-weight: 700; font-size: 0.84rem; margin-top: 2px; }

/* ── The close (beat 17): one rule, then the firm's rulebook, then the tally ── */
body[data-beat='17'] .rulebook, body.ended .rulebook { display: none; }
body[data-beat='17'] .rulebook { display: none; }
.rulebook { flex-direction: column; gap: 16px; }
.rule-hero { background: var(--ink); color: #fff; border-radius: 16px; padding: 22px 24px; box-shadow: 0 30px 70px -24px rgba(20, 33, 61, 0.55); position: relative; z-index: 2; animation: rise 0.7s var(--ease) both; }
.rule-tag { margin: 0 0 10px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; color: var(--rule); }
.rule-text { margin: 0; font-size: clamp(1.3rem, 2.1vw, 1.8rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
.rule-meta { margin: 12px 0 0; font-size: 0.86rem; color: var(--on-stage-soft); }
.rule-stack { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.rule-stack li { background: #fff; border: 1px solid #cdd4e0; border-radius: 8px; padding: 7px 10px; font-size: 0.78rem; line-height: 1.3; color: var(--ink); opacity: 0; transform: translateY(-14px) scale(0.96); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.rule-stack li.on { opacity: 1; transform: none; }
.rule-stack li::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; transform: rotate(45deg); background: var(--rule); vertical-align: 1px; }
.rule-stack li.more { background: transparent; border-style: dashed; color: var(--ink-soft); text-align: center; }
.rule-stack li.more::before { display: none; }
.rulebook .tally { margin: 4px 0 0; font-size: 1.05rem; font-weight: 600; color: var(--ink); opacity: 0; transition: opacity 0.6s var(--ease); font-variant-numeric: tabular-nums; }
.rulebook .tally.on { opacity: 1; }
.rulebook .tally b { color: var(--agent-ink); }

/* The lifecycle has many steps now: only the steps carry labels, the rule diamonds a number */
.life.big .life-rule .life-label { display: none; }
.life-label { font-size: 0.62rem; }
.old { flex: 0 0 auto; }

/* ── The timeline (SVG): a real clock, one band per day. Marks are small and quiet; the step on screen is ringed
   and named; the narrator's words light up the marks they count. ── */
.life { padding: 2px 0 0; }
.tl { display: block; overflow: visible; max-width: 100%; }
.tl-rail line { stroke: var(--line); stroke-width: 1.25; stroke-linecap: round; }
.tl-skip { stroke: var(--line); stroke-width: 1.25; stroke-dasharray: 1.5 4; stroke-linecap: round; }
.tl-day { font: 600 9.5px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; fill: var(--ink-soft); }
.tl-quiet { font: 500 9px/1 var(--font); letter-spacing: 0.04em; fill: #9aa3b5; }
.tl-now { font: 600 11.5px/1 var(--font); fill: var(--ink); }
.tl-mark > :first-child { fill: var(--paper); stroke: #b3bccb; stroke-width: 1.2; transition: fill 0.4s, stroke 0.4s; transform-box: fill-box; transform-origin: center; }
.tl-mark.tl-rule > :first-child { stroke: var(--rule); }
.tl-mark.tl-event > :first-child { stroke: var(--other); }
.tl-mark.done > :first-child { fill: var(--ink); stroke: var(--ink); }
.tl-mark.tl-rule.done > :first-child { fill: var(--rule); stroke: var(--rule); }
.tl-mark.tl-event.done > :first-child { fill: var(--other); stroke: var(--other); }
.tl-mark.here > :first-child { fill: var(--agent); stroke: var(--agent); }
.tl-mark.tl-rule.here > :first-child { fill: var(--rule); stroke: var(--rule); }
.tl-mark.tl-event.here > :first-child { fill: var(--other); stroke: var(--other); }
.tl-ring { fill: none; stroke: var(--agent); stroke-width: 1.25; opacity: 0; transform-box: fill-box; transform-origin: center; }
.tl-mark.here .tl-ring { opacity: 0.55; animation: tlpulse 1.8s ease-in-out infinite; }
.tl-mark.tl-event.here .tl-ring { stroke: var(--other); }
.tl-mark.tl-rule.here .tl-ring { stroke: var(--rule); }
@keyframes tlpulse { 50% { transform: scale(1.25); opacity: 0.2; } }
/* the narrator counts them: each counted mark grows and turns amber, together */
.tl .tl-mark.hl { animation: none !important; }
.tl-mark > :first-child { transition: fill 0.25s, stroke 0.25s, transform 0.3s var(--ease); }
.tl .tl-mark.hl > :first-child { transform: scale(1.55); fill: var(--rule); stroke: var(--rule-ink); }
.tl .tl-day.hl { animation: none !important; fill: var(--rule-ink); }
.tl-day { transition: fill 0.25s; }
@media (prefers-reduced-motion: reduce) { .tl-mark.here .tl-ring, .tl .tl-mark.hl > :first-child { animation: none; } }
/* the opening headline is a sentence now: one size down, so it sits in three lines */
.beat.hero h1, .gate h1 { font-size: clamp(1.9rem, 3.1vw, 2.9rem); line-height: 1.08; text-wrap: balance; }

/* ── Matter tabs: one tab per matter (a client's one incident), each with its own page of records ── */
.mt-strip { flex: none; display: flex; gap: 4px; align-items: flex-end; padding: 8px 12px 0; background: #d3dae6; border-bottom: 1px solid #b9c2d3; min-height: 8px; overflow: hidden; }
.mt-strip:not(:has(.mt.on)) { display: none; }
.mt { display: none; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 64px; padding: 7px 10px 6px; border: 1px solid transparent; border-bottom: 0; border-radius: 9px 9px 0 0; background: transparent; color: #4b566b; font: inherit; font-size: 0.74rem; line-height: 1.2; cursor: pointer; text-align: left; transition: background 0.25s, color 0.25s; }
.mt.on { display: flex; }
.mt:hover { background: rgba(255, 255, 255, 0.55); }
.mt.sel { background: #e3e8f0; border-color: #b9c2d3; color: var(--ink); margin-bottom: -1px; box-shadow: 0 -2px 0 var(--agent) inset; }
.mt.all { flex: none; margin-left: auto; }
.mt { flex-direction: column; align-items: stretch; gap: 1px; padding: 6px 11px 6px; }
.mt.on { display: flex; }
.mt-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mt-top b { font-weight: 700; font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mt-top .mt-st { margin-left: auto; }
.mt-t { font-weight: 400; font-size: 0.7rem; color: #6a7488; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt.sel .mt-t { color: var(--ink-soft); }
.mt.all { align-items: flex-start; }
.mt-st { flex: none; font-size: 0.62rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; background: #eef1f6; color: var(--ink-soft); }
.mt-st[data-s='intake'] { background: #fff1d1; color: var(--rule-ink); }
.mt-st[data-s='potential'] { background: #e9e5ff; color: #4b3cb8; }
.mt-st[data-s='review'] { background: #e9e5ff; color: #4b3cb8; }
.mt-st[data-s='accepted'] { background: #dcf4ef; color: var(--agent-ink); }
.mt-st[data-s='signed'] { background: var(--agent); color: #fff; }
.mt-st[data-s='declined'] { background: #ffe3df; color: #b3261e; }
.mt.pop { animation: tabpop 0.8s var(--ease); }
@keyframes tabpop { 0% { opacity: 0; transform: translateY(10px) scale(0.92); background: #c8f0e7; } 40% { opacity: 1; transform: none; background: #c8f0e7; } 100% { background: transparent; } }
.mt.sel.pop { animation-name: tabpopsel; }
@keyframes tabpopsel { 0% { opacity: 0; transform: translateY(10px) scale(0.92); } 100% { opacity: 1; transform: none; } }
.mt-st.bump { animation: stbump 1.2s var(--ease); }
@keyframes stbump { 0% { transform: scale(1); box-shadow: 0 0 0 0 var(--agent); } 25% { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(43, 184, 163, 0.45); } 100% { transform: none; box-shadow: 0 0 0 0 transparent; } }

/* Pages: only the shown tab's page is in the layout */
.crm-grid { display: block; }
.mpanel { display: none; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 10px; align-items: start; }
.mpanel.on { display: grid; animation: panelin 0.35s var(--ease); }
@keyframes panelin { from { opacity: 0.4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.mp-empty { display: none; padding: 40px 16px; text-align: center; color: #7b869b; font-style: italic; font-size: 0.85rem; }
.mp-empty.on { display: block; }
.card.wide:not(.k-contact) { grid-column: 1 / -1; }
/* A status in a field is a chip */
.fv[data-side^='st-'] { justify-self: start; width: fit-content; padding: 1px 9px; margin: 0; border-radius: 999px; font-weight: 700; font-size: 0.72rem; background: #eef1f6; }
.fv[data-side='st-intake'] { background: #fff1d1; color: var(--rule-ink); }
.fv[data-side='st-potential'], .fv[data-side='st-review'] { background: #e9e5ff; color: #4b3cb8; }
.fv[data-side='st-accepted'] { background: #dcf4ef; color: var(--agent-ink); }
.fv[data-side='st-signed'] { background: var(--agent); color: #fff; }
.fv[data-side='st-declined'] { background: #ffe3df; color: #b3261e; }
.k-conflict .ico { background: #4b3cb8; }
.conflict { padding: 8px 10px; font-size: 0.8rem; line-height: 1.4; color: var(--ink); background: #f5f3ff; }
.mt-link { margin-top: 5px; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: #4b3cb8; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.lst-r.go { cursor: pointer; }
.lst-r.go:hover { background: #f4f7fb; }
.k-incident .ico { background: var(--ink-soft); }

/* The overview: one narrow card per matter, side by side */
.mpanel.role-all { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.mpanel.role-all .card { cursor: pointer; }
.mpanel.role-all .card:hover { border-color: var(--agent); }
.mpanel.role-all .card-h { text-transform: none; letter-spacing: 0; font-size: 0.82rem; }
.mpanel.role-all .fr { grid-template-columns: 62px minmax(0, 1fr); }
.mpanel.role-all .fv { overflow-wrap: anywhere; }
.mpanel.role-all { zoom: 1.22; }

/* ══ Design review pass (2026-11-12). Presentation only; beats 15–17 and the end screen are left alone. ══ */

/* Headlines break into even lines; the punch line no longer strands one word on a line of its own. */
.beat h2, .beat h1, .punch { text-wrap: balance; }
.punch { line-height: 1.15; margin-top: 0.2em !important; }
.beat .after { font-size: 1rem; color: var(--ink-soft); margin-top: 0.2em; }

/* What the marks on the timeline are. Only on the opening screen, where the narrator counts them. */
.life-key { display: none; flex: none; gap: 16px; flex-wrap: wrap; margin: -6px 0 0; padding: 0; list-style: none; font-size: 0.74rem; font-weight: 500; color: var(--ink-soft); }
body[data-beat='0'] .life-key { display: flex; }
.life-key li { display: inline-flex; align-items: center; gap: 6px; }
.life-key i { display: inline-block; width: 9px; height: 9px; background: var(--ink); flex: none; }
.life-key .k-call i { border-radius: 50%; }
.life-key .k-text i { width: 11px; height: 10px; clip-path: polygon(0 0, 100% 0, 100% 72%, 46% 72%, 22% 100%, 22% 72%, 0 72%); }
.life-key .k-rule i { background: var(--rule); transform: rotate(45deg) scale(0.85); border-radius: 1px; }
.life-key .k-person i { background: var(--other); border-radius: 50%; }

/* A matter's page: the short lists sit beside the incident, so the page is a fifth shorter and is drawn larger
   (the page is scaled to fit the window; less height means bigger type). */
@media (min-width: 901px) {
  .mpanel.role-crash > .k-contact, .mpanel.role-other > .k-contact { grid-column: 1; grid-row: 1; }
  .mpanel.role-crash > .k-incident, .mpanel.role-other > .k-incident { grid-column: 1; grid-row: 2 / span 2; }
  .mpanel.role-crash > .k-matter, .mpanel.role-other > .k-matter { grid-column: 2; grid-row: 1; }
  .mpanel.role-crash > .card.k-claim.wide, .mpanel.role-other > .card.k-claim.wide { grid-column: 2; grid-row: 2; }
  .mpanel.role-crash > .card.k-office.wide[data-k='firms'], .mpanel.role-other > .card.k-office.wide[data-k='providers'] { grid-column: 2; grid-row: 3; }
}
/* The second client's page has a conflict check across the top; its short lists sit beside the incident too. */
@media (min-width: 901px) {
  .mpanel.role-partner > .k-contact { grid-column: 1; grid-row: 1; }
  .mpanel.role-partner > .k-matter { grid-column: 2; grid-row: 1; }
  .mpanel.role-partner > .k-conflict { grid-row: 2; }
  .mpanel.role-partner > .k-incident { grid-column: 1; grid-row: 3 / span 2; }
  .mpanel.role-partner > .card.k-claim.wide { grid-column: 2; grid-row: 3; }
  .mpanel.role-partner > .card.k-office.wide[data-k='firms'] { grid-column: 2; grid-row: 4; }
}
.k-conflict .fr { border-top: 1px solid #e6e9f0; }
.tg-node.claim { background: #f3f0ff; border-color: #a99be0; }

/* The reminder that was cancelled stays marked: it is the point of the film, and it was one faint grey line. */
.lst-r.cut { background: #fff0ed; box-shadow: inset 3px 0 0 #d9463a; }
.lst-r.cut .st.cut { font-size: 0.72rem; padding: 2px 9px; }
.lst-r.del { animation-duration: 3.2s; }

/* The opening screen: the three matters as three rows across the window, at a size that can be read. */
body[data-beat='0'] .mpanel.role-all { grid-template-columns: minmax(0, 1fr); zoom: 1.5; gap: 12px; }
body[data-beat='0'] .mpanel.role-all .fr { grid-template-columns: 76px minmax(0, 1fr); }
body[data-beat='0'] .mpanel.role-all .fr:last-child { display: none; } /* the list of scheduled actions: detail for the matter's own page */

/* ── Phone: one fixed screen like the desktop film. Top to bottom: timeline, this screen's headline, the CRM,
   the conversation. (It used to be the scrolling layout: the headline and the conversation were below the fold.) ── */
@media (max-width: 900px) {
  html, body { overflow: hidden; }
  .layout { display: flex; flex-direction: column; height: 100vh; height: 100dvh; gap: 8px; padding: 52px 12px 10px; }
  .story { display: contents; }
  .bar { padding: 8px 12px; }
  .brand { font-size: 1rem; }
  .sound { padding: 6px 11px; font-size: 0.8rem; }
  .life { order: 1; flex: none; overflow: hidden; }
  .life-key { display: none !important; }
  .beats { order: 2; flex: none; height: 96px; min-height: 0; }
  body[data-beat='0'] .beats, body.ended .beats { flex: 1 1 auto; height: auto; }
  .beat, .beat.hero { min-height: 0; padding: 0; justify-content: center; }
  .beat h2 { font-size: 1.22rem; line-height: 1.12; margin: 0; }
  .beat.endcard h2 { margin-bottom: 0.4em; }
  .beat .when { font-size: 0.8rem !important; margin-bottom: 0.25em !important; }
  .beat:not(.hero):not(.endcard) > p:not(.when) { display: none; }
  .beat.hero h1 { font-size: 1.75rem; }
  .beat .lede { font-size: 1.05rem; }
  .stage { order: 3; position: static; flex: 1 1 0; min-height: 0; height: auto; padding: 0; background: none; }
  body[data-beat='0'] .stage { flex: 0 0 0; }
  body.ended .stage { flex: 0 1 36vh; }
  .story .now { order: 4; flex: none; max-height: 30vh; min-height: 0; padding: 10px 12px; border-radius: 16px; }
  .say { font-size: 0.84rem; }
  .crm-bar { padding: 7px 10px; font-size: 0.72rem; }
  .crm-body { padding: 8px; }
  .crm-dots { display: none; }
  .crm-app { white-space: nowrap; }
  .mt { flex: 1 1 0; padding: 5px 8px; }
  .mt-top { flex-wrap: wrap; row-gap: 2px; }
  .mt-top b { flex: 1 1 100%; }
  .mt-top .mt-st { margin-left: 0; }
  /* A matter's page on a phone: what it is, its claims, what the rules scheduled; the long records are on the full case page. */
  .mpanel:not(.role-all) { grid-template-columns: minmax(0, 1fr); }
  .mpanel:not(.role-all) > .k-contact, .mpanel.role-crash > .k-incident, .mpanel.role-other > .k-incident { display: none; }
  .mpanel > .k-matter { order: 1; }
  .mpanel > .k-claim, .mpanel > .k-conflict { order: 2; }
  .mpanel > .k-rule { order: 3; }
  .mpanel > .k-office { order: 4; }
  .mpanel > .k-incident { order: 5; }
}


/* ── The ending (beats 16, 17): what one call held, and the firm's own words putting it in order ── */
.tangle { display: none; position: relative; width: 100%; height: min(82vh, 760px); background: #fbfaf7; border: 1px solid #d9d4c7; border-radius: 10px; box-shadow: 0 24px 50px -28px rgba(20, 33, 61, 0.35); overflow: hidden; }
body[data-beat='16'] .tangle, body[data-beat='17'] .tangle { display: block; }
.tg-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.tg-lines line { stroke: #c9b8a6; stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 0.5s var(--ease), stroke 0.6s; }
.tg-lines line.on { opacity: 0.9; }
.tg-lines line.ok { stroke: #9fb7d9; opacity: 0.55; }
.tangle.done .tg-lines line { opacity: 0; }
.tg-nodes { position: absolute; inset: 0; }
.tg-node { position: absolute; transform: translate(-50%, -50%) scale(0.8); max-width: 23%; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1.5px solid #cfc7b8; font-size: 0.8rem; line-height: 1.2; color: #2b2f38; text-align: center; opacity: 0; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), border-color 0.5s, background 0.5s, box-shadow 0.5s; box-shadow: 0 6px 16px -10px rgba(20, 33, 61, 0.4); }
.tg-node.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.tg-node small { display: block; color: #7a7f8a; font-size: 0.7rem; margin-top: 2px; }
.tg-node.person { font-weight: 700; border-color: #2b2f38; }
.tg-node.incident { background: #fff6e8; border-color: #e0a85a; }
.tg-node.matter { background: #eef2fb; border-color: #8ea6d6; font-weight: 600; }
.tg-node.rule { background: #fff1f0; border: 1.5px dashed #c8433a; color: #8f2a22; font-weight: 600; }
.tg-node.ok { border-style: solid; border-color: #2f8f5b; background: #f0faf4; color: #1f5e3c; box-shadow: 0 0 0 3px rgba(47, 143, 91, 0.15); }
.tg-node.hl { box-shadow: 0 0 0 4px rgba(214, 160, 60, 0.45); }
.tg-cols { position: absolute; inset: 0; pointer-events: none; }
.tg-col { position: absolute; top: 3%; width: 30%; transform: translateX(-50%); text-align: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #5a6a8a; opacity: 0; transition: opacity 0.6s var(--ease) 0.6s; }
.tangle.done .tg-col { opacity: 1; }
.tg-rules { position: absolute; left: 3%; right: 3%; bottom: 3%; margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tg-rules li { background: #1f2a44; color: #fff; border-radius: 8px; padding: 8px 12px; font-size: 0.86rem; line-height: 1.3; opacity: 0; transform: translateY(10px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); display: none; }
body[data-beat='17'] .tg-rules li { display: block; }
.tg-rules li.on { opacity: 1; transform: none; }
.tg-rules li b { color: #9fe0b9; font-weight: 700; margin-right: 6px; }
.tangle.done .tg-rules { display: none; }
.tg-tally { position: absolute; left: 0; right: 0; bottom: 4%; margin: 0; text-align: center; font-size: 1.05rem; font-weight: 600; color: #1f2a44; opacity: 0; transition: opacity 0.6s var(--ease) 0.8s; font-variant-numeric: tabular-nums; }
.tg-tally b { color: #2f8f5b; }
.tangle.done .tg-tally { opacity: 1; }
#b17 .punch { margin-top: 18px; font-weight: 700; }
@media (max-width: 899px) {
  .tangle { height: 58vh; }
  .tg-node { font-size: 0.62rem; padding: 4px 6px; max-width: 28%; }
  .tg-node small { display: none; }
  .tg-rules li { font-size: 0.7rem; padding: 5px 8px; }
}
#b17 .punch { font-size: 1.05rem; font-weight: 600; color: var(--muted, #5b6170); line-height: 1.4; }
.tg-node small { display: block !important; }
.tg-node.person { min-width: 7.5em; }

/* Beat 17: three reasons, then the claim. */
#b17 .why { list-style: none; counter-reset: why; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
#b17 .why li { counter-increment: why; position: relative; padding-left: 2.1em; font-size: 1.02rem; line-height: 1.4; color: var(--muted, #5b6170); transition: color 0.4s; }
#b17 .why li::before { content: counter(why); position: absolute; left: 0; top: 0.05em; width: 1.5em; height: 1.5em; border-radius: 50%; background: #1f2a44; color: #fff; font-size: 0.8rem; font-weight: 700; display: grid; place-items: center; }
#b17 .why li b { color: var(--ink, #1f2a44); display: block; font-size: 1.12rem; }
#b17 .why li.hl { color: var(--ink, #1f2a44); }
#b17 .claim { margin-top: 22px; }
.tg-node.rule small { color: #b3261e; font-weight: 600; font-style: italic; }
.tg-node.rule.ok small { color: #2f6f4b; }
.tangle .tg-node { display: block !important; }


/* ── A call nobody answers: it rings, then says so, calmly. Not an error, just what happens in intake. ── */
.ringcard { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 14px; padding: 12px 14px; border-radius: 14px; background: var(--stage-2); border: 1px solid var(--stage-line); transition: background 0.5s var(--ease), border-color 0.5s var(--ease); }
.rc-ico { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--agent); transition: background 0.5s var(--ease); }
.rc-ico svg { width: 19px; height: 19px; fill: #fff; transform-origin: 50% 50%; }
.rc-slash { position: absolute; left: 50%; top: 50%; width: 24px; height: 2.5px; border-radius: 2px; background: var(--on-stage); transform: translate(-50%, -50%) rotate(-45deg) scaleX(0); transition: transform 0.45s var(--ease) 0.15s; box-shadow: 0 0 0 1.5px var(--stage-2); }
.rc-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rc-t b { font-size: 0.98rem; font-weight: 600; color: var(--on-stage); }
.rc-t span { font-size: 0.78rem; color: var(--on-stage-soft); }
.rc-pill { font-size: 0.74rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: rgba(43, 184, 163, 0.18); color: var(--agent); white-space: nowrap; }
.rc-cap { grid-column: 1 / -1; margin-top: 4px; font-size: 0.82rem; color: var(--on-stage-soft); }
.ringcard.ringing .rc-ico { animation: ringshake 1.3s ease-in-out infinite, ring 1.3s var(--ease) infinite; }
.ringcard.ringing .rc-pill { animation: blink 1.4s ease-in-out infinite; }
.ringcard.noans { background: #1a2745; border-style: dashed; border-color: #4a5c8a; }
.ringcard.noans .rc-ico { background: #3a4a73; }
.ringcard.noans .rc-ico svg { fill: #c9d2e8; }
.ringcard.noans .rc-slash { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1); }
.ringcard.noans .rc-pill { background: rgba(255, 255, 255, 0.1); color: var(--on-stage); }
@keyframes ringshake { 0%, 100% { transform: rotate(0); } 8%, 24% { transform: rotate(-14deg); } 16%, 32% { transform: rotate(14deg); } 40% { transform: rotate(0); } }
.now .ringcard.hl { animation: hld 2.8s var(--ease) !important; }
@media (prefers-reduced-motion: reduce) { .ringcard.ringing .rc-ico, .ringcard.ringing .rc-pill { animation: none; } }

/* The same thing on the CRM: the call stays in the list, marked, and the case goes on. */
.st.miss { background: #eceff6; color: #4c5878; box-shadow: inset 0 0 0 1px #cfd6e6; }
.lst-r.miss .lc:first-child b::before { content: '✕ '; color: #7b88a8; font-weight: 700; }
.lst-r.miss { background: #f7f8fb; }
.lst-r.ring { animation: rowmiss 2.4s var(--ease); }
@keyframes rowmiss { 0%, 55% { background: #e4e8f3; box-shadow: inset 3px 0 0 #7b88a8; } 100% { background: #f7f8fb; } }
.fv[data-side='st-noanswer'] { background: #eceff6; color: #4c5878; }

/* On the timeline: a call nobody answered is an open circle with a slash. */
.tl-mark.tl-missed > :first-child { fill: var(--paper); stroke: #7b88a8; stroke-dasharray: 2.2 1.8; }
.tl-mark.tl-missed.done > :first-child { fill: var(--paper); stroke: #55607a; }
.tl-mark.tl-missed.here > :first-child { fill: #fff; stroke: #55607a; }
.tl-slash { stroke: #7b88a8; stroke-width: 1.3; stroke-linecap: round; pointer-events: none; }
.tl-mark.tl-missed.done .tl-slash, .tl-mark.tl-missed.here .tl-slash { stroke: #55607a; }
.tl-mark.tl-missed.here .tl-ring { stroke: #7b88a8; }
.tl .tl-mark.tl-missed.hl > :first-child { fill: var(--rule); stroke: var(--rule-ink); }
.life-key .k-missed i { background: transparent; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #7b88a8; position: relative; }
.life-key .k-missed i::after { content: ''; position: absolute; left: -1px; right: -1px; top: 50%; height: 1.5px; background: #7b88a8; transform: rotate(-45deg); }

/* Matter tabs: the one on screen is unmistakable; no underline. */
.mt { opacity: 0.62; transition: background 0.25s, color 0.25s, opacity 0.25s, transform 0.25s; }
.mt.sel { opacity: 1; background: #fff; border-color: #9fabc0; box-shadow: 0 -4px 12px -6px rgba(20, 33, 61, 0.35); color: var(--ink); animation: tabin 0.35s var(--ease); }
.mt.sel b { font-weight: 800; }
@keyframes tabin { from { transform: translateY(4px); background: #dfe9ff; } to { transform: none; background: #fff; } }
.mt-link { text-decoration: none; }

/* ══ Phone pass (2026-11-13). Desktop is unchanged: everything new is hidden there or inside the phone query. ══ */
.pp, .paused-pill { display: none; }
.pp-ico { display: block; box-sizing: border-box; width: 11px; height: 12px; border-left: 3.5px solid currentColor; border-right: 3.5px solid currentColor; }
body.paused .pp-ico { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
@media (max-width: 900px) {
  /* Controls: sound, pause, skip. A tap on the CRM or the conversation pauses too; a pill says how to go on. */
  .bar-right { gap: 6px; }
  .pp { display: inline-flex; padding: 6px 11px; min-height: 32px; }
  body.ended .pp, body.gated .pp { display: none; }
  body.paused .paused-pill { display: block; position: fixed; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 45; border: 0; border-radius: 999px; padding: 13px 22px; background: var(--ink); color: #fff; font: 600 0.95rem/1 var(--font); white-space: nowrap; box-shadow: 0 14px 34px -10px rgba(20, 33, 61, 0.55); cursor: pointer; }

  /* The CRM is a window onto the page at a readable size; it moves to each new write (demo.js, follow). It can
     also be scrolled by hand. */
  .crm-body { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .crm-body::-webkit-scrollbar { display: none; }
  /* The "All matters" tab is for the end; during the film it only squeezed the matter names. */
  body.film .mt.all.on { display: none; }
  .mt-st { font-size: 0.6rem; padding: 1px 6px; }
  .lst-r .st { white-space: normal; line-height: 1.25; }
  .story .now { max-height: 27dvh; }

  /* Beat 15, the usual way: the form from its top, smaller, so "Caller" and the stamp are both seen. */
  body[data-beat='15'] .stage { justify-content: flex-start; }
  .old-body { padding: 10px; gap: 8px; }
  .old-form { grid-template-columns: 7.2em minmax(0, 1fr); gap: 5px 8px; font-size: 0.8rem; }
  .old-form dd { padding: 2px 6px; }
  .old-notes { font-size: 0.7rem; min-height: 0; }
  .stamp { font-size: 1.45rem; padding: 6px 16px; }
  .stamp small { font-size: 0.7rem; }

  /* Beat 17: the three reasons and the claim get the whole screen. (The web of nodes settling into three columns
     needs a wide screen; on a phone it was a pile of overlapping boxes.) */
  body[data-beat='17'] .stage { display: none; }
  body[data-beat='17'] .beats { flex: 1 1 auto; height: auto; }
  #b17 .why { gap: 10px; margin-top: 10px; }
  #b17 .why li { font-size: 0.92rem; line-height: 1.35; }
  #b17 .why li b { font-size: 1.02rem; }
  #b17 .claim { margin-top: 18px; font-size: 1.45rem; line-height: 1.15; }

  /* The end: a page that scrolls. The words and the buttons first, then the finished CRM, one matter per row. */
  html:has(body.ended), body.ended { height: auto; overflow-y: auto; }
  body.ended .layout { height: auto; min-height: 100dvh; }
  body.ended .beats { flex: none; height: auto; }
  body.ended .beat.endcard { position: static; }
  body.ended .beat.endcard .start { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
  body.ended .beat.endcard .fine { font-size: 0.82rem; }
  body.ended .stage { flex: none; height: 80dvh; }
  body.ended .mpanel.role-all { grid-template-columns: minmax(0, 1fr); zoom: 1; }
  body.ended .mpanel.role-all .fr { grid-template-columns: 76px minmax(0, 1fr); }
}
@media (max-width: 420px) { .xs-hide { display: none; } }

/* ── The logo (from superpanel.io): in the bar, and above the words on the start screen. ── */
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo { display: block; height: 24px; width: auto; }
.gate-logo { display: block; height: 30px; width: auto; margin: 0 0 28px; }
@media (max-width: 900px) { .brand-logo { height: 20px; } .gate-logo { height: 26px; margin-bottom: 22px; } }

/* ── Switching matter tabs: instant. The old tab used to fade back while the new one flashed in, which looked
   like two tabs pressed at once. (A tab that has just opened still pops in: that is news, not a switch.) ── */
.mt { transition: none; }
.mt.sel { animation: none; }
.mt.pop { animation: tabpop 0.8s var(--ease); }
.mt.sel.pop { animation: tabpopsel 0.8s var(--ease); }

/* ── No green on the tabs (2026-11-13). A status change used to pulse its chip green, and a new tab came in on a
   green ground; both landed in the same moment as the switch they caused, and read as the switch flashing. The
   chip's new words say it changed; a new tab still slides in, without the colour. ── */
.mt-st.bump { animation: none; }
@keyframes tabpopplain { 0% { opacity: 0; transform: translateY(10px) scale(0.92); } 100% { opacity: 1; transform: none; } }
.mt.pop, .mt.sel.pop { animation: tabpopplain 0.6s var(--ease); }

/* ── "Book a call" in the header, on every screen (2026-11-13): the header stays put, so it is always there. ── */
.cta { display: inline-flex; align-items: center; flex: none; padding: 7px 15px; border-radius: 999px; background: var(--ink); color: #fff; font-family: var(--display, inherit); font-size: 0.86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.cta:hover { background: #24345a; }
/* the bar stays visible (and clickable) during the film, the pause and the end; only the start screen covers it */
.bar { pointer-events: none; }
.bar .cta { pointer-events: auto; }
@media (max-width: 900px) { .cta { padding: 6px 11px; font-size: 0.8rem; min-height: 32px; } }
/* Narrow phones: the logo becomes the mark alone, so sound, pause, skip and the call button fit on one line. */
@media (max-width: 420px) {
  .brand-logo { width: 20px; height: 27px; object-fit: cover; object-position: left center; }
}
/* The start screen covers the bar; "Book a call" stays above it (its own logo is on the start screen). */
body.gated .bar { z-index: 60; }
body.gated .bar .brand { visibility: hidden; }
body.gated .paused-pill { display: none !important; }

/* ── Without sound (2026-11-13): the narrator's words as captions under the headline, and a notice when the
   browser would not play the sound. Neither shows while the sound is on. ── */
.subs { display: none; flex: none; margin: 0; padding: 10px 14px; border-left: 3px solid var(--rule); border-radius: 0 10px 10px 0; background: #fff8e8; color: var(--ink); font-size: 1rem; line-height: 1.4; }
.subs.on { display: block; animation: subsin 0.25s var(--ease); }
.subs::before { content: 'Narrator'; display: block; margin-bottom: 2px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rule-ink); }
@keyframes subsin { from { opacity: 0.3; } to { opacity: 1; } }
body.ended .subs, body.gated .subs { display: none !important; }
.soundfail-pill { display: none; }
body.soundfail.film:not(.gated):not(.ended) .soundfail-pill { display: inline-flex; align-items: center; gap: 9px; position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 46; border: 0; border-radius: 999px; padding: 11px 18px; background: var(--rule); color: #2a1a00; font: 600 0.92rem/1 var(--font); white-space: nowrap; box-shadow: 0 12px 30px -10px rgba(20, 33, 61, 0.45); cursor: pointer; pointer-events: auto; }
@media (max-width: 900px) {
  .subs { order: 2; padding: 7px 11px; font-size: 0.86rem; line-height: 1.35; }
  .subs::before { font-size: 0.6rem; }
  body.soundfail.film:not(.gated):not(.ended) .soundfail-pill { top: auto; bottom: 18px; font-size: 0.84rem; padding: 11px 16px; }
}

/* The web of boxes on a phone (screens 16 and 17): names only, except the catches, so nineteen boxes fit. */
@media (max-width: 900px) {
  .tangle .tg-node { font-size: 0.56rem; padding: 3px 5px; max-width: 25%; line-height: 1.15; }
  .tangle .tg-node:not(.rule) small { display: none !important; }
  .tangle .tg-node.rule small { font-size: 0.5rem; line-height: 1.1; }
}
