:root {
  --surface-0: #070b0c;
  --surface-1: #0b1113;
  --surface-2: #111a1d;
  --line-soft: rgba(189, 239, 245, 0.12);
  --line-strong: rgba(189, 239, 245, 0.35);
  --text-primary: #e8f4f5;
  --text-muted: #8da3a7;
  --text-faint: #596c70;
  --cyan: #bdeff5;
  --cyan-bright: #e4fbff;
  --cyan-deep: #49a8b9;
  --amber: #e7b980;
  --danger: #e5918c;
  --font-display: "Unbounded", "Avenir Next", sans-serif;
  --font-body: "Commissioner", "Avenir Next", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", monospace;
  --duration-fast: 120ms;
  --duration-base: 220ms;
  --duration-slow: 480ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-state: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { background: var(--surface-0); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 48% 42%, rgba(39, 99, 112, 0.18), transparent 28rem),
    linear-gradient(128deg, #06090a 0%, #0a1113 45%, #06090a 100%);
  font-family: var(--font-body);
}

button, input { font: inherit; }
button { cursor: pointer; }

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 4px;
}

.ambient { position: fixed; pointer-events: none; filter: blur(70px); opacity: .42; }
.ambient--one { width: 33vw; height: 32vw; top: 6%; left: 25%; background: rgba(69, 157, 175, .17); }
.ambient--two { width: 20vw; height: 20vw; right: -6%; bottom: 10%; background: rgba(142, 216, 226, .08); }

.noise {
  position: fixed; inset: 0; z-index: 8; pointer-events: none; opacity: .11;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.app-shell { position: relative; min-height: 100vh; max-width: 1600px; margin: 0 auto; padding: 28px clamp(22px, 4vw, 68px) 32px; }

.topbar { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 4; }
.wordmark { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.wordmark__name { font: 700 15px/1 var(--font-display); letter-spacing: -.06em; }
.wordmark__divider { width: 1px; height: 16px; background: var(--line-strong); }
.wordmark__meta, .eyebrow { color: var(--text-muted); font: 700 9px/1.4 var(--font-mono); letter-spacing: .15em; }
.connection { display: flex; gap: 8px; align-items: center; margin-left: auto; margin-right: 20px; color: var(--text-muted); font: 600 11px/1 var(--font-mono); letter-spacing: .04em; }
.connection__beacon { width: 7px; height: 7px; border-radius: 100%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(189, 239, 245, .09), 0 0 18px rgba(189, 239, 245, .8); }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; color: var(--text-primary); border: 1px solid var(--line-soft); border-radius: 50%; background: rgba(11, 17, 19, .64); transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-fast); }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }

.presence { display: grid; grid-template-columns: minmax(165px, 1fr) minmax(350px, 1.45fr) minmax(155px, 1fr); align-items: center; min-height: min(68vh, 710px); margin-top: -26px; }
.presence__copy { align-self: center; position: relative; z-index: 3; }
.presence__status { max-width: 230px; margin: 15px 0 10px; font: 500 clamp(25px, 3vw, 44px)/1.1 var(--font-display); letter-spacing: -.07em; }
.presence__hint { max-width: 220px; margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.5; }

