/* Editorial frame for the existing interactive stories. Demo surfaces retain their own tokens. */
:root {
  --page: #11181f; --ink: #f6f3ee; --muted: #afb8c2; --accent: #f6b987; --rule: #ffffff1a;
  --story-gap: clamp(40px, 5vw, 72px);
  --story-heading: clamp(2rem, 3.1vw, 2.5rem);
  --story-space: clamp(64px, 7vw, 96px);
  --story-frame: 24px;
  --story-shadow: 0 24px 48px #00000024, 0 1px 0 #ffffff0a inset;
}
.scan-page > section {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--story-gap); padding-block: var(--story-space); align-items: center;
  border-top: 1px solid var(--rule);
}
.scan-page > section:first-child { border-top: 0; }
.scan-page > section > [class$="-copy"] { grid-column: 2; grid-row: 1; min-width: 0; max-width: none; }
.scan-page > section > [class$="-stage"] { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; max-width: none; border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); border-radius: var(--story-frame); box-shadow: var(--story-shadow); }
.scan-page > section:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.scan-page > section:nth-child(even) > [class$="-copy"] { grid-column: 1; }
.scan-page > section:nth-child(even) > [class$="-stage"] { grid-column: 2; }
.scan-page > section h2 { font-size: var(--story-heading); line-height: 1.13; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.scan-page .section-eyebrow { margin-bottom: 1.25rem; font-size: .6875rem; letter-spacing: .14em; }
.scan-page .section-description { font-size: 1rem; line-height: 1.7; max-width: 43ch; margin-top: 1.5rem; }
.scan-page .story-takeaway { padding-left: 1rem; margin-top: 1.5rem; max-width: 36ch; font-size: .9375rem; }
.scan-page .story-cta { min-height: 3.25rem; margin-top: 1.5rem; padding: .75rem 1.375rem; font-size: .9375rem; color: #182028; }
.scan-page .story-cta:focus-visible { outline-color: #ffbf91; }
.scan-page .copy-rule { display: none; }
.scan-page .copy-footnote { margin-top: 1.5rem; font-size: .8125rem; }
.scan-page .score-explainer { font-size: .8125rem; }
.scan-page .scan-stage { height: 440px; }
.scan-page .work-stage { height: 500px; }
.scan-page .activation-stage, .scan-page .conversation-stage { height: 550px; }
@media(max-width:1000px) {
  .scan-page > section, .scan-page > section:nth-child(even) { grid-template-columns: 1fr; gap: 2rem; }
  .scan-page > section > [class$="-copy"], .scan-page > section:nth-child(even) > [class$="-copy"] { grid-column: 1; grid-row: auto; max-width: 38rem; }
  .scan-page > section > [class$="-stage"], .scan-page > section:nth-child(even) > [class$="-stage"] { grid-column: 1; grid-row: auto; max-width: 780px; margin-inline: auto; }
  .scan-page .section-description { max-width: 56ch; }
}
@media(max-width:540px) {
  :root { --story-heading: 2rem; --story-frame: 20px; }
  .scan-page .work-stage { height: 560px; }
  .scan-page .activation-stage, .scan-page .conversation-stage { height: 625px; }
}
@media(prefers-reduced-motion:reduce) { .story-cta { transition: none; } }
.scene-navigation button, .work-chapters button, .activation-chapters button, .conversation-chapters button { min-height: 44px; }
/* Dark reflective surrounds match the reference; the real example UI stays untouched. */
:root { --story-space: 48px; }
.scan-page > section > [class$="-stage"] {
  background: radial-gradient(ellipse at 100% 0, #efb07c66, transparent 58%), linear-gradient(135deg, #1b252e, #11181f);
  border-color: #ffffff21;
  box-shadow: 0 20px 48px #00000029, 0 1px 0 #ffffff0a inset;
}
.scan-page .scene-navigation button,
.scan-page .work-chapters button,
.scan-page .activation-chapters button,
.scan-page .conversation-chapters button { color: #c2c7cd; }
.scan-page nav button[aria-pressed=true] { color: var(--accent); }
.scan-page .stage-footer, .scan-page .stage-footer button,
.scan-page .work-stage-footer, .scan-page .work-stage-footer button,
.scan-page .activation-stage-footer, .scan-page .activation-stage-footer button,
.scan-page .conversation-stage-footer, .scan-page .conversation-stage-footer button { color: #b9bfc6; }
.scan-page .story-takeaway { display: flex; align-items: baseline; gap: .75rem; padding-left: 0; border-left: 0; }
.scan-page .story-takeaway::before { content: '✓'; color: var(--accent); flex: none; }
@media(max-width:540px) { :root { --story-space: 40px; } }

/* Keep the observation and its evidence together, as in the following work scene. */
.scan-page > .scan-section { padding-top: 24px; }
.scan-page :is(.scan-section, .activation-section, .conversation-section) h2 span { color: var(--ink); }
.scan-page :is(.scan-section, .activation-section, .conversation-section) .section-eyebrow { margin-bottom: 1rem; }
.scan-page :is(.scan-section, .activation-section, .conversation-section) .section-description { margin-top: 1.125rem; line-height: 1.65; }
:is(.scan-benefits, .story-benefits) { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .75rem; }
:is(.scan-benefits, .story-benefits) li { display: flex; align-items: flex-start; gap: .75rem; color: var(--ink); font-size: .9375rem; line-height: 1.5; }
:is(.scan-benefits, .story-benefits) svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.scan-page .scan-stage { height: auto; }
.scan-workspace { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.7fr); margin: 12px 12px 0; border: 1px solid var(--rule); border-radius: 14px; background: color-mix(in srgb, var(--page) 90%, transparent); overflow: hidden; }
.scan-companion { display: flex; flex-direction: column; min-width: 0; padding: 16px 14px; color: var(--ink); border-right: 1px solid var(--rule); }
.scan-companion-header { display: flex; align-items: center; gap: 6px; margin-left: -8px; }
.scan-companion-header > div:last-child { display: grid; gap: 4px; }
.scan-companion-header strong { font-size: 13px; font-weight: 500; line-height: 1.3; }
.scan-companion-header span { color: var(--muted); font-size: 10px; line-height: 1.3; }
.scan-stage .scan-o { position: relative; inset: auto; flex: none; width: 48px; height: 48px; }
.scan-observations { flex: 1; padding-top: 22px; }
.scan-observations p { font-size: 14px; line-height: 1.65; text-wrap: pretty; animation: scan-observation-in .3s ease both; }
.scan-companion-context { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 10px; line-height: 1.5; color: var(--muted); }
.scan-canvas { position: relative; container-type: inline-size; min-width: 0; padding: 40px 10px 12px; }
.scan-stage .scene-navigation { top: 0; gap: clamp(2px, 2cqw, 12px); }
.scan-stage .scene-navigation button { min-height: 40px; font-size: 10px; padding-inline: 4px; }
.scan-stage .scan-film { position: relative; inset: auto; height: 276px; }
.scan-stage .scene-board { top: 0; left: 0; width: 100%; transform: none; border-radius: 10px; }
.scan-stage .board-header { height: 28px; padding-inline: 12px; font-size: 9px; }
.scan-stage .board-header small { font-size: 8px; }
.scan-stage .board-body { height: 186px; }
.scan-stage .board-result { height: 60px; }
.scan-stage .site-nav { height: 28px; padding-inline: 14px; }
.scan-stage .site-content { height: 120px; padding: 12px 14px 6px; gap: 14px; }
.scan-stage .site-product { height: 98px; }
.scan-stage .site-message h3 { font-size: 23px; }
.scan-stage .site-kicker { margin-bottom: 7px; }
.scan-stage .site-bottom { margin-inline: 14px; }
.scan-stage .lead-nav { height: 30px; }
.scan-stage .lead-layout { padding-top: 10px; gap: 12px; }
.scan-stage .form-field { height: 20px; }
.scan-stage .ads-body { padding: 9px 10px; }
.scan-stage .ads-grid { gap: 8px; }
.scan-stage .ad-brand { height: 26px; }
.scan-stage .ad-art { height: 58px; }
.scan-stage .ad-copy { min-height: 32px; padding-block: 4px; }
.scan-stage .ad-art-title { font-size: 14px; left: 8px; }
.scan-stage .tracking-body { padding: 12px; }
.scan-stage .tracking-heading { margin-bottom: 10px; }
.scan-stage .tracking-sources { margin-bottom: 9px; }
.scan-stage .tracking-sources > div { padding: 6px 5px; gap: 4px; }
.scan-stage .event-row { height: 25px; }
.scan-stage .stage-footer { position: relative; inset: auto; min-height: 40px; margin: 0 16px; gap: 6px; }
.scan-stage .motion-toggle { min-height: 40px; flex: none; }
.scan-page .scan-stage .score-explainer { margin: 0; max-width: none; font-size: 10px; }
.scan-stage .score-explainer summary { min-height: 40px; gap: 7px; color: var(--muted); text-decoration: none; line-height: 1.4; }
.scan-stage .score-explainer summary::after { content: none; }
.scan-stage .score-explainer summary::-webkit-details-marker { display: none; }
.scan-stage .score-explainer summary:hover { color: var(--ink); }
.scan-stage .score-explainer summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.scan-stage .score-explainer summary svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.score-explainer-panel { position: absolute; bottom: 100%; left: 0; z-index: 4; width: min(28rem, calc(100cqw - 34px)); padding: 18px; border: 1px solid var(--rule); border-radius: 12px; background: var(--page); box-shadow: var(--story-shadow); font-size: 12px; line-height: 1.65; color: var(--muted); }
.score-explainer-panel strong { color: var(--ink); font-weight: 500; }
.score-explainer-panel p { margin-top: 8px; }
@keyframes scan-observation-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@container (max-width: 580px) {
  .scan-workspace { grid-template-columns: minmax(0, 1fr); }
  .scan-companion { padding: 12px 16px 16px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .scan-observations { padding-top: 8px; min-height: 78px; }
  .scan-observations p { max-width: 46ch; }
  .scan-companion-context { display: none; }
}
@container (max-width: 340px) {
  .scan-stage .site-nav > span:last-child { display: none; }
  .scan-stage .site-content { gap: 10px; padding-inline: 10px; }
  .scan-stage .site-message h3 { font-size: 21px; }
  .scan-stage .site-bottom { margin-inline: 10px; }
  .scan-stage .site-cta { gap: 4px; }
  .scan-stage .result-score { min-width: 50px; font-size: 30px; }
  .scan-stage .result-copy > span { font-size: 10px; }
  .scan-stage .result-button { gap: 7px; padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) { .scan-observations p { animation: none; } }

/* The companion stays in place as the canvas moves from setup to the customer view. */
.scan-page .activation-stage, .scan-page .conversation-stage { height: 520px; }
.activation-stage .activation-os, .conversation-stage .conversation-os { inset: 48px 12px 46px; }
.activation-stage .activation-split, .conversation-stage .conversation-split { grid-template-columns: 30% minmax(0, 1fr); }
.activation-stage .activation-guide, .conversation-stage .conversation-guide { min-width: 0; padding: 18px 14px; }
.activation-stage .activation-tavyo, .conversation-stage .conversation-tavyo { font-size: 13px; margin-bottom: 22px; }
.activation-stage .activation-tavyo small, .conversation-stage .conversation-tavyo small { font-size: 9px; color: var(--os-canvas-muted); }
.story-observations p { font-size: 14px; line-height: 1.65; color: var(--os-canvas-ink); text-wrap: pretty; animation: scan-observation-in .3s ease both; }
.activation-room, .conversation-room { position: relative; overflow: hidden; }
.activation-review, .conversation-work { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.activation-stage .activation-review-main { padding-inline: 12px; gap: 12px; }
.activation-stage .activation-settings { margin-inline: 12px; padding-block: 9px; }
.activation-stage .activation-settings dt { font-size: 8px; }
.activation-stage .activation-settings dd { font-size: 10px; }
.activation-stage .activation-settings dd > span { font-size: 8px; }
.activation-stage .activation-review-actions { min-height: 54px; padding: 6px 12px; }
.activation-stage .activation-review-actions > span { font-size: 9px; }
.activation-stage .activation-launch { min-height: 44px; font-size: 10px; padding-inline: 10px; }
.activation-room .activation-customer-view { inset: 0; padding: 12px; }
.activation-room .activation-customer-label { margin-bottom: 8px; }
.activation-room .activation-feed { width: min(244px, 100%); flex: 1; min-height: 0; display: flex; flex-direction: column; }
.activation-room .activation-feed-header, .activation-room .activation-feed-bottom { height: 28px; min-height: 28px; }
.activation-room .activation-feed-dock { aspect-ratio: auto; flex: 1; min-height: 0; }
.activation-room .activation-feed-caption { margin-top: 8px; font-size: 10px; }
.activation-room .activation-landing { inset: 0; border: 0; border-radius: 0; box-shadow: none; }
.activation-room .activation-site > header { padding: 12px 16px; }
.activation-room .activation-site-body { padding: 16px; }
.activation-room .activation-site-hero { gap: 14px; }
.activation-room .activation-site-hero h3 { font-size: 26px; }
.activation-room .activation-site-product.site-product { height: 115px; }
.activation-room .activation-site-actions { gap: 8px; margin-top: 16px; }
.activation-room .activation-site-actions > span { font-size: 7px; }
.activation-room .activation-enquire { gap: 8px; padding-inline: 9px; }
.activation-room .activation-arrival-note { font-size: 9px; padding-inline: 10px; }
.activation-room .activation-arrival-note > a { font-size: 8px; }
.conversation-room .conversation-arrival { top: 18px; width: min(266px, calc(100% - 28px)); }
.conversation-room .conversation-arrival-caption { margin-bottom: 10px; }
.conversation-room .conversation-phone-body { min-height: 196px; }
.conversation-room .conversation-arrival > p { margin-top: 10px; }
.conversation-stage .conversation-handoff { position: static; inset: auto; margin: 0; padding: 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--c-edge); border-radius: 0; background: color-mix(in srgb, var(--orange) 8%, var(--paper)); }
.conversation-stage .conversation-handoff > div { min-width: 0; flex: 1; }
.conversation-stage .conversation-handoff strong { font: 500 12px/1.4 Inter, sans-serif; margin: 0 0 4px; letter-spacing: 0; }
.conversation-stage .conversation-handoff p { font-size: 10px; line-height: 1.5; color: var(--c-muted); }
.conversation-stage .conversation-takeover { margin: 0; min-height: 44px; width: auto; font-size: 11px; color: var(--a-ink, var(--c-ink)); background: var(--paper); border-color: var(--c-edge); flex: none; }
.conversation-stage .conversation-thread-header strong { font-size: 12px; }
.conversation-stage .conversation-thread-header div > span { font-size: 8px; }
.conversation-stage .conversation-owner { font-size: 9px; }
.conversation-stage .conversation-message { font-size: 11px; line-height: 1.6; padding: 9px 10px; }
.conversation-stage .conversation-message-author, .conversation-stage .conversation-message small { font-size: 8px; }
.conversation-stage .conversation-reply { font-size: 11px; }
.conversation-stage .conversation-review-evidence, .conversation-stage .conversation-reply-head, .conversation-stage .conversation-idle-reply { font-size: 9px; }
.conversation-stage .conversation-reply-actions > span { font-size: 8px; }
.conversation-stage .conversation-send { min-height: 44px; font-size: 10px; }
.conversation-stage .conversation-transfer-note { font-size: 9px; }
.conversation-stage .conversation-order > p { font-size: 11px; }
.conversation-stage .conversation-order small, .conversation-stage .conversation-order > footer { font-size: 9px; }
@media (max-width: 620px) {
  .scan-page .activation-stage, .scan-page .conversation-stage { height: 660px; }
}
@container (max-width: 480px) {
  .activation-stage .activation-split, .conversation-stage .conversation-split { grid-template-columns: minmax(0, 1fr); grid-template-rows: 140px minmax(0, 1fr); }
  .activation-stage .activation-guide, .conversation-stage .conversation-guide { display: block; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--os-canvas-border); }
  .activation-stage .activation-tavyo, .conversation-stage .conversation-tavyo { position: static; margin: 0 0 10px; font-size: 12px; }
  .activation-stage .activation-tavyo small, .conversation-stage .conversation-tavyo small { font-size: 9px; }
  .activation-stage .activation-o { width: 26px; height: 26px; }
  .conversation-stage .conversation-tavyo svg { width: 30px; height: 30px; }
  .story-observations p { font-size: 13px; line-height: 1.5; }
  .activation-stage .activation-settings { gap: 6px; }
  .activation-stage .activation-settings dd { font-size: 9px; }
  .activation-stage .activation-review-actions > span { font-size: 8px; }
  .activation-stage .activation-launch { font-size: 9px; }
  .conversation-stage .conversation-reply:focus { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .story-observations p { animation: none; } }
.activation-stage .activation-review-main { grid-template-rows: minmax(0, 1fr); }
.activation-stage .activation-ad-column, .activation-stage .activation-destination { min-height: 0; }
.activation-stage .activation-destination > small { display: none; }
.activation-stage .activation-mini-page { transform: none; }
