/* guide/app.css — Ascent HI Guide attendee page. VERSION 1.7.4 — 2026-11-10
   (bot check inside the loading card). 1.7.3 — 2026-11-10
   (consent line under email forms). 1.7.2 — 2026-11-05
   (video thumbnails: picture rows in the side panel, sideways cards on
   phones). 1.6.0 — 2026-11-05 (Book a meeting: the booking-link dialog). 1.5.0 — 2026-11-05
   (the AI Agent card). 1.4.1 — 2026-11-04
   (default client colours: deep ocean blue #1F5A7A + soft apricot #F2B880,
   George). 1.4.0 — 2026-11-04 (email dialog, Open-visit bot-check box). 1.3.0 — 2026-10-28
   (Test-mode bar). 1.2.0 — 2026-10-28
   (ask bar under the video). 1.1.0 — 2026-10-28
   (agent panel → centered dialog, larger avatar). 1.0.0 — 2026-10-27.
   --brand / --accent come from the client's branding at load (app.js);
   defaults (a client that never picked colours) are deep ocean blue
   #1F5A7A (white text 7.5:1) + soft apricot #F2B880 (dark text 8.4:1). */
:root {
  --brand: #1F5A7A;
  --accent: #F2B880;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #b42318;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
[hidden] { display: none !important; }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 0; }
h3 { margin: 0 0 12px; }
input { font: inherit; color: var(--text); width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
label input { margin-top: 4px; font-weight: 400; }

.btn { font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; padding: 10px 14px; border: 1px solid var(--line); background: #fff; color: var(--text); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #1f2933; }
.btn.ghost { background: transparent; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.icon-btn { background: none; border: 0; font-size: 16px; cursor: pointer; color: var(--muted); margin-left: auto; padding: 4px 8px; }

/* Centered cards: loading, unavailable, gate */
.view { min-height: 100vh; }
#viewLoading, #viewUnavailable, #viewGate { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.center-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; width: 100%; max-width: 440px; text-align: left; }
#viewLoading .center-card, #viewUnavailable .center-card { text-align: center; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0 0 20px; }
.fine { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.form-error { color: var(--danger); font-size: 14px; margin: 0 0 12px; }
form .btn.primary { width: 100%; }
.row-links { display: flex; justify-content: space-between; margin-top: 14px; }
.brand-logo { max-height: 48px; max-width: 200px; margin-bottom: 16px; object-fit: contain; }
.brand-logo.small { max-height: 34px; max-width: 140px; margin: 0; }
.spinner { width: 32px; height: 32px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
#turnstileBox:not(:empty) { margin-bottom: 12px; }

/* Demo view */
.preview-bar { background: #fef3c7; color: #78350f; font-size: 14px; text-align: center; padding: 8px 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; background: var(--brand); color: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-company { font-weight: 700; }
.brand-title { font-size: 13px; opacity: .8; }
.topbar .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }

.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; padding: 20px; max-width: 1440px; margin: 0 auto; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 16px; align-self: start; position: sticky; top: 16px; }
.cat h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.cat + .cat { margin-top: 14px; }
.feature { display: block; width: 100%; text-align: left; padding: 9px 10px; margin-bottom: 4px; border-radius: 8px; border: 1px solid transparent; background: transparent; font: inherit; color: var(--text); cursor: pointer; }
.feature:hover { background: var(--bg); }
.feature.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); font-weight: 600; }
.ask-bar { margin-top: 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ask-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ask-row .btn { padding: 12px 14px; font-size: 15px; white-space: nowrap; flex: 1 0 auto; }
.ask-row .ask-btn { flex-grow: 2; }
.ask-btn { font-size: 16px; }
.typed { display: flex; gap: 6px; }
.ask-bar .fine { margin: 0; }

.stage { min-width: 0; position: relative; }
/* Desktop: size the video by the window height too, so the video AND the
   ask bar under it fit on screen together (350px = top bar, heading, ask bar). */
@media (min-width: 861px) {
  .stage { width: 100%; max-width: max(520px, calc((100vh - 350px) * 16 / 9)); justify-self: start; }
}
.feature-head { margin-bottom: 12px; }
.crumb { font-size: 13px; color: var(--muted); }
.video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0b0f14; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-wrap iframe, #player, #player > * { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.video-wrap .vidyard-player-container { position: absolute !important; inset: 0; }
.manual-pause { position: absolute; left: 12px; bottom: 12px; margin: 0; background: rgba(15, 23, 42, .82); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 6px; }
.empty-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #cbd5e1; padding: 24px; text-align: center; }

/* Agent panel: centered dialog over a dimmed page */
.agent-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 9; }
.agent { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(600px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); padding: 28px 28px 24px; z-index: 10; }
.agent-close { position: absolute; top: 12px; right: 12px; font-size: 18px; }
.agent-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin-bottom: 18px; }
.agent-head .orb { margin-bottom: 10px; }
.agent-name { font-weight: 700; font-size: 18px; }
.agent-status { font-size: 14px; color: var(--muted); min-height: 21px; }
.orb { width: 112px; height: 112px; flex: none; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 55%, #fff), var(--brand) 70%); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
.orb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.orb.listening { animation: ring 1.3s infinite; }
.orb.thinking { animation: breathe 1s ease-in-out infinite; }
.orb.speaking { animation: ring .7s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 20px transparent; } }
@keyframes breathe { 50% { transform: scale(.92); opacity: .8; } }
@keyframes spin { to { transform: rotate(360deg); } }
.transcript { max-height: 40vh; overflow: auto; font-size: 16px; line-height: 1.6; }
.transcript .q { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.transcript .a { white-space: pre-wrap; }
.agent-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.agent-typed { margin-top: 12px; }
.cta-card { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-items: center; }
.cta-card > div { width: 100%; text-align: center; font-size: 13px; color: var(--muted); }

.badge { text-align: center; font-size: 12px; color: var(--muted); padding: 8px 0 20px; }
.badge a { color: var(--muted); }

dialog { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; width: min(400px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f2933; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 20; max-width: calc(100% - 32px); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; padding: 12px 16px; }
  .panel { position: static; order: 2; }
  .stage { order: 1; }
  .agent { padding: 24px 18px 18px; }
  .orb { width: 88px; height: 88px; }
  .topbar { padding: 10px 16px; }
  .ask-row .ask-btn { flex-basis: 100%; }
  .ask-row .btn { padding: 10px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .orb, .spinner { animation: none !important; } }

/* 1.4.0 — Visitor access (§5.2) */
dialog .muted { color: #64748b; font-size: 14px; line-height: 1.5; margin: 0 0 12px; }
.open-check { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 60; }
.open-check:empty { display: none; }

/* 1.5.0 — the AI Agent card (side panel) and strip (phones) */
.host-card, .host-strip { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: 12px; }
.host-card { flex-direction: column; text-align: center; padding: 18px 14px 14px; gap: 10px; border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); background: color-mix(in srgb, var(--brand) 4%, #fff); }
.host-card:hover, .host-strip:hover { border-color: var(--brand); }
.host-card:focus-visible, .host-strip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.host-card[hidden], .host-strip[hidden] { display: none; }
.host-pic { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 55%, #fff), var(--brand) 70%); color: #fff; font-weight: 700; font-size: 36px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px color-mix(in srgb, var(--brand) 25%, #fff); }
.host-pic.small { width: 44px; height: 44px; font-size: 18px; box-shadow: none; }
.host-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.host-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.host-name { font-size: 16px; }
.ai-tag { display: inline-block; vertical-align: 2px; margin-left: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, #fff); border-radius: 999px; padding: 2px 8px; }
.host-role { font-size: 13px; color: var(--muted); }
.host-invite { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--brand); }
.host-strip { display: none; padding: 8px 10px; }
@media (max-width: 860px) {
  .host-card { display: none !important; }
  .host-strip:not([hidden]) { display: flex; }
}

/* 1.6.0 — Book a meeting (§5.3): the link-as-button in the fallback dialog */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
#bookDialog h3 { margin-top: 0; }

/* 1.7.0 — Video thumbnails (§5.4) */
.feature-list { display: flex; flex-direction: column; gap: 4px; }
.feature { display: flex; align-items: flex-start; gap: 10px; padding: 6px; margin: 0; }
.feature .thumb { position: relative; flex: 0 0 120px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #0f172a; box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.feature .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.feature:hover .thumb img { transform: scale(1.04); }
.feature .thumb.no-pic { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #0f172a)); }
.thumb-play { color: #fff; font-size: 16px; opacity: .9; }
.thumb-len { position: absolute; right: 4px; bottom: 4px; background: rgba(15, 23, 42, .82); color: #fff; font-size: 11px; font-weight: 600; line-height: 1; padding: 3px 5px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.thumb-now { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(15, 23, 42, .55); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.feature.active .thumb-now { display: flex; }
.feature.active .thumb { box-shadow: 0 0 0 2px var(--brand); }
.feature.active .thumb-len { display: none; }
.feature.active .thumb-play { display: none; }
.f-text { min-width: 0; padding-top: 2px; }
.f-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.35; }
.feature.active .f-title { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .feature .thumb img { transition: none; } .feature:hover .thumb img { transform: none; } }

@media (max-width: 860px) {
  /* The sideways row must not widen the page: grid/flex children may shrink below their content. */
  .layout { grid-template-columns: minmax(0, 1fr); }
  .panel, .stage, #nav, .cat { min-width: 0; }
  .feature-list { flex-direction: row; overflow-x: auto; gap: 12px; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .feature { flex: 0 0 168px; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent; }
  .feature:hover, .feature.active { background: transparent; border: 0; }
  .feature .thumb { flex: none; width: 100%; }
  .f-text { padding: 0 2px; }
  .f-title { -webkit-line-clamp: 2; font-size: 13px; }
}
.fine.consent { margin-top: 6px; }
.fine.consent a { color: inherit; text-decoration: underline; }
.center-card .open-check { position: static; transform: none; margin: 14px auto 0; display: flex; justify-content: center; }
.spinner[hidden] { display: none; }
