/* Scene A: a neutral handheld device running the Urd interview, then the record's way to the QMS.
   Mirrors the product's interview screen (AI card, round mic button with pulse rings,
   "MICROPHONE ACTIVE" banner). State classes on the scene root: speaking, recording, preparing, tapped. */
:root { --rec: #C93C3C; --rec-tint: #FDECEC; --bezel: #0B1722; --bezel-line: #2A4257; }

.hero-stage { min-width: 0; }
.hh {
    position: relative; width: min(100%, 320px); margin-inline: auto; padding: 10px;
    border-radius: 42px; background: var(--bezel);
    box-shadow: var(--shadow-stage), inset 0 0 0 1.5px var(--bezel-line), 0 0 0 1px rgba(255, 255, 255, .04);
}
.hh::after { content: ""; position: absolute; right: -3px; top: 118px; width: 3px; height: 54px; border-radius: 0 3px 3px 0; background: var(--bezel-line); }
.hh-screen {
    position: relative; height: 560px; border-radius: 32px; overflow: hidden;
    display: flex; flex-direction: column;
    background: var(--cool-white); color: var(--graphite); font-size: .875rem; line-height: 1.45;
}
.hh-ctx { display: flex; align-items: baseline; gap: .5rem; padding: .875rem 1rem .75rem; background: var(--white); border-bottom: 1px solid var(--fog); }
.hh-ctx .id { font: 400 .8125rem/1 var(--font-mono); color: var(--ocean); white-space: nowrap; }
.hh-ctx .meta { font-size: .75rem; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hh-banner {
    height: 0; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; gap: .5rem;
    font: 600 .6875rem/1 var(--font-body); letter-spacing: .06em; color: var(--rec); background: var(--rec-tint);
    transition: height 220ms var(--ease);
}
.hh-banner i { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: blink 1s ease-in-out infinite; }
.recording .hh-banner { height: 30px; border-bottom: 2px solid var(--rec); }
@keyframes blink { 50% { opacity: .3; } }

/* Conversation stream: newest at the bottom, older turns slide up and out */
.stream { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: .625rem; padding: .875rem; overflow: hidden; }
.stream > * { flex: none; }
.scene-live .stream [data-at]:not(.on), .scene-live .stream > .off { display: none; }
.scene-live .stream > .on { animation: settle 380ms var(--ease) both; }
.ai { display: grid; grid-template-columns: 10px 1fr; gap: .5rem; align-items: start; }
.ai-dot { width: 10px; height: 10px; margin-top: 1rem; border-radius: 50%; background: var(--teal); }
.speaking .ai:not(.done) .ai-dot, .preparing .ai-dot { animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.5); opacity: .55; } }
.ai-card { background: var(--white); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: .625rem .75rem; min-height: 3.2rem; }
.ai-pill { display: block; width: fit-content; margin-bottom: .3rem; padding: .2rem .4rem; border-radius: 5px; font: 400 .625rem/1 var(--font-mono); letter-spacing: .06em; background: rgba(0, 151, 169, .12); color: var(--ocean); }
.ai-card p { color: var(--navy); font-weight: 500; }
.me { align-self: flex-end; width: fit-content; max-width: 88%; background: var(--navy); color: var(--on-navy); border-radius: 14px 14px 4px 14px; padding: .625rem .75rem; }
.me .who { display: flex; align-items: center; gap: .35rem; width: fit-content; margin-top: 0; margin-bottom: .35rem; padding: .2rem .4rem; border-radius: 5px; border: 1px solid var(--navy-line); font: 400 .625rem/1 var(--font-mono); letter-spacing: .06em; color: var(--on-navy); }
.me .who::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal-bright); }
.me:has(.typing) .who::before { animation: breathe 1.2s ease-in-out infinite; }
.me p:empty { display: none; }
.dots { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); font-size: .8125rem; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); animation: blink 900ms ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 150ms; } .dots i:nth-child(3) { animation-delay: 300ms; margin-right: 4px; }
.typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--teal-bright); animation: caret 700ms steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* Bottom bar with the mic */
.hh-bar { flex: none; height: 138px; display: grid; align-content: center; justify-items: center; gap: .5rem; background: var(--white); border-top: 1px solid var(--fog); }
.mic { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: var(--white); cursor: pointer; transition: width .2s, height .2s, background .2s; }
.mic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* While the operator speaks the button is Sandstone, the color for human content (Janus, 22 Nov 2026) */
.recording .mic { width: 76px; height: 76px; background: var(--sand); color: var(--navy); }
.recording .mic::before, .recording .mic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sand); animation: mic-pulse 2s ease-out infinite; pointer-events: none; }
.recording .mic::after { animation-delay: .6s; }
@keyframes mic-pulse { from { transform: scale(1); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.speaking .mic, .preparing .mic { background: var(--fog); color: var(--soft); }
.mic-label { font-size: .8125rem; color: var(--muted); height: 1.2em; }
.mic-label span { display: none; }
.mic-label .l-idle { display: block; }
.recording .l-idle, .speaking .l-idle, .preparing .l-idle { display: none; }
.recording .l-rec { display: block; color: var(--rec); font-weight: 500; }
.speaking .l-spk, .preparing .l-prep { display: block; }

/* The record sheet slides up over the conversation */
.sheet { position: absolute; inset: 44px 0 0 0; z-index: 2; display: flex; flex-direction: column; gap: .625rem; padding: 1rem; background: var(--white); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 30px -12px rgba(6, 18, 30, .35); }
.scene-live .sheet { transition: transform 520ms var(--ease); }
.scene-live .sheet:not(.on) { opacity: 1; visibility: visible; transform: translateY(104%); transition: transform 520ms var(--ease); }
.sheet-grip { width: 36px; height: 4px; border-radius: 4px; background: var(--fog); align-self: center; flex: none; }
.record-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.record-head b { font: 700 1rem/1.2 var(--font-display); color: var(--navy); }
.fields { border-top: 1px solid var(--fog); margin: 0; }
.fields div { display: grid; grid-template-columns: 5.25rem 1fr 1rem; gap: .5rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px solid var(--fog); }
.fields dt { font: 400 .625rem/1.5 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--soft); }
.fields dd { margin: 0; color: var(--navy); font-weight: 500; font-size: .8125rem; }
.fields div::after { content: "✓"; color: var(--navy); font-weight: 700; font-size: .8125rem; }
.scene-live .fields.on div { animation: settle 420ms var(--ease) both; animation-delay: calc(var(--i) * 380ms); }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } }
.sheet-note { font-size: .6875rem; line-height: 1.4; color: var(--muted); }
/* Summary: a waiting state, then the text Urd read back */
.synth { display: grid; }
.synth > * { grid-area: 1 / 1; }
.synth-wait { display: grid; gap: .45rem; align-content: start; }
.synth-wait .sk { height: 9px; border-radius: 5px; background: linear-gradient(90deg, var(--fog) 25%, var(--cool-white) 50%, var(--fog) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.synth-wait .sk.s { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.scene-live .synth-wait.off { opacity: 0; visibility: hidden; }
.synth-text { min-height: 3.9rem; padding: .625rem .75rem; border-left: 3px solid var(--teal); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--teal) 8%, transparent); color: var(--navy); font-weight: 500; font-size: .8125rem; }
.sign-row { display: grid; grid-template-columns: auto 1fr; gap: .5rem; }
.scene-live .sign-row.off { opacity: 0; visibility: hidden; }
.wrong { min-height: 48px; padding: 0 .75rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: .75rem; font-weight: 500; }
.wrong:hover { border-color: var(--muted); color: var(--navy); }
.sign { padding: 0 .75rem; font-size: .8125rem; }
.wrong-note { position: absolute; inset: auto 0 0 0; display: none; gap: .5rem; padding: 1rem; background: var(--white); border-top: 1px solid var(--fog); box-shadow: 0 -10px 24px -14px rgba(6, 18, 30, .4); font-size: .75rem; color: var(--muted); }
.wrong-note b { color: var(--navy); font-size: .875rem; }
.wrong-field { display: block; padding: .625rem .75rem; border: 1px solid var(--border); border-radius: 8px; color: var(--soft); font-style: italic; }
.wrong-back { justify-self: start; min-height: 36px; color: var(--ocean); font-weight: 600; }
.show-wrong .wrong-note { display: grid; animation: settle 260ms var(--ease) both; }
.sheet-sign { margin-top: auto; display: grid; }
.sheet-sign > * { grid-area: 1 / 1; }
.sign { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; background: var(--teal); color: var(--white); font-weight: 600; cursor: pointer; transition: transform 160ms, background 160ms; }
.tapped .sign { transform: scale(.96); background: var(--ocean); }
.signed-box { display: flex; gap: .5rem; align-items: center; min-height: 48px; padding: 0 .875rem; border-radius: 12px; background: color-mix(in srgb, var(--success) 11%, transparent); color: var(--success); font-weight: 600; font-size: .8125rem; }
.signed-box::before { content: "✓"; font-weight: 700; }

/* After the device: SME sign-off and the round-trip to the QMS */
.route { max-width: 360px; margin: 1.25rem auto 0; display: grid; gap: .625rem; font-size: .875rem; }
.route .signed { display: flex; gap: .5rem; align-items: baseline; color: var(--on-navy); }
.route .signed::before { content: "✓"; color: var(--on-navy); font-weight: 700; }
.route .signed b { color: var(--on-navy); font-weight: 600; }
.cp-route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .625rem; }
.cp { display: inline-flex; align-items: center; gap: .5rem; font: 400 .75rem/1 var(--font-mono); color: var(--navy); }
.cp::before { content: ""; width: 10px; height: 10px; transform: rotate(45deg); border-radius: 2px; background: var(--teal); box-shadow: 0 0 0 4px rgba(0, 151, 169, .18); }
.route .cp { color: var(--on-navy); }
.route .cp::before { background: var(--teal-bright); box-shadow: 0 0 0 4px rgba(0, 181, 202, .2); }
.cp-line { height: 2px; border-radius: 2px; background: var(--navy-line); overflow: hidden; }
.cp-line::after { content: ""; display: block; height: 100%; background: var(--teal-bright); transform-origin: left; }
.scene-live .cp-route .cp-line::after { transform: scaleX(0); transition: transform 1100ms var(--ease) 250ms; }
.scene-live .cp-route.on .cp-line::after { transform: scaleX(1); }
.qms { font: 600 .75rem/1 var(--font-body); padding: .5rem .7rem; border-radius: 8px; background: var(--cool-white); color: var(--navy); }
.cp-note { color: var(--on-navy); font-size: .8125rem; }
/* Finding 2: before step 06 the panel's place shows the CP-A to Your QMS line as a dimmed outline,
   which fills in at step 06. The hidden lines keep their space, so the buttons below do not move.
   Brand Guide 1.2: text on Deep Navy is Cool White (14.57:1); the dimming is the Cool Lilac outline only. */
