/* AFYX demo journey (/demos). Builds on styles.css tokens. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero */
.demos-hero { min-height: min(720px, 92svh); }
.demos-hero h1 span { color: #65ded2; }
.demos-hero-clock { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; padding: 0; list-style: none; }
.demos-hero-clock a { display: grid; gap: 2px; min-width: 150px; padding: 10px 14px; color: #d4e5ec; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; font-size: 11px; font-weight: 650; text-decoration: none; backdrop-filter: blur(8px); transition: background .2s ease, border-color .2s ease; }
.demos-hero-clock a:hover, .demos-hero-clock a:focus-visible { background: rgba(41,200,187,.16); border-color: rgba(101,222,210,.6); }
.demos-hero-clock time, .demos-hero-clock .clock-k { color: #8ce8de; font-size: 18px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

.demos-legend { background: white; border-bottom: 1px solid var(--line); }
.demos-legend-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 26px; }
.demos-legend-grid > div { display: grid; gap: 3px; padding: 4px 24px; border-right: 1px solid var(--line); }
.demos-legend-grid > div:first-child { padding-left: 0; }
.demos-legend-grid > div:last-child { border-right: 0; }
.demos-legend-grid strong { color: var(--blue); font-size: 14px; }
.demos-legend-grid span { color: #607583; font-size: 12px; line-height: 1.5; }

/* Journey layout and rail */
.journey { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); padding-block: clamp(48px, 7vw, 90px); }
.journey-rail { position: sticky; top: 104px; align-self: start; }
.journey-rail-title { margin: 0 0 16px; color: #627788; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.journey-progress { position: absolute; top: 46px; bottom: 10px; left: 6px; width: 2px; background: #dfe8ea; border-radius: 2px; }
.journey-progress span { position: absolute; inset: 0; background: var(--teal); border-radius: 2px; transform: scaleY(0); transform-origin: top; transition: transform .15s linear; }
.journey-rail ol { position: relative; display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.journey-rail a { position: relative; display: grid; grid-template-columns: 14px auto; column-gap: 12px; padding: 8px 0; color: #516a79; font-size: 12px; text-decoration: none; }
.journey-rail .rail-time { color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.journey-rail .rail-label { grid-column: 2; line-height: 1.3; }
.rail-dot { grid-row: span 2; width: 14px; height: 14px; margin-top: 4px; background: white; border: 2px solid #b9cdd1; border-radius: 50%; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.journey-rail a.is-past .rail-dot { background: #9fe3dc; border-color: #29c8bb; }
.journey-rail a[aria-current="step"] .rail-dot { background: var(--teal); border-color: var(--navy); transform: scale(1.25); }
.journey-rail a[aria-current="step"] .rail-time { color: #008f92; }
.journey-rail a:hover .rail-label, .journey-rail a:focus-visible .rail-label { color: var(--blue); }
.journey-chapters { min-width: 0; }

.chapter { padding-bottom: clamp(48px, 7vw, 96px); scroll-margin-top: 96px; }
.chapter + .chapter { padding-top: clamp(48px, 7vw, 96px); border-top: 1px solid #e8eef0; }
.chapter-intro { max-width: 820px; margin-bottom: 40px; }
.chapter-kicker { margin: 0 0 14px; color: #627788; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chapter-kicker span { margin-right: 8px; padding: 4px 8px; color: var(--navy); background: #e3f6f3; border-radius: 999px; }
.chapter-intro h2 { font-size: clamp(30px, 4.2vw, 50px); }
.chapter-intro h2 time, .chapter-intro h2 .chapter-phase { display: block; color: #0f9c97; font-size: .56em; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chapter-beat { max-width: 760px; color: var(--ink-soft); font-size: clamp(17px, 1.8vw, 19px); line-height: 1.65; }
.chapter-beat strong { color: var(--ink); }

/* Scenes */
.scene-list { display: grid; gap: clamp(40px, 6vw, 72px); }
.scene { scroll-margin-top: 96px; }
.scene-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 18px; }
.scene-number { color: #198487; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.scene-head h3 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 650; }
.scene-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: clamp(20px, 3vw, 36px); }

.scene-parts { min-width: 0; }
.scene-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #f0f4f5; border-radius: 999px; }
.scene-tabs [role="tab"] { flex: 1 1 auto; min-height: 36px; padding: 0 12px; color: #4b6576; background: transparent; border: 0; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap; }
.scene-tabs [role="tab"]:hover { color: var(--navy); }
.scene-tabs [role="tab"][aria-selected="true"] { color: var(--navy); background: white; box-shadow: 0 1px 4px rgba(16,42,67,.12); }
.scene-tabs [role="tab"]:focus-visible, .scene-panel:focus-visible { outline: 3px solid rgba(41,200,187,.5); outline-offset: 2px; }
.scene-panel { padding: 18px 4px 0; border-radius: 8px; }
.scene-copy { color: var(--ink-soft); font-size: 14px; line-height: 1.62; }
.scene-copy p { margin-bottom: 12px; }
.scene-copy strong { color: var(--ink); }
.scene-copy a { color: var(--blue); font-weight: 700; }
.scene-flag { display: inline-block; margin-bottom: 14px !important; padding: 4px 9px; color: #7a5300; background: #fdf3dc; border-radius: 999px; font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.scene-flag.future { color: #0b5a7a; background: #e4f1f8; }
.scene-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scene-ba > div { padding: 14px; background: #f7f9f8; border: 1px solid #e6ecee; border-radius: 10px; }
.scene-ba > div:last-child { background: #effaf8; border-color: #cdeee9; }
.scene-ba strong { display: block; margin-bottom: 5px; color: #627785; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.scene-ba p { margin: 0; font-size: 13px; }
.scene-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.scene-kpis li { display: grid; gap: 2px; padding-top: 10px; border-top: 2px solid var(--teal); }
.scene-kpis strong { color: var(--blue); font-size: 22px; font-weight: 700; letter-spacing: -.04em; line-height: 1.15; }
.scene-kpis span { color: #607583; font-size: 11px; line-height: 1.4; }
.scene-subhead { margin: 0 0 6px !important; color: #627785; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.scene-pilot { display: grid; gap: 0; margin: 0; }
.scene-pilot > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid #e6ecee; }
.scene-pilot dt { color: var(--ink); font-size: 12px; font-weight: 700; }
.scene-pilot dd { margin: 0; font-size: 13px; }

/* Scene player */
.scene-player { margin: 0; min-width: 0; }
.sp-placeholder { display: grid; aspect-ratio: 16 / 9; place-items: center; color: #8ce8de; background: linear-gradient(135deg, #071c36, #0c2b4b); border-radius: 14px; font-size: 14px; font-weight: 650; }
.sp-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; color: #e7f1f5; background: radial-gradient(120% 90% at 85% 0%, #12406a 0%, #0a2645 45%, #061629 100%); border-radius: 14px; box-shadow: 0 18px 50px rgba(7,28,54,.22); container-type: inline-size; font-size: 13px; font-size: clamp(10px, 1.8cqw, 17px); }
.scene-player.is-paused .sp-stage *, .scene-player.is-paused .sp-stage *::before, .scene-player.is-paused .sp-stage *::after { animation-play-state: paused !important; }
.sp-screen { position: absolute; inset: 0 0 17% 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4%; padding: 4.5% 5% 3%; transition: opacity .25s ease; }
.sp-screen.is-cut { opacity: 0; transition: none; }
.sp-stage[data-layer="title"] .sp-screen, .sp-stage[data-layer="end"] .sp-screen { visibility: hidden; opacity: 0; }
.sp-main { position: relative; display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: .7em; }
.sp-side { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: .5em; overflow: hidden; padding: 1em; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 1em; backdrop-filter: blur(6px); }
.sp-side-title { margin: 0; color: #8ce8de; font-size: .78em; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.sp-side-list { display: grid; gap: .45em; margin: 0; }
.sp-row { padding: .45em .6em; background: rgba(255,255,255,.07); border-radius: .5em; }
.sp-row.is-new { animation: sp-pop .5s ease-out; }
.sp-row dt { color: #9fb7c5; font-size: .72em; font-weight: 650; }
.sp-row dd { margin: 0; color: white; font-size: .9em; font-weight: 650; line-height: 1.3; }
.sp-status { margin: auto 0 0; padding: .55em .7em; border-radius: .6em; font-size: .85em; font-weight: 750; opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.sp-status.is-on { opacity: 1; transform: none; }
.sp-status.is-ok { color: #062a2a; background: #65ded2; }
.sp-status.is-warn { color: #3d2a00; background: #f5c862; }
.sp-status.is-alert { color: white; background: #d6455d; }
.sp-title, .sp-end { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; gap: .5em; padding: 6%; text-align: center; background: linear-gradient(135deg, #071c36, #0a2946); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s; }
.sp-title.is-on, .sp-end.is-on { opacity: 1; visibility: visible; }
.sp-title span, .sp-end span { color: #8ce8de; font-size: .85em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sp-title strong { color: white; font-size: 2.6em; font-weight: 620; letter-spacing: -.04em; line-height: 1.05; }
.sp-end strong { color: #65ded2; font-size: 3.6em; font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.sp-end p { max-width: 34em; margin: 0 auto; color: #d6e5ec; font-size: 1.15em; line-height: 1.4; }
.sp-end .sp-end-flag { position: absolute; top: 4%; right: 4%; padding: .2em .6em; color: #f5c862; border: 1px solid rgba(245,200,98,.45); border-radius: 1em; font-size: .68em; font-weight: 700; letter-spacing: .02em; }
.sp-subtitle { position: absolute; right: 0; bottom: 0; left: 0; z-index: 4; display: flex; height: 17%; align-items: center; justify-content: center; margin: 0; padding: 0 5%; color: white; background: #04152b; border-top: 1px solid rgba(255,255,255,.1); font-size: 1.15em; font-weight: 650; line-height: 1.25; text-align: center; opacity: 0; transition: opacity .25s ease; }
.sp-poster { position: absolute; inset: 0; z-index: 6; display: grid; align-content: center; justify-items: center; gap: .55em; padding: 6%; color: white; background: radial-gradient(120% 90% at 85% 0%, #12406a 0%, #0a2645 45%, #061629 100%); border: 0; cursor: pointer; font: inherit; text-align: center; }
.scene-player.is-playing .sp-poster { display: none; }
.sp-poster-kicker { color: #8ce8de; font-size: .85em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sp-poster-title { max-width: 18em; font-size: 2.3em; font-weight: 620; letter-spacing: -.035em; line-height: 1.08; }
.sp-poster-play { display: grid; width: 3.6em; height: 3.6em; margin-top: .4em; place-items: center; padding-left: .2em; color: var(--navy); background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 .5em rgba(41,200,187,.18); font-size: 1.3em; transition: transform .2s ease; }
.sp-poster:hover .sp-poster-play, .sp-poster:focus-visible .sp-poster-play { transform: scale(1.06); }
.sp-poster:focus-visible { outline: 3px solid var(--teal); outline-offset: -3px; }
.sp-poster-meta { color: #9fb7c5; font-size: .8em; font-weight: 650; }
.sp-subtitle.is-on { opacity: 1; }
.sp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp-controls { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.sp-btn { display: inline-grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: var(--navy); background: #eef3f4; border: 1px solid #dce5e7; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; }
.sp-btn:hover { background: #dff5f2; }
.sp-btn:focus-visible { outline: 3px solid rgba(41,200,187,.5); outline-offset: 2px; }
.sp-progress { position: relative; flex: 1; height: 4px; overflow: hidden; background: #e1e9eb; border-radius: 4px; }
.sp-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--teal); border-radius: 4px; }
.sp-time { min-width: 76px; color: #607583; font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.sp-caption { margin-top: 6px; color: #6b7d89; font-size: 11px; }
.sp-badge { margin-right: 4px; color: #198487; font-weight: 750; }
.sp-storyboard { display: none; margin: 12px 0 0; padding: 14px 14px 14px 32px; color: #304b5e; background: #f7f9f8; border: 1px solid #e6ecee; border-radius: 10px; font-size: 12px; }
.sp-storyboard li + li { margin-top: 4px; }
.scene-player.is-static .sp-storyboard { display: block; }

/* Template: call / chat / inbox */
.tpl-call-head, .tpl-chat-head { display: flex; align-items: center; gap: .8em; padding: .7em .9em; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: .9em; }
.tpl-avatar { display: grid; width: 2.6em; height: 2.6em; flex: 0 0 auto; place-items: center; color: var(--navy); background: #65ded2; border-radius: 50%; font-size: 1.1em; }
.is-ringing .tpl-avatar { animation: sp-ring 1s ease-in-out infinite; }
.tpl-call-id { display: grid; min-width: 0; }
.tpl-call-id strong, .tpl-chat-head strong { overflow: hidden; color: white; font-size: 1em; text-overflow: ellipsis; white-space: nowrap; }
.tpl-call-state { color: #9fb7c5; font-size: .8em; }
.tpl-wave { display: flex; align-items: center; gap: .18em; height: 2em; margin-left: auto; }
.tpl-wave i { display: block; width: .22em; height: 20%; background: #65ded2; border-radius: 1em; opacity: .35; }
.is-live .tpl-wave i { opacity: 1; animation: sp-wave 1.1s ease-in-out infinite; }
.tpl-wave i:nth-child(3n) { animation-delay: -.3s; } .tpl-wave i:nth-child(3n+1) { animation-delay: -.6s; } .tpl-wave i:nth-child(4n) { animation-delay: -.85s; }
.tpl-log { display: flex; flex: 1; min-height: 0; flex-direction: column; justify-content: flex-end; gap: .5em; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 22%); mask-image: linear-gradient(transparent, #000 22%); }.tpl-bubble { align-self: flex-end; max-width: 86%; margin: 0; padding: .55em .8em; color: #062a2a; background: #9be9df; border-radius: .9em .9em .25em .9em; font-size: 1em; line-height: 1.38; animation: sp-pop .45s ease-out; }
.tpl-bubble.out { align-self: flex-start; color: #102a43; background: white; border-radius: .9em .9em .9em .25em; }
.tpl-banner { padding: .55em .8em; color: #3d2a00; background: #f5c862; border-radius: .6em; font-size: .9em; font-weight: 750; opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.tpl-banner:empty { display: none; }
.tpl-banner.is-on { opacity: 1; transform: none; }
.tpl-dot { width: .7em; height: .7em; flex: 0 0 auto; background: #65ded2; border-radius: 50%; box-shadow: 0 0 0 .3em rgba(101,222,210,.2); }
.tpl-chat-input { display: flex; align-items: center; justify-content: space-between; padding: .5em .5em .5em .9em; color: #9fb7c5; background: rgba(255,255,255,.08); border-radius: 2em; font-size: .85em; }
.tpl-chat-input i { display: grid; width: 1.9em; height: 1.9em; place-items: center; color: var(--navy); background: #65ded2; border-radius: 50%; font-style: normal; font-weight: 800; }
.tpl-ooo { margin-left: auto; padding: .2em .6em; color: #3d2a00; background: #f5c862; border-radius: 1em; font-size: .75em; font-style: normal; font-weight: 750; }
.tpl-mail { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: .4em; margin: 0; padding: 0; overflow: hidden; list-style: none; }
.tpl-mail-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1em .6em; padding: .5em .7em; background: rgba(255,255,255,.08); border-left: .25em solid #65ded2; border-radius: .5em; animation: sp-slide .45s ease-out; }
.tpl-mail-from { color: #9fb7c5; font-size: .75em; font-weight: 700; }
.tpl-mail-subj { grid-column: 1; overflow: hidden; color: white; font-size: .9em; text-overflow: ellipsis; white-space: nowrap; }
.tpl-mail-draft { grid-column: 1 / -1; color: #9be9df; font-size: .78em; font-style: italic; animation: sp-pop .45s ease-out; }
.tpl-tag { grid-row: 1 / span 2; grid-column: 2; align-self: center; padding: .2em .6em; border-radius: 1em; font-size: .72em; font-weight: 750; white-space: nowrap; }
.tpl-tag:empty { display: none; }
.tpl-tag.is-ok { color: #062a2a; background: #65ded2; } .tpl-tag.is-warn { color: #3d2a00; background: #f5c862; } .tpl-tag.is-alert { color: white; background: #d6455d; } .tpl-tag.is-muted { color: #c9d6de; background: rgba(255,255,255,.14); }

/* Template: radar */
.sp-main.is-radar { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 1em; }
.tpl-radar-wrap { min-width: 0; }
svg.tpl-radar { width: 100%; height: auto; max-height: 100%; }
svg.tpl-radar circle, svg.tpl-radar > path { fill: none; stroke: rgba(140,232,222,.25); stroke-width: 1; }
.tpl-sweep { transform-origin: 100px 100px; animation: sp-sweep 3.2s linear infinite; }
.tpl-sweep path { fill: rgba(101,222,210,.22); stroke: none; }
svg.tpl-radar .tpl-blip circle { fill: #65ded2; stroke: none; animation: sp-blip 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.tpl-blip text { fill: #e7f1f5; font-size: 9px; font-weight: 700; }
.tpl-feed { display: grid; gap: .45em; margin: 0; padding: 0; list-style: none; }
.tpl-feed-item { display: grid; gap: .1em; padding: .45em .7em; background: rgba(255,255,255,.08); border-left: .25em solid #65ded2; border-radius: .45em; font-size: .85em; line-height: 1.3; animation: sp-slide .45s ease-out; }
.tpl-feed-kind { color: #9fb7c5; font-size: .78em; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.tpl-feed-item.is-relevant { border-left-color: #f5c862; } .tpl-feed-item.is-case { border-left-color: #d6455d; } .tpl-feed-item.is-ignore { opacity: .55; border-left-color: #7f93a0; }

/* Template: compare */
.tpl-compare { display: grid; gap: .35em; }
.tpl-compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: .2em .8em; padding: .45em .7em; background: rgba(255,255,255,.06); border-radius: .45em; font-size: .85em; line-height: 1.3; transition: background .4s ease; }
.tpl-compare-row.head { color: #8ce8de; background: none; font-size: .75em; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.tpl-flag { grid-column: 1 / -1; font-size: .85em; font-style: normal; font-weight: 750; }
.tpl-flag:empty { display: none; }
.tpl-compare-row.is-flagged { animation: sp-pop .45s ease-out; }
.tpl-compare-row.is-warn { background: rgba(245,200,98,.16); } .tpl-compare-row.is-warn .tpl-flag { color: #f5c862; }
.tpl-compare-row.is-alert { background: rgba(214,69,93,.22); } .tpl-compare-row.is-alert .tpl-flag { color: #ff9aab; }
.tpl-compare-row.is-ok .tpl-flag { color: #65ded2; }

/* Template: graph */
svg.tpl-graph { width: 100%; height: auto; flex: 1; min-height: 0; }
.tpl-edge { stroke: rgba(140,232,222,.2); stroke-width: 2; stroke-dasharray: 5 5; }
.tpl-edge.is-on { stroke: #65ded2; animation: sp-dash 1s linear infinite; }
.tpl-node rect { fill: rgba(255,255,255,.07); stroke: rgba(255,255,255,.2); transition: fill .4s ease, stroke .4s ease; }
.tpl-node text, .tpl-hub text { fill: #e7f1f5; font-size: 12px; font-weight: 700; text-anchor: middle; }
.tpl-node.is-on rect { fill: rgba(101,222,210,.25); stroke: #65ded2; }
.tpl-hub circle { fill: #12628a; stroke: #65ded2; stroke-width: 2; }
.is-done .tpl-hub circle { fill: #65ded2; animation: sp-pulse 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.is-done .tpl-hub text { fill: #071c36; }
.tpl-graph-out { align-self: center; padding: .45em .9em; color: #062a2a; background: #9be9df; border-radius: 1em; font-size: .9em; font-weight: 750; opacity: 0; transition: opacity .4s ease; }
.tpl-graph-out.is-on { opacity: 1; }

/* Template: browser */
.tpl-browser-bar { display: flex; align-items: center; gap: .4em; padding: .5em .8em; background: rgba(255,255,255,.1); border-radius: .7em .7em 0 0; }
.tpl-browser-bar i { width: .65em; height: .65em; background: rgba(255,255,255,.3); border-radius: 50%; }
.tpl-url { flex: 1; margin-left: .6em; padding: .2em .7em; overflow: hidden; color: #c9d6de; background: rgba(0,0,0,.25); border-radius: 1em; font-size: .78em; text-overflow: ellipsis; white-space: nowrap; }
.sp-main.is-browser { gap: 0; }
.tpl-page { position: relative; display: grid; flex: 1; align-content: start; gap: .45em; padding: .8em 1em; color: #102a43; background: #f4f8f9; border-radius: 0 0 .7em .7em; }
.tpl-page-title { font-size: .95em; }
.tpl-field { display: grid; grid-template-columns: 9em 1fr; align-items: center; gap: .6em; font-size: .8em; font-weight: 650; }
.tpl-input { min-height: 1.9em; padding: .3em .6em; overflow: hidden; background: white; border: 1px solid #cfdbe0; border-radius: .4em; white-space: nowrap; transition: border-color .2s ease, box-shadow .2s ease; }
.tpl-input.is-focus { border-color: #29c8bb; box-shadow: 0 0 0 .2em rgba(41,200,187,.3); }
.tpl-input.is-typed { animation: sp-type 1s steps(24) both; }
.tpl-submit { justify-self: end; padding: .35em 1.1em; color: white; background: #12628a; border-radius: 1em; font-size: .8em; font-weight: 750; }
.tpl-submit.is-focus { box-shadow: 0 0 0 .25em rgba(245,200,98,.6); }
.tpl-cursor { position: absolute; top: 0; left: 0; z-index: 2; width: 1.3em; height: 1.3em; background: #071c36; clip-path: polygon(0 0, 0 100%, 30% 72%, 52% 100%, 66% 92%, 45% 64%, 85% 64%); transform: translate(70%, 70%); transition: transform .9s cubic-bezier(.5,.1,.2,1); filter: drop-shadow(0 1px 1px rgba(255,255,255,.8)); }

/* Template: chart */
.tpl-chart { display: grid; flex: 1; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 6%; min-height: 0; padding: 0 2% .4em; border-bottom: 1px solid rgba(255,255,255,.25); }
.tpl-bar { display: flex; height: 100%; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: .3em; text-align: center; }
.tpl-bar-fill { display: block; height: var(--h); background: linear-gradient(180deg, #65ded2, #12628a); border-radius: .4em .4em 0 0; transform: scaleY(0); transform-origin: bottom; transition: transform 1s cubic-bezier(.3,.1,.2,1); }
.tpl-bar-label { color: #c9d6de; font-size: .72em; font-weight: 700; opacity: 0; transition: opacity .5s ease .4s; }
.tpl-bar-year { position: relative; top: 1.6em; color: #9fb7c5; font-size: .8em; font-weight: 700; }
.tpl-bar.is-on .tpl-bar-fill { transform: scaleY(1); }
.tpl-bar.is-on .tpl-bar-label { opacity: 1; }
.tpl-chart-note { margin: 1.8em 0 0; color: #f5c862; font-size: .72em; font-weight: 700; }

.scene-player.is-static .sp-stage * { animation: none !important; transition: none !important; }

@keyframes sp-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sp-slide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes sp-ring { 0%, 100% { transform: rotate(0); box-shadow: 0 0 0 0 rgba(101,222,210,.6); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-8deg); box-shadow: 0 0 0 .7em rgba(101,222,210,0); } }
@keyframes sp-wave { 0%, 100% { height: 20%; } 50% { height: 100%; } }
@keyframes sp-sweep { to { transform: rotate(360deg); } }
@keyframes sp-blip { 0% { transform: scale(.6); opacity: 1; } 70% { transform: scale(1.5); opacity: .5; } 100% { transform: scale(1); opacity: 1; } }
@keyframes sp-dash { to { stroke-dashoffset: -20; } }
@keyframes sp-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes sp-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Live demos */
.live-demo { margin-top: 26px; padding: clamp(18px, 3vw, 28px); background: #f4f8f7; border: 1px solid #e3eaec; border-radius: 14px; }
.live-demo:empty { display: none; }
.live-head h4 { margin: 8px 0 6px; font-size: clamp(19px, 2.2vw, 24px); letter-spacing: -.03em; }
.live-head p { max-width: 760px; margin: 0 0 16px; color: var(--ink-soft); font-size: 14px; }
.live-badge { display: inline-block; padding: 5px 9px; color: #062a2a; background: #9be9df; border-radius: 999px; font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.live-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.live-btn { min-height: 40px; padding: 0 15px; color: white; background: var(--navy); border: 1px solid var(--navy); border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 750; }
.live-btn:hover { background: #0d3554; }
.live-btn.ghost { color: var(--navy); background: white; border-color: #cfdbe0; }
.live-btn.is-on { background: #d6455d; border-color: #d6455d; }
.live-btn:disabled { opacity: .5; cursor: not-allowed; }
.live-btn:focus-visible, .live-demo select:focus-visible, .live-demo input:focus-visible { outline: 3px solid rgba(41,200,187,.5); outline-offset: 2px; }
.live-check { display: inline-flex; align-items: center; gap: 6px; color: #496174; font-size: 12px; }
.live-status { margin: 10px 0 0; color: #496174; font-size: 12px; }
.live-status.is-error { color: #9a3412; }
.live-privacy { margin: 16px 0 0; padding-top: 12px; color: #607583; border-top: 1px solid #dfe7e9; font-size: 11px; line-height: 1.55; }
.live-privacy strong { color: var(--ink); }
.live-privacy a { color: var(--blue); }

.voice-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.voice-log { display: flex; height: 300px; flex-direction: column; gap: 8px; overflow-y: auto; padding: 14px; background: linear-gradient(160deg, #0a2645, #061629); border-radius: 12px; font-size: 13px; }
.voice-log { justify-content: flex-start; }
.voice-form { display: flex; gap: 8px; margin-top: 10px; }
.voice-form input { flex: 1; min-width: 0; padding: 10px 12px; color: var(--ink); background: white; border: 1px solid #dce5e7; border-radius: 999px; font: inherit; font-size: 13px; }
.voice-case { padding: 16px; background: white; border: 1px solid #e3eaec; border-radius: 12px; }
.voice-case-title { margin: 0; color: #627785; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.voice-case-status { margin: 4px 0 10px; color: var(--ink); font-size: 15px; font-weight: 700; }
.voice-case-status.is-alert { color: #b42339; }
.voice-case-status.is-done { color: #7a5300; }
.voice-criteria { display: grid; gap: 6px; margin: 0; }
.voice-criteria > div { padding: 7px 10px; background: #f7f9f8; border-left: 3px solid #cfdbe0; border-radius: 6px; }
.voice-criteria > div.is-met { background: #effaf8; border-left-color: var(--teal); }
.voice-criteria dt { color: #607583; font-size: 10px; font-weight: 700; }
.voice-criteria dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.voice-transfer { margin: 10px 0 0; padding: 8px 10px; color: #3d2a00; background: #f5c862; border-radius: 8px; font-size: 12px; font-weight: 750; }
.voice-draft { margin: 10px 0 0; padding: 12px; overflow-x: auto; color: #d7e8ee; background: #081d35; border-radius: 8px; font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }

.deputy-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.deputy-row { padding: 12px 14px; background: white; border: 1px solid #e3eaec; border-left: 3px solid #cfdbe0; border-radius: 10px; transition: border-color .3s ease, box-shadow .3s ease; }
.deputy-row.is-working { border-left-color: var(--teal); box-shadow: 0 0 0 3px rgba(41,200,187,.2); }
.deputy-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.deputy-meta strong { color: #607583; font-size: 11px; }
.deputy-subject { margin: 4px 0 2px; color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.35; }
.deputy-body { margin: 0; color: #607583; font-size: 12px; line-height: 1.45; }
.deputy-tag { flex: 0 0 auto; padding: 3px 8px; color: #607583; background: #f0f4f5; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.deputy-tag.is-pv { color: white; background: #d6455d; } .deputy-tag.is-escalate { color: #3d2a00; background: #f5c862; } .deputy-tag.is-reply { color: #062a2a; background: #9be9df; } .deputy-tag.is-ignore { color: #607583; background: #e5ecee; }
.deputy-action { margin: 8px 0 0; padding: 8px 10px; color: #304b5e; background: #f7f9f8; border-radius: 6px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.deputy-summary { margin-top: 18px; padding: 20px; color: #e3f2f2; background: var(--navy); border-radius: 12px; }
.deputy-summary-kicker { margin: 0; color: #8ce8de; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.deputy-summary h5 { margin: 6px 0 14px; color: white; font-size: clamp(16px, 2vw, 20px); letter-spacing: -.02em; }
.deputy-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.deputy-summary-grid strong { color: #8ce8de; font-size: 12px; }
.deputy-summary-grid ul { margin: 6px 0 0; padding-left: 18px; font-size: 12px; }
.deputy-news { margin: 14px 0 10px; color: #c9d9e1; font-size: 12px; }

.lit-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; }
.lit-form .live-actions { margin-top: 0; }
.lit-cases { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.lit-case { padding: 12px 14px; background: white; border: 1px solid #e3eaec; border-left: 3px solid var(--teal); border-radius: 10px; font-size: 13px; }
.lit-case.is-warn { border-left-color: #e0a526; } .lit-case.is-alert { border-left-color: #d6455d; }
.lit-case.is-sample { background: repeating-linear-gradient(135deg, #fff, #fff 12px, #fbfcfc 12px, #fbfcfc 24px); }
.lit-case-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.lit-id { color: #607583; font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.lit-triage { padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.lit-triage.is-ok { color: #0c5c58; background: #e3f6f3; } .lit-triage.is-warn { color: #6a4b08; background: #fbf1da; } .lit-triage.is-alert { color: white; background: #d6455d; }
.lit-case a { color: var(--blue); font-weight: 650; }
.lit-title { margin: 0; color: var(--ink); font-weight: 650; }
.lit-detail { margin: 4px 0 0; color: #607583; font-size: 11px; }

/* Roadmap, ROI, CTA */
.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 40px 0; }
.roadmap-step { position: relative; padding: 22px; background: white; border: 1px solid #e3eaec; border-radius: 12px; }
.roadmap-step::before { position: absolute; top: 0; right: 22px; left: 22px; height: 3px; content: ""; background: linear-gradient(90deg, var(--teal), #12628a); border-radius: 0 0 3px 3px; }
.roadmap-when { color: #0f9c97; font-size: 22px; font-weight: 700; letter-spacing: -.04em; }
.roadmap-step h3 { margin: 6px 0 10px; font-size: 17px; font-weight: 650; }
.roadmap-step ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px; }
.roadmap-step a { color: var(--blue); font-weight: 700; }
.roadmap-section { background: var(--paper); }
.roadmap-player { max-width: 860px; margin-inline: auto; }

.roi { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; margin-top: 36px; }
.roi fieldset { min-width: 0; margin: 0; padding: 20px; background: white; border: 1px solid #e3eaec; border-radius: 12px; }
.roi legend { padding: 0 6px; color: #627785; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.roi-rows { display: grid; gap: 12px; }
.roi-slider { display: grid; gap: 4px; color: var(--ink); font-size: 13px; font-weight: 600; }
.roi-slider > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.roi-slider small { color: #7a8c97; font-size: 11px; font-weight: 500; }
.roi-slider output { margin-left: auto; color: var(--blue); font-weight: 750; font-variant-numeric: tabular-nums; }
.roi-slider input[type="range"] { width: 100%; accent-color: #19a9a0; }
.roi-global { display: grid; align-content: start; gap: 14px; }
.roi-result { margin-top: 8px; padding: 18px; color: white; background: var(--navy); border-radius: 12px; }
.roi-label { margin: 0; color: #8ce8de; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.roi-value { margin: 4px 0; font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -.05em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.roi-sub { margin: 0; color: #c9d9e1; font-size: 12px; }
.roi-note { max-width: 860px; margin: 16px 0 0; color: #607583; font-size: 12px; }

.demos-cta { color: white; background: var(--navy); }
.demos-cta .lead { color: #bed1da; }
.demos-cta-actions { justify-content: flex-end; }

@media (max-width: 1099px) {
  .journey { display: block; padding-top: 0; }
  .journey-rail { position: sticky; z-index: 10; top: 78px; margin: 0 calc(var(--gutter) * -1) 32px; padding: 8px var(--gutter); background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
  .journey-rail-title, .journey-progress { display: none; }
  .journey-rail::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: var(--teal); transform: scaleX(var(--journey-pct, 0)); transform-origin: left; }
  .journey-rail ol { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .journey-rail ol::-webkit-scrollbar { display: none; }
  .journey-rail a { display: flex; align-items: center; gap: 6px; padding: 6px 12px; white-space: nowrap; border: 1px solid #e3eaec; border-radius: 999px; }
  .journey-rail a[aria-current="step"] { background: #e3f6f3; border-color: #9fe3dc; }
  .rail-dot { width: 8px; height: 8px; margin: 0; border-width: 0; background: #b9cdd1; }
  .journey-rail .rail-time { font-size: 12px; }
  .scene-body { grid-template-columns: 1fr; }
  .roadmap-grid { grid-template-columns: 1fr; }
  .chapter { padding-top: 24px; }
}
@media (max-width: 760px) {
  .journey-rail { top: 68px; }
  .demos-legend-grid { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .demos-legend-grid > div { padding-inline: 0 14px; border-right: 0; }
  .voice-grid, .roi, .deputy-list, .deputy-summary-grid, .lit-form { grid-template-columns: 1fr; }
  .scene-ba, .scene-kpis { grid-template-columns: 1fr; }
  .roadmap-grid { grid-template-columns: 1fr; }
  .demos-cta-actions { justify-content: flex-start; }
  .sp-screen { grid-template-columns: 1fr; padding-bottom: 14%; }
  .sp-side { display: none; }
  .demos-hero-clock a { min-width: 0; flex: 1 1 30%; }
}
@media (prefers-reduced-motion: reduce) {
  .tpl-sweep, .tpl-blip circle, .tpl-edge.is-on, .is-live .tpl-wave i, .is-ringing .tpl-avatar { animation: none !important; }
}

/* Player: Try / Expand / Fullscreen controls */
.sp-progress { min-width: 40px; }
.sp-icon svg { display: block; }
.sp-try { display: inline-flex; min-height: 34px; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0 14px; color: var(--navy); background: var(--teal); border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.sp-try:hover { background: #4fd6cb; }
.sp-try.is-on { color: white; background: var(--navy); }
.sp-try:focus-visible { outline: 3px solid rgba(41,200,187,.5); outline-offset: 2px; }
.sp-try-dot { width: 7px; height: 7px; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 3px rgba(7,28,54,.14); }
.sp-stage.is-expandable { cursor: zoom-in; }
.scene-player.is-theater .sp-stage.is-expandable, .scene-player.is-fullscreen .sp-stage.is-expandable { cursor: pointer; }
.sp-ghost { background: repeating-linear-gradient(135deg, #f3f7f8, #f3f7f8 12px, #edf3f4 12px, #edf3f4 24px); border-radius: 14px; }

/* Scene body: video + Try panel side by side, tabs below while trying */
.scene-body { grid-template-areas: "player parts"; }
.scene-body > .scene-player, .scene-body > .sp-ghost { grid-area: player; }
.scene-body > .scene-parts { grid-area: parts; }
.scene-body > .try-panel { grid-area: try; }
.scene-body.is-trying { grid-template-areas: "player try" "parts parts"; }

/* Try panel */
.try-panel { position: relative; display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 18px; color: var(--ink); background: white; border: 1px solid #e3eaec; border-radius: 14px; box-shadow: 0 18px 50px rgba(7,28,54,.12); }
.try-panel::before { position: absolute; top: 0; right: 18px; left: 18px; height: 3px; content: ""; background: linear-gradient(90deg, var(--teal), #12628a); border-radius: 0 0 3px 3px; }
.try-panel[hidden] { display: none; }
.try-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.try-kicker { color: #198487; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.try-head h4 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.02em; }
.try-head h4:focus { outline: none; }
.try-head h4:focus-visible { outline: 3px solid rgba(41,200,187,.5); outline-offset: 2px; }
.try-close { width: 30px; height: 30px; flex: 0 0 auto; color: #496174; background: #f0f4f5; border: 0; border-radius: 50%; cursor: pointer; font-size: 17px; line-height: 1; }
.try-close:hover { background: #dff5f2; }
.try-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.try-engine { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.try-engine::before { width: 7px; height: 7px; content: ""; background: currentColor; border-radius: 50%; }
.try-engine.is-live { color: #0c5c58; background: #e3f6f3; }
.try-engine.is-data { color: #0b5a7a; background: #e4f1f8; }
.try-engine.is-scripted { color: #7a5300; background: #fdf3dc; }
.try-engine.is-pending { color: #4b6576; background: #f0f4f5; }
.try-body { display: grid; min-width: 0; gap: 10px; }
.try-log { display: flex; height: 250px; flex-direction: column; gap: 8px; overflow-y: auto; padding: 12px; background: linear-gradient(160deg, #0a2645, #061629); border-radius: 12px; font-size: 13px; }
.try-log { justify-content: flex-start; }
.try-typing { opacity: .7; }
.try-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.try-chip { padding: 6px 11px; color: var(--navy); background: #f0f4f5; border: 1px solid #dce5e7; border-radius: 999px; cursor: pointer; font: inherit; font-size: 11px; font-weight: 650; line-height: 1.35; text-align: left; }
.try-chip:hover { background: #dff5f2; border-color: #9fe3dc; }
.try-form { display: flex; gap: 8px; }
.try-form input { flex: 1; min-width: 0; padding: 10px 12px; color: var(--ink); background: white; border: 1px solid #dce5e7; border-radius: 999px; font: inherit; font-size: 13px; }
.try-note, .try-status, .try-intro { margin: 0; color: #607583; font-size: 12px; line-height: 1.5; }
.try-note:empty { display: none; }
.try-webchat { height: 420px; overflow: hidden; border: 1px solid #e3eaec; border-radius: 10px; }
.try-gate { display: grid; gap: 14px; padding: 18px; background: linear-gradient(160deg, #f2fbfa, #ffffff); border: 1px solid #cdeee9; border-radius: 12px; }
.try-gate.is-error { background: #fffaf0; border-color: #f1dfb4; }
.try-gate-text { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.55; }
.try-gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.try-gate-unlock { display: inline-flex; align-items: center; gap: 8px; }
.try-gate-unlock svg { width: 16px; height: 16px; }
.try-link { padding: 0; color: #096f79; background: none; border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.try-link:hover { color: var(--navy); }
.try-live-switch { justify-self: start; margin-top: 4px; }
.try-run-form { display: grid; gap: 10px; }
.try-run-form .live-actions { margin-top: 0; }
.try-results h5 { margin: 6px 0 4px; font-size: 15px; }
.try-summary { margin: 0 0 6px; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.try-points, .try-records { margin: 6px 0; padding-left: 18px; color: #304b5e; font-size: 12px; line-height: 1.5; }
.try-records a { color: var(--blue); font-weight: 650; }
.try-records small { color: #607583; }
.try-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; font-size: 11px; }
.try-sources strong { color: #627785; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.try-sources a { color: var(--blue); font-weight: 700; }
.try-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding-top: 10px; border-top: 1px solid #e6ecee; }
.try-library { color: var(--blue); font-size: 12px; font-weight: 750; text-decoration: none; }
.try-library:hover { text-decoration: underline; text-underline-offset: 4px; }
.try-foot small { color: #7a8c97; font-size: 10px; }
.try-panel button:focus-visible, .try-panel input:focus-visible, .try-panel a:focus-visible { outline: 3px solid rgba(41,200,187,.5); outline-offset: 2px; }
.is-compact .voice-grid { grid-template-columns: 1fr; gap: 12px; }
.is-compact .voice-log { height: 210px; }
.is-compact .live-privacy { margin-top: 4px; }

/* Expanded theater */
.sp-theater { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 2vh 2vw; overflow: auto; background: rgba(3,12,24,.94); backdrop-filter: blur(4px); }
.sp-theater[hidden] { display: none; }
.sp-theater-open { overflow: hidden; }
.sp-theater-dialog { display: flex; max-width: 100%; flex-direction: column; gap: 12px; color: white; }
.sp-theater-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sp-theater-titles { display: grid; gap: 2px; min-width: 0; }
.sp-theater-kicker { color: #8ce8de; font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.sp-theater-title { margin: 0; overflow: hidden; color: white; font-size: clamp(18px, 2vw, 26px); text-overflow: ellipsis; white-space: nowrap; }
.sp-theater-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.sp-theater-btn { display: inline-flex; min-height: 36px; align-items: center; gap: 6px; padding: 0 14px; color: white; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; }
.sp-theater-btn:hover { background: rgba(41,200,187,.2); border-color: #8ce8de; }
.sp-theater-close { width: 40px; height: 40px; color: white; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; }
.sp-theater-close:hover { background: rgba(214,69,93,.5); }
.sp-theater button:focus-visible { outline: 3px solid rgba(101,222,210,.7); outline-offset: 2px; }
.sp-theater-main { display: flex; align-items: flex-start; gap: 20px; min-height: 0; }
.sp-theater-slot { width: min(90vw, calc((100vh - 170px) * 16 / 9)); flex: 0 0 auto; }
.sp-theater.has-drawer .sp-theater-slot { width: min(90vw - 400px, calc((100vh - 170px) * 16 / 9)); }
.sp-theater-drawer { width: 380px; max-height: calc(100vh - 110px); flex: 0 0 380px; overflow: auto; border-radius: 14px; }
.sp-theater-drawer[hidden] { display: none; }
.scene-player.is-theater .sp-time, .scene-player.is-fullscreen .sp-time { color: #c9d6de; }
.scene-player.is-theater .sp-caption, .scene-player.is-fullscreen .sp-caption { color: #9fb7c5; }
.scene-player.is-theater .sp-storyboard { max-height: 18vh; overflow: auto; }

/* Native fullscreen */
.scene-player.is-fullscreen { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2vh 2vw; overflow: auto; background: #030c18; }
.scene-player.is-fullscreen .sp-stage, .scene-player.is-fullscreen .sp-controls, .scene-player.is-fullscreen .sp-caption { width: min(100%, calc((100vh - 110px) * 16 / 9)); }
.scene-player.is-fullscreen .sp-storyboard { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .sp-theater:not([hidden]) .sp-theater-dialog { animation: sp-pop .25s ease-out; }
}
@media (max-width: 1099px) {
  .scene-body { grid-template-areas: "player" "parts"; }
  .scene-body.is-trying { grid-template-areas: "player" "try" "parts"; }
}
@media (max-width: 900px) {
  .sp-theater { place-items: start center; }
  .sp-theater-main { flex-direction: column; }
  .sp-theater-slot, .sp-theater.has-drawer .sp-theater-slot { width: min(94vw, calc((100vh - 170px) * 16 / 9)); }
  .sp-theater-drawer { width: 100%; max-height: none; flex-basis: auto; }
  .sp-theater-btn span { display: none; }
}
@media (max-width: 420px) {
  .sp-time { display: none; }
}
/* Frontier Firm journey: phase notes, scene tags and the link to the overview */
.phase-people { max-width: 760px; margin-top: 22px; padding: 16px 20px; background: #f3faf9; border: 1px solid #cdeee9; border-left: 4px solid var(--teal); border-radius: 10px; }
.phase-people strong { display: block; margin-bottom: 4px; color: #0c5c58; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.phase-people p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.scene-time { color: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.scene-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.scene-channel, .scene-audience { padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.scene-channel { color: #0b5a7a; background: #e4f1f8; }
.scene-channel.is-voice { color: #5b3a8c; background: #efe8fa; }
.scene-channel.is-autonomous { color: #6a4b08; background: #fbf1da; }
.scene-audience { color: #4b6576; background: #f0f4f5; }
.roadmap-phase { margin: 2px 0 0; color: #627788; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.roadmap-section .lead a { color: var(--blue); font-weight: 700; }
.journey-rail .journey-rail-overview { display: block; margin-top: 22px; padding: 12px 14px; color: var(--navy); background: #e3f6f3; border: 1px solid #9fe3dc; border-radius: 10px; font-size: 12px; font-weight: 750; line-height: 1.35; text-decoration: none; }
.journey-rail .journey-rail-overview:hover, .journey-rail .journey-rail-overview:focus-visible { background: var(--teal); }
@media (max-width: 1099px) {
  .journey-rail { display: flex; align-items: center; gap: 8px; }
  .journey-rail ol { flex: 1 1 auto; min-width: 0; }
  .journey-rail .journey-rail-overview { flex: 0 0 auto; margin: 0; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
}
@media (max-width: 560px) {
  .journey-rail .journey-rail-overview { font-size: 0; }
  .journey-rail .journey-rail-overview::after { content: "All 15 ↓"; font-size: 12px; }
}

/* Role-based chat messages (Try panels and voice transcript): agent left, user/caller right */
.msg { display: flex; flex: 0 0 auto; align-items: flex-end; gap: 8px; max-width: 88%; }
.msg--agent { align-self: flex-start; }
.msg--user { align-self: flex-end; justify-content: flex-end; }
.msg-avatar { display: grid; flex: 0 0 auto; width: 26px; height: 26px; place-items: center; color: var(--navy); background: #65ded2; border-radius: 50%; font-size: 11px; font-weight: 800; }
.msg-body { display: grid; min-width: 0; gap: 3px; }
.msg-who { color: #9fb7c5; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.msg--user .msg-who { text-align: right; }
.msg-text { position: relative; margin: 0; padding: 8px 12px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }
.msg--agent .msg-text { color: #102a43; background: white; border-radius: 12px 12px 12px 4px; }
.msg--user .msg-text { color: var(--navy); background: var(--teal); border-radius: 12px 12px 4px 12px; }
.msg-text::after { position: absolute; bottom: 0; width: 8px; height: 10px; content: ""; }
.msg--agent .msg-text::after { left: -6px; background: white; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.msg--user .msg-text::after { right: -6px; background: var(--teal); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.msg.try-typing .msg-text { opacity: .7; }
/* AI Lab sub-nav adds ~42px to the fixed header */
.ai-lab-page .journey-rail { top: 146px; }
.ai-lab-page .chapter, .ai-lab-page .scene { scroll-margin-top: 138px; }
@media (max-width: 1099px) { .ai-lab-page .journey-rail { top: 120px; } }
@media (max-width: 760px) { .ai-lab-page .journey-rail { top: 108px; } }

/* 40-minute tour: agenda, steps, time chips */
.tour-agenda-section { padding-block: 44px 8px; background: white; }
.tour-agenda-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 32px; }
.tour-agenda-head h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); }
.tour-tip { max-width: 460px; margin: 0; color: #607583; font-size: 13px; line-height: 1.5; }
.tour-tip kbd { padding: 1px 6px; color: var(--navy); background: #f0f4f5; border: 1px solid #cfdbe0; border-bottom-width: 2px; border-radius: 5px; font: 700 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.tour-agenda { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: none; }
.tour-agenda a { display: grid; height: 100%; grid-template-columns: auto 1fr; align-content: start; gap: 4px 8px; padding: 12px; color: var(--ink); background: #f4f8f9; border: 1px solid #e3eaec; border-radius: 12px; text-decoration: none; transition: background .2s ease, border-color .2s ease; }
.tour-agenda a:hover, .tour-agenda a:focus-visible { background: #e3f6f3; border-color: #9fe3dc; }
.tour-agenda-n { display: grid; width: 24px; height: 24px; place-items: center; color: var(--navy); background: var(--teal); border-radius: 50%; font-size: 12px; font-weight: 800; }
.tour-agenda-title { align-self: center; font-size: 13px; font-weight: 700; line-height: 1.25; }
.tour-agenda-min { grid-column: 2; color: #0f9c97; font-size: 12px; font-weight: 750; }
.tour-chip { display: inline-flex; align-items: center; padding: 3px 9px; color: var(--navy); background: #e3f6f3; border: 1px solid #9fe3dc; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: none; white-space: nowrap; }
.chapter-kicker .tour-chip { margin-right: 8px; padding: 4px 10px; }
.scene-head .tour-chip { justify-self: start; }
.tour-step { scroll-margin-top: 138px; }
.tour-step h2:focus { outline: none; }
.tour-step h2:focus-visible { outline: 3px solid rgba(41,200,187,.5); outline-offset: 4px; }
.tour-phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tour-phase { padding: 22px; background: white; border: 1px solid #e3eaec; border-top: 3px solid var(--teal); border-radius: 12px; }
.tour-phase-n { color: #0f9c97; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tour-phase h3 { margin: 6px 0 8px; font-size: 19px; }
.tour-phase p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.tour-phase .tour-phase-in { margin-top: 12px; font-size: 12px; font-weight: 650; }
.tour-phase-in a { color: var(--blue); font-weight: 750; }
.tour-next-row { display: flex; justify-content: flex-end; margin-top: 26px; }
.tour-next { display: inline-flex; align-items: center; padding: 10px 16px; color: var(--navy); background: #e3f6f3; border: 1px solid #9fe3dc; border-radius: 999px; font-size: 13px; font-weight: 750; text-decoration: none; }
.tour-next:hover, .tour-next:focus-visible { background: var(--teal); }
.tour-close-actions { margin: 0 0 32px; }

/* Library of all use cases */
.library-section { background: var(--paper); border-top: 1px solid var(--line); scroll-margin-top: 120px; }
.library-section .lead a { color: var(--blue); font-weight: 700; }
.library-group { margin-top: 40px; scroll-margin-top: 140px; }
.library-group h3 { margin: 0 0 14px; font-size: 22px; }
.library-group h3 .chapter-phase { margin-right: 8px; color: #0f9c97; }
.library-note { margin: -6px 0 14px; color: #7a5300; font-size: 12px; font-weight: 650; }
.uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.uc-card { display: flex; min-width: 0; flex-direction: column; gap: 8px; padding: 18px; color: var(--ink); background: white; border: 1px solid #e3eaec; border-radius: 12px; text-decoration: none; }
.uc-card h4 { margin: 0; font-size: 16px; line-height: 1.25; }
.uc-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.uc-phase { color: #627788; font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.uc-quad { padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.uc-quad.q-quick { color: #0c5c58; background: #e3f6f3; } .uc-quad.q-big { color: #0b4a73; background: #e4f1f8; } .uc-quad.q-nice { color: #5b6470; background: #eef1f3; } .uc-quad.q-park { color: #7a5300; background: #fdf3dc; }
.uc-task { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.uc-meta { margin: 0; color: #7a8c98; font-size: 11px; }
.uc-toggle { align-self: flex-start; margin-top: auto; padding: 7px 13px; color: var(--navy); background: #f0f4f5; border: 1px solid #dce5e7; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; }
.uc-toggle:hover { background: #dff5f2; border-color: #9fe3dc; }
.uc-card.is-featured { background: #f2fbfa; border-color: #9fe3dc; }
.uc-card.is-featured:hover, .uc-card.is-featured:focus-visible { border-color: var(--teal); }
.uc-tour { margin-top: auto; color: #0f9c97; font-size: 12px; font-weight: 800; }
.uc-card.is-open { grid-column: 1 / -1; }
.uc-body { margin-top: 10px; padding-top: 18px; border-top: 1px solid #e6ecee; }
.uc-body[hidden] { display: none; }
.uc-body .scene { scroll-margin-top: 140px; }

@media (max-width: 1099px) {
  .tour-agenda { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tour-agenda { grid-template-columns: 1fr 1fr; }
  .tour-phases { grid-template-columns: 1fr; }
  .tour-next-row { justify-content: flex-start; }
}

/* Live voice in the browser (real Copilot Studio agent) */
.voice-live-bar { display: flex; align-items: center; gap: 14px; }
.voice-live-mic { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 14px; color: var(--navy); background: var(--teal); border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 800; box-shadow: 0 6px 18px rgba(41,200,187,.35); }
.voice-live-mic:disabled { color: #607583; background: #eef3f4; box-shadow: none; cursor: not-allowed; }
.voice-live-mic:focus-visible { outline: 3px solid rgba(18,98,138,.5); outline-offset: 3px; }
.voice-live-mic-dot { width: 14px; height: 14px; background: var(--navy); border-radius: 50%; }
.voice-live-mic[aria-pressed="true"] { color: white; background: #d6455d; box-shadow: 0 0 0 6px rgba(214,69,93,.2); }
.voice-live-mic[aria-pressed="true"] .voice-live-mic-dot { background: white; animation: voice-pulse 1s ease-in-out infinite; }
.voice-live-side { display: grid; min-width: 0; gap: 6px; }
.voice-live-state { color: #304b5e; font-size: 13px; font-weight: 750; }
.voice-live-state[data-state="listening"] { color: #b3243c; }
.voice-live-state[data-state="thinking"] { color: #12628a; }
.voice-live-state[data-state="speaking"] { color: #0c5c58; }
.voice-live-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #607583; font-size: 12px; }
.voice-live-lang { padding: 3px 6px; color: var(--ink); background: white; border: 1px solid #cfdbe0; border-radius: 6px; font: inherit; font-size: 12px; }
.voice-live-speak { display: inline-flex; align-items: center; gap: 4px; }
.msg--agent .msg-text { white-space: pre-line; }
.msg-sources { margin: 0; color: #9fb7c5; font-size: 10px; }
.msg-sources a { color: #8ce8de; }
.try-switches { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@keyframes voice-pulse { 50% { transform: scale(.6); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .voice-live-mic[aria-pressed="true"] .voice-live-mic-dot { animation: none; } }

.tpl-hub text { font-size: 10px; }

.roadmap-grid-4 { grid-template-columns: repeat(4, 1fr); }
.library-stage { margin-left: 8px; padding: 3px 9px; color: #0c5c58; background: #e3f6f3; border-radius: 999px; font-size: 12px; font-weight: 750; vertical-align: middle; }
@media (max-width: 1099px) { .roadmap-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .roadmap-grid-4 { grid-template-columns: 1fr; } }

/* Voice Try panels: Foundry speech-to-speech vs Copilot Studio + browser speech */
.try-voice-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 4px; background: #f0f4f5; border-radius: 999px; }
.try-voice-switch[hidden] { display: none; }
.try-voice-switch button { flex: 1 1 auto; min-height: 34px; padding: 0 12px; color: #304b5e; background: transparent; border: 0; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 750; }
.try-voice-switch button[aria-pressed="true"] { color: var(--navy, #071c36); background: white; box-shadow: 0 1px 4px rgba(7,28,54,.15); }
.try-voice-switch button:focus-visible { outline: 3px solid rgba(41,200,187,.55); outline-offset: 2px; }

/* SOP Copilot try panel */
.sop-reg{margin:.2rem 0 .1rem;font-size:.86rem;color:var(--muted,#5b6b74)}
.sop-budget{margin:.1rem 0;font-size:.8rem;color:var(--muted,#5b6b74)}
.sop-show{margin-left:.4rem}
.sop-run{display:grid;gap:.7rem;margin-top:.6rem}
.sop-run:empty{display:none}
.sop-head{display:flex;justify-content:space-between;align-items:center;gap:.6rem}
.sop-badge{font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:.2rem .55rem;border-radius:999px;background:#eef3f5;color:#3b4b55}
.sop-badge.is-running,.sop-badge.is-queued{background:#fff4d6;color:#7a5200}
.sop-badge.is-done{background:#dcf5ea;color:#0b5a3a}
.sop-steps{list-style:none;margin:0;padding:0;display:grid;gap:.35rem}
.sop-steps li{display:grid;grid-template-columns:1.4rem 1fr;gap:.4rem;align-items:start;font-size:.86rem}
.sop-steps li small{display:block;color:var(--muted,#5b6b74);font-size:.76rem}
.sop-dot{font-weight:700;color:#9aa8b0;text-align:center}
.sop-steps li.is-done .sop-dot{color:#0b8a57}
.sop-steps li.is-running .sop-dot{color:#c98400;animation:sop-blink 1.2s ease-in-out infinite}
.sop-steps li.is-error .sop-dot{color:#c0392b}
@keyframes sop-blink{50%{opacity:.35}}
.sop-rounds{width:100%;border-collapse:collapse;font-size:.78rem}
.sop-rounds th,.sop-rounds td{padding:.25rem .35rem;border-bottom:1px solid #e3e9ec;text-align:left}
.sop-result{display:grid;gap:.15rem;padding:.7rem .8rem;border-radius:10px;font-size:.84rem}
.sop-result.is-ready{background:#e3f7ee;color:#0b4a31}
.sop-result.is-attention{background:#fff2dc;color:#6b4300}
.sop-result small{opacity:.8}
.sop-files{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;font-size:.84rem}
@media (prefers-reduced-motion:reduce){.sop-steps li.is-running .sop-dot{animation:none}}
.sop-show{margin-left:.6rem;background:none;border:0;padding:.4rem 0;font:inherit;font-size:.86rem;font-weight:700;color:#0b6e78;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.sop-upload{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .6rem;margin:.35rem 0 .2rem;padding:.65rem .75rem;border:1px dashed #b9c8cf;border-radius:10px;font-size:.84rem}
.sop-upload-label{flex-basis:100%;font-weight:700;font-size:.82rem}
.sop-upload-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.sop-upload-pick{display:inline-flex;align-items:center;padding:.35rem .8rem;border-radius:999px;border:1px solid #0b6e78;color:#0b6e78;font-weight:700;cursor:pointer;background:#fff}
.sop-upload-pick:focus-within{outline:3px solid rgba(41,200,187,.55);outline-offset:2px}
.sop-upload-name{color:var(--muted,#5b6b74);overflow-wrap:anywhere}
.sop-upload-clear{background:none;border:0;padding:0;font:inherit;font-size:.8rem;color:#0b6e78;text-decoration:underline;cursor:pointer}
.sop-upload small{flex-basis:100%;color:var(--muted,#5b6b74);font-size:.74rem;line-height:1.4}
.usecase-field.is-muted{opacity:.45}
