/* =========================================================================
   Tipsheet Search — Epic EHR Guidance
   Design: luminous glassmorphism — Manrope + Fraunces, sage/sky palette
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@300;400;500;600;700;800&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafbfc;
  --ink: #0a1628;
  --ink-soft: #4a5a73;
  --muted: #5a6a7f;
  --line: rgba(10, 22, 40, 0.08);
  --line-soft: rgba(10, 22, 40, 0.05);

  --navy-900: #0a1628;
  --navy-700: #1e3a5f;
  --navy-600: #2a5d6f;
  --sage: #7cc4af;
  --sage-soft: rgba(124, 196, 175, 0.2);
  --sky: #8fb2e8;
  --sky-soft: rgba(143, 178, 232, 0.18);
  --sky-700: #2a5b9e;
  --coral: #8fb2e8;
  --coral-700: #2a5b9e;
  --coral-soft: rgba(143, 178, 232, 0.14);

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 20px 60px -20px rgba(10, 22, 40, 0.15),
    0 8px 24px -8px rgba(10, 22, 40, 0.08);

  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --highlight: rgba(253, 229, 138, 0.85);
  --highlight-edge: rgba(200, 170, 0, 0.3);
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Atmospheric gradient mesh */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 100% 60% at 50% -20%, rgba(124, 196, 175, 0.35), transparent 60%),
    radial-gradient(ellipse 80% 50% at 90% 10%, rgba(143, 178, 232, 0.3), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 40%, rgba(143, 178, 232, 0.3), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 90%, rgba(124, 196, 175, 0.18), transparent 60%);
  filter: blur(40px);
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 32px 140px;
  position: relative;
  z-index: 1;
}

::selection { background: var(--sage-soft); color: var(--ink); }

/* ============================================================ NAV */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 64px;
}
.logo { display: flex; align-items: center; gap: 14px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-600) 100%);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 19px;
  position: relative;
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  font-family: 'Fraunces', serif;
}
.logo-mark::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  background: var(--sage); border-radius: 50%; bottom: -3px; right: -3px;
  border: 2px solid var(--bg); box-shadow: 0 4px 12px rgba(124,196,175,0.5);
}
.logo-text { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }
.logo-text small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: 0.02em; margin-top: 2px; }

.nav-right { display: flex; gap: 10px; align-items: center; }
.nav-pill {
  background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); padding: 8px 14px;
  border-radius: var(--radius-pill); font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--ink); cursor: pointer; transition: all 160ms ease;
  text-decoration: none; display: inline-block;
}
.nav-pill:hover { background: rgba(255,255,255,0.9); transform: translateY(-1px); color: var(--ink); border-bottom-color: var(--line); }
.nav-pill.primary { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.nav-pill.primary:hover { background: var(--navy-900); color: #fff; }

/* ============================================================ HERO */
.hero { text-align: center; max-width: 880px; margin: 0 auto 40px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-soft);
  padding: 7px 16px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; color: var(--navy-600);
  margin-bottom: 28px;
  box-shadow: 0 4px 14px rgba(10, 22, 40, 0.04);
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--sage);
  box-shadow: 0 0 0 3px rgba(124, 196, 175, 0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(124, 196, 175, 0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(124, 196, 175, 0.1); }
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 400;
  line-height: 1; letter-spacing: -0.04em;
  margin-bottom: 18px;
  color: var(--ink);
}
.hero h1 .accent {
  font-weight: 400;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600) 50%, var(--sage));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .source-line {
  font-size: 14px; font-weight: 500;
  color: var(--muted); margin-bottom: 28px;
  letter-spacing: 0.01em;
}
.hero .source-line strong { color: var(--navy-700); font-weight: 700; }

.hero-disclaimer {
  display: inline-flex; gap: 10px; align-items: flex-start;
  background: var(--coral-soft); border: 1px solid rgba(143,178,232,0.25);
  border-radius: 12px; padding: 12px 16px;
  font-size: 13px; color: #1e3a5f; line-height: 1.5;
  max-width: 600px; text-align: left; margin-top: 8px;
}
.hero-disclaimer svg { flex-shrink: 0; color: var(--coral-700); margin-top: 1px; }

