/* Grok vs ElevenLabs comparison — Straticom "Cadence" design system (light port). */
:root {
  --bg: #f4f6f9; --bg-2: #eef1f6; --ink: #25252a;
  --muted: rgba(37,37,42,.58); --faint: rgba(37,37,42,.4);
  --line: rgba(37,37,42,.1); --hairline: rgba(37,37,42,.07);
  --accent: #ed7d31; --accent-strong: #b8470f; --accent-ink: #3a1d00;
  --accent-tint: rgba(237,125,49,.14); --accent-soft: rgba(237,125,49,.1);
  --green: #1d9e75; --green-soft: #e6f5ee; --amber: #d98a14; --red: #d64038; --red-soft: #fbe9e7; --blue: #205ae3;
  --card: rgba(255,255,255,.72); --card-solid: #fff;
  --surface: rgba(37,37,42,.04); --surface-2: rgba(37,37,42,.055);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.07); --shadow: 0 8px 24px rgba(16,24,40,.1); --shadow-lg: 0 24px 60px rgba(11,15,78,.14);
  --radius: 14px; --radius-sm: 10px; --radius-lg: 20px; --radius-pill: 100px;
  --font-display: "DM Sans","Inter",-apple-system,BlinkMacSystemFont,sans-serif;
  --font-body: "Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --font-mono: "DM Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --ease: cubic-bezier(.25,.1,.25,1); --dur-fast: .2s; --dur: .42s; color-scheme: light;
  --grok: #6d4bff; --eleven: #ed7d31;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 520px at 88% -8%, var(--accent-soft), transparent 60%), radial-gradient(760px 480px at -6% 4%, rgba(109,75,255,.06), transparent 55%); }
h1,h2,h3 { margin: 0; font-weight: 600; font-family: var(--font-display); letter-spacing: -.011em; }
.num { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
button { font: inherit; cursor: pointer; font-family: var(--font-body); }
:where(button,input,a):focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; }
@keyframes cad-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 var(--dotc,var(--accent-tint)); } 50% { box-shadow: 0 0 0 6px transparent; } }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .001s !important; transition-duration: .001s !important; } }

.wrap { max-width: 1120px; margin: 0 auto; padding: 26px 20px 80px; }
header.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; animation: cad-rise var(--dur) var(--ease) both; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--grok), var(--eleven)); box-shadow: var(--shadow-sm); flex: 0 0 auto; }
.brand h1 { font-size: 19px; }
.brand p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.legend { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font-size: 11px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--surface); color: var(--muted); border: 1px solid var(--hairline); }
.chip b { color: var(--ink); font-weight: 600; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .compare { grid-template-columns: 1fr; } }

.tester { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); display: flex; flex-direction: column; overflow: hidden; animation: cad-rise var(--dur) var(--ease) both; }
.tester[data-provider="grok"] { --pc: var(--grok); }
.tester[data-provider="elevenlabs"] { --pc: var(--eleven); }
.tester.cad-2 { animation-delay: .07s; }
.thead { padding: 15px 17px 13px; border-bottom: 1px solid var(--hairline); }
.thead .row1 { display: flex; align-items: center; gap: 9px; }
.pdot { width: 11px; height: 11px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 16%, transparent); flex: 0 0 auto; }
.thead h2 { font-size: 16px; }
.thead .tag { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--pc); border: 1px solid color-mix(in srgb, var(--pc) 35%, transparent); padding: 2px 8px; border-radius: var(--radius-pill); }
.thead .meta { margin-top: 5px; font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.thead .meta b { color: var(--ink); font-weight: 600; }

.statusbar { display: flex; align-items: center; gap: 9px; padding: 9px 17px; border-bottom: 1px solid var(--hairline); background: var(--surface); font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: 0 0 auto; }
.dot.ready { background: var(--green); } .dot.error { background: var(--red); }
.dot.live { background: var(--pc); --dotc: color-mix(in srgb, var(--pc) 30%, transparent); animation: pulse 1.4s var(--ease) infinite; }
.dot.connecting { background: var(--amber); }
.meter { margin-left: 12px; width: 84px; height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; opacity: .35; }
.meter-fill { height: 100%; width: 0; background: var(--pc); transition: width .06s linear; }
.lat { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity .3s; }
.lat.show { opacity: 1; }
.lat b { color: var(--pc); font-weight: 600; }
.lat-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--pc); background: color-mix(in srgb, var(--pc) 13%, transparent); border-radius: 5px; padding: 1px 5px; margin-left: 7px; vertical-align: 1px; }

