/* GuideEye live demo section. Uses the colour tokens from landing.css. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.live { padding: 22px; border-radius: 28px; }
.live:hover::after { opacity: 0; } /* keep the sheen off the working surface */
.live .row { display: flex; gap: 10px; align-items: center; }
.live .row.wrap { flex-wrap: wrap; }
.live .btn-small { margin-left: 0; }

/* Status bar */
.live-bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 20px; margin-bottom: 18px; }
.live-status { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.dot-off { background: #9e9e99; box-shadow: none; }
.dot-bad { background: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .2); }
.live-settings { font-size: 14.5px; }
.live-settings summary { cursor: pointer; color: var(--muted); font-weight: 600; text-align: right; }
.live-settings form { margin-top: 10px; display: grid; gap: 6px; min-width: min(360px, 100%); }
.live-settings label { color: var(--muted); }

.live input[type="text"], .live input[type="url"] {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--ink);
  font: 500 16px/1 var(--font); box-shadow: inset 0 1px 2px var(--glass-edge);
}
.live input::placeholder { color: var(--muted); opacity: .8; }

.live-offline { margin-bottom: 18px; padding: 20px 22px; border-radius: 16px; border: 1px solid #e5484d; background: rgba(229, 72, 77, .08); }
.live-offline h3 { font-size: 18px; }
.live-offline p { margin-top: 6px; color: var(--muted); }
.live-offline pre { margin: 12px 0 14px; padding: 12px 16px; border-radius: 12px; background: var(--screen); color: #94f27f; overflow-x: auto; font: 14px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }

.live-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: start; }

/* Camera */
.stage { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--screen); }
.stage video, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #acada8; font-weight: 600; }
.stage-warning { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(30, 30, 30, .88); color: #94f27f; font-size: 20px; font-weight: 700; line-height: 1.25; text-align: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.stage-warning:empty, .stage.on .stage-empty { display: none; }
.nav-status { margin-top: 12px; padding: 10px 16px; border-radius: 14px; background: var(--icon-bg); color: var(--accent); font-weight: 700; font-size: 15.5px; }
.nav-status:empty { display: none; }
.live-controls { display: grid; gap: 12px; margin-top: 16px; }
.live-controls .btn { justify-self: start; }
.toggle { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 500; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }

/* Tabs and panels */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); }
.tab { flex: 1; min-height: 42px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 15px/1 var(--font); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.panel { display: grid; gap: 14px; margin-top: 16px; }
.panel[hidden] { display: none; }
.hint { font-size: 14px; color: var(--muted); }
.hint:empty { display: none; }

/* Conversation */
.log { display: flex; flex-direction: column; gap: 10px; height: 300px; overflow-y: auto; padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-border); }
.msg { max-width: 88%; padding: 10px 15px; border-radius: 18px; font-size: 15.5px; line-height: 1.45; }
.msg-user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.msg-guide { align-self: flex-start; background: var(--glass-strong); border: 1px solid var(--glass-border); border-bottom-left-radius: 6px; }
.msg-error { align-self: flex-start; border: 1px solid #e5484d; background: rgba(229, 72, 77, .08); }
.msg small { display: block; margin-top: 4px; font-size: 12px; opacity: .72; }
.msg.thinking p::after { content: "…"; }

.confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 20px; border: 2px solid var(--accent); background: var(--icon-bg); }
.confirm[hidden] { display: none; }
.confirm p { font-weight: 700; font-size: 17px; }

.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick .chip { min-height: 40px; padding: 0 14px; font-size: 14px; }

.ask { display: flex; gap: 8px; align-items: center; }
.mic { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: transform .2s; }
.mic svg { width: 24px; height: 24px; }
.mic:hover { transform: scale(1.05); }
.mic[aria-pressed="true"] { background: #e5484d; color: #fff; animation: mic-pulse 1.2s ease-in-out infinite; }
.mic[hidden] { display: none; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 10px rgba(229, 72, 77, .18); } }