/* ============================================================ CARDS */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  margin-bottom: 22px;
}

/* ============================================================ SUGGESTIONS */
.suggestions { padding: 20px 26px 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.suggestions-label {
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--muted); flex-basis: 100%; margin-bottom: 4px;
}
#popularRow, #recentRow { display: contents; }

.suggestion {
  background: rgba(255,255,255,0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 12px;
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--navy-700);
  cursor: pointer; transition: all 160ms ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.suggestion::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--sky); flex-shrink: 0; }
.suggestion.recent::before { background: var(--sage); }
.suggestion:hover {
  background: #fff; transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 22, 40, 0.08);
}

/* ============================================================ MESSAGES */
.chat-body { padding: 24px 28px 28px; }

.msg-user {
  margin-left: auto; max-width: 75%; margin-bottom: 28px;
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-600) 100%);
  color: #fff; padding: 16px 20px;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 8px 24px -8px rgba(30, 58, 95, 0.4);
  font-size: 15px; font-weight: 500; line-height: 1.5;
}
.msg-user p { margin: 0; }

.msg-asst { max-width: 100%; margin-bottom: 24px; }

.answer {
  font-size: 16px; line-height: 1.7; color: var(--ink); max-width: 72ch;
}
.answer p { margin-bottom: 14px; }
.answer p:last-child { margin-bottom: 0; }
.answer strong { font-weight: 700; color: var(--navy-700); }
.answer em { font-style: italic; color: var(--ink-soft); }

.cite {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  background: linear-gradient(135deg, rgba(124, 196, 175, 0.25), rgba(124, 196, 175, 0.1));
  border: 1px solid rgba(42, 93, 111, 0.2);
  border-radius: 6px; color: var(--navy-700); font-size: 11px; font-weight: 700;
  vertical-align: 1px; margin: 0 2px;
}

/* ============================================================ SOURCES */
.sources {
  margin-top: 24px; padding: 18px 22px;
  background: rgba(255,255,255,0.5); border-radius: var(--radius);
  border: 1px solid var(--line-soft);
}
.sources-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700; color: var(--navy-600); margin-bottom: 14px;
}
.source {
  display: grid; grid-template-columns: 28px 1fr; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.source:last-of-type { border-bottom: 0; }
.source-num {
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}
.source-info { display: flex; flex-direction: column; gap: 3px; }
.source-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.source-meta { font-size: 12px; color: var(--muted); font-weight: 500; }
.source-quote {
  margin-top: 8px; font-family: 'Fraunces', serif; font-size: 13.5px;
  line-height: 1.6; color: var(--ink-soft); font-style: italic;
  padding: 10px 14px; background: rgba(255,255,255,0.6); border-radius: 8px;
  border-left: 2px solid var(--sage); white-space: pre-wrap;
}

.source-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 0 4px; margin-left: 42px;
}
.btn-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--navy-700);
  background: rgba(255,255,255,0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 6px 14px;
  text-decoration: none; transition: all 140ms ease;
}
.btn-link:hover {
  background: #fff; border-color: var(--navy-700);
  color: var(--navy-700); border-bottom-color: var(--navy-700);
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,22,40,0.08);
}

.snippet-toggle {
  background: none; border: none; padding: 0 2px;
  color: var(--navy-700); font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; display: inline;
}
.snippet-toggle:hover { color: var(--coral-700); }

.source-not-used {
  font-size: 12px; font-weight: 600; color: var(--coral-700);
  background: var(--coral-soft); border-radius: 8px;
  padding: 6px 10px; margin-bottom: 10px;
  grid-column: 1 / -1;
}
.sources-label-secondary {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700; color: var(--muted); margin-top: 16px; margin-bottom: 14px;
  padding-top: 16px; border-top: 1px solid var(--line-soft);
}

