/* heytina demo builder: "Signal" UI.
   Light hero (the website) -> dark stage that opens like an iris (the build) -> brand-coloured result card. */

@font-face { font-family: "Jakarta"; src: url("vendor/fonts/jakarta.woff2") format("woff2"); font-weight: 200 800;
  font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
  U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Serif"; src: url("vendor/fonts/serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Serif"; src: url("vendor/fonts/serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic;
  font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("vendor/fonts/jakarta-ext.woff2") format("woff2"); font-weight: 200 800;
  font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
  U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ht-1: #3d5afe; --ht-2: #7c4dff; --ht-3: #22d3ee;      /* heytina signal colours */
  --brand: #3d5afe; --brand-ink: #ffffff;                 /* the company's colour (card, button) */
  --glow: #5b7cff; --glow-2: #8b5cf6;                     /* a version of it that is visible on the dark stage */
  --paper: #f6f7fb; --ink: #0b0d17; --muted: #5b6478; --line: #e4e7f0;
  --night: #05060c; --night-2: #0c1020; --text-n: #e9ecf6; --muted-n: #8b93ad; --line-n: rgba(255,255,255,.09);
  --radius: 22px;
  --ease-out: cubic-bezier(.16,1,.3,1);
  font-family: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); overflow-x: hidden; min-height: 100vh; transition: background-color 1s; }
body.mode-stage, body.mode-result { background: var(--night); }
[hidden] { display: none !important; }
button, input { font: inherit; }

/* ------------------------------------------------------------------ backgrounds */
.bg-light { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 38%, rgba(61,90,254,.10), transparent 70%),
    radial-gradient(40% 40% at 15% 85%, rgba(34,211,238,.10), transparent 70%),
    radial-gradient(40% 40% at 88% 80%, rgba(124,77,255,.10), transparent 70%),
    var(--paper); }
.iris { position: fixed; inset: 0; z-index: 1; background: radial-gradient(120% 90% at 50% 0%, var(--night-2), var(--night) 60%);
  clip-path: circle(0px at 50% 50%); pointer-events: none; }
#aurora { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(60px) saturate(1.2); opacity: .9; }
.grain { position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding: 22px 32px; pointer-events: none; }
.wordmark { pointer-events: auto; display: inline-block; line-height: 0;
  transition: color .6s; }
.wordmark img { height: 30px; width: auto; }
.wordmark .logo-light { display: none; }
body.mode-stage .wordmark .logo-dark, body.mode-result .wordmark .logo-dark { display: none; }
body.mode-stage .wordmark .logo-light, body.mode-result .wordmark .logo-light { display: inline; }
/* The debug drawer only with ?debug=1 */
html.no-debug .dbg-toggle, html.no-debug .debug { display: none; }
/* reCAPTCHA v3 (fallback ?url= only): no floating badge; the form on heytina.ai shows Google's notice */
.grecaptcha-badge { visibility: hidden !important; }