.controls { display: flex; gap: 10px; padding: 14px 17px; border-bottom: 1px solid var(--hairline); }
.btn { border: 0; border-radius: 11px; padding: 11px 16px; font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; letter-spacing: -.005em; transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast), color var(--dur-fast); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; box-shadow: none; cursor: default; }
.btn .spin { width: 13px; height: 13px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; display: inline-block; animation: sp .7s linear infinite; }
/* Connect — solid provider colour; becomes a quiet outline "End" once connected */
.btn.connect { background: var(--pc); color: #fff; box-shadow: 0 6px 16px -8px var(--pc), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.connect:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px var(--pc); }
.btn.connect.is-end { background: transparent; color: var(--muted); box-shadow: none; border: 1px solid var(--line); }
.btn.connect.is-end:hover { color: var(--red); border-color: var(--red); transform: none; }
/* Talk — the primary action once connected: wide, inviting, provider-tinted */
.btn.talk { flex: 1; background: color-mix(in srgb, var(--pc) 11%, #fff); color: var(--pc); border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent); }
.btn.talk:not(:disabled):hover { background: color-mix(in srgb, var(--pc) 19%, #fff); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.talk .ico { font-size: 15px; line-height: 1; }
.btn.talk.on { background: var(--red); color: #fff; border-color: transparent; box-shadow: 0 6px 18px -8px var(--red); animation: talkpulse 1.7s var(--ease) infinite; }
@keyframes talkpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(214,64,56,.4); } 50% { box-shadow: 0 0 0 7px rgba(214,64,56,0); } }

.log { flex: 1; min-height: 300px; max-height: 46vh; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.log:empty::before { content: "Connect to hear Ava greet you, then talk or type below."; color: var(--faint); font-size: 12.5px; margin: auto; text-align: center; }
.msg { max-width: 90%; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; animation: cad-rise .3s var(--ease) both; font-size: 13.5px; }
.msg .who { font-size: 9.5px; text-transform: uppercase; letter-spacing: .6px; opacity: .6; margin-bottom: 3px; }
.msg.user { align-self: flex-end; background: var(--surface-2); color: var(--ink); }
.msg.agent { align-self: flex-start; background: color-mix(in srgb, var(--pc) 9%, #fff); border: 1px solid color-mix(in srgb, var(--pc) 22%, transparent); }
.msg.tool { align-self: stretch; max-width: 100%; background: transparent; border: 0; border-left: 3px solid var(--amber); border-radius: 6px; padding: 5px 10px; font-size: 12px; color: var(--muted); }
.msg.tool b { color: var(--ink); font-weight: 600; font-family: var(--font-mono); font-size: 11.5px; }
.msg.tool .sim { font-size: 9.5px; border: 1px solid var(--amber); color: #9a5b00; border-radius: 5px; padding: 0 5px; margin-left: 6px; }

.askboth { max-width: 1120px; margin: 20px auto 0; display: flex; gap: 9px; align-items: center; animation: cad-rise var(--dur) var(--ease) both; animation-delay: .12s; }
.askboth input { flex: 1; background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; color: var(--ink); font: inherit; }
.askboth input:focus { outline: none; border-color: var(--accent); }
.askboth .btn { background: var(--ink); color: #fff; padding: 13px 20px; }
.hint { color: var(--muted); font-size: 12px; margin: 12px auto 0; max-width: 1120px; }
.hint b { color: var(--ink); }
