/* Ada v3 base styles. No external assets. No inline styles are needed (strict CSP). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--blue-3); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue-3); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: #fff; color: #000; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.fill { fill: currentColor; stroke: none; }

/* ---------- atmosphere ---------- */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.page { position: relative; z-index: 1; }
.haze { position: absolute; inset: 0 0 auto 0; height: 900px; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(60% 50% at 8% 0%, rgba(70, 90, 255, .38), transparent 70%),
    radial-gradient(50% 45% at 100% 8%, rgba(60, 70, 200, .30), transparent 70%),
    radial-gradient(40% 30% at 50% 0%, rgba(90, 110, 255, .16), transparent 70%); }
.beam { position: absolute; left: -6%; top: 110px; width: 1100px; height: 0; transform-origin: 0 0; transform: rotate(26deg); pointer-events: none; z-index: -1; }
.beam::before { content: ""; position: absolute; left: 0; top: -110px; width: 100%; height: 220px;
  background: linear-gradient(90deg, rgba(120, 150, 255, .55), rgba(90, 120, 255, .18) 45%, transparent 85%);
  filter: blur(46px); }
.beam::after { content: ""; position: absolute; left: 0; top: -1.5px; width: 100%; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, #fff, #a9bcff 20%, rgba(90, 120, 255, .5) 55%, transparent);
  box-shadow: 0 0 24px 4px rgba(110, 140, 255, .7); }
.flare { position: absolute; left: -90px; top: 60px; width: 260px; height: 260px; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, .9) 0 4%, rgba(140, 165, 255, .6) 12%, transparent 62%); filter: blur(6px); }
.cone { position: absolute; left: 50%; bottom: 0; width: min(900px, 120%); height: 100%; transform: translateX(-50%); pointer-events: none; z-index: -1; }
.cone::before { content: ""; position: absolute; inset: 0; clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, transparent, rgba(90, 120, 255, .16) 40%, rgba(150, 175, 255, .6)); filter: blur(14px); }
.cone::after { content: ""; position: absolute; left: 50%; bottom: -80px; width: 520px; height: 240px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 175, 255, .95), rgba(79, 107, 255, .35) 55%, transparent); filter: blur(22px); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 60; padding: calc(14px + var(--safe-t)) var(--gutter) 0; }
.nav-pill { max-width: 1060px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 12px 10px 18px;
  background: rgba(10, 13, 30, .62); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 40, .45), inset 0 1px 0 rgba(255, 255, 255, .06); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 19px; color: #fff; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, #7f9bff, #3947d8); box-shadow: 0 0 18px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .5); }
.logo-mark .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 14.5px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; background: var(--surface-2); }
.nav-act { display: flex; align-items: center; gap: 8px; }
.chip-btn { min-height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
.chip-btn:hover { background: var(--surface-2); border-color: var(--line-2); color: #fff; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-links { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px); flex-direction: column; margin: 0; padding: 10px;
    background: rgba(8, 10, 24, .96); border: 1px solid var(--line); border-radius: 22px; backdrop-filter: blur(20px); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; font-size: 16px; }
  .nav-toggle { display: inline-flex; }
  .nav-pill { position: relative; }
  .nav-act .btn-sm.hide-m { display: none; }
  .nav-pill .nav-act { margin-left: auto; }
}