/* ------------------------------------------------------------------ opened without a build */
.notice { position: relative; z-index: 5; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; padding: 96px 16px 64px; text-align: center; }
.notice p { margin: 0; max-width: 520px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.notice .hint { font-size: 14px; font-weight: 500; color: var(--muted); line-height: 1.6; }
.notice code { padding: 2px 6px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; }
.notice .hint a { color: var(--ht-1); }
.notice .home { margin-top: 8px; padding: 12px 22px; border-radius: 14px; background: var(--ink); color: #fff;
  font-weight: 700; font-size: 15px; text-decoration: none; }

/* ------------------------------------------------------------------ the address bar at the top of the stage */
.omni-slot { width: min(620px, 100%); height: 64px; position: relative; }
.omni { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 18px;
  background: #fff; border-radius: 999px; border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 18px 50px rgba(30,41,99,.12), 0 2px 6px rgba(15,23,42,.05);
  transition: box-shadow .3s, border-color .3s; }
.omni:focus-within { border-color: rgba(61,90,254,.45); box-shadow: 0 0 0 5px rgba(61,90,254,.12), 0 18px 50px rgba(30,41,99,.14); }
.omni-icon { flex: 0 0 26px; height: 26px; display: grid; place-items: center; color: #9aa3b8; }
.omni-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.omni-icon img { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; }
.omni input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; font-weight: 600;
  color: var(--ink); letter-spacing: -.01em; }
.omni input::placeholder { color: #a3abbe; font-weight: 500; }
.omni-timer, .omni-progress { display: none; }

/* compact: the address bar on the dark stage */
.omni-slot.top { width: min(520px, calc(100% - 32px)); height: 50px; margin: 0 auto; }
.omni.compact { background: rgba(16,20,36,.72); border-color: var(--line-n); padding: 6px 6px 6px 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.35); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.omni.compact input { color: var(--text-n); font-size: 15px; pointer-events: none; }
.omni.compact .omni-timer { display: grid; place-items: center; position: relative; width: 38px; height: 38px; flex: 0 0 38px; }
.omni-timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.omni-timer circle { fill: none; stroke-width: 2.4; }
.omni-timer .track { stroke: rgba(255,255,255,.1); }
.omni-timer .prog { stroke: var(--glow); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 0; filter: drop-shadow(0 0 4px var(--glow)); }
.omni-timer b { font-size: 12px; color: var(--text-n); font-variant-numeric: tabular-nums; }
.omni.compact .omni-progress { display: block; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, transparent, var(--glow)); box-shadow: 0 0 12px var(--glow); }

/* ------------------------------------------------------------------ stage */
.stage { position: relative; z-index: 5; min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  padding: 26px 16px 34px; color: var(--text-n); }
.scene { position: relative; width: min(1240px, 100%); flex: 1; display: grid; grid-template-columns: 1fr minmax(0, 640px) 1fr;
  gap: 34px; align-items: center; margin: 22px 0 8px; perspective: 1600px; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 4; }
.wires path { fill: none; stroke: var(--glow); stroke-width: 1.4; opacity: .55; filter: drop-shadow(0 0 4px var(--glow)); }
.wires circle { fill: #fff; filter: drop-shadow(0 0 6px var(--glow)); }
.wires circle.anchor { fill: var(--glow); stroke: #fff; stroke-width: 1.5; }

.browser { position: relative; z-index: 2; border-radius: 16px; overflow: hidden; background: #0f1322;
  border: 1px solid rgba(255,255,255,.12); transform-style: preserve-3d;
  box-shadow: 0 50px 120px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04), 0 0 80px color-mix(in srgb, var(--glow) 25%, transparent); }
.chrome { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.07); }
.chrome i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.chrome i:nth-child(2) { background: #febc2e; } .chrome i:nth-child(3) { background: #28c840; }
.chrome span { margin-left: 10px; font-size: 12px; color: var(--muted-n); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewport { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.skeleton { position: absolute; inset: 0; padding: 6% 7%; display: grid; grid-template-rows: 7% 34% 9% 9% 22%; gap: 5%;
  background: #f4f6fb; }
.skeleton b { display: block; border-radius: 10px; background: linear-gradient(100deg, #e8ecf5 30%, #f7f9fd 50%, #e8ecf5 70%);
  background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton b:nth-child(1) { width: 40%; } .skeleton b:nth-child(3) { width: 70%; } .skeleton b:nth-child(4) { width: 55%; }
@keyframes shimmer { to { background-position: -220% 0; } }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center;
  clip-path: inset(0 0 100% 0); }
.dotgrid { position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: multiply;
  background-image: radial-gradient(color-mix(in srgb, var(--glow) 70%, #000) 1px, transparent 1.4px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 var(--beam, 0%), transparent calc(var(--beam, 0%) + 14%));
  mask-image: linear-gradient(180deg, transparent, #000 var(--beam, 0%), transparent calc(var(--beam, 0%) + 14%)); }
.beam { position: absolute; left: -2%; right: -2%; top: 0; height: 3px; opacity: 0; z-index: 3;
  background: linear-gradient(90deg, transparent, var(--glow) 18%, #fff 50%, var(--glow) 82%, transparent);
  box-shadow: 0 0 22px 4px var(--glow), 0 0 70px 12px color-mix(in srgb, var(--glow) 45%, transparent); }
.beam::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 90px;
  background: linear-gradient(0deg, color-mix(in srgb, var(--glow) 28%, transparent), transparent); }
.sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }

/* shards: the facts pulled out of the website */
.col { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 16px; }
.col.left { align-items: flex-end; } .col.right { align-items: flex-start; }
.slot { width: 100%; min-height: 112px; display: flex; align-items: center; }   /* reserved: facts never push each other */
.col.left .slot { justify-content: flex-end; }
.shard { position: relative; width: min(290px, 100%); padding: 14px 16px 14px 18px; border-radius: 16px; color: var(--text-n);
  background: linear-gradient(160deg, rgba(28,33,56,.86), rgba(13,16,30,.86)); border: 1px solid var(--line-n);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.shard::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--glow); box-shadow: 0 0 12px var(--glow); }
.shard .k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted-n); }
.shard .k svg { width: 15px; height: 15px; fill: none; stroke: var(--glow); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shard .v { margin-top: 6px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.shard .m { margin-top: 3px; font-size: 13px; color: var(--muted-n); line-height: 1.4; }
.shard .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.shard .tags span { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08); color: #cfd5e6; }
.shard .swatches { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.shard .sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.shard .hex { font-size: 12.5px; font-weight: 600; color: #cfd5e6; font-variant-numeric: tabular-nums; }
.shard .logo { margin-left: auto; height: 30px; max-width: 90px; padding: 4px 8px; border-radius: 8px; background: #fff; object-fit: contain; }
.shard .num { font-variant-numeric: tabular-nums; }
.shard .line { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 12.5px; color: #cfd5e6; }
.shard .line svg { width: 14px; height: 14px; fill: none; stroke: #4ade80; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.flying-swatch { position: fixed; z-index: 40; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 20px rgba(255,255,255,.5); pointer-events: none; }

.status { position: relative; z-index: 3; height: 30px; overflow: hidden; text-align: center; }
.status-title { display: inline-block; font-size: 15px; font-weight: 600; color: var(--text-n); letter-spacing: -.005em; }
.status-title::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 0 0 var(--glow); animation: ping 1.6s infinite; vertical-align: 1px; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--glow) 70%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

.rail { position: relative; z-index: 3; list-style: none; display: flex; gap: 0; padding: 0; margin: 14px 0 0; width: min(760px, 100%); }
.rail li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px;
  font-weight: 600; color: #5d6683; transition: color .5s; }
.rail li::before { content: ""; position: absolute; top: 6px; left: -50%; right: 50%; height: 2px; background: rgba(255,255,255,.08); }
.rail li:first-child::before { display: none; }
.rail li::after { content: ""; position: absolute; top: 6px; left: -50%; height: 2px; width: 0; background: var(--glow);
  box-shadow: 0 0 10px var(--glow); transition: width .7s var(--ease-out); }
.rail li:first-child::after { display: none; }
.rail li.on::after { width: 100%; }
.rail li i { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: #151a2c;
  border: 2px solid #2a3150; transition: all .4s var(--ease-out); }
.rail li.on { color: var(--text-n); }
.rail li.on i { background: var(--glow); border-color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--glow) 22%, transparent), 0 0 18px var(--glow); }
.rail li.active i { animation: nodepulse 1.2s ease-in-out infinite; border-color: var(--glow); }
@keyframes nodepulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--glow) 25%, transparent); } }

/* ------------------------------------------------------------------ result: the assistant as a live voice */
.result { position: relative; z-index: 5; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 384px;
  align-items: center; gap: 56px; width: min(1240px, 100%); margin: 0 auto; padding: 96px 32px 48px; color: var(--text-n); }
.backdrop { position: fixed; inset: -60px; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12);
  filter: blur(38px) saturate(1.4) brightness(.42); }
.backdrop::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 38% 42%, transparent, var(--night) 85%),
              linear-gradient(180deg, color-mix(in srgb, var(--glow) 10%, transparent), transparent 40%); }

.live { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.portrait-stage { position: relative; width: min(680px, 100%); height: 380px; display: grid; place-items: center; }
.portrait { position: relative; width: 340px; height: 340px; display: grid; place-items: center; }
#ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.avatar { position: relative; z-index: 2; width: 196px; height: 196px; border-radius: 50%; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.75), 0 0 0 7px color-mix(in srgb, var(--glow) 28%, transparent),
              0 30px 80px rgba(0,0,0,.55), 0 0 90px color-mix(in srgb, var(--glow) 45%, transparent); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.avatar[data-initial]::before { content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center;
  font: 400 96px/1 "Serif", Georgia, serif; color: var(--brand-ink); background: var(--brand); }
.avatar img:not([src]) { display: none; }
.links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.links path { fill: none; stroke: color-mix(in srgb, var(--glow) 70%, #fff); stroke-width: 1.2; opacity: .5; }
.links circle { fill: var(--glow); }
.abilities { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.abilities li { position: absolute; max-width: 200px; padding: 10px 14px 10px 12px; border-radius: 14px; display: flex; gap: 10px;
  align-items: flex-start; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text-n);
  background: rgba(14,18,34,.62); border: 1px solid rgba(255,255,255,.10); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.abilities li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--glow);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--glow) 22%, transparent), 0 0 12px var(--glow); }
.abilities li[data-slot="0"] { left: -3%; top: 12%; }
.abilities li[data-slot="1"] { right: -6%; top: 26%; }
.abilities li[data-slot="2"] { left: -6%; top: 64%; }
.abilities li[data-slot="3"] { right: -4%; top: 70%; }

.ident { text-align: center; margin-top: 4px; }
.on-air { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 600; color: #b8f5c9; }
.on-air i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6);
  animation: onair 1.8s infinite; }
@keyframes onair { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 100% { box-shadow: 0 0 0 12px rgba(52,211,153,0); } }
.name { margin: 2px 0 0; font: 400 clamp(72px, 9vw, 132px)/.92 "Serif", Georgia, serif; letter-spacing: -.02em; color: #fff;
  text-shadow: 0 0 60px color-mix(in srgb, var(--glow) 45%, transparent); }
.name { overflow: hidden; padding: .04em .06em .14em; }  /* the letters rise out of a clipped line */
.name .ch { display: inline-block; }
.of { margin: 12px 0 0; font-size: 16px; color: var(--muted-n); display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; }
.brand-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff; }
.brand-chip img { width: 24px; height: 24px; border-radius: 50%; background: #fff; object-fit: contain; padding: 2px; }
.brand-chip img:not([src]) { display: none; }
.brand-chip b { font-weight: 700; }
.caption { min-height: 3.2em; max-width: 600px; margin: 22px auto 0; font: italic 400 clamp(20px, 2vw, 25px)/1.38 "Serif", Georgia, serif;
  color: rgba(233,236,246,.34); }
.caption .wd { transition: color .25s; }
.caption .wd.said { color: rgba(233,236,246,.92); }
.caption .wd.now { color: #fff; text-shadow: 0 0 18px var(--glow); }

.console { align-self: center; display: flex; flex-direction: column; gap: 26px; padding: 28px; border-radius: 26px;
  background: linear-gradient(160deg, rgba(24,29,50,.72), rgba(10,13,26,.72)); border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 40px 100px rgba(0,0,0,.45); }
.console label { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 12px; }
.dial { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: border-color .2s, box-shadow .2s; }
.dial:focus-within { border-color: var(--glow); box-shadow: 0 0 0 4px color-mix(in srgb, var(--glow) 20%, transparent); }
.dial input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: #fff; font-size: 17px;
  font-weight: 600; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.dial input::placeholder { color: rgba(233,236,246, calc(.35 * var(--ph, 1))); }
/* country and language of the call: flag button left of the number */
.country { position: relative; flex: 0 0 auto; }
#country-btn { display: flex; align-items: center; gap: 5px; height: 46px; padding: 0 8px 0 11px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.07); color: var(--muted-n); cursor: pointer; transition: background .2s, color .2s; }
#country-btn:hover, #country-btn[aria-expanded="true"] { background: rgba(255,255,255,.13); color: #fff; }
#country-btn:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
#country-btn .chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round;
  stroke-linejoin: round; transition: transform .25s var(--ease-out); }
#country-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.flag { display: block; flex: 0 0 auto; width: 24px; height: 17px; border-radius: 4px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.flag svg { display: block; width: 100%; height: 100%; }
.country-list { position: absolute; z-index: 30; left: -6px; top: calc(100% + 12px); width: 280px; max-height: min(380px, 70vh);
  overflow: auto; margin: 0; padding: 6px; list-style: none; border-radius: 18px; background: rgba(13,16,31,.97);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 28px 70px rgba(0,0,0,.6); transform-origin: top left; }
.country-list.up { top: auto; bottom: calc(100% + 12px); transform-origin: bottom left; }
.country-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  font-size: 14.5px; color: var(--text-n); outline: none; }
.country-list li b { font-weight: 600; }
.country-list li .region { color: var(--muted-n); font-size: 13.5px; }
.country-list li .code { margin-left: auto; color: var(--muted-n); font-size: 13px; font-variant-numeric: tabular-nums; }
.country-list li:hover, .country-list li:focus-visible { background: rgba(255,255,255,.08); }
.country-list li[aria-selected="true"] { background: color-mix(in srgb, var(--glow) 24%, transparent); }
.dial input { padding-right: 14px; }
#call { position: relative; width: 100%; height: 54px; margin-top: 12px; border: 0; border-radius: 999px; background: var(--brand);
  color: var(--brand-ink); display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: -.005em;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent), 0 10px 24px rgba(0,0,0,.35);
  animation: callpulse 2.4s infinite; }