/* Bridge */
.bridge-caption { min-height: 190px; max-height: 300px; overflow-y: auto; padding: 20px; border-radius: 16px; background: var(--screen); color: #fff; font-size: clamp(24px, 3vw, 34px); font-weight: 600; line-height: 1.25; }

/* Memory */
.memory { display: grid; gap: 8px; max-height: 330px; overflow-y: auto; }
.memory li { padding: 12px 15px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-border); font-size: 15px; }
.memory small { display: block; color: var(--muted); font-size: 12.5px; }
.memory-empty { color: var(--muted); }

.live-privacy { margin-top: 20px; font-size: 13.5px; color: var(--muted); }

@media (max-width: 900px) {
  .live-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .live { padding: 16px; border-radius: 28px; }
  .log { height: 260px; }
  .ask { flex-wrap: wrap; }
  .ask input { flex-basis: calc(100% - 60px); }
  .ask .btn { width: 100%; }
}

/* Always-on microphone, Bridge and Family */
.mic-state { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.mic-state::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #9e9e99; }
.mic-state[data-state="on"] { color: var(--ink); }
.mic-state[data-state="on"]::before { background: #e5484d; animation: mic-pulse 1.4s ease-in-out infinite; }
.bridge-caption { min-height: 96px; margin-top: 6px; }
.bridge-sign { background: var(--accent); color: var(--accent-ink); }
.msg-link { margin-top: 10px; }
.memory li { position: relative; }
.link-button { position: absolute; right: 12px; top: 12px; border: 0; background: none; color: var(--accent); font: 600 13.5px/1 var(--font); cursor: pointer; text-decoration: underline; }
.contact-form { display: grid; gap: 8px; }
.contact-form label { font-size: 14px; font-weight: 600; }
.contact-form .btn { justify-self: start; margin-top: 4px; }
.hint a { color: var(--accent); font-weight: 600; }

/* Bridge: live sign reading and fingerspelling */
.bridge-head { justify-content: space-between; }
.sign-mode { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); }
.sign-mode label { cursor: pointer; }
.sign-mode input { position: absolute; opacity: 0; }
.sign-mode span { display: block; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.sign-mode input:checked + span { background: var(--ink); color: var(--bg); }
.sign-mode input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.link-inline { border: 0; background: none; color: var(--accent); font: 600 13.5px/1 var(--font); text-decoration: underline; cursor: pointer; }
.sign-live { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 15px; font-weight: 700; }
.sign-meter { flex: 1; height: 8px; border-radius: 99px; background: var(--glass-edge); overflow: hidden; }
.sign-meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .12s linear; }
.spell { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.spell:empty { display: none; }
.spell-card { flex: none; width: 62px; margin: 0; padding: 6px; border-radius: 12px; background: #fff; text-align: center; animation: rise .3s both; }
.spell-card img { display: block; width: 50px; height: 56px; object-fit: contain; }
.spell-card figcaption { font: 700 15px/1.3 var(--font); color: #1e1e1e; }
.spell-gap { flex: none; width: 18px; }

/* Fingerspelling wraps by word and never leaves its box */
.spell { flex-wrap: wrap; overflow-x: hidden; overflow-y: auto; max-height: 260px; gap: 10px 18px; }
.spell-word { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.live-side, .panel, .panel > div { min-width: 0; }
.bridge-caption { overflow-wrap: anywhere; }

/* Big view for the person in front of you */
.facing-open { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; gap: 2vh; padding: 3vw; background: #000; overflow-y: auto; }
.facing-open .eyebrow { color: #94f27f; font-size: 2vw; }
.facing-open .bridge-caption { min-height: 0; max-height: none; flex: none; margin: 0; padding: 2vw; background: #000; color: #fff; font-size: clamp(40px, 7vw, 120px); line-height: 1.1; }
.facing-open .spell { max-height: none; flex: 1; gap: 2vw 4vw; align-content: flex-start; }
.facing-open .spell-word { gap: 1vw; }
.facing-open .spell-card { width: clamp(90px, 11vw, 190px); padding: 1vw; border-radius: 1.4vw; }
.facing-open .spell-card img { width: 100%; height: clamp(90px, 12vw, 200px); }
.facing-open .spell-card figcaption { font-size: clamp(22px, 2.6vw, 44px); }

/* Bridge: one spoken word per line */
.spell { flex-direction: column; flex-wrap: nowrap; gap: 12px; }
.spell-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.spell-label { min-width: 84px; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.facing-open .spell { gap: 3vh; }
.facing-open .spell-line { gap: 1vw 2.5vw; }
.facing-open .spell-label { min-width: 16vw; color: #fff; font-size: clamp(34px, 5vw, 90px); }

/* Microphone source (bracelet or another microphone) */
.mic-source { display: grid; gap: 6px; padding-left: 34px; font-size: 14.5px; }
.mic-source label { font-weight: 600; color: var(--muted); }
.mic-source select { min-height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--ink); font: 500 15px/1 var(--font); max-width: 100%; }
.mic-source .link-inline { justify-self: start; }

/* Settings tab */
.settings-card { display: grid; gap: 10px; padding: 16px 18px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-border); }
.settings-card h3 { font-size: 17px; font-weight: 700; }
.settings-status { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.permissions { display: grid; gap: 8px; }
.permissions li { display: grid; grid-template-columns: minmax(96px, auto) 1fr auto; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.permissions em { font-style: normal; font-weight: 500; color: var(--muted); }
.permissions em[data-state="granted"], .permissions em[data-state="on"] { color: var(--accent); font-weight: 700; }
.permissions em[data-state="denied"] { color: #e5484d; }
.settings-options { display: grid; gap: 12px; }
.settings-card .btn { justify-self: start; }
.tabs { overflow-x: auto; }
.tab { padding: 0 10px; white-space: nowrap; }

/* Demo header: status on the left, band on the right, both on one tidy row */
.live-bar { align-items: center; }
.live-status { flex: 1 1 320px; min-width: 0; line-height: 1.35; }
.band-widget { display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-border); }
.band-label { font-size: 14px; font-weight: 600; white-space: nowrap; }
.band-widget .btn-small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.service-form { display: grid; gap: 6px; }
.service-form label { font-size: 14px; font-weight: 600; color: var(--muted); }
#demo { scroll-margin-top: 96px; }

/* Camera zoom */
.zoom { display: inline-flex; align-items: center; gap: 6px; }
.zoom-step { min-height: 52px; width: 52px; padding: 0; }
.zoom-step svg { width: 22px; height: 22px; stroke-width: 2.4; }
.zoom-label { min-width: 46px; text-align: center; font-weight: 700; font-size: 16px; }
.stage video { transition: transform .2s ease; }

/* Zoom buttons stay put on hover: the icon must not slide and the circle must not jump */
.zoom-step { border-radius: 50%; flex: none; display: grid; place-items: center; line-height: 0; }
.zoom-step:hover { transform: none; filter: brightness(1.15); }
.zoom-step:hover svg, .zoom-step svg { transform: none; }
.zoom-step:active { transform: scale(.94); }
.zoom-step:disabled { opacity: .45; cursor: default; filter: none; }
.zoom-step:hover::after { opacity: 0; }
.route-map { margin: 12px 0; border: 1px solid var(--glass-edge); border-radius: 22px; overflow: hidden; background: var(--glass-strong); }
.route-turn { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.route-arrow { flex: none; width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.route-arrow svg { width: 40px; height: 40px; fill: currentColor; transition: transform .35s ease; }
.route-arrow .arrow-arrive, .route-arrow[data-turn="arrive"] .arrow-go { display: none; }
.route-arrow[data-turn="arrive"] .arrow-arrive { display: block; }
.route-arrow[data-turn="left"] .arrow-go { transform: rotate(-90deg); }
.route-arrow[data-turn="right"] .arrow-go { transform: rotate(90deg); }
.route-arrow[data-turn="slight-left"] .arrow-go { transform: rotate(-45deg); }
.route-arrow[data-turn="slight-right"] .arrow-go { transform: rotate(45deg); }
.route-arrow[data-turn="uturn"] .arrow-go { transform: rotate(180deg); }
.route-turn-text { flex: 1; min-width: 0; }
.route-turn-text p { margin: 0; }
.route-distance { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.route-say { margin-top: 4px !important; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.route-relative { margin-top: 2px !important; font-size: 14.5px; font-weight: 600; color: var(--accent); }
.route-relative:empty { display: none; }
.route-turn.pulse .route-arrow { animation: route-pulse 1.4s ease 2; }
@keyframes route-pulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 10px var(--icon-bg); } }
.route-progress { padding: 0 16px 12px; }
.route-progress-text { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--muted); }
.route-progress-text strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-progress-text span { flex: none; font-weight: 600; }
.route-bar { margin-top: 8px; height: 8px; border-radius: 99px; background: var(--icon-bg); overflow: hidden; }
.route-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .6s ease; }
.route-view { background: var(--screen); }
.route-canvas, .route-map iframe { display: block; width: 100%; height: 320px; border: 0; }
.route-canvas[hidden], .route-map iframe[hidden], .route-view[hidden], .route-actions .btn[hidden], .route-map.no-map .route-view { display: none; }
.route-steps-box { padding: 10px 16px 0; font-size: 15px; }
.route-steps-box summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.route-steps { margin: 8px 0 0; padding-left: 22px; max-height: 190px; overflow: auto; color: var(--muted); }
.route-steps li { padding: 4px 0; }
.route-steps li.done { opacity: .5; text-decoration: line-through; }
.route-steps li.current { color: var(--ink); font-weight: 700; }
.route-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 14px; }
.route-actions .route-stop { margin-left: auto; }
.route-map.arrived .route-actions, .route-map.arrived .route-steps-box, .route-map.arrived .route-hint { display: none; }
.route-hint { margin: 0; padding: 0 16px 14px; font-size: 13.5px; color: var(--muted); }
.route-hint[hidden] { display: none; }
.route-turn.off .route-arrow { background: #e8590c; color: #fff; }
.route-turn.off .route-relative { color: #e8590c; }
.route-map.big { background: #000; border-color: #fff; }
.route-map.big .route-arrow { width: 104px; height: 104px; border-radius: 26px; background: #ffe600; color: #000; }
.route-map.big .route-arrow svg { width: 64px; height: 64px; }
.route-map.big .route-distance { font-size: 42px; color: #fff; }
.route-map.big .route-say { font-size: 25px; color: #fff; }
.route-map.big .route-relative { font-size: 20px; color: #ffe600; }
.route-map.big .route-progress-text { font-size: 19px; color: #fff; }
.route-map.big .route-progress-text strong { color: #fff; }
.route-map.big .route-bar { height: 12px; background: #333; }
.route-map.big .route-bar i { background: #ffe600; }
.route-map.big .route-canvas, .route-map.big iframe { height: 400px; }
.route-map.big .route-steps-box, .route-map.big .route-hint { font-size: 18px; color: #fff; }
.route-map.big .route-steps-box summary, .route-map.big .route-steps li.current { color: #fff; }
.route-map.big .route-steps { color: #ddd; }
.route-map.big .route-actions .btn { min-height: 52px; font-size: 18px; color: #fff; }
@media (max-width: 560px) {
  .route-turn { flex-wrap: wrap; }
  .route-turn .btn { width: 100%; }
  .route-actions .route-stop { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .route-turn.pulse .route-arrow { animation: none; } }