.hologram-stage { position: relative; isolation: isolate; display: grid; width: min(100%, 555px); aspect-ratio: 4 / 5; place-items: center; justify-self: center; overflow: visible; }
.hologram-stage::before { content: ""; position: absolute; width: 74%; height: 12%; bottom: 3%; border-radius: 50%; border: 1px solid rgba(189,239,245,.36); box-shadow: 0 0 34px rgba(118, 220, 238, .3), inset 0 0 22px rgba(189, 239, 245, .15); transform: perspective(180px) rotateX(67deg); }
.hologram-stage__aura { position: absolute; inset: 14% 10% 7%; z-index: -2; border-radius: 48%; background: radial-gradient(ellipse, rgba(164, 238, 246, .15), rgba(69, 168, 185, .06) 46%, transparent 72%); filter: blur(22px); }
.hologram-stage__grid { position: absolute; inset: 16% 10% 5%; z-index: -1; opacity: .42; background: linear-gradient(rgba(189,239,245,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(189,239,245,.1) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(ellipse, #000 10%, transparent 68%); transform: perspective(300px) rotateX(15deg); }
.hologram-stage__frame { position: absolute; inset: 9% 5%; border: 1px solid rgba(189,239,245,.13); clip-path: polygon(20% 0, 80% 0, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0 80%, 0 20%); }
.mirka-video { z-index: 1; width: 88%; height: 92%; object-fit: cover; object-position: center; mix-blend-mode: screen; filter: saturate(.82) contrast(1.13) drop-shadow(0 0 22px rgba(186, 241, 248, .23)); mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 44%, rgba(0,0,0,.75) 68%, transparent 91%); }
.scanline { position: absolute; z-index: 2; width: 70%; height: 15%; top: 24%; opacity: .42; background: linear-gradient(to bottom, transparent, rgba(227, 251, 255, .13), transparent); mix-blend-mode: screen; animation: scan 6.2s linear infinite; }
.presence-caption { position: absolute; z-index: 3; bottom: 9%; padding: 6px 10px; color: var(--cyan-bright); border: 1px solid rgba(189,239,245,.2); background: rgba(5, 13, 15, .62); font: 700 9px/1 var(--font-mono); letter-spacing: .16em; }

.orbit { position: absolute; border: 1px solid rgba(189,239,245,.13); border-radius: 50%; pointer-events: none; }
.orbit--outer { width: 92%; aspect-ratio: 1; transform: rotateX(73deg) rotateZ(12deg); }
.orbit--inner { width: 70%; aspect-ratio: 1; border-color: rgba(189,239,245,.19); transform: rotateY(64deg) rotateZ(38deg); }
.orbit--signal { width: 82%; aspect-ratio: 1; border-color: transparent; box-shadow: 0 0 0 1px rgba(189,239,245,.13), 0 0 38px rgba(150, 232, 242, .12); animation: orbit 13s linear infinite; }

.telemetry { align-self: center; justify-self: end; width: min(100%, 170px); border-left: 1px solid var(--line-soft); }
.telemetry__block { display: grid; gap: 7px; padding: 14px 0 14px 15px; border-bottom: 1px solid var(--line-soft); }
.telemetry__label { color: var(--text-faint); font: 600 9px/1 var(--font-mono); letter-spacing: .14em; }
.telemetry__value { color: var(--text-muted); font: 600 10px/1.25 var(--font-mono); letter-spacing: .04em; }

.conversation { position: relative; z-index: 3; display: grid; grid-template-columns: 85px minmax(0, 1fr) auto; gap: 20px; align-items: baseline; max-width: 1000px; margin: -30px auto 26px; padding: 18px 22px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: linear-gradient(90deg, rgba(17, 26, 29, .18), rgba(17, 26, 29, .52), rgba(17, 26, 29, .08)); }
.conversation__rail { position: absolute; top: -1px; left: 22px; width: 42px; height: 1px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.conversation__label { margin: 0; color: var(--text-muted); font: 700 9px/1 var(--font-mono); letter-spacing: .15em; }
.conversation__line { margin: 0; font-size: clamp(16px, 1.6vw, 21px); line-height: 1.3; letter-spacing: -.02em; }
.conversation__expand, .quick-action { color: var(--text-muted); border: 0; background: transparent; font: 600 10px/1 var(--font-mono); letter-spacing: .05em; text-decoration: underline; text-underline-offset: 4px; }
.conversation__expand:hover, .quick-action:hover { color: var(--cyan-bright); }

.control-deck { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 26px; min-height: 100px; }
.mic-control { position: relative; display: grid; place-items: center; width: 94px; height: 94px; color: var(--surface-0); border: 0; border-radius: 50%; background: var(--cyan-bright); box-shadow: 0 0 0 1px rgba(237,253,255,.8), 0 0 38px rgba(185, 239, 245, .24); transition: transform var(--duration-base) var(--ease-out), background var(--duration-base); }
.mic-control:hover { transform: scale(1.04); }
.mic-control:active { transform: scale(.97); }
.mic-control svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.mic-control__text { position: absolute; top: calc(100% + 12px); color: var(--text-primary); font: 700 10px/1 var(--font-mono); letter-spacing: .1em; white-space: nowrap; }
.mic-control__ring { position: absolute; inset: -9px; border: 1px solid rgba(189,239,245,.26); border-radius: 50%; transition: opacity var(--duration-base); }
.level-meter { display: flex; align-items: center; justify-content: flex-end; gap: 3px; width: 100px; height: 36px; }
.level-meter i { display: block; width: 3px; height: 8px; background: var(--cyan-deep); opacity: .3; transition: height 80ms linear, opacity 80ms linear; }
.level-meter i:nth-child(2n) { height: 14px; }.level-meter i:nth-child(3n) { height: 20px; }
.quick-action { width: 100px; text-align: left; }

.task-rail { position: absolute; z-index: 3; top: 112px; right: clamp(22px, 4vw, 68px); width: min(280px, 21vw); padding: 18px; border: 1px solid var(--line-soft); background: rgba(9, 15, 17, .56); backdrop-filter: blur(16px); }
.task-rail__header { display: flex; justify-content: space-between; align-items: end; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.task-rail h2 { margin: 8px 0 0; font: 500 20px/1 var(--font-display); letter-spacing: -.07em; }
.task-rail__count { color: var(--cyan-bright); font: 700 12px/1 var(--font-mono); }
.task-card { padding: 17px 0; border-bottom: 1px solid var(--line-soft); }.task-card:last-child { border-bottom: 0; padding-bottom: 2px; }
.task-card__topline, .task-card footer { display: flex; justify-content: space-between; gap: 10px; color: var(--text-faint); font: 600 8px/1.2 var(--font-mono); letter-spacing: .11em; }.task-card__state { color: var(--text-muted); }.task-card--working .task-card__state { color: var(--cyan); }
.task-card h3 { margin: 10px 0 6px; font-size: 14px; line-height: 1.22; letter-spacing: -.02em; }.task-card p { margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.45; }.task-card footer { margin-top: 13px; }
.task-card__progress { height: 2px; margin-top: 14px; background: rgba(189,239,245,.12); }.task-card__progress span { display: block; height: 100%; background: var(--cyan); box-shadow: 0 0 12px rgba(189,239,245,.7); }

.drawer { width: min(550px, calc(100vw - 32px)); margin: auto 0 auto auto; padding: 0; color: var(--text-primary); border: 1px solid var(--line-strong); background: rgba(8, 13, 15, .94); box-shadow: -20px 0 50px rgba(0,0,0,.3); }.drawer::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); }.drawer__panel { min-height: 100vh; padding: 32px; }.drawer__header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 26px; border-bottom: 1px solid var(--line-soft); }.drawer h2 { margin: 9px 0 0; font: 500 25px/1 var(--font-display); letter-spacing: -.07em; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }.switch-row span { display: grid; gap: 7px; }.switch-row strong { font-size: 14px; }.switch-row small, .drawer__note { color: var(--text-muted); font-size: 12px; line-height: 1.5; }.switch-row input { appearance: none; width: 42px; height: 24px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); }.switch-row input::after { content: ""; display: block; width: 16px; height: 16px; margin: 3px; border-radius: 50%; background: var(--text-muted); transition: transform var(--duration-base); }.switch-row input:checked { background: rgba(189,239,245,.15); }.switch-row input:checked::after { transform: translateX(18px); background: var(--cyan-bright); }.drawer__note { margin-top: 24px; }
.gateway-field { display: grid; gap: 9px; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }.gateway-field > span { color: var(--text-faint); font: 700 9px/1 var(--font-mono); letter-spacing: .14em; }.gateway-field input { width: 100%; padding: 12px 13px; color: var(--cyan-bright); border: 1px solid var(--line-strong); border-radius: 2px; outline: 0; background: rgba(17,26,29,.7); font: 600 11px/1.3 var(--font-mono); }.gateway-field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(189,239,245,.08); }.gateway-field small { color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.voice-settings { display: grid; gap: 15px; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }.voice-settings__heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; color: var(--text-faint); font: 700 9px/1 var(--font-mono); letter-spacing: .14em; }.voice-settings__heading small { color: var(--cyan); font: 600 9px/1 var(--font-mono); letter-spacing: .04em; text-align: right; }.edge-voices { display: grid; gap: 9px; }.edge-voices > span { color: var(--text-faint); font: 700 9px/1 var(--font-mono); letter-spacing: .14em; }.voice-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.voice-choice__button { position: relative; display: block; min-height: 54px; padding: 10px 11px; color: var(--text-muted); border: 1px solid var(--line-soft); border-radius: 2px; background: rgba(17,26,29,.52); text-align: left; font: 600 12px/1.2 var(--font-body); transition: border-color var(--duration-fast), background var(--duration-fast), color var(--duration-fast); cursor: pointer; }.voice-choice__button input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }.voice-choice__button small { display: block; margin-top: 5px; color: var(--text-faint); font: 600 8px/1 var(--font-mono); letter-spacing: .1em; }.voice-choice__button:hover:not(.is-disabled) { color: var(--cyan-bright); border-color: var(--line-strong); }.voice-choice__button:has(input:checked) { color: var(--cyan-bright); border-color: var(--cyan-deep); background: linear-gradient(135deg, rgba(189,239,245,.15), rgba(17,26,29,.68)); box-shadow: inset 0 0 18px rgba(189,239,245,.05), 0 0 18px rgba(83,180,196,.08); }.voice-choice__button.is-disabled { cursor: not-allowed; opacity: .42; }.voice-choice__button.is-disabled input { cursor: not-allowed; }
.transcript-list { display: grid; gap: 20px; padding: 28px 0 0; margin: 0; list-style: none; }.transcript-list li { border-bottom: 1px solid var(--line-soft); padding-bottom: 18px; }.transcript-list span { color: var(--cyan); font: 700 9px/1 var(--font-mono); letter-spacing: .12em; }.transcript-list p { margin: 8px 0 0; line-height: 1.5; }

