/* Nabd — styled to match medicanai.com (v2 dark theme): tokens, Inter 400–800, glass pill nav,
   maroon pill buttons, coral gradient highlights, glass dark cards with 3D maroon icon tiles. */

@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-wght-normal.woff2?v=5.3") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-ext-wght-normal.woff2?v=5.3") format("woff2-variations");
  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; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-vietnamese-wght-normal.woff2?v=5.3") format("woff2-variations");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/noto-sans-arabic-arabic-wght-normal.woff2?v=5.3") format("woff2-variations");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/noto-sans-bengali-bengali-wght-normal.woff2?v=5.3") format("woff2-variations");
  unicode-range: U+0980-09FF; }

:root {
  /* medicanai.com tokens */
  --accent: #8C2323;
  --accent-d: #6E1F1F;
  --cyan: #D98A84;
  --coral: #E0857B;
  --coral-light: #F3C0BB;
  --gold: #C2873B;
  --success: #1E8E5A;
  --line: #E8E3E1;
  --bg-soft: #FAF7F6;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --maxw: 1180px;
  --font: "Inter", "Noto Sans Arabic", "Noto Sans Bengali", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* v2 dark surfaces (from the live site) */
  --bg: #1E2227;
  --bar: #1C1A1D;
  --glass: rgba(32, 27, 30, .38);
  --glass-border: rgba(255, 255, 255, .16);
  --card: rgba(255, 255, 255, .05);
  --card-border: rgba(255, 255, 255, .10);
  --text: #FFFFFF;
  --text-2: #E9E5E3;
  --lead: #CFC7C5;
  --muted: #9AA6B2;
  --muted-2: #8B94A0;
  --glow: 0 8px 22px rgba(140, 35, 35, .32);
  --glow-hover: 0 12px 28px rgba(140, 35, 35, .42);
  --shadow: 0 18px 40px rgba(0, 0, 0, .30);

  /* aliases used by the admin page */
  --surface: #262B31;
  --surface-2: #2F353C;
  --border: var(--card-border);
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(140, 35, 35, .24);
  --warn: #E9B872;
  --warn-soft: rgba(194, 135, 59, .18);
  --danger: #F28B82;
  --pink: var(--cyan);
  --pink-hi: var(--coral-light);
  --maroon: var(--accent);
  --maroon-hi: #A83E3E;
  --maroon-deep: var(--accent-d);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text-2);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background: var(--bg);
  display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  min-height: 100dvh; overflow-x: hidden;
}
button, select, textarea, input { font: inherit; color: inherit; }
button, a, select, .starter, .hub-node { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { flex: none; }
main, .thread, .msg, .msg .meta, .bubble, .controls, .pill, .starter > span { min-width: 0; }

/* ------------------------------------------------------------ product bar */
.prodbar { background: var(--bar); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.prodbar-inner {
  max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: center;
  gap: 34px; padding: 10px 22px; overflow: hidden;
}
.pb-blurb { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .06em; white-space: nowrap; }
.prodbar img { display: block; width: auto; filter: brightness(0) invert(1); opacity: .85; transition: opacity .25s; }
.prodbar img:hover { opacity: 1; }

/* ------------------------------------------------------------ glass pill nav */
.topbar { position: sticky; top: 0; z-index: 40; padding: 10px 22px 0; }
.nav {
  max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 9px 10px 9px 22px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}
[dir="rtl"] .nav { padding: 9px 22px 9px 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-width: 0; }
.logo { height: 26px; width: auto; display: block; }
.brand-divider { width: 1px; height: 22px; background: rgba(255, 255, 255, .22); }
.brand-nabd { font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; color: var(--text-2); }
.brand-nabd .ar { color: var(--cyan); margin-inline-start: 3px; }

.controls { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.pill {
  height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: transparent;
  color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: .9rem; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background .18s, border-color .18s, color .18s;
}
.pill:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill .fill { fill: currentColor; stroke: none; }
.pill.select { padding-inline-end: 4px; }
.pill.select select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font-weight: 600; cursor: pointer;
  height: 100%; padding-inline-end: 20px; max-width: 170px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 9px) 17px, calc(100% - 4px) 17px; background-size: 5px 5px; background-repeat: no-repeat;
}
[dir="rtl"] .pill.select select { background-position: 9px 17px, 4px 17px; }
.pill.select select option { background: var(--bar); color: #fff; }
#speakToggle[aria-pressed="false"] { color: var(--muted-2); }
#speakToggle[aria-pressed="false"] .wave { opacity: 0; }
#speakToggle[aria-pressed="true"] { color: var(--coral-light); }
.pill.team { background: var(--warn-soft); color: var(--warn); }
.pill.lang { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); }

.nav-cta { display: flex; align-items: center; gap: 8px; }
.menu-btn {
  display: none; width: 42px; height: 42px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; place-items: center; color: #fff;
}
.menu-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ------------------------------------------------------------ buttons (site .btn) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; font-size: 1rem;
  padding: 15px 28px; border-radius: 999px; cursor: pointer; border: 0; transition: .18s ease; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--accent-d); transform: translateY(-2px); box-shadow: var(--glow-hover); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1.5px solid rgba(255, 255, 255, .22); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.btn-lg { padding: 18px 34px; font-size: 1.08rem; }