/* ============================================================ DISCLAIMER (in answer) */
.msg-disclaimer {
  margin-top: 16px; padding: 12px 16px;
  background: var(--coral-soft); border: 1px solid rgba(143,178,232,0.25);
  border-radius: 12px; font-size: 12.5px; color: #1e3a5f; line-height: 1.5;
  display: flex; gap: 10px; align-items: flex-start;
}
.msg-disclaimer svg { flex-shrink: 0; color: var(--coral-700); margin-top: 1px; }

/* ============================================================ THINKING */
.thinking {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--muted); font-style: italic; font-size: 14px; padding: 4px 0;
}
.thinking-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--sage);
  animation: tpulse 1.2s ease-in-out infinite;
}
.thinking-dot:nth-child(2) { animation-delay: 0.15s; }
.thinking-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes tpulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* ============================================================ COMPOSER (fixed) */
.composer-outer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  padding: 0 32px 28px;
  background: linear-gradient(to bottom, transparent 0%, rgba(250,251,252,0.97) 28%);
  pointer-events: none;
}
.composer-inner { max-width: 1200px; margin: 0 auto; pointer-events: auto; }

.composer {
  display: flex; gap: 10px; padding: 14px 16px;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 20px 50px -20px rgba(10, 22, 40, 0.18);
  align-items: flex-end;
}
.composer textarea {
  flex: 1; background: transparent; border: 0; padding: 10px 8px;
  font-family: inherit; font-size: 15px; color: var(--ink); resize: none;
  min-height: 28px; max-height: 160px; line-height: 1.5;
}
.composer textarea:focus { outline: none; }
.composer textarea::placeholder { color: #8a96a8; }
.composer button[type="submit"] {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-600) 100%);
  color: #fff; border: 0; width: 46px; height: 46px; border-radius: 12px;
  cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 8px 20px -6px rgba(30, 58, 95, 0.5);
  transition: transform 160ms ease, box-shadow 160ms ease; flex-shrink: 0;
  font-size: 0; padding: 0;
}
.composer button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -6px rgba(30, 58, 95, 0.6); }
.composer button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============================================================ DOCUMENT VIEWER */
.doc-view { max-width: 1040px; margin: 0 auto; padding: 32px 24px 80px; position: relative; z-index: 1; }
.doc-view h1 { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 500; margin: 12px 0 6px; }
.doc-view a { color: var(--navy-700); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.doc-view a:hover { color: var(--coral-700); }
.full-doc {
  margin-top: 20px;
  background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 28px 32px; white-space: pre-wrap; line-height: 1.7;
  font-family: 'Manrope', system-ui, sans-serif; font-size: 14.5px; color: var(--ink);
  box-shadow: var(--glass-shadow); overflow-x: auto;
}
.highlight {
  background: var(--highlight);
  padding: 2px 3px; border-radius: 3px;
  box-shadow: inset 0 -2px 0 var(--highlight-edge);
}
.muted { color: var(--muted); font-size: 13.5px; }

/* ============================================================ ADMIN + LOGIN */
.admin-shell { max-width: 1040px; margin: 0 auto; padding: 32px 24px 80px; position: relative; z-index: 1; }
.admin-shell h1 { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 400; margin-bottom: 4px; }
.admin-shell .tagline { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

.panel {
  background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 26px 28px; margin: 18px 0; box-shadow: var(--glass-shadow);
}
.panel h2 { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 500; color: var(--ink); margin: 0 0 4px; }
.panel .muted { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.panel label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }

input[type="text"], input[type="password"], input[type="file"], input:not([type]) {
  width: 100%; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; font: inherit;
  background: rgba(255,255,255,0.8); color: var(--ink);
}
input:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(30,58,95,0.1); }
input[type="file"] { padding: 10px; background: rgba(255,255,255,0.5); }
input[type="date"] { padding: 11px 14px; }

.meta-fields { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.meta-row { display: flex; flex-direction: column; }
.meta-row label { margin-top: 10px; margin-bottom: 5px; }
.meta-dates { flex-direction: row; gap: 16px; }
.meta-dates > div { flex: 1; display: flex; flex-direction: column; }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 11px; }

.btn, button.btn-primary {
  font-family: inherit; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: #fff; border: 0; border-radius: var(--radius); padding: 12px 22px;
  cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 6px 16px -4px rgba(30,58,95,0.4);
}
.btn:hover, button.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -4px rgba(30,58,95,0.5); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

button.danger {
  font-family: inherit; font-size: 13px; font-weight: 600;
  background: transparent; color: #c0392b;
  border: 1px solid #c0392b; border-radius: var(--radius); padding: 8px 14px;
  cursor: pointer; transition: all 140ms ease;
}
button.danger:hover { background: #c0392b; color: #fff; }

.error { color: #c0392b; font-weight: 600; }
.success { color: var(--navy-600); font-weight: 600; }

.doc-row {
  display: grid; grid-template-columns: 1.6fr 0.55fr auto auto auto;
  gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.doc-row:last-child { border-bottom: 0; }
.doc-row strong { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 500; color: var(--ink); }
.doc-row .chunk-count { color: var(--muted); font-size: 13px; }

.model-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.model-card {
  background: rgba(255,255,255,0.5); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 16px 18px;
}
.model-card strong { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 500; display: block; margin: 2px 0 8px; color: var(--ink); }
.model-label { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--navy-700); }
.model-meta { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.model-meta code { font-size: 12px; background: rgba(255,255,255,0.7); padding: 1px 6px; border-radius: 4px; word-break: break-all; border: 1px solid var(--line); }

.login-shell { max-width: 460px; margin: 80px auto; padding: 0 24px; text-align: center; position: relative; z-index: 1; }
.login-shell .logo-mark { margin: 0 auto 22px; }
.login-shell h1 { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 400; margin: 0 0 6px; }
.login-shell .panel { text-align: left; }

/* brand-monogram used on login/admin pages */
.brand-monogram {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-600) 100%);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 22px;
  font-family: 'Fraunces', serif;
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.25);
}

/* admin brand header */
.brand { text-align: center; margin-bottom: 8px; }
.brand h1 { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 400; }
.brand .full-name { display: inline-block; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.brand .tagline { font-size: 14px; color: var(--muted); max-width: 520px; margin: 0 auto; }

.top-utility { text-align: right; margin-bottom: 24px; }
.utility-link { color: var(--navy-700); font-size: 13px; font-weight: 600; text-decoration: none; }
.utility-link:hover { text-decoration: underline; }

/* ============================================================ RESPONSIVE */
@media (max-width: 720px) {
  .shell { padding: 20px 18px 130px; }
  .nav { margin-bottom: 40px; }
  .logo-text small { display: none; }
  .nav-pill { padding: 7px 12px; font-size: 12px; }
  .hero { margin-bottom: 28px; }
  .hero h1 { letter-spacing: -0.03em; }
  .chat-body { padding: 18px 18px 22px; }
  .msg-user { max-width: 90%; }
  .sources { padding: 14px 16px; }
  .source-actions { margin-left: 0; }
  .composer-outer { padding: 0 18px 22px; }
  .doc-row { grid-template-columns: 1fr; gap: 6px; }
  .model-grid { grid-template-columns: 1fr; }
  .full-doc { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================ VOICE CONTROLS */
.mic-btn {
  background: rgba(255,255,255,0.6); border: 1px solid var(--line);
  width: 46px; height: 46px; border-radius: 12px;
  cursor: pointer; display: grid; place-items: center;
  color: var(--ink-soft); transition: all 160ms ease;
  flex-shrink: 0; padding: 0; font-size: 0;
}
.mic-btn:hover { background: rgba(255,255,255,0.9); color: var(--navy-700); border-color: var(--navy-700); }
.mic-btn.listening {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff; border-color: #c0392b;
  animation: mic-pulse 1s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

.speak-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 5px 13px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  transition: all 140ms ease; margin-top: 14px;
}
.speak-btn:hover, .speak-btn.speaking {
  background: rgba(255,255,255,0.8); color: var(--navy-700); border-color: var(--navy-700);
}