body[data-state="listening"] .presence__status { color: var(--cyan-bright); } body[data-state="listening"] .orbit--signal { animation-duration: 2.8s; border-color: rgba(189,239,245,.3); } body[data-state="listening"] .mic-control { background: var(--cyan); animation: pulse 1.2s var(--ease-state) infinite; } body[data-state="listening"] .mirka-video { filter: saturate(1.05) brightness(1.12) drop-shadow(0 0 38px rgba(189,241,248,.52)); }
body[data-state="thinking"] .orbit--outer { animation: orbit 5.5s linear infinite; } body[data-state="thinking"] .scanline { animation-duration: 1.8s; opacity: .75; } body[data-state="thinking"] .presence-caption { color: var(--amber); border-color: rgba(231,185,128,.45); }
body[data-state="speaking"] .orbit--signal { animation: pulse-orbit .84s ease-in-out infinite; border-color: rgba(189,239,245,.48); } body[data-state="speaking"] .hologram-stage__aura { animation: glow 1.1s ease-in-out infinite; }
body[data-state="working"] .orbit--outer { animation: orbit 8s linear infinite; } body[data-state="working"] .presence-caption { color: var(--amber); }
body[data-reduced-motion="true"] *, body[data-reduced-motion="true"] *::before, body[data-reduced-motion="true"] *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 1ms !important; }