#call:disabled { cursor: default; }
#call svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
@keyframes callpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--glow) 55%, transparent), 0 10px 24px rgba(0,0,0,.35); }
  70%, 100% { box-shadow: 0 0 0 16px transparent, 0 10px 24px rgba(0,0,0,.35); } }
.consent { margin: 14px 2px 0; font-size: 12.5px; line-height: 1.5; color: var(--muted-n); text-wrap: pretty; }
.consent a { color: var(--text-n); text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }
.consent a:hover { color: #fff; text-decoration-color: currentColor; }
.restart { align-self: flex-start; border: 0; background: none; color: var(--muted-n); font-weight: 600; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 4px; }
.restart:hover { color: #fff; }
.impact { position: fixed; z-index: 55; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none; }
.particles { position: fixed; inset: 0; z-index: 54; width: 100vw; height: 100vh; pointer-events: none; }

/* ------------------------------------------------------------------ debug drawer */
.dbg-toggle { position: fixed; z-index: 60; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(128,128,128,.25); background: rgba(128,128,128,.12); color: #8b93ad; font: 700 12px ui-monospace, monospace;
  opacity: .45; transition: opacity .2s; }
.dbg-toggle:hover, .dbg-toggle[aria-expanded="true"] { opacity: 1; }
.debug { position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: #0b0e19; color: #d6dbea;
  border-left: 1px solid #1d2337; box-shadow: -30px 0 80px rgba(0,0,0,.5); transform: translateX(105%);
  transition: transform .45s var(--ease-out); display: flex; flex-direction: column; }
.debug.open { transform: none; }
.debug header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #1d2337; }
.debug header button { background: none; border: 0; color: #d6dbea; font-size: 24px; cursor: pointer; }
.debug-body { overflow: auto; padding: 6px 18px 30px; }
.debug h3 { margin: 18px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #8b93ad; }
.debug pre { margin: 0; max-height: 300px; overflow: auto; white-space: pre-wrap; font-size: 11.5px; background: #060810; padding: 10px;
  border-radius: 10px; border: 1px solid #1d2337; }
.debug input { width: 100%; height: 38px; margin: 6px 0; padding: 0 10px; border-radius: 8px; border: 1px solid #2a3150; background: #060810; color: #d6dbea; }
.debug button#dbg-load { height: 36px; padding: 0 14px; border-radius: 8px; border: 0; background: var(--ht-1); color: #fff; font-weight: 700; cursor: pointer; }
.debug .small { text-align: left; color: #8b93ad; }
.debug a { color: #93a5ff; }

/* ------------------------------------------------------------------ small screens */
/* ------------------------------------------------------------------ fit the visible screen
   Every scene fits one screen without scrolling: sizes follow the viewport height as well as its width. */

.stage { min-height: 100vh; min-height: 100dvh; padding: clamp(12px, 2.6vh, 26px) 16px clamp(12px, 3vh, 34px); }
.scene { margin: clamp(8px, 2.2vh, 22px) 0 4px;
  grid-template-columns: 1fr minmax(0, min(640px, calc((100vh - 330px) * 1.45))) 1fr; }
.slot { min-height: clamp(84px, 13vh, 112px); }
.rail { margin-top: clamp(6px, 1.4vh, 14px); }

.result { min-height: 100vh; min-height: 100dvh; padding: clamp(60px, 10vh, 96px) 32px clamp(14px, 3.6vh, 48px);
  --p: clamp(200px, 37vh, 340px); }
.portrait-stage { height: calc(var(--p) + 30px); }
.portrait { width: var(--p); height: var(--p); }
.avatar { width: calc(var(--p) * .576); height: calc(var(--p) * .576); }
.name { font-size: clamp(56px, min(9vw, 13vh), 132px); }
.caption { margin-top: clamp(10px, 2.2vh, 22px); font-size: clamp(17px, min(2vw, 3vh), 25px); }
.console { gap: clamp(14px, 2.8vh, 26px); padding: clamp(20px, 3.4vh, 28px); }

@media (max-width: 980px) {
  .result { grid-template-columns: 1fr; gap: 28px; padding: 84px 16px 40px; }
  .console { width: min(460px, 100%); justify-self: center; }
  .scene { grid-template-columns: 1fr 1fr; gap: 14px; }
  .browser { grid-column: 1 / -1; grid-row: 1; }
  .col.left, .col.right { align-items: stretch; }
  .shard { width: 100%; }
  .wires { display: none; }
}
@media (max-width: 720px) {
  .topbar { padding: 16px; }
  .wordmark img { height: 24px; }
  .portrait-stage { height: auto; display: flex; flex-direction: column; gap: 14px; }
  .result { --p: clamp(118px, 21vh, 230px); padding: 58px 16px 12px; gap: 10px; }
  .links { display: none; }
  .abilities { position: static; display: flex; flex-wrap: nowrap; gap: 8px; width: 100%; overflow-x: auto;
    scrollbar-width: none; padding: 2px 2px 4px; pointer-events: auto; }
  .abilities li { position: static; flex: 0 0 auto; max-width: none; white-space: nowrap; font-size: 13px; padding: 8px 12px 8px 10px; }
  .name { font-size: clamp(40px, 7.4vh, 76px); }
  .of { margin-top: 6px; }
  .caption { font-size: clamp(14px, 2.15vh, 19px); min-height: 0; margin-top: 6px; }
  .console { padding: 14px 16px; gap: 10px; }
  .console label { font-size: 15px; margin-bottom: 8px; }
  .dial input, #country-btn { height: 40px; }
  .consent { margin-top: 8px; font-size: 11px; }
  #call { height: 46px; margin-top: 8px; font-size: 15px; }
  body.mode-stage .topbar { display: none; }
  .scene { grid-template-columns: 1fr 1fr !important; gap: 10px; margin-top: 14px; }
  .slot { min-height: 0; }
  .col { gap: 8px; }
  .shard { padding: 10px 10px 10px 13px; border-radius: 12px; }
  .shard::before { top: 10px; bottom: 10px; }
  .shard .k { font-size: 9.5px; letter-spacing: .05em; gap: 5px; }
  .shard .k svg { width: 12px; height: 12px; }
  .shard .v { font-size: 13px; margin-top: 4px; }
  .shard .m, .shard .tags, .shard .line, .shard .hex, .shard .logo { display: none; }
  .shard .swatches { margin-top: 6px; gap: 6px; }
  .shard .sw { width: 20px; height: 20px; }
  .rail li span { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton b, .status-title::before { animation: none; }
}