.btn-sm { padding: 10px 16px; font-size: .88rem; }
.btn .arrow { transition: transform .18s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ------------------------------------------------------------ hero */
main { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px 8px; position: relative; }
.hero { position: relative; padding: 54px 0 28px; }
body::before {  /* the site's diagonal maroon glow */
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% 8%, rgba(140, 35, 35, .34), transparent 62%),
    radial-gradient(700px 480px at 10% 90%, rgba(110, 31, 31, .16), transparent 60%);
}
body::after {  /* faint oversized brand mark watermark */
  content: ""; position: fixed; right: -120px; bottom: -120px; width: 520px; height: 520px; z-index: -1; pointer-events: none;
  background: url("/static/brand/mark-sm.png") center / contain no-repeat; opacity: .045;
}
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.eyebrow { margin: 0 0 14px; font-size: .8rem; font-weight: 700; letter-spacing: .14em; color: var(--coral); }
.hero h1 {
  margin: 0; color: #fff; font-weight: 800; letter-spacing: -.02em; line-height: 1.08;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem); text-wrap: balance;
}
.hero h1 span { display: block; }
.hl, .hero h1 .hl {
  background: linear-gradient(120deg, var(--coral), var(--coral-light));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.lead { margin: 22px 0 30px; max-width: 560px; color: var(--lead); font-size: 1.1rem; line-height: 1.65; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin: 22px 0 0; color: var(--muted-2); font-size: .9rem; }
.hero-short, .hero-mic, .hero-mic-label, .src-toggle { display: none; }

/* audience hub — the site's connected-platform diagram, made interactive */
.hero-visual { position: relative; }
.hub-caption { text-align: center; margin: 0 0 6px; color: var(--muted); font-size: .85rem; font-weight: 600; letter-spacing: .02em; }
.hub { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto; }
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-lines path { fill: none; stroke: rgba(224, 133, 123, .45); stroke-width: 1.4; stroke-dasharray: 2 6; stroke-linecap: round; }
.hub-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 42%; aspect-ratio: 1.3;
  border-radius: 16px; background: #23282D; border: 1px solid rgba(255, 255, 255, .10); padding: 16px;
  box-shadow: 0 0 0 26px rgba(140, 35, 35, .06), 0 20px 50px rgba(0, 0, 0, .4);
  display: flex; flex-direction: column; gap: 9px;
}
.hub-bar { display: block; height: 7px; width: 70%; border-radius: 4px; background: rgba(255, 255, 255, .14); }
.hub-bar.short { width: 45%; }
.hub-ai { position: absolute; top: 14px; inset-inline-end: 14px; font-size: 10px; font-weight: 800; color: #F3C0BB; background: rgba(140, 35, 35, .55); padding: 2px 8px; border-radius: 999px; }
.hub-core svg { margin-top: auto; width: 60%; fill: none; stroke: #5FD7A0; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hub-node {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; color: var(--text-2);
}
.hub-node .ic {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #23282D;
  border: 1.5px solid rgba(140, 35, 35, .85); transition: background .2s, transform .2s, box-shadow .2s;
}
.hub-node .ic svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-node b { font-size: .78rem; font-weight: 600; color: #CDD4DC; }
.hub-node:hover .ic { transform: scale(1.06); background: #2A2F35; }
.hub-node.active .ic {
  background: linear-gradient(150deg, #A83E3E, #8C2323 52%, #681D1D); border-color: transparent;
  box-shadow: 0 9px 20px rgba(140, 35, 35, .45), inset 0 1.5px rgba(255, 255, 255, .45);
}
.hub-node.active b { color: #fff; }

/* starter cards — site .card.dark + .ic */
.starters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 44px; text-align: start; }
.starter {
  display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--radius); cursor: pointer; color: #CDD4DC;
  background: var(--card); border: 1px solid var(--card-border); font-size: .95rem; line-height: 1.5; text-align: start;
  transition: transform .2s, border-color .2s, background .2s;
}
.starter:hover { transform: translateY(-4px); border-color: rgba(224, 133, 123, .35); background: rgba(255, 255, 255, .07); }
.starter-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, #B5474A, #8C2323 60%, #5E1A1A);
  box-shadow: 0 9px 22px rgba(0, 0, 0, .45), inset 0 1.5px rgba(255, 255, 255, .35), inset 0 -4px 7px rgba(0, 0, 0, .35);
}
.starter-ico svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.starter b { display: block; color: #fff; font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -.01em; }

/* ------------------------------------------------------------ conversation */
.thread { list-style: none; margin: 0 auto; padding: 26px 0 0; display: flex; flex-direction: column; gap: 22px; max-width: 860px; }
.msg { display: flex; flex-direction: column; gap: 8px; }
.msg.user { align-items: flex-end; }
.msg.user .bubble {
  background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 22px 22px 6px 22px;
  max-width: min(85%, 640px); white-space: pre-wrap; box-shadow: var(--glow); font-weight: 500;
}
[dir="rtl"] .msg.user .bubble { border-radius: 22px 22px 22px 6px; }
.msg.assistant .bubble {
  padding: 18px 22px; border-radius: 6px 22px 22px 22px; background: var(--card); border: 1px solid var(--card-border);
  color: #CDD4DC; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.7;
}
[dir="rtl"] .msg.assistant .bubble { border-radius: 22px 6px 22px 22px; }
.bubble p { margin: 0 0 .75em; } .bubble p:last-child { margin-bottom: 0; }
.bubble h3 { margin: 1em 0 .35em; font-size: 1.05rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.bubble h3:first-child { margin-top: 0; }
.bubble strong { color: #fff; font-weight: 700; }
.bubble ul, .bubble ol { margin: .2em 0 .85em; padding-inline-start: 1.3em; }
.bubble li { margin: .25em 0; }
.bubble li::marker { color: var(--coral); }
.bubble code { background: rgba(255, 255, 255, .08); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.bubble .cite {
  display: inline-block; font-size: 10.5px; line-height: 1; padding: 3px 6px; margin: 0 2px; border-radius: 999px;
  background: rgba(140, 35, 35, .38); color: var(--coral-light); vertical-align: 2px; font-weight: 700; direction: ltr;
}
.msg .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-inline-start: 6px; }
.src {
  font-size: .75rem; border: 1px solid var(--card-border); background: rgba(255, 255, 255, .03); border-radius: 999px; padding: 3px 11px;
  color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr;
}
.src b { color: var(--coral); }
.src .lab { color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 0 5px; margin-inline-start: 5px; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; min-height: 32px; }
.icon-btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--coral); }
@keyframes blink { 50% { opacity: 0; } }
.error { color: var(--danger); }

/* ------------------------------------------------------------ composer (glass pill like the nav) */
.composer-wrap {
  position: sticky; bottom: 0; z-index: 20; padding: 16px 22px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(30, 34, 39, 0), var(--bg) 40%);
}
.composer {
  max-width: 860px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; padding: 7px;
  border-radius: 28px; background: rgba(38, 43, 49, .92); border: 1px solid var(--glass-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .3); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.composer:focus-within { border-color: rgba(224, 133, 123, .55); box-shadow: 0 0 0 3px rgba(140, 35, 35, .25), 0 18px 40px rgba(0, 0, 0, .3); }
textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; color: #fff;
  padding: 12px 6px; max-height: 180px; line-height: 1.45; font-size: 16px;
}
textarea::placeholder { color: var(--muted-2); }
.mic, .send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; transition: .18s; }
.mic svg, .send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mic { background: var(--accent); color: #fff; box-shadow: var(--glow); }
.mic:hover { background: var(--accent-d); }
.send { background: rgba(255, 255, 255, .08); color: #fff; }
.send:not(:disabled):hover { background: rgba(255, 255, 255, .14); }
.send:disabled { opacity: .35; cursor: default; }
.status { max-width: 860px; margin: 0 auto 8px; min-height: 20px; font-size: .82rem; color: var(--muted); text-align: center; }
.status:empty { min-height: 0; margin: 0; }
.status.error { color: var(--danger); }
.disclaimer { max-width: 860px; margin: 9px auto 0; font-size: .72rem; color: #6F7882; text-align: center; }
.powered { margin: 6px auto 0; text-align: center; font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: #7D868F; }
.powered b { color: var(--coral-light); font-weight: 700; letter-spacing: .02em; }
.admin-footer { padding: 0 18px 28px; }

/* ------------------------------------------------------------ live voice screen */
.call {
  position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto 1fr auto auto; overflow: hidden;
  background: radial-gradient(80% 60% at 70% 20%, rgba(140, 35, 35, .40), transparent 70%), linear-gradient(180deg, #23282D, #16191D);
  padding: max(18px, env(safe-area-inset-top)) 22px max(26px, env(safe-area-inset-bottom));
}
.call-head { display: flex; justify-content: space-between; align-items: center; max-width: 760px; width: 100%; margin: 0 auto; }
.call-head .logo { height: 24px; }
.call-lang { font-size: .8rem; font-weight: 600; color: var(--coral-light); border: 1px solid rgba(224, 133, 123, .4); border-radius: 999px; padding: 4px 13px; }
.call-lang:empty { display: none; }
.call-stage { display: grid; place-items: center; align-content: center; gap: 52px; }
.orb { --level: 0; width: min(58vw, 240px); aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; background: transparent; position: relative; cursor: pointer; }
.orb-core, .orb-halo { position: absolute; inset: 0; border-radius: 50%; }
.orb-core {
  display: grid; place-items: center;
  background: linear-gradient(150deg, #B5474A, #8C2323 55%, #5E1A1A);
  box-shadow: inset 0 2px rgba(255, 255, 255, .35), inset 0 -8px 16px rgba(0, 0, 0, .35), 0 24px 70px rgba(140, 35, 35, .55);
  transform: scale(calc(.84 + var(--level) * .2)); transition: transform .09s linear, filter .3s;
}
.orb-core svg { width: 46%; fill: none; stroke: #FFE9E6; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.orb-halo { background: var(--accent); opacity: .22; transform: scale(calc(1 + var(--level) * .55)); transition: transform .09s linear; }
.orb[data-state="connecting"] .orb-core, .orb[data-state="muted"] .orb-core { filter: grayscale(.9) brightness(.7); }
.orb[data-state="thinking"] .orb-halo, .orb[data-state="transcribing"] .orb-halo { animation: orbThink 1.4s ease-in-out infinite; }
.orb[data-state="thinking"] .orb-core, .orb[data-state="transcribing"] .orb-core { animation: orbBreath 1.4s ease-in-out infinite; }
.orb[data-state="speaking"] .orb-halo { animation: orbSpeak .95s ease-out infinite; background: var(--coral); }
@keyframes orbThink { 0%,100% { transform: scale(1); opacity: .14; } 50% { transform: scale(1.2); opacity: .3; } }
@keyframes orbBreath { 0%,100% { transform: scale(.86); } 50% { transform: scale(.92); } }
@keyframes orbSpeak { 0% { transform: scale(.95); opacity: .35; } 100% { transform: scale(1.5); opacity: 0; } }
.call-state { font-size: .95rem; font-weight: 600; color: var(--lead); min-height: 24px; text-align: center; }
.captions { max-width: 760px; width: 100%; margin: 0 auto 22px; display: grid; gap: 10px; text-align: center; min-height: 96px; }
.captions p { margin: 0; text-wrap: pretty; }
.cap-user { color: var(--muted); font-size: .92rem; }
.cap-user:not(:empty)::before { content: "“"; } .cap-user:not(:empty)::after { content: "”"; }
.cap-bot { font-size: clamp(1.05rem, 2.6vw, 1.35rem); line-height: 1.5; max-height: 30vh; overflow-y: auto; color: #fff; font-weight: 600; letter-spacing: -.01em; }
.call-controls { display: flex; justify-content: center; gap: 26px; }
.round {
  width: 66px; height: 66px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06);
  color: #fff; display: grid; place-items: center; cursor: pointer; transition: .18s;
}
.round svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round .slash { opacity: 0; }
.round[aria-pressed="true"] { background: #fff; color: var(--bg); }
.round[aria-pressed="true"] .slash { opacity: 1; }
.round.end { background: var(--accent); border-color: transparent; box-shadow: var(--glow); }
.round.end:hover { background: var(--accent-d); }

/* ------------------------------------------------------------ tablet */
@media (max-width: 1060px) {
  .controls .pill span:not(.sr-only) { display: none; }  /* icon-only pills */
  .pill.select select { max-width: 120px; }
  .starters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-copy { text-align: center; }
  .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hub { width: min(100%, 360px); }
  .menu-btn { display: grid; }
  .nav { flex-wrap: wrap; border-radius: 26px; }
  .controls {
    display: none; order: 3; width: 100%; margin: 6px 0 2px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1);
  }
  .controls.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .controls .pill { width: 100%; justify-content: center; height: 46px; background: rgba(255, 255, 255, .05); }
  .controls .pill span:not(.sr-only) { display: inline; }
  .controls .pill.select { justify-content: flex-start; }
  .controls .pill.select select { flex: 1; min-width: 0; width: 100%; max-width: none; text-overflow: ellipsis; }
  .nav-cta { margin-inline-start: auto; }
  .prodbar-inner { gap: 22px; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .prodbar-inner::-webkit-scrollbar { display: none; }
  .pb-blurb { display: none; }
}

/* ------------------------------------------------------------ phone: very simple, fast */
@media (max-width: 640px) {
  body::before { position: absolute; background: radial-gradient(520px 360px at 75% 0%, rgba(140, 35, 35, .34), transparent 64%); }
  body::after { display: none; }
  .nav, .composer { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav { background: #22262B; box-shadow: none; }
  .composer { background: #262B31; box-shadow: none; }
  .btn-primary, .mic, .msg.user .bubble, .round.end { box-shadow: none; }
  button:active, .starter:active, .pill:active { transform: scale(.97); }

  .prodbar-inner { gap: 20px; padding: 8px 14px; }
  .prodbar img { transform: scale(.8); transform-origin: left center; }
  .topbar { padding: 8px 10px 0; }
  .nav { padding: 6px 6px 6px 16px; gap: 8px; }
  [dir="rtl"] .nav { padding: 6px 16px 6px 6px; }
  .logo { height: 20px; }
  .brand-divider, .brand-nabd { display: none; }
  .nav-cta { gap: 4px; }
  .nav { flex-wrap: wrap; }
  .nav-cta .btn-sm { padding: 9px 12px; font-size: .84rem; gap: 6px; }
  .nav-cta .btn-sm svg { width: 16px; height: 16px; }
  .pill.lang { height: 38px; padding: 0 10px; }
  .pill.lang svg { display: none; }
  .menu-btn { width: 38px; }
  .menu-btn { width: 42px; height: 42px; }

  main { padding: 0 16px 4px; }
  .hero { min-height: calc(100dvh - 230px); display: flex; flex-direction: column; justify-content: center; padding: 18px 0 8px; }
  .eyebrow, .lead, .hero-actions, .hero-trust, .hero-visual { display: none; }
  .hero h1 { font-size: 2rem; line-height: 1.1; }
  .hero-short { display: block; margin: 12px auto 30px; color: var(--lead); font-size: 1rem; }
  .hero-mic {
    display: grid; place-items: center; position: relative; margin: 0 auto; width: 134px; height: 134px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
    background: linear-gradient(150deg, #B5474A, #8C2323 55%, #5E1A1A);
    box-shadow: inset 0 2px rgba(255, 255, 255, .35), inset 0 -8px 16px rgba(0, 0, 0, .35);
  }
  .hero-mic svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; position: relative; }
  .hero-mic-ring { position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(224, 133, 123, .38); animation: micBreath 2.6s ease-in-out infinite; }
  @keyframes micBreath { 0%, 100% { transform: scale(.94); opacity: .9; } 50% { transform: scale(1.04); opacity: .35; } }
  .hero-mic-label { display: block; margin: 16px 0 26px; font-weight: 700; color: var(--coral-light); }

  .starters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .starters::-webkit-scrollbar { display: none; }
  .starter { flex: none; flex-direction: row; align-items: center; gap: 9px; scroll-snap-align: start; padding: 8px 15px 8px 8px; border-radius: 999px; transition: none; }
  [dir="rtl"] .starter { padding: 8px 8px 8px 15px; }
  .starter:hover { transform: none; }
  .starter-ico { width: 30px; height: 30px; border-radius: 50%; box-shadow: none; }
  .starter-ico svg { width: 16px; height: 16px; }
  .starter > span { display: flex; font-size: 0; }
  .starter > span > b { margin: 0; font-size: .9rem; white-space: nowrap; }

  .thread { gap: 16px; padding-top: 14px; }
  .msg.user .bubble { max-width: 88%; padding: 10px 15px; }
  .msg.assistant .bubble { padding: 4px 2px; background: transparent; border: 0; border-radius: 0; }
  .msg .meta { padding-inline-start: 0; gap: 2px; }
  .icon-btn { min-height: 38px; padding: 8px 12px; }
  .src-toggle { display: inline-flex; }
  .msg .meta .src { display: none; max-width: calc(100vw - 40px); }
  .msg .meta.show-src .src { display: inline-block; }

  .composer-wrap { padding: 8px 10px max(8px, env(safe-area-inset-bottom)); background: var(--bg); }
  .composer { border-radius: 26px; padding: 5px; }
  .mic, .send { width: 44px; height: 44px; }
  .disclaimer { font-size: .66rem; margin-top: 6px; }
  body.has-thread .disclaimer { display: none; }
  .powered { font-size: .66rem; margin-top: 4px; }

  .call { padding-inline: 16px; }
  .call-stage { gap: 36px; }
  .cap-bot { max-height: 34vh; font-size: 1.12rem; }
  .round { width: 70px; height: 70px; }
}
@media (max-height: 640px) and (max-width: 900px) {
  .orb { width: min(44vw, 170px); }
  .call-stage { gap: 26px; }
  .captions { min-height: 60px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