.scene-live .route .cp-route:not(.on) { opacity: 1; visibility: visible; transform: none; }
.scene-live .route .cp-route:not(.on) .cp { color: var(--on-navy); }
html:root .scene-live .route .cp-route:not(.on) .cp::before { background: none; box-shadow: inset 0 0 0 1.5px var(--on-navy-muted); }
.scene-live .route .cp-route:not(.on) .qms { background: none; color: var(--on-navy); box-shadow: inset 0 0 0 1px var(--on-navy-muted); }

/* Moment navigation: click to jump back and forth */
.moments { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; margin-top: 1.25rem; }
.moment, .moments .replay {
    display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .75rem; border-radius: 999px;
    border: 1px solid var(--navy-line); color: var(--on-navy-muted);
    font: 400 .6875rem/1 var(--font-mono); letter-spacing: .02em; text-transform: uppercase;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.moment:hover, .moments .replay:hover { color: var(--on-navy); border-color: var(--on-navy-muted); background: none; }
.moment[aria-current="true"] { color: var(--on-navy); border-color: var(--teal); background: rgba(0, 151, 169, .16); }
.moment .n { color: var(--on-navy); }
.moments .replay { margin-left: 0; border-style: dashed; }
.replay svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.no-js .moments, .reduced .moments { display: none; }
.scenario-note { margin-top: .875rem; text-align: center; font: 400 .6875rem/1.4 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--on-navy); }
@media (max-width: 400px) { .hh-screen { height: 530px; } }
@media (max-width: 1023px) { .hero-proof { display: none; } }