/* ---------- buttons ---------- */
.btn { --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--h); padding: 0 28px; border-radius: 999px;
  font-weight: 650; font-size: 16px; text-decoration: none; border: 1px solid transparent; transition: transform .2s var(--ease), box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: linear-gradient(180deg, #6a86ff, #3b4ce0); border-color: rgba(190, 205, 255, .5);
  box-shadow: 0 0 0 1px rgba(70, 90, 255, .6), 0 8px 34px rgba(79, 107, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn-primary:hover { color: #fff; box-shadow: 0 0 0 1px rgba(110, 130, 255, .9), 0 10px 46px rgba(95, 125, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-ghost { color: #fff; background: rgba(20, 26, 70, .6); border-color: rgba(110, 135, 255, .5); box-shadow: 0 0 26px rgba(79, 107, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .1); backdrop-filter: blur(8px); }
.btn-ghost:hover { color: #fff; background: rgba(40, 52, 130, .6); box-shadow: 0 0 36px rgba(79, 107, 255, .5); }
.btn-sm { --h: 40px; padding: 0 18px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-3); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-2); box-shadow: 0 0 12px 2px var(--glow); }
.h1 { font-size: clamp(42px, 8.2vw, 92px); line-height: 1.02; letter-spacing: -.045em; font-weight: 750; }
.h2 { font-size: clamp(32px, 5vw, 58px); line-height: 1.08; letter-spacing: -.035em; font-weight: 720; }
.lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 640px; }
.grad { padding-bottom: .1em; background: linear-gradient(180deg, #fff 10%, #9db2ff 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.sec-head { display: grid; gap: 16px; justify-items: center; text-align: center; margin-bottom: 56px; }
.section { padding: 96px 0; position: relative; }
@media (max-width: 640px) { .section { padding: 72px 0; } .sec-head { margin-bottom: 36px; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 0; text-align: center; overflow: hidden; }
.hero-copy { display: grid; justify-items: center; gap: 24px; position: relative; z-index: 2; }
.pill-tag { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 8px; border-radius: 999px; background: rgba(20, 26, 70, .55); border: 1px solid var(--line-2); font-size: 14px; color: var(--blue-3); }
.pill-tag b { background: linear-gradient(180deg, #6a86ff, #3b4ce0); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; letter-spacing: .04em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 8px; }
.hero-micro { font-size: 14px; color: var(--faint); }
.mock-stage { position: relative; margin: 64px auto 0; max-width: 1080px; perspective: 1800px; padding: 0 var(--gutter); }
.mock-stage::before { content: ""; position: absolute; left: 10%; right: 10%; top: 10%; bottom: -10%; background: radial-gradient(closest-side, rgba(79, 107, 255, .45), transparent); filter: blur(50px); z-index: -1; }
.mock { transform: rotateX(7deg); transform-origin: 50% 0; border-radius: 22px; background: linear-gradient(180deg, #0d1128, #080a18); border: 1px solid var(--line-2);
  box-shadow: 0 40px 120px rgba(40, 60, 230, .35), 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 1px 0 rgba(255, 255, 255, .15) inset; overflow: hidden; text-align: left;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3158; }
.mock-url { margin: 0 auto; padding: 4px 16px; border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--faint); font-size: 12.5px; }
.mock-body { display: grid; grid-template-columns: 210px 1fr 250px; min-height: 440px; }
.mock-side { border-right: 1px solid var(--line); padding: 16px; display: grid; gap: 8px; align-content: start; font-size: 13px; color: var(--muted); }
.mock-side .new { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(79, 107, 255, .18); border: 1px solid rgba(110, 135, 255, .4); color: #fff; font-weight: 600; }
.mock-side span.row { padding: 8px 10px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-side span.row.on { background: var(--surface-2); color: #fff; }
.mock-main { padding: 22px 24px; display: grid; gap: 14px; align-content: start; }
.bub { max-width: 82%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; }
.bub.u { justify-self: end; background: linear-gradient(180deg, #4d63f0, #3544cc); color: #fff; border-bottom-right-radius: 6px; }
.bub.a { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.tone { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: rgba(79, 107, 255, .16); color: var(--blue-3); border: 1px solid rgba(110, 135, 255, .35); }
.tone::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-2); box-shadow: 0 0 10px var(--blue-2); }
.mock-live { margin-top: auto; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); }
.mock-live .rec { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #6a86ff, #3b4ce0); box-shadow: 0 0 22px var(--glow); }
.wavebars { display: flex; align-items: center; gap: 3px; height: 34px; flex: 1; min-width: 0; overflow: hidden; }
.wavebars i { width: 3px; flex: none; border-radius: 3px; background: linear-gradient(180deg, #a9bcff, #4f6bff); height: 40%; animation: wv 1.3s ease-in-out infinite; }
.wavebars i:nth-child(3n) { animation-delay: -.4s; }
.wavebars i:nth-child(3n+1) { animation-delay: -.9s; }
.wavebars i:nth-child(5n) { animation-delay: -.2s; height: 70%; }
.wavebars i:nth-child(7n) { animation-delay: -.65s; height: 25%; }
@keyframes wv { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1.25); } }
.mock-live time { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.mock-side-r { border-left: 1px solid var(--line); padding: 18px; display: grid; gap: 14px; align-content: start; font-size: 13px; color: var(--muted); }
.mock-side-r h4 { color: #fff; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.meter { display: grid; gap: 6px; }
.meter div { display: flex; justify-content: space-between; color: var(--text); }
.meter .bar { height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .08); overflow: hidden; display: block; }
.meter .bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, #4f6bff, #9db2ff); }
.w68 { width: 68%; } .w18 { width: 18%; } .w9 { width: 9%; } .w5 { width: 5%; }
@media (max-width: 900px) {
  .mock-body { grid-template-columns: 1fr; min-height: 0; }
  .mock-side, .mock-side-r { display: none; }
  .mock { transform: none; }
}
@media (max-width: 640px) { .hero { padding-top: 40px; } .mock-stage { margin-top: 40px; } .mock-main { padding: 16px; } .mock-url { display: none; } }

.strip { margin-top: -10px; padding: 44px 0 0; position: relative; z-index: 2; }
.strip p { text-align: center; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 22px; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px; }
.strip li { display: inline-flex; align-items: center; gap: 10px; color: #c4cdee; font-weight: 650; font-size: 18px; opacity: .9; }
.strip li .ic { color: var(--blue-2); }

/* ---------- platform chip ---------- */
.platform { position: relative; display: grid; grid-template-columns: minmax(0, 360px) minmax(60px, 1fr) 260px; align-items: center; max-width: 960px; margin: 0 auto; }
.plat-cards { display: grid; gap: 16px; }
.mini { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(180deg, rgba(20, 26, 60, .9), rgba(9, 11, 26, .95)); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 30, .5), inset 0 1px 0 rgba(255, 255, 255, .08); position: relative; z-index: 2; }
.mini .gi { width: 40px; height: 40px; }
.mini b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.mini span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.circuit { width: 100%; height: 100%; min-height: 340px; }
.circuit path { fill: none; stroke: rgba(120, 145, 255, .55); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.circuit .pulse { stroke: #cfd9ff; stroke-width: 2; stroke-dasharray: 14 240; animation: flow 3.4s linear infinite; filter: drop-shadow(0 0 4px #8fa8ff); }
.circuit .pulse:nth-of-type(6) { animation-delay: -.8s; } .circuit .pulse:nth-of-type(7) { animation-delay: -1.6s; } .circuit .pulse:nth-of-type(8) { animation-delay: -2.4s; }
@keyframes flow { to { stroke-dashoffset: -254; } }
.chip { position: relative; width: 240px; height: 240px; display: grid; place-items: center; justify-self: end; }
.chip::before { content: ""; position: absolute; inset: -60px; background: radial-gradient(closest-side, rgba(79, 107, 255, .65), transparent); filter: blur(10px); }
.chip-core { position: relative; width: 168px; height: 168px; border-radius: 34px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(155deg, #86a0ff, #3d4fe6 55%, #2a35b5); border: 1px solid rgba(220, 230, 255, .8);
  box-shadow: 0 0 0 10px rgba(30, 40, 120, .55), 0 0 0 11px rgba(120, 145, 255, .5), 0 0 70px rgba(79, 107, 255, .95), inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -18px 30px rgba(20, 20, 120, .5); }
.chip-core .ic { width: 78px; height: 78px; stroke-width: 2.2; filter: drop-shadow(0 4px 10px rgba(10, 10, 90, .6)); }
.chip-name { position: absolute; bottom: 14px; font-weight: 750; letter-spacing: .08em; font-size: 14px; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 80, .7); }
.chip-pins i { position: absolute; background: linear-gradient(180deg, #a9bcff, #4f6bff); border-radius: 2px; box-shadow: 0 0 8px var(--glow); }
.chip-pins .l { left: -5px; width: 22px; height: 3px; } .chip-pins .l1 { top: 20%; } .chip-pins .l2 { top: 40%; } .chip-pins .l3 { top: 60%; } .chip-pins .l4 { top: 80%; }
.chip-pins .r { right: -5px; width: 22px; height: 3px; } .chip-pins .r1 { top: 20%; } .chip-pins .r2 { top: 40%; } .chip-pins .r3 { top: 60%; } .chip-pins .r4 { top: 80%; }
@media (max-width: 800px) {
  .platform { grid-template-columns: 1fr; gap: 0; justify-items: center; }
  .circuit { display: none; }
  .chip { order: -1; justify-self: center; margin-bottom: 36px; }
  .plat-cards { width: 100%; grid-template-columns: 1fr; position: relative; }
  .plat-cards::before { content: ""; position: absolute; left: 50%; top: -36px; height: 36px; width: 2px; background: linear-gradient(180deg, #8fa8ff, transparent); }
}

/* glossy blue icon tile */
.gi { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(155deg, #8ea6ff, #4558e8 55%, #2c37b8); border: 1px solid rgba(215, 225, 255, .6);
  box-shadow: 0 6px 22px rgba(79, 107, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -8px 14px rgba(20, 20, 120, .45); }
.gi .ic { width: 55%; height: 55%; stroke-width: 2; }

/* ---------- tilted cards ---------- */
.tilts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; max-width: 1020px; margin: 0 auto; perspective: 1600px; padding-bottom: 20px; }
.tilt { position: relative; padding: 28px 24px 26px; border-radius: 24px; min-height: 230px; display: grid; gap: 12px; align-content: start;
  background: linear-gradient(165deg, rgba(48, 58, 140, .75), rgba(12, 14, 36, .95) 70%); border: 1px solid rgba(150, 170, 255, .28);
  box-shadow: 0 30px 60px rgba(0, 0, 40, .6), 0 0 40px rgba(60, 80, 230, .18), inset 0 1px 0 rgba(255, 255, 255, .18);
  transform: rotateX(10deg) rotateZ(var(--rz, 0deg)) translateY(var(--ty, 0px)); transition: transform .5s var(--ease), box-shadow .5s; }
.tilt:hover { transform: rotateX(0) rotateZ(0) translateY(-8px); box-shadow: 0 30px 70px rgba(0, 0, 40, .6), 0 0 60px rgba(79, 107, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .25); }
.tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(120deg, rgba(255, 255, 255, .12), transparent 38%); }
.tilt h3 { font-size: 20px; letter-spacing: -.02em; margin-top: 8px; }
.tilt p { color: var(--muted); font-size: 15px; }
.tilt:nth-child(1) { --rz: -2.5deg; --ty: 14px; } .tilt:nth-child(2) { --rz: 1.5deg; } .tilt:nth-child(3) { --rz: 3deg; --ty: 14px; }
.tilt:nth-child(4) { --rz: -2deg; } .tilt:nth-child(5) { --rz: 1deg; --ty: 14px; } .tilt:nth-child(6) { --rz: 2.5deg; }
@media (max-width: 900px) { .tilts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tilts { grid-template-columns: 1fr; gap: 16px; } .tilt { --ty: 0px; min-height: 0; transform: rotateZ(var(--rz)) scale(.99); } }

/* ---------- video / how / results ---------- */
.frame { position: relative; max-width: 1020px; margin: 0 auto; padding: 10px; border-radius: 30px; background: linear-gradient(160deg, rgba(150, 170, 255, .5), rgba(60, 70, 200, .12) 40%, rgba(150, 170, 255, .35));
  box-shadow: 0 0 120px rgba(79, 107, 255, .35), 0 40px 100px rgba(0, 0, 30, .7); }
.frame video { width: 100%; aspect-ratio: 16/9; border-radius: 22px; background: #000; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding: 26px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: s; content: "0" counter(s); font: 700 13px var(--mono); color: var(--blue-2); letter-spacing: .1em; }
.step h3 { font-size: 19px; margin: 10px 0 8px; letter-spacing: -.02em; }
.step p { color: var(--muted); font-size: 15px; }
.fine { margin-top: 28px; text-align: center; color: var(--faint); font-size: 14px; max-width: 760px; margin-inline: auto; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.tones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1020px; margin: 0 auto; }
.tone-card { padding: 22px; border-radius: 20px; background: linear-gradient(180deg, rgba(20, 26, 60, .8), rgba(9, 11, 26, .9)); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.tone-card .em { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.tone-card .em i { width: 12px; height: 12px; border-radius: 50%; }
.tone-card q { color: var(--text); font-size: 15px; quotes: "\201C" "\201D"; }
.tone-card p { color: var(--muted); font-size: 14px; }
.d-neutral { background: #94a3d8; } .d-angry { background: #ff6b7a; } .d-happy { background: #ffc857; } .d-sad { background: #4da3ff; }
@media (max-width: 900px) { .tones { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tones { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1020px; margin: 0 auto; }
.stat { padding: 30px 26px; border-radius: 24px; background: linear-gradient(180deg, rgba(24, 30, 72, .7), rgba(9, 11, 26, .9)); border: 1px solid var(--line-2); text-align: center; display: grid; gap: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.stat .num { font-size: clamp(48px, 6vw, 76px); font-weight: 750; letter-spacing: -.05em; line-height: 1; background: linear-gradient(180deg, #fff, #8fa8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat b { font-size: 16px; } .stat span { color: var(--muted); font-size: 14px; }
.stat .bar { height: 6px; background: rgba(255, 255, 255, .08); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.stat .bar i { display: block; height: 100%; background: linear-gradient(90deg, #4f6bff, #b4c4ff); border-radius: 6px; box-shadow: 0 0 12px var(--glow); }
.w86 { width: 90.0%; } .w69 { width: 82.8%; } .w47 { width: 57.6%; }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr; } }

.cases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.case { padding: 26px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.case h3 { font-size: 18px; letter-spacing: -.01em; } .case p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cases { grid-template-columns: 1fr; } }

/* ---------- pricing (uiverse orange-cougar-98 recreated) ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1020px; margin: 0 auto; align-items: stretch; }
.price-card { position: relative; background: #fff; color: #000; border-radius: 24px; padding: 32px 24px; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 40, .5); }
.price-card.pop { box-shadow: 0 0 0 3px #4f6bff, 0 0 70px rgba(79, 107, 255, .7), 0 20px 60px rgba(0, 0, 40, .5); }
.price-card .badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, #6a86ff, #3b4ce0); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 20px rgba(79, 107, 255, .6); }
.price-card h3 { font-size: 18px; line-height: 28px; font-weight: 500; letter-spacing: -.05em; color: #4b5563; }
.price-card .sub { margin-top: 8px; font-size: 14px; color: #6b7280; line-height: 1.5; }
.price-card .price { margin-top: 24px; font-size: 48px; font-weight: 300; letter-spacing: -.025em; line-height: 1; color: #000; }
.price-card .price small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: #6b7280; margin-left: 4px; }
.price-card .go { margin-top: 24px; display: block; width: 100%; text-align: center; text-decoration: none; background: #000; border: 2px solid #000; color: #fff; border-radius: 999px; padding: 10px 24px; font-size: 14px; font-weight: 500; transition: background .2s, color .2s; margin-top: auto; }
.price-card .price + .go, .price-card .gap { margin-top: 24px; }
.price-card .go:hover { background: transparent; color: #000; }
.price-card .grow { flex: 1; min-height: 24px; }
@media (min-width: 640px) { .price-card { padding: 40px 40px 24px; } .price-card h3 { font-size: 30px; line-height: 36px; } }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 420px; gap: 28px; } }
.compare { max-width: 1020px; margin: 56px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cmp { padding: 26px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.cmp h3 { font-size: 17px; margin-bottom: 14px; }
.cmp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.cmp li { display: flex; gap: 10px; color: #c9d2f0; font-size: 15px; line-height: 1.45; }
.cmp li .ic { width: 18px; height: 18px; color: var(--blue-2); margin-top: 2px; stroke-width: 2.6; }
@media (max-width: 900px) { .compare { grid-template-columns: 1fr; max-width: 420px; } }
.faq { max-width: 820px; margin: 56px auto 0; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 650; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; color: var(--blue-2); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; }
.field label, .lbl { font-size: 14px; font-weight: 600; color: #d6ddf7; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); color: var(--text); font-size: 16px; }
.input::placeholder { color: var(--faint); }
.input:hover { border-color: rgba(150, 170, 255, .45); }
.input:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(79, 107, 255, .35); }
select.input option { background: #0b0e1f; color: #fff; }
textarea.input { min-height: 120px; resize: vertical; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 14.5px; color: #c9d2f0; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #5b78ff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1/-1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.glass { background: linear-gradient(180deg, rgba(20, 26, 64, .72), rgba(9, 11, 26, .82)); border: 1px solid var(--line-2); border-radius: 28px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 30px 90px rgba(0, 0, 40, .6), 0 0 60px rgba(60, 80, 230, .18), inset 0 1px 0 rgba(255, 255, 255, .12); }
.wl { max-width: 760px; margin: 0 auto; padding: 36px; display: grid; gap: 20px; }
@media (max-width: 640px) { .wl { padding: 22px 18px; } }

/* ---------- final cta + footer ---------- */
.cta { position: relative; padding: 150px 0 220px; text-align: center; overflow: hidden; }
.cta .wrap { display: grid; justify-items: center; gap: 24px; position: relative; z-index: 2; }
.cta-box { position: relative; }
.foot { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 32px 0 calc(32px + var(--safe-b)); background: rgba(5, 6, 11, .6); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { color: var(--muted); text-decoration: none; font-size: 14.5px; } .foot a:hover { color: #fff; }
.foot small { color: var(--faint); font-size: 13.5px; display: block; flex-basis: 100%; }
@media (max-width: 640px) { .cta { padding: 90px 0 160px; } }

/* ---------- alerts (uiverse empty-wolverine-58) + toasts ---------- */
.alert { display: flex; align-items: center; padding: 8px; border-radius: 8px; border-left: 4px solid; font-size: 13px; line-height: 1.4; font-weight: 600; transition: all .3s; position: relative; }
.alert:hover { transform: scale(1.05); }
.alert .ic { width: 20px; height: 20px; margin-right: 8px; stroke-width: 2; }
.alert > span { flex: 1; }
.alert .x { margin: 0 0 0 8px; background: none; border: 0; color: inherit; opacity: .75; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; padding: 0; flex: none; }
.alert .x:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.alert .x .ic { margin: 0; width: 16px; height: 16px; }
.alert-success { background: #14532d; border-color: #15803d; color: #dcfce7; } .alert-success:hover { background: #166534; } .alert-success .ic.lead-ic { color: #22c55e; }
.alert-info { background: #1e3a8a; border-color: #1d4ed8; color: #dbeafe; } .alert-info:hover { background: #1e40af; } .alert-info .ic.lead-ic { color: #60a5fa; }
.alert-warning { background: #713f12; border-color: #a16207; color: #fef9c3; } .alert-warning:hover { background: #854d0e; } .alert-warning .ic.lead-ic { color: #eab308; }
.alert-error { background: #7f1d1d; border-color: #b91c1c; color: #fee2e2; } .alert-error:hover { background: #991b1b; } .alert-error .ic.lead-ic { color: #ef4444; }
.toasts { position: fixed; top: calc(16px + var(--safe-t)); right: 16px; z-index: 300; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toasts .alert { pointer-events: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); animation: tin .35s var(--ease); }
@keyframes tin { from { opacity: 0; transform: translateX(24px); } }
@media (max-width: 640px) { .toasts { top: auto; bottom: calc(16px + var(--safe-b)); right: 16px; left: 16px; width: auto; } .toasts .alert { animation-name: tup; } @keyframes tup { from { opacity: 0; transform: translateY(24px); } } }
.inline-alerts { display: grid; gap: 10px; }

/* ---------- auth ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 110px var(--gutter) 60px; position: relative; }
.auth-card { width: 100%; max-width: 460px; padding: 36px 32px; display: grid; gap: 20px; position: relative; z-index: 2; }
.auth-card h1 { font-size: 30px; letter-spacing: -.03em; line-height: 1.15; }
.auth-card .sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.seg button { min-height: 40px; border-radius: 999px; border: 0; background: none; color: var(--muted); font-weight: 650; font-size: 14.5px; }
.seg button[aria-selected="true"] { background: linear-gradient(180deg, #6a86ff, #3b4ce0); color: #fff; box-shadow: 0 0 20px rgba(79, 107, 255, .5); }
.social { display: grid; gap: 10px; }
.social button { min-height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 600; font-size: 15.5px; }
.social button:hover { background: rgba(255, 255, 255, .11); border-color: rgba(170, 190, 255, .5); }
.social .ic { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.auth-card form { display: grid; gap: 16px; }
.danger-zone { border: 1px solid rgba(251, 113, 133, .4); border-radius: 16px; padding: 18px; display: grid; gap: 12px; background: rgba(127, 29, 29, .15); }
.btn-danger { background: #b91c1c; color: #fff; border-color: #ef4444; box-shadow: 0 0 24px rgba(239, 68, 68, .35); }
.btn-danger:hover { color: #fff; background: #dc2626; }
.set-sec { display: grid; gap: 12px; padding-top: 6px; }
.set-sec h2 { font-size: 16px; letter-spacing: -.01em; }
.why { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(79, 107, 255, .1); border: 1px solid rgba(110, 135, 255, .3); color: #c9d2f0; font-size: 14px; line-height: 1.5; }
.why .ic { color: var(--blue-2); margin-top: 2px; }
.mini-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-size: 13.5px; }
.back-home { position: absolute; top: calc(18px + var(--safe-t)); left: var(--gutter); z-index: 5; }
@media (max-width: 480px) { .auth-card { padding: 26px 20px; } }

/* ---------- chat app ---------- */
body.chat-body { overflow: hidden; height: 100dvh; }
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 284px minmax(0, 1fr); height: 100dvh; transition: grid-template-columns .3s var(--ease); }
.app.collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.sidebar { background: rgba(7, 9, 20, .88); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; overflow: hidden; backdrop-filter: blur(20px); }
.sb-in { width: 284px; display: flex; flex-direction: column; height: 100%; padding: 14px; gap: 14px; padding-top: calc(14px + var(--safe-t)); padding-bottom: calc(14px + var(--safe-b)); }
.sb-top { display: flex; align-items: center; justify-content: space-between; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; background: none; border: 1px solid transparent; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: #fff; }
.new-chat { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border-radius: 14px; background: rgba(79, 107, 255, .16); border: 1px solid rgba(110, 135, 255, .45); color: #fff; font-weight: 650; box-shadow: 0 0 24px rgba(79, 107, 255, .22); }
.new-chat:hover { background: rgba(79, 107, 255, .28); }
.hist { flex: 1; overflow-y: auto; display: grid; gap: 2px; align-content: start; margin: 0 -6px; padding: 0 6px; }
.hist h2 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 6px; font-weight: 700; }
.hist button { text-align: left; padding: 10px 12px; border-radius: 10px; background: none; border: 0; color: #c4cdee; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist button:hover, .hist button[aria-current="true"] { background: var(--surface-2); color: #fff; }
.acct { position: relative; }
.acct-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.acct-btn:hover { background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; background: linear-gradient(160deg, #7f9bff, #3947d8); box-shadow: 0 0 14px rgba(79, 107, 255, .5); }
.acct-btn b { display: block; font-size: 14.5px; line-height: 1.2; } .acct-btn small { color: var(--faint); font-size: 12.5px; }
.menu { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; padding: 6px; border-radius: 16px; background: #0b0e20; border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); display: grid; z-index: 20; }
.menu.up-right { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; min-width: 230px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; background: none; border: 0; text-decoration: none; color: #d6ddf7; font-size: 14.5px; text-align: left; width: 100%; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: #fff; }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
.chat-main { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 10px; border-bottom: 1px solid transparent; position: relative; z-index: 10; }
.chat-head .logo { font-size: 17px; }
.chat-head .spacer { flex: 1; }
.model { position: relative; }
.model-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(20, 26, 70, .6); border: 1px solid rgba(110, 135, 255, .45); font-weight: 650; font-size: 14.5px; box-shadow: 0 0 20px rgba(79, 107, 255, .22); }
.model-btn:hover { background: rgba(40, 52, 130, .6); }
.model-btn .ic { width: 16px; height: 16px; }
.model .menu { top: calc(100% + 8px); bottom: auto; right: auto; min-width: 270px; }
.model .menu button { align-items: flex-start; } .model .menu small { display: block; color: var(--muted); font-size: 12.5px; }
.model .menu button[aria-checked="true"] { background: rgba(79, 107, 255, .18); }
.scroll { flex: 1; overflow-y: auto; padding: 8px var(--gutter) 24px; scroll-behavior: smooth; }
.col { width: 100%; max-width: 760px; margin: 0 auto; }
.empty { min-height: 100%; display: grid; align-content: center; justify-items: center; gap: 18px; text-align: center; padding: 28px 0; }
.orb { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #c5d2ff, #5870ff 45%, #2a35b5); box-shadow: 0 0 70px rgba(79, 107, 255, .8), inset 0 -10px 20px rgba(20, 20, 120, .5); }
.orb .ic { width: 38px; height: 38px; stroke-width: 2.2; }
.empty h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -.035em; line-height: 1.1; }
.empty p { color: var(--muted); max-width: 480px; }
.sugg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; margin-top: 12px; }
.sugg button { text-align: left; display: grid; gap: 6px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(180deg, rgba(24, 30, 72, .7), rgba(9, 11, 26, .85)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); transition: transform .2s var(--ease), border-color .2s; }
.sugg button:hover { transform: translateY(-3px); border-color: rgba(150, 170, 255, .55); }
.sugg b { font-size: 15px; } .sugg span { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.sugg .ic { color: var(--blue-2); }
@media (max-width: 560px) { .sugg { grid-template-columns: 1fr; } }
.msgs { display: grid; gap: 22px; padding-top: 12px; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: linear-gradient(180deg, #4d63f0, #3544cc); color: #fff; border-radius: 20px 20px 6px 20px; max-width: min(85%, 560px); padding: 12px 18px; box-shadow: 0 8px 24px rgba(60, 80, 230, .3); overflow-wrap: anywhere; }
.msg.ada .avatar { width: 34px; height: 34px; margin-top: 2px; }
.msg.ada .bubble { max-width: min(92%, 620px); padding: 12px 18px; border-radius: 6px 20px 20px 20px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg.ada .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.play { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #6a86ff, #3b4ce0); border: 0; color: #fff; box-shadow: 0 0 16px rgba(79, 107, 255, .5); }
.play .ic { width: 15px; height: 15px; margin-left: 2px; }
.tone.est { margin-top: 0; }
.typing { display: inline-flex; gap: 5px; padding: 6px 2px; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-3); animation: bl 1.1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bl { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.1); } }
.dock { padding: 8px var(--gutter) calc(12px + var(--safe-b)); position: relative; }
.dock::before { content: ""; position: absolute; left: 0; right: 0; top: -40px; height: 40px; background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; }
.live { margin: 0 auto 10px; max-width: 760px; padding: 10px 16px; border-radius: 16px; background: rgba(79, 107, 255, .12); border: 1px solid rgba(110, 135, 255, .4); color: #d6ddf7; font-size: 15px; min-height: 44px; }
.composer { max-width: 760px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 28px; background: rgba(14, 18, 44, .85); border: 1px solid var(--line-2); box-shadow: 0 10px 50px rgba(0, 0, 40, .6), 0 0 40px rgba(60, 80, 230, .15); backdrop-filter: blur(16px); }
.composer:focus-within { border-color: var(--blue-2); box-shadow: 0 10px 50px rgba(0, 0, 40, .6), 0 0 0 3px rgba(79, 107, 255, .3); }
.composer textarea { flex: 1; min-width: 0; resize: none; background: none; border: 0; outline: none; color: var(--text); font-size: 16px; line-height: 1.5; padding: 10px 0; max-height: 180px; min-height: 44px; }
.composer textarea::placeholder { color: var(--faint); }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .1); flex: none; }
.send:not([disabled]) { background: linear-gradient(180deg, #6a86ff, #3b4ce0); box-shadow: 0 0 20px rgba(79, 107, 255, .55); }
.send[disabled] { cursor: not-allowed; color: var(--faint); }
.mic { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(215, 225, 255, .6); display: grid; place-items: center; color: #fff; flex: none; background: linear-gradient(155deg, #8ea6ff, #4558e8 55%, #2c37b8); box-shadow: 0 0 28px rgba(79, 107, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .6); }
.mic .ic { width: 24px; height: 24px; stroke-width: 2.1; }
.mic:hover { transform: scale(1.06); }
.mic.rec { background: linear-gradient(155deg, #ff8f9d, #e0344f 60%, #a3162f); border-color: rgba(255, 220, 225, .7); box-shadow: 0 0 0 0 rgba(251, 113, 133, .6); animation: ring 1.4s infinite; }
@keyframes ring { to { box-shadow: 0 0 0 18px rgba(251, 113, 133, 0); } }
.rec-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding-left: 0; }
.rec-bar canvas { flex: 1; min-width: 0; height: 44px; width: 100%; }
.rec-bar time { font-family: var(--mono); font-size: 14px; color: #fff; min-width: 44px; }
.note { text-align: center; color: var(--faint); font-size: 12.5px; padding-top: 10px; max-width: 760px; margin: 0 auto; }
.gate { min-height: 100%; display: grid; place-items: center; padding: 20px 0 40px; }
.gate .glass { width: 100%; max-width: 480px; padding: 36px 30px; display: grid; gap: 18px; text-align: center; position: relative; }
.gate .orb { margin: 0 auto; }
.gate h1 { font-size: clamp(28px, 4.5vw, 38px); letter-spacing: -.035em; line-height: 1.1; }
.gate .sub { color: var(--muted); }
.gate .why { text-align: left; }
.gate form { display: grid; gap: 12px; text-align: left; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 10, .6); z-index: 40; backdrop-filter: blur(3px); }
.state-switch { position: fixed; right: 12px; bottom: 76px; z-index: 30; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(5, 6, 11, .85); border: 1px dashed var(--line-2); font-size: 12px; }
.state-switch button { border: 0; background: none; padding: 5px 10px; border-radius: 999px; color: var(--muted); font-size: 12px; }
.state-switch button[aria-pressed="true"] { background: var(--blue); color: #fff; }
@media (max-width: 860px) {
  .app, .app.collapsed { grid-template-columns: 0 minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 304px); z-index: 50; transform: translateX(-102%); transition: transform .3s var(--ease); }
  .sidebar .sb-in { width: 100%; }
  .app.drawer-open .sidebar { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, .6); }
  .state-switch { bottom: 150px; }
}
@media (min-width: 861px) { .scrim { display: none; } }
@media (max-width: 480px) { .model-btn .lbl-t { display: none; } .chat-head .logo span.nm { display: none; } .gate .glass { padding: 28px 20px; } }

/* ---------- legal / contact / 404 ---------- */
.doc-hero { padding: 80px 0 30px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.doc-hero h1 { font-size: clamp(36px, 6vw, 60px); letter-spacing: -.04em; line-height: 1.06; }
.doc-hero p { color: var(--muted); }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; max-width: 1020px; margin: 20px auto 100px; align-items: start; }
.toc { position: sticky; top: 100px; display: grid; gap: 2px; font-size: 14.5px; }
.toc a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: #fff; border-color: var(--blue-2); }
.prose { padding: 40px; border-radius: 28px; background: rgba(12, 15, 36, .6); border: 1px solid var(--line); }
.prose h2 { font-size: 24px; letter-spacing: -.02em; margin: 36px 0 12px; scroll-margin-top: 100px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #c4cdee; line-height: 1.75; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; display: grid; gap: 8px; margin: 12px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 14px 0; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); color: #c4cdee; vertical-align: top; }
.prose th { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.prose code { font-family: var(--mono); font-size: 13.5px; background: rgba(255, 255, 255, .07); padding: 2px 6px; border-radius: 6px; }
.ph { background: rgba(251, 191, 36, .14); color: #fde68a; padding: 1px 6px; border-radius: 6px; font-family: var(--mono); font-size: .9em; }
.table-wrap { overflow-x: auto; }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; gap: 20px; } .toc { position: static; grid-auto-flow: column; overflow-x: auto; } .toc a { white-space: nowrap; border-left: 0; border-bottom: 2px solid var(--line); } .prose { padding: 24px 18px; } }
.contact-wrap { max-width: 720px; margin: 20px auto 100px; padding: 36px; display: grid; gap: 20px; }
@media (max-width: 640px) { .contact-wrap { padding: 22px 16px; } }
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter) 60px; position: relative; overflow: hidden; }
.lost .cone { height: 70%; bottom: auto; top: 0; transform: translateX(-50%) scaleY(-1); opacity: .8; }
.lost-in { position: relative; z-index: 2; display: grid; gap: 22px; justify-items: center; }
.lost .big { font-size: clamp(90px, 22vw, 220px); font-weight: 800; letter-spacing: -.06em; line-height: .9; background: linear-gradient(180deg, #fff, #5870ff 90%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 40px rgba(79, 107, 255, .6)); }
.lost svg.flat { width: min(560px, 90vw); height: 80px; }
.lost svg.flat path { fill: none; stroke: #8fa8ff; stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 6px #6a86ff); }

/* ---------- admin (Orion style) ---------- */
body.admin-body { background: var(--bg); }
[data-theme="light"] body.admin-body { background: linear-gradient(180deg, #eef0fc, #e6e9f9); }
.adm { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }
.adm-side { padding: 22px 16px; border-right: 1px solid var(--line); background: var(--glass); display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
[data-theme="light"] .adm-side { box-shadow: 4px 0 30px rgba(70, 80, 170, .08); }
.adm-nav { display: grid; gap: 4px; }
.adm-nav a { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.adm-nav a:hover { background: var(--surface-2); color: var(--text); }
.adm-nav a[aria-current="page"] { background: var(--blue); color: #fff; box-shadow: 0 8px 22px var(--glow); }
.adm-main { padding: 24px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
.adm-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.adm-top h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; margin-right: auto; }
.sample { display: inline-flex; padding: 4px 12px; border-radius: 999px; background: rgba(251, 191, 36, .15); color: #fbbf24; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1px solid rgba(251, 191, 36, .4); }
[data-theme="light"] .sample { color: #92600a; background: #fff4d6; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; min-width: 0; box-shadow: 0 10px 40px rgba(0, 0, 30, .35); }
[data-theme="light"] .card { box-shadow: 0 10px 40px rgba(70, 80, 170, .12); border-color: rgba(255, 255, 255, .9); }
.card h2 { font-size: 16px; letter-spacing: -.01em; margin-bottom: 4px; }
.card .cap { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { display: grid; gap: 4px; }
.kpi-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.kpi-top .gi { width: 34px; height: 34px; border-radius: 10px; }
[data-theme="light"] .gi { box-shadow: 0 6px 16px rgba(74, 92, 240, .35), inset 0 1px 0 rgba(255, 255, 255, .6); }
.kpi .val { font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.delta { font-size: 13px; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.delta.up { color: #10b981; } .delta.down { color: #ef4444; }
.delta small { color: var(--faint); font-weight: 500; }
.grid-adm { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-bottom: 16px; }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font: 11px var(--font); }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .ln { fill: none; stroke-width: 3; stroke-linecap: round; }
.chart .area { opacity: .16; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.gauge-wrap { display: grid; place-items: center; position: relative; }
.gauge-val { position: absolute; bottom: 14%; text-align: center; font-size: 38px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.gauge-val small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-top: 6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 8px 10px; font-weight: 700; }
.tbl td { padding: 11px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl .mp { display: block; width: 100%; min-width: 70px; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.tbl .mp i { display: block; height: 100%; border-radius: 6px; background: var(--blue); }
.tbl .mp.g i { background: #10b981; } .tbl .mp.r i { background: #ef4444; } .tbl .mp.y i { background: #f59e0b; }
.status { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); }
.status.late { background: rgba(239, 68, 68, .16); color: #ef4444; } .status.ok { background: rgba(16, 185, 129, .16); color: #10b981; } .status.due { background: rgba(245, 158, 11, .16); color: #f59e0b; }
.pill-lg { display: grid; gap: 2px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; } }
@media (max-width: 860px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; flex-direction: row; align-items: center; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .adm-nav { display: flex; } .adm-nav a { white-space: nowrap; }
  .adm-side .logo { flex: none; }
}
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr; } }

/* ---------- reveal / motion ---------- */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in, .no-js .rv { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}
@media print { #stars, .beam, .flare, .cone, .haze { display: none; } }

/* ---------- state helpers, gates, otp ---------- */
[data-auth="out"] .in-only { display: none !important; }
[data-auth="in"] .out-only { display: none !important; }
.app.out { grid-template-columns: minmax(0, 1fr) !important; }
.app.out .sidebar { display: none; }
.chart .bt { fill: #fff; font-weight: 700; font-size: 14px; }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { width: 100%; min-width: 0; height: 58px; text-align: center; font: 600 26px var(--mono); border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); color: #fff; padding: 0; }
.otp input:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(79, 107, 255, .35); }
.qr-box { display: grid; place-items: center; padding: 14px; border-radius: 18px; background: #fff; width: 188px; height: 188px; margin: 0 auto; box-shadow: 0 0 50px rgba(79, 107, 255, .45); }
.qr-box svg { width: 100%; height: 100%; }
.keybox { font: 600 15px var(--mono); letter-spacing: .12em; text-align: center; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px dashed var(--line-2); overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; margin: 0; padding: 0; font: 14px var(--mono); }
.codes li { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); text-align: center; }
.admin-gate { min-height: 100vh; display: grid; place-items: center; padding: 100px var(--gutter) 60px; position: relative; }
.admin-gate .glass { width: 100%; max-width: 480px; padding: 36px 30px; display: grid; gap: 18px; text-align: center; position: relative; z-index: 2; }
.admin-gate form { display: grid; gap: 14px; text-align: left; }
.admin-gate .orb { margin: 0 auto; }
.admin-gate h1 { font-size: clamp(26px, 4.5vw, 34px); letter-spacing: -.03em; line-height: 1.12; }
.admin-gate .sub { color: var(--muted); }
.admin-gate .social { text-align: left; }
.role-tag { display: inline-flex; margin: 0 auto; padding: 4px 12px; border-radius: 999px; background: rgba(79, 107, 255, .18); color: var(--blue-3); border: 1px solid rgba(110, 135, 255, .45); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.admin-gate .back { display: inline-block; text-align: center; }
[data-theme="light"] .admin-dash-only { color: var(--text); }

.scrim { display: none; }
.app.drawer-open .scrim { display: block; }
.scroll > .col { min-height: 100%; }
.empty { min-height: calc(100dvh - 290px); }
.gate { min-height: calc(100dvh - 210px); }
.mic .stop { display: none; } .mic.rec .stop { display: block; } .mic.rec .mi { display: none; }
[data-theme="light"] #stars { display: none; }
.dock-note { padding: 8px var(--gutter) calc(12px + var(--safe-b)); }

.legend .lg1 { background: #5b6cff; } .legend .lg2 { background: #ff8fa3; }
#theme .ic:nth-child(2) { display: none; }
[data-theme="light"] #theme .ic:nth-child(1) { display: none; }
[data-theme="light"] #theme .ic:nth-child(2) { display: block; }
[data-theme="light"] .adm-nav a[aria-current="page"] { box-shadow: 0 8px 22px rgba(74, 92, 240, .35); }
[data-theme="light"] .avatar { color: #fff; }
.gauge { color: var(--text); max-width: 300px; }
.gate .orb, .admin-gate .orb { width: 64px; height: 64px; }
.gate .orb .ic, .admin-gate .orb .ic { width: 30px; height: 30px; }
.gate .glass { gap: 14px; padding: 28px 30px; }
.gate h1 + .sub, .admin-gate h1 + .sub, .auth-card h1 + .sub { margin-top: 10px; }
.page { overflow-x: clip; }
@media (max-width: 860px) { .app, .app.collapsed, .app.out { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 600px) {
  .chat-head > a.chip-btn { display: none; }
  .beam { transform: rotate(38deg); width: 700px; opacity: .5; top: 70px; }
  .flare { opacity: .5; left: -120px; }
  .state-switch { left: 8px; right: 8px; overflow-x: auto; justify-content: flex-start; }
  body[data-state] .state-switch, #admin .state-switch { bottom: 8px; }
}

/* ---------- v3.1: auth flow, settings, admin pages ---------- */
.linkish { background: none; border: 0; padding: 4px 0; color: var(--blue-3); text-decoration: underline; text-underline-offset: 3px; font-size: 14.5px; justify-self: start; }
.linkish:hover { color: #fff; }
.auth-card form, .auth-card .flow { display: grid; gap: 16px; }
.auth-card .flow { text-align: center; justify-items: stretch; }
.auth-card .flow .mini-links, .auth-card form .mini-links { justify-content: center; }
.orb.sm { width: 60px; height: 60px; margin: 0 auto; }
.orb.sm .ic { width: 28px; height: 28px; }
.orb.ok { background: radial-gradient(circle at 35% 30%, #c3f5dc, #22c58b 45%, #0f7a55); box-shadow: 0 0 60px rgba(34, 197, 139, .7), inset 0 -10px 20px rgba(0, 60, 30, .5); }
.auth-card .otp input { height: 54px; }
.muted { color: var(--muted); font-size: 14px; }
.fine.left { text-align: left; margin: 14px 0 0; max-width: none; }
.gi.sm { width: 38px; height: 38px; border-radius: 11px; }

/* settings */
.set-layout { padding-top: 40px; padding-bottom: 90px; }
.set-head { margin-bottom: 26px; }
.set-head h1 { font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -.035em; line-height: 1.1; }
.set-head p { color: var(--muted); margin-top: 8px; }
.set-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.set-nav { position: sticky; top: 96px; display: grid; gap: 4px; }
.set-nav button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: none; border: 1px solid transparent; color: var(--muted); font-weight: 600; font-size: 15px; text-align: left; }
.set-nav button:hover { background: var(--surface-2); color: #fff; }
.set-nav button[aria-selected="true"] { background: rgba(79, 107, 255, .18); border-color: rgba(110, 135, 255, .45); color: #fff; box-shadow: 0 0 24px rgba(79, 107, 255, .2); }
.set-nav button.danger { color: #ff9aa6; }
.set-nav button.danger[aria-selected="true"] { background: rgba(185, 28, 28, .2); border-color: rgba(239, 68, 68, .5); color: #ffd5da; box-shadow: none; }
.set-panes { display: grid; gap: 18px; min-width: 0; }
.pane { display: grid; gap: 18px; }
.pane-card { padding: 28px; display: grid; gap: 18px; border-radius: 24px; }
.pane-card h2 { font-size: 20px; letter-spacing: -.02em; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.pane-card h2 + .set-row { border-top: 0; padding-top: 0; }
.set-row b { font-size: 16px; display: block; }
.set-row p { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 520px; }
.set-row .ctl { display: flex; align-items: center; gap: 10px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.set-row.stack { align-items: flex-start; flex-wrap: wrap; }
.set-row .ctl.wide { flex: 1; min-width: 260px; justify-content: flex-start; flex-wrap: nowrap; }
.set-row .ctl.wide .input { flex: 1; min-width: 0; }
.set-form { display: grid; gap: 14px; max-width: 420px; justify-items: start; }
.set-form .field { width: 100%; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.badge-ok { background: rgba(16, 185, 129, .16); color: #34d399; border: 1px solid rgba(16, 185, 129, .4); }
.badge-warn { background: rgba(245, 158, 11, .16); color: #fbbf24; border: 1px solid rgba(245, 158, 11, .4); }
.sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sessions li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.sessions b { display: block; font-size: 15px; } .sessions small { color: var(--muted); font-size: 13px; }
.dl-card { grid-template-columns: auto 1fr auto; align-items: center; }
.danger-card { border-color: rgba(239, 68, 68, .55); box-shadow: 0 0 0 1px rgba(239, 68, 68, .2), 0 30px 90px rgba(0, 0, 40, .6), 0 0 50px rgba(239, 68, 68, .12); }
.danger-card h2 { color: #ffb4bd; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid var(--line-2); transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.switch input:checked + .track { background: linear-gradient(180deg, #6a86ff, #3b4ce0); border-color: rgba(190, 205, 255, .6); box-shadow: 0 0 18px rgba(79, 107, 255, .6); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue-3); outline-offset: 3px; }
.dlg { border: 1px solid var(--line-2); border-radius: 24px; background: #0b0e20; color: var(--text); padding: 26px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 40px 120px rgba(0, 0, 0, .7), 0 0 60px rgba(79, 107, 255, .2); }
.dlg::backdrop { background: rgba(0, 0, 10, .7); backdrop-filter: blur(4px); }
.dlg form { display: grid; gap: 16px; }
.dlg h2 { font-size: 22px; letter-spacing: -.02em; }
.dlg-act { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .set-grid { grid-template-columns: 1fr; gap: 18px; }
  .set-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .set-nav button { flex: none; white-space: nowrap; border-color: var(--line); background: var(--surface); }
  .set-row { flex-direction: column; align-items: flex-start; }
  .set-row .ctl { justify-content: flex-start; }
  .set-row .ctl.wide { width: 100%; }
  .dl-card { grid-template-columns: auto 1fr; } .dl-card .btn { grid-column: 1/-1; }
  .pane-card { padding: 20px 16px; }
}

/* admin pages */
.kpis-gap { margin-top: 16px; }
.alert + .kpis-gap, .alert + .grid-adm { margin-top: 16px; }
.input.sm { min-height: 40px; padding: 8px 14px; font-size: 14.5px; width: auto; min-width: 180px; }
[data-theme="light"] .input { background: #fff; color: var(--text); border-color: var(--line-2); }
[data-theme="light"] .btn-ghost { background: #fff; color: var(--blue); border-color: var(--line-2); box-shadow: none; }
[data-theme="light"] .alert { box-shadow: none; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar .grow-t { flex: 1; font-size: 16px; margin: 0; }
.toolbar .muted { margin-left: auto; }
.mono { font-family: var(--mono); font-size: 13px; }
.status.role { background: rgba(79, 107, 255, .18); color: var(--blue-3); }
[data-theme="light"] .status.role { color: #3a4bd6; }
.row-actions, .inline-cell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btn-mini { min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.btn-mini:hover { border-color: var(--blue-2); color: var(--blue-3); }
.btn-mini.danger { color: #ef4444; border-color: rgba(239, 68, 68, .4); } .btn-mini.danger:hover { background: rgba(239, 68, 68, .14); color: #ef4444; }
.tbl tr.row-late td { background: rgba(239, 68, 68, .09); }
.tbl tr.row-late td:first-child { box-shadow: inset 3px 0 #ef4444; }
.tone-chip { display: inline-flex; align-items: center; gap: 8px; } .tone-chip i { width: 9px; height: 9px; border-radius: 50%; }
.stackbar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--surface-2); margin: 18px 0 14px; }
.stackbar span { display: block; height: 100%; }
.seg-neutral { background: #8b9bd6; } .seg-happy { background: #ffc857; } .seg-sad { background: #4da3ff; } .seg-angry { background: #ff6b7a; }
.legend.col { display: grid; gap: 8px; }
.lg-row { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; } .lg-row i { width: 10px; height: 10px; border-radius: 50%; } .lg-row b { margin-left: auto; }
.split { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.mlist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.mlist button { width: 100%; text-align: left; display: grid; gap: 4px; padding: 12px; border-radius: 14px; background: none; border: 1px solid transparent; }
.mlist button:hover { background: var(--surface-2); }
.mlist button[aria-current="true"] { background: rgba(79, 107, 255, .14); border-color: rgba(110, 135, 255, .45); }
.mlist b { font-size: 15px; } .mlist span { color: var(--muted); font-size: 13.5px; }
.m-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.d-head h2 { font-size: 20px; margin: 0; }
.msg-body { font-size: 15.5px; line-height: 1.7; padding: 16px; border-radius: 14px; background: var(--surface-2); }
.due-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 16px; border-radius: 14px; border: 1px dashed var(--line-2); font-weight: 600; }
.d-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.seg-sm { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.seg-sm button { min-height: 32px; padding: 0 14px; border-radius: 999px; border: 0; background: none; color: var(--muted); font-weight: 650; font-size: 13.5px; }
.seg-sm button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.drawer-r { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); z-index: 80; padding: 24px; background: var(--bg-3); border-left: 1px solid var(--line-2); box-shadow: -30px 0 80px rgba(0, 0, 20, .5); overflow-y: auto; }
[data-theme="light"] .drawer-r { background: #fff; }
.dl { margin: 0; display: grid; gap: 14px; } .dl div { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dl dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; } .dl dd { margin: 0; }
.dl.wide { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.status-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.status-list li .status { margin-left: auto; }
.status-list .dot { width: 10px; height: 10px; border-radius: 50%; background: #10b981; box-shadow: 0 0 10px #10b981; } .status-list .dot.slow { background: #f59e0b; box-shadow: 0 0 10px #f59e0b; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .dl.wide { grid-template-columns: 1fr; } }
.nav-pill .nav-act { margin-left: auto; }
.state-switch button { white-space: nowrap; }

/* ---- soft horizontal scrollers (mobile admin nav, settings tabs, legal TOC) ---- */
@media (max-width: 860px) {
  .adm-side, .set-nav, .toc, .state-switch {
    scrollbar-width: none;                /* Firefox */
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    /* fade the edges instead of a hard cut + scrollbar */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 28px), transparent 100%);
  }
  .adm-side::-webkit-scrollbar, .set-nav::-webkit-scrollbar, .toc::-webkit-scrollbar, .state-switch::-webkit-scrollbar { display: none; }
  .adm-side { padding-left: 18px; padding-right: 18px; gap: 10px; }
  .adm-nav { gap: 6px; }
  .adm-nav a, .set-nav a, .set-nav button { scroll-snap-align: center; }
  .adm-nav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
  .adm-nav a:not([aria-current="page"]) { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
  .adm-nav a[aria-current="page"] { box-shadow: 0 4px 14px color-mix(in srgb, var(--blue) 35%, transparent); }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .adm-side, .set-nav, .toc { scroll-behavior: auto; }
}

/* ---- dashboard integration (live site): auth states, verify gate, history rows, speech language ---- */
[data-auth="boot"] .in-only, [data-auth="boot"] .out-only, [data-auth="boot"] .verify-only { display: none !important; }
[data-auth="in"] .verify-only, [data-auth="out"] .verify-only { display: none !important; }
[data-auth="verify"] .in-only, [data-auth="verify"] .out-only { display: none !important; }
.hist .h-row { display: flex; align-items: center; gap: 2px; border-radius: 10px; }
.hist .h-row:hover { background: var(--surface-2); }
.hist .h-open { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hist .h-act { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); opacity: 0; }
.hist .h-act .ic { width: 15px; height: 15px; }
.hist .h-row:hover .h-act, .hist .h-act:focus-visible { opacity: 1; }
.hist .h-act:hover { color: #fff; background: var(--surface-3, rgba(255, 255, 255, .08)); }
@media (hover: none) { .hist .h-act { opacity: .7; } }
.hist-empty { padding: 10px 12px; font-size: 13.5px; }
.lang-pick { display: grid; gap: 6px; padding: 8px 12px 6px; font-size: 12.5px; color: var(--muted); }
.lang-pick select { width: 100%; }
.msg .bubble .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.ada .tools small { font-size: 12px; }
.play.hint { box-shadow: 0 0 0 3px rgba(110, 135, 255, .45); }
.mic:disabled, .send:disabled { opacity: .55; cursor: not-allowed; }
/* ---- chat replies: markdown + ChatGPT-style code blocks ---- */
.msg .bubble .txt.md { white-space: normal; }
.md p { margin: 0 0 .7em; } .md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: .2em 0 .8em; padding-left: 1.3em; } .md li { margin: .2em 0; }
.md h3, .md h4, .md h5 { margin: .8em 0 .4em; font-size: 1.02em; line-height: 1.3; }
.md a { color: var(--blue-3, #8fa5ff); text-decoration: underline; }
.md .ic-code { font-family: var(--mono, ui-monospace, Consolas, monospace); font-size: .88em; padding: .12em .4em; border-radius: 6px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); }
.codeblock { margin: .6em 0 .9em; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); background: #0a0c16; }
.codeblock .cb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 6px 14px; background: rgba(255, 255, 255, .05); font-size: 12px; color: var(--muted); font-family: var(--mono, ui-monospace, Consolas, monospace); }
.codeblock .cb-copy { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.codeblock .cb-copy:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.codeblock pre { margin: 0; padding: 12px 14px; overflow-x: auto; max-width: 100%; }
.codeblock code { font-family: var(--mono, ui-monospace, Consolas, monospace); font-size: 13.5px; line-height: 1.55; color: #e6e9f5; white-space: pre; }
[data-theme="light"] .codeblock { background: #f6f7fb; } [data-theme="light"] .codeblock code { color: #1b2033; }
[data-admin-link][hidden] { display: none !important; }
/* ---- thin, dark scrollbars everywhere (sidebar history, page) ---- */
html, .hist, .scroll, .codeblock pre, .table-wrap { scrollbar-width: thin; scrollbar-color: rgba(130, 150, 230, .35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(130, 150, 230, .3); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(150, 170, 245, .55); background-clip: padding-box; }
.pane h3 { margin: 18px 0 8px; font-size: 15px; }
.mono { font-family: var(--mono, ui-monospace, Consolas, monospace); }
#apiKeyBox code { white-space: pre-wrap; word-break: break-all; }
/* ---- mobile chat: follow the visible viewport (keyboard), never pan sideways ---- */
html:has(body.chat-body), body.chat-body { overflow: hidden; overscroll-behavior: none; width: 100%; max-width: 100%; }
body.chat-body { position: fixed; inset: 0; height: var(--vvh, 100dvh); touch-action: pan-y; }
.chat-body .app, .chat-body .chat-main { height: var(--vvh, 100dvh); max-width: 100vw; }
.chat-body .chat-main, .chat-body .scroll, .chat-body .col, .chat-body .msgs, .chat-body .msg, .chat-body .bubble { min-width: 0; }
.chat-body .scroll { overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat-body .msg .bubble { overflow-wrap: anywhere; word-break: break-word; }
.chat-body .msg.user .bubble { max-width: 88%; }
.chat-body .codeblock { max-width: 100%; }
.chat-body .dock { flex: none; }
@media (max-width: 860px) {
  .chat-body .sidebar { visibility: hidden; }
  .chat-body .app.drawer-open .sidebar { visibility: visible; }
  .chat-body .dock { padding-top: 6px; }
  .chat-body .dock .note { display: none; }
  .chat-body .dock::before { top: -24px; height: 24px; }
  .chat-body .scroll { padding-bottom: 12px; }
  .chat-body .composer { padding-left: 14px; }
  .chat-body .composer textarea { font-size: 16px; }
  .chat-body .empty { min-height: auto; padding-top: 12px; }
  .chat-body .sugg { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) { .chat-body .sugg { grid-template-columns: 1fr; } }