@keyframes scan { 0% { transform: translateY(-120%); } 100% { transform: translateY(430%); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 11px rgba(189,239,245,.11), 0 0 45px rgba(189,239,245,.35); } }
@keyframes pulse-orbit { 50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(189,239,245,.05), 0 0 42px rgba(189,239,245,.28); } }
@keyframes glow { 50% { opacity: .62; transform: scale(1.04); } }

@media (max-width: 1050px) { .task-rail { position: relative; top: auto; right: auto; width: min(100%, 720px); margin: 34px auto 0; } .presence { grid-template-columns: 1fr minmax(330px, 1.35fr); } .telemetry { display: none; } }
@media (max-width: 700px) { .app-shell { padding: 22px 18px 28px; } .wordmark__meta, .wordmark__divider { display: none; } .connection { margin-right: 12px; } .presence { display: flex; flex-direction: column; min-height: 0; margin-top: 18px; } .presence__copy { align-self: stretch; padding-left: 8px; } .presence__status { max-width: 100%; margin-top: 11px; font-size: 29px; } .presence__hint { max-width: 280px; } .hologram-stage { width: min(100%, 430px); margin: -12px auto -25px; } .conversation { grid-template-columns: 1fr; gap: 10px; margin: 0; padding: 17px 14px; } .conversation__expand { justify-self: start; padding: 6px 0; } .control-deck { gap: 15px; margin-top: 10px; } .level-meter, .quick-action { width: 72px; } .task-rail { margin-top: 33px; } .drawer__panel { padding: 24px; } }
