body.bios-live .nav-item[data-tab="organism"],
body.bios-live .nav-item[data-tab="family"],
body.bios-live .pulse-card,
body.bios-live .view-today .ai-grid,
body.bios-live .view-data .summary-grid,
body.bios-live .view-data .sources-panel,
body.bios-live .view-data .data-tabs,
body.bios-live .view-data .show-all,
body.bios-live .view-data .export-card,
body.bios-live .view-data .page-head .btn-soft,
body.bios-live .view-settings > .bios-demo-settings-profile,
body.bios-live .view-settings > .bios-demo-settings-goal,
body.bios-live .view-settings > .bios-demo-settings-about,
body.bios-live .view-protocol-create,
body.bios-live .create-protocol-open,
body.bios-live .view-protocols > .protocol-pane {
  display: none !important;
}

body.bios-live .view-protocols > .protocol-tabs {
  display: inline-grid;
}

body.bios-live .view-protocols .protocol-tab {
  transition: color .16s ease, background .16s ease, box-shadow .16s ease;
}

body.bios-live .view-protocols .protocol-tab:hover {
  color: var(--violet);
  background: rgba(91, 77, 240, .08);
}

body.bios-live .view-protocols .protocol-tab:focus-visible {
  outline: 3px solid rgba(91, 77, 240, .24);
  outline-offset: 2px;
}

body.bios-live .bios-live-protocols {
  min-height: 320px;
  padding: 28px;
  background: var(--card);
}

body.bios-live .bios-protocol-empty-state {
  min-height: 264px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

body.bios-live .bios-protocol-empty-state h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

body.bios-live .bios-protocol-empty-state p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

body.bios-live .bios-protocol-list {
  display: grid;
  gap: 12px;
}

body.bios-live .bios-protocol-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--hair);
  border-radius: 8px;
}

body.bios-live .bios-protocol-card h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

body.bios-live .bios-protocol-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.bios-live .bios-protocol-card .bios-protocol-next-action {
  margin-top: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

body.bios-live .bios-protocol-card .bios-protocol-next-action.clarification_required {
  color: #9a6812;
}

body.bios-live .bios-protocol-status {
  color: var(--violet);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 720px) {
  body.bios-live .view-protocols > .protocol-tabs {
    display: grid;
  }

  body.bios-live .bios-live-protocols {
    padding: 18px;
  }

  body.bios-live .bios-protocol-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

body.bios-live .view-profile > .profile-hero,
body.bios-live .view-profile > .profile-section,
body.bios-live .view-profile > .protected-banner {
  display: none !important;
}

body.bios-live .view-profile > .page-head .topbar-right { display: none; }

body.bios-live .main .topbar-right > .avatar,
body.bios-live .main .topbar-right > .bios-topbar-profile-avatar {
  display: none !important;
}

body.bios-live .sidebar .profile:hover {
  background: rgba(91, 77, 240, .08);
  box-shadow: 0 0 0 2px rgba(91, 77, 240, .1);
}

body.bios-live .bios-profile-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  object-fit: cover;
}

body.bios-live .bios-avatar-hidden { display: none; }

body.bios-live .bios-live-profile-panel {
  display: grid;
  gap: 20px;
}

body.bios-live .bios-profile-hero-live {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 28px;
}

body.bios-live .bios-profile-photo-wrap {
  position: relative;
  width: 112px;
  height: 112px;
}

body.bios-live .bios-profile-photo-live {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #cfc7f7, #8fa0ff);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
}

body.bios-live .bios-profile-photo-live img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.bios-live .bios-profile-photo-button {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

body.bios-live .bios-profile-identity-live h2 {
  margin: 0 0 7px;
  font-size: 24px;
}

body.bios-live .bios-profile-identity-live p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

body.bios-live .bios-profile-details-live { padding: 28px; }

body.bios-live .bios-profile-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

body.bios-live .bios-profile-heading h2 { margin: 0 0 6px; }
body.bios-live .bios-profile-heading p { margin: 0; color: var(--muted); }

body.bios-live .bios-profile-facts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

body.bios-live .bios-profile-facts-list .bios-live-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 7px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

body.bios-live .bios-profile-facts-list .bios-live-row:nth-child(odd) {
  border-right: 1px solid var(--line);
}

body.bios-live .bios-profile-facts-list span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  line-height: 1.35;
}

body.bios-live .bios-profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.bios-live .bios-profile-form[hidden] { display: none; }

body.bios-live .bios-profile-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

body.bios-live .bios-profile-form input,
body.bios-live .bios-profile-form select {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

body.bios-live .bios-profile-form input:focus,
body.bios-live .bios-profile-form select:focus {
  outline: 3px solid rgba(91, 77, 240, .14);
  border-color: var(--violet);
}

body.bios-live .bios-profile-form input[readonly] {
  background: var(--surface-tint);
  color: var(--muted);
}

body.bios-live .bios-profile-email-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.bios-live .bios-live-access-panel {
  display: grid;
  gap: 18px;
  max-width: 1040px;
  margin: 0 auto;
}

body.bios-live .bios-access-heading,
body.bios-live .bios-access-list,
body.bios-live .bios-access-form {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 8px;
}

body.bios-live .bios-access-heading h1,
body.bios-live .bios-access-list h2,
body.bios-live .bios-access-form h2 { margin: 0 0 7px; }
body.bios-live .bios-access-heading p,
body.bios-live .bios-access-form-heading p,
body.bios-live .bios-access-row p { margin: 0; color: var(--muted); }

body.bios-live .bios-access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--hair);
}

body.bios-live .bios-access-row code { display: block; margin-top: 8px; font-size: 12px; }
body.bios-live .bios-access-row > div:last-child { display: flex; gap: 8px; }
body.bios-live .bios-access-revoke { color: #b4233a; }

body.bios-live .bios-access-form { display: grid; gap: 16px; }
body.bios-live .bios-access-form label { display: grid; gap: 7px; font-size: 14px; font-weight: 650; }
body.bios-live .bios-access-form input[type="text"],
body.bios-live .bios-access-form select {
  width: 100%; min-width: 0; height: 46px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
body.bios-live .bios-access-form fieldset { display: grid; gap: 10px; margin: 0; padding: 16px; border: 1px solid var(--hair); border-radius: 8px; }
body.bios-live .bios-access-form fieldset label { display: flex; align-items: center; gap: 9px; font-weight: 500; }
body.bios-live .bios-access-form input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--violet); }
body.bios-live .bios-access-pilot-note { margin: 0; color: var(--muted); font-size: 12px; }
body.bios-live .bios-access-form > .btn-primary { justify-self: start; }

.bios-access-step-up { width: min(440px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 8px; }
.bios-access-step-up::backdrop { background: rgba(24, 28, 39, .54); }
.bios-access-step-up-form { display: grid; gap: 16px; padding: 24px; }
.bios-access-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bios-access-dialog-heading h2 { margin: 4px 0 0; font-size: 20px; }
.bios-access-dialog-heading button { width: 38px; height: 38px; border: 1px solid var(--hair); border-radius: 50%; background: #fff; }
.bios-access-step-up-form label { display: grid; gap: 7px; font-size: 14px; font-weight: 650; }
.bios-access-step-up-form input { height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; }
.bios-access-error { min-height: 18px; margin: 0; color: #b4233a; font-size: 13px; }
.bios-access-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 720px) {
  body.bios-live .bios-access-row { align-items: flex-start; flex-direction: column; }
  body.bios-live .bios-access-row > div:last-child { width: 100%; }
  body.bios-live .bios-access-row button { flex: 1; }
}

body.bios-live .bios-profile-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
}

@media (max-width: 760px) {
  body.bios-live .sidebar {
    padding: 18px 20px;
    gap: 10px;
  }
  body.bios-live .sidebar .brand {
    width: 100%;
    padding: 0 4px 10px;
  }
  body.bios-live .sidebar .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  body.bios-live .sidebar .nav-item {
    width: 100%;
    padding: 10px;
    font-size: 13px;
  }
  body.bios-live .sidebar-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }
  body.bios-live .sidebar-foot .help { display: none; }
  body.bios-live .sidebar-foot .profile { min-width: 0; }
  body.bios-live .bios-live-logout {
    width: auto;
    margin: 0;
    white-space: nowrap;
  }
  body.bios-live .bios-profile-hero-live { grid-template-columns: minmax(0, 1fr); }
  body.bios-live .bios-profile-hero-live > .btn-soft { grid-column: 1 / -1; width: 100%; }
  body.bios-live .bios-profile-facts-list,
  body.bios-live .bios-profile-form { grid-template-columns: 1fr; }
  body.bios-live .bios-profile-facts-list .bios-live-row:nth-child(odd) { border-right: 0; }
  body.bios-live .bios-profile-email-note,
  body.bios-live .bios-profile-actions { grid-column: 1; }
}

/* Keep every command visibly interactive without changing its layout. */
body.bios-live button,
body.bios-live [role="button"],
body.bios-live .chip,
body.bios-live .settings-row[data-open-view],
body.bios-live .privacy-row[data-open-view] {
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease,
    box-shadow .16s ease, filter .16s ease, transform .16s ease;
}

body.bios-live button:not(:disabled):hover,
body.bios-live [role="button"]:not([aria-disabled="true"]):hover,
body.bios-live .chip:hover {
  border-color: rgba(8, 124, 240, .42);
  box-shadow: 0 0 0 3px rgba(8, 124, 240, .09);
  filter: brightness(.98);
}

body.bios-live .home-chat-upload,
body.bios-live .composer-plus {
  border-radius: 50%;
}

body.bios-live .btn-primary:not(:disabled):hover,
body.bios-live .btn-danger:not(:disabled):hover,
body.bios-live .home-chat-send:not(:disabled):hover,
body.bios-live .composer-send:not(:disabled):hover {
  box-shadow: 0 7px 18px rgba(8, 124, 240, .22);
  filter: brightness(.96);
  transform: translateY(-1px);
}

body.bios-live .home-chat-upload:not(:disabled):hover,
body.bios-live .composer-plus:not(:disabled):hover,
body.bios-live .chat-intro-close:not(:disabled):hover,
body.bios-live .bios-document-close:not(:disabled):hover,
body.bios-live .bios-upload-close:not(:disabled):hover,
body.bios-live .bios-pending-attachment button:not(:disabled):hover {
  border-color: rgba(8, 124, 240, .38);
  background: var(--violet-soft);
  color: var(--violet);
  box-shadow: 0 0 0 3px rgba(8, 124, 240, .09);
  filter: none;
}

body.bios-live button:not(:disabled):active,
body.bios-live [role="button"]:not([aria-disabled="true"]):active,
body.bios-live .chip:active {
  transform: translateY(1px);
}

body.bios-live button:focus-visible,
body.bios-live [role="button"]:focus-visible,
body.bios-live .chip:focus-visible,
body.bios-live .settings-row[data-open-view]:focus-visible,
body.bios-live .privacy-row[data-open-view]:focus-visible {
  outline: 3px solid rgba(8, 124, 240, .24);
  outline-offset: 3px;
}

body.bios-live button:disabled,
body.bios-live [role="button"][aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .55;
  box-shadow: none;
  filter: none;
}

body.bios-live .chat-thread .bubble { white-space: pre-wrap; }
body.bios-live .consent-native-checkbox {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  accent-color: var(--violet);
}

.bios-live-panel { margin-top: 22px; padding: 28px; }
.bios-live-panel h2 { margin: 0 0 8px; font-size: 20px; }
.bios-live-panel p { margin: 0; color: var(--muted); line-height: 1.6; }
.bios-live-list { display: grid; gap: 12px; margin-top: 20px; }
.bios-live-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.bios-live-row:first-child { border-top: 0; }
.bios-live-row b { display: block; overflow-wrap: anywhere; }
.bios-live-row span { color: var(--muted); font-size: 13px; }
.bios-live-status { white-space: nowrap; font-weight: 800; color: var(--violet) !important; }
.bios-consent-trailing { display: grid; justify-items: end; gap: 9px; }
.bios-consent-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.bios-consent-actions .btn-soft,
.bios-consent-withdraw { min-height: 36px; padding: 7px 11px; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.bios-consent-withdraw { border: 1px solid #d5d1df; background: #fff; color: #7b3344; }
.bios-consent-actions button:disabled { cursor: wait; opacity: .58; }
.bios-live-toast { position: fixed; right: 24px; bottom: 24px; z-index: 1000; max-width: min(420px, calc(100vw - 48px)); padding: 14px 18px; border-radius: 8px; background: #242235; color: #fff; box-shadow: 0 14px 40px rgba(32,28,69,.24); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.bios-live-toast.show { opacity: 1; transform: translateY(0); }
.bios-settings-row-button { width: 100%; grid-template-columns: 1fr auto; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.bios-settings-row-button:hover { background: var(--surface-tint); }
.bios-settings-row-button > span:first-child { min-width: 0; }

.bios-billing-settings {
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(10, 117, 230, .14);
  background: linear-gradient(145deg, #fff 0%, #f5faff 100%);
}
.bios-billing-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.bios-billing-heading small { color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.bios-billing-heading h2 { margin: 4px 0 0; }
.bios-billing-price { color: var(--blue); font-size: 24px; font-weight: 800; white-space: nowrap; }
.bios-billing-price small { font-size: 14px; font-weight: 600; }
.bios-billing-copy { margin: 0; color: var(--muted); line-height: 1.55; }
.bios-billing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.bios-billing-consent { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 420px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.bios-billing-consent input { margin-top: 3px; accent-color: var(--blue); }
.bios-billing-history { display: grid; gap: 10px; padding-top: 4px; }
.bios-billing-history:empty { display: none; }
.bios-billing-history h3 { margin: 0 0 2px; font-size: 15px; }
.bios-billing-history-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(10,117,230,.12); }
.bios-billing-history-row > span:first-child { display: grid; gap: 3px; }
.bios-billing-history-row small { color: var(--muted); }
.bios-billing-refund-status { color: var(--muted); font-size: 13px; text-align: right; }
.bios-billing-refund-form { display: flex; align-items: center; gap: 8px; }
.bios-billing-refund-form select { min-height: 38px; max-width: 220px; padding: 0 34px 0 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); }
@media (max-width: 680px) {
  .bios-billing-heading { flex-direction: column; gap: 8px; }
  .bios-billing-actions .btn-primary, .bios-billing-actions .btn-outline { width: 100%; }
  .bios-billing-history-row, .bios-billing-refund-form { align-items: stretch; flex-direction: column; }
  .bios-billing-refund-form select { max-width: none; width: 100%; }
}
.bios-settings-arrow { color: var(--muted); font-size: 24px; line-height: 1; }
.bios-settings-single { grid-template-columns: minmax(0, 1fr) !important; }
.bios-telegram-settings { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.bios-telegram-settings h2 { margin: 0 0 8px; }
.bios-telegram-settings p { margin: 0; color: var(--muted); line-height: 1.55; }
.bios-telegram-settings .btn-primary { flex: 0 0 auto; }
@media (max-width: 680px) {
  .bios-telegram-settings { align-items: stretch; flex-direction: column; }
  .bios-telegram-settings .btn-primary { width: 100%; }
}
.bios-confirm-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid rgba(13,35,59,.12); border-radius: 8px; background: #fff; color: #0d233b; box-shadow: 0 28px 80px rgba(8,29,51,.24); }
.bios-confirm-dialog::backdrop { background: rgba(5,18,31,.46); backdrop-filter: blur(8px); }
.bios-confirm-dialog-panel { padding: 30px; }
.bios-confirm-dialog h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.2; }
.bios-confirm-dialog p { margin: 0; color: #5f6f7d; font-size: 14px; line-height: 1.55; }
.bios-confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.bios-live-empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.bios-live-pdf { display: block; width: 100%; min-height: 68vh; border: 0; background: #fff; }
.bios-profile-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.bios-profile-heading .btn-soft { flex: 0 0 auto; }
.bios-profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.bios-profile-form[hidden] { display: none; }
.bios-profile-form label { display: grid; gap: 8px; min-width: 0; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.bios-profile-form input,
.bios-profile-form select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.bios-profile-form input:focus,
.bios-profile-form select:focus { border-color: var(--violet); outline: 2px solid rgba(105, 84, 255, .14); }
.bios-profile-actions { display: flex; align-items: center; gap: 12px; grid-column: 1 / -1; }
.bios-live-logout { width: 100%; margin-top: 12px; }
.bios-live-health-summary { margin-bottom: 22px; }
.bios-health-latest { display: grid; gap: 6px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.bios-health-latest span { color: var(--ink-2); line-height: 1.55; }
.bios-memory-record,
.bios-result-record { display: grid; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); }
.bios-memory-section-title { margin: 18px 0 0; color: var(--ink); font-size: 15px; }
.bios-memory-section-title:first-child { margin-top: 0; }
.bios-memory-record.is-history { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-tint); }
.bios-memory-record.is-history + .bios-memory-record.is-history { margin-top: -4px; }
.bios-memory-period { color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.bios-memory-record:first-child,
.bios-result-record:first-child { border-top: 0; }
.bios-memory-record-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.bios-memory-record-head time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.bios-memory-record p,
.bios-result-record p { margin: 0; color: var(--ink-2); white-space: pre-wrap; }
.bios-memory-record small { color: var(--muted); line-height: 1.5; }
.bios-memory-provenance { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 12px; }
.bios-memory-action { justify-self: start; padding: 5px 8px; border-radius: 6px; background: #f1efff; color: var(--violet); font-size: 12px; font-weight: 700; }
.bios-message-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bios-message-attachments span,
.bios-pending-attachment { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-2); font-size: 12px; }
.bios-pending-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.bios-pending-attachment > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bios-pending-attachment button { width: 20px; height: 20px; border: 0; padding: 0; background: transparent; color: var(--muted); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.bios-chat-operation-error { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid #efc8c8; border-radius: 8px; background: #fff8f8; color: #7a3030; font-size: 12px; }
.bios-chat-operation-error button { border: 0; background: transparent; color: var(--violet); font: inherit; font-weight: 700; cursor: pointer; }
.bios-message-text { display: block; min-width: 0; white-space: normal; }
.message.user .bios-message-text { white-space: pre-wrap; }
.bios-message-text p,
.bios-message-text ul,
.bios-message-text ol { margin: 0; }
.bios-message-text p + p,
.bios-message-text p + ul,
.bios-message-text p + ol,
.bios-message-text p + h3,
.bios-message-text p + h4,
.bios-message-text ul + p,
.bios-message-text ol + p,
.bios-message-text ul + h3,
.bios-message-text ul + h4,
.bios-message-text ol + h3,
.bios-message-text ol + h4,
.bios-message-text ul + ul,
.bios-message-text ol + ol,
.bios-message-text h3 + p,
.bios-message-text h4 + p { margin-top: 12px; }
.bios-message-text ul,
.bios-message-text ol { padding-left: 22px; }
.bios-message-text li + li { margin-top: 6px; }
.bios-message-text strong { color: var(--ink); font-weight: 700; }
.bios-message-text h3,
.bios-message-text h4 { margin: 0 0 10px; color: inherit; font-size: 1.04em; font-weight: 780; line-height: 1.35; }
.bios-typewriter-inline-pending { display: none; }
.bios-message-column { display: grid; min-width: 0; gap: 8px; }
.bios-chat-feedback { display: grid; gap: 8px; margin: 2px 0 0 4px; }
.bios-chat-feedback-actions,
.bios-chat-feedback-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.bios-chat-feedback-button { min-height: 30px; padding: 5px 9px; border: 1px solid rgba(28,39,61,.12); border-radius: 999px; background: #fff; color: var(--muted); font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.bios-chat-feedback-button:hover { border-color: rgba(8,124,240,.34); color: #076ed8; }
.bios-chat-feedback-button.is-active { border-color: rgba(8,124,240,.20); background: #edf6ff; color: #076ed8; }
.bios-chat-feedback-reasons { padding-top: 2px; }
.bios-chat-feedback-reasons .bios-chat-feedback-button { background: #f7f9fc; font-weight: 600; }
.bios-chat-intelligence { margin-top: 14px; padding-top: 11px; border-top: 1px solid rgba(28,39,61,.08); color: var(--ink-2); }
.bios-chat-intelligence > summary { display: inline-flex; align-items: center; gap: 7px; color: #076ed8; font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.bios-chat-intelligence > summary::-webkit-details-marker { display: none; }
.bios-chat-intelligence > summary::after { content: "⌄"; font-size: 14px; transform-origin: center; transition: transform .18s ease; }
.bios-chat-intelligence[open] > summary::after { transform: rotate(180deg); }
.bios-chat-intelligence-content { display: grid; gap: 12px; margin-top: 9px; padding: 0; font-size: 12px; line-height: 1.55; }
.bios-chat-intelligence-context { margin: 0; color: #41516b; }
.bios-chat-intelligence-block { display: grid; gap: 5px; }
.bios-chat-intelligence-block strong { color: var(--ink); font-size: 12px; }
.bios-chat-intelligence-block ol { margin: 0; padding-left: 18px; }
.bios-chat-intelligence-block small { color: var(--muted); }
.bios-chat-intelligence-sources { display: grid; gap: 3px; padding-top: 9px; border-top: 1px solid rgba(8,124,240,.10); color: var(--muted); font-size: 11px; }
.bios-chat-citations { display: grid; gap: 8px; padding-top: 9px; border-top: 1px solid rgba(8,124,240,.10); }
.bios-chat-citations > strong { color: var(--ink); font-size: 12px; }
.bios-chat-citation { display: grid; gap: 2px; padding-left: 10px; border-left: 2px solid rgba(8,124,240,.22); }
.bios-chat-citation b { color: #33435a; font-size: 11px; font-weight: 700; }
.bios-chat-citation span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.bios-answer-citations { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bios-answer-citation {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid rgba(91,76,255,.18);
  border-radius: 999px;
  background: rgba(91,76,255,.07);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}
.bios-hypothesis-handoff { display: grid; gap: 7px; margin-top: 10px; padding: 11px 0 4px; border-top: 1px solid rgba(28,39,61,.08); }
.bios-hypothesis-handoff-title { color: #60708a; font-size: 11px; font-weight: 650; }
.bios-hypothesis-handoff-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; color: #26364c; font-size: 12px; }
.bios-hypothesis-handoff-row > span:first-child { font-weight: 600; }
.bios-hypothesis-handoff-status { color: #60708a; }
.bios-hypothesis-handoff-status.is-verified { color: #1e7a54; }
.bios-hypothesis-handoff-status.is-rejected { color: #8a4b4b; }
.bios-hypothesis-handoff-link { padding: 0; border: 0; background: transparent; color: #076ed8; font: inherit; font-weight: 650; cursor: pointer; }
.bios-hypothesis-handoff-link:disabled { opacity: .45; cursor: wait; }
.bios-hypothesis-handoff-review { flex-basis: 100%; margin: 0; color: #4d5e75; line-height: 1.5; }
.bios-thinking-message .bubble {
  min-width: min(520px, 100%);
  min-height: 58px;
  display: grid;
  gap: 11px;
  justify-self: start;
  padding-block: 14px;
  color: var(--muted);
}
.bios-thinking-label { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; }
.bios-thinking-dots {
  width: 30px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
}
.bios-thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
  opacity: .3;
  animation: bios-thinking-dot 1.15s ease-in-out infinite;
}
.bios-thinking-dots span:nth-child(2) { animation-delay: .16s; }
.bios-thinking-dots span:nth-child(3) { animation-delay: .32s; }
@keyframes bios-thinking-dot {
  0%, 70%, 100% { opacity: .28; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}
.bios-typewriter-active::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -.12em;
  background: var(--violet);
  animation: bios-typewriter-caret .7s steps(1, end) infinite;
}
@keyframes bios-typewriter-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .bios-thinking-dots span,
  .bios-typewriter-active::after { animation: none; }
  .bios-thinking-dots span { opacity: .65; transform: none; }
}
.bios-document-row { width: 100%; border: 0; border-bottom: 1px solid var(--hair); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .16s ease; }
.bios-document-row:hover { background: #faf9ff; }
.bios-document-row:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.bios-document-status { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.bios-document-action .bios-document-open { margin-top: 12px; align-self: flex-start; }
.bios-follow-up-list { display: grid; gap: 12px; margin-top: 14px; }
.bios-follow-up-record { border-top: 1px solid var(--line); padding-top: 16px; }
.bios-follow-up-record:first-child { border-top: 0; padding-top: 0; }
.bios-follow-up-record h3 { margin: 0 0 8px; font-size: 16px; }
.bios-follow-up-record p { margin: 0 0 8px; color: var(--muted); }
.bios-follow-up-record ul { margin: 0 0 12px; padding-left: 20px; }
.bios-follow-up-record small { display: block; margin-bottom: 12px; color: var(--muted); }
.bios-follow-up-form { display: grid; gap: 10px; }
.bios-follow-up-form textarea { width: 100%; min-height: 88px; resize: vertical; border: 1px solid var(--line); border-radius: 6px; padding: 12px; font: inherit; color: var(--ink); background: #fff; }
.bios-follow-up-attachments { display: flex; flex-wrap: wrap; gap: 6px; }
.bios-follow-up-attachments span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 12px; color: var(--ink-2); }
.bios-follow-up-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bios-follow-up-actions .btn-primary,.bios-follow-up-actions .btn-soft { min-height: 40px; }
.bios-document-chevron { color: var(--muted); font-size: 24px !important; font-weight: 400 !important; line-height: 1; }
body.bios-modal-open { overflow: hidden; }
.bios-document-modal[hidden] { display: none; }
.bios-document-modal { position: fixed; inset: 0; z-index: 1250; display: grid; place-items: center; padding: 24px; background: rgba(24, 22, 64, .36); }
.bios-document-dialog { position: relative; width: min(680px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 30px; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(24, 22, 64, .24); }
.bios-document-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; }
.bios-document-close:focus-visible { outline: 2px solid var(--violet); border-radius: 4px; }
.bios-document-review-label { display: block; margin: 0 48px 10px 0; color: var(--violet); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.bios-document-dialog h2 { margin: 0 48px 5px 0; font-size: 24px; }
.bios-document-filename { margin: 0 48px 24px 0; color: var(--muted); overflow-wrap: anywhere; }
.bios-document-lead { margin: 0 0 10px; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.55; }
.bios-document-explanation { margin: 0; color: var(--ink-2); line-height: 1.6; }
.bios-document-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 24px 0; border-block: 1px solid var(--line); }
.bios-document-stats > div { display: grid; gap: 4px; min-width: 0; padding: 18px 20px 18px 0; }
.bios-document-stats > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.bios-document-stats b { font-size: 20px; }
.bios-document-stats span { color: var(--muted); font-size: 13px; }
.bios-document-labels { margin-top: 24px; }
.bios-document-labels h3 { margin: 0 0 10px; font-size: 15px; }
.bios-document-labels ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--ink-2); line-height: 1.45; }
.bios-document-action { display: grid; gap: 4px; margin-top: 24px; padding: 16px 0 0 16px; border-top: 1px solid var(--line); border-left: 3px solid #38a169; }
.bios-document-modal.requires-action .bios-document-action { border-left-color: #c47b17; }
.bios-document-action span { color: var(--ink-2); line-height: 1.5; }
.bios-document-retry { justify-self: start; margin-top: 8px; }
.bios-upload-modal[hidden] { display: none; }
.bios-upload-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; background: rgba(24, 22, 64, .36); }
.bios-upload-dialog { position: relative; width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 28px; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(24, 22, 64, .24); }
.bios-upload-dialog h2 { margin: 0 44px 6px 0; font-size: 22px; }
.bios-upload-filename { margin: 0 0 20px; color: var(--muted); overflow-wrap: anywhere; }
.bios-upload-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; }
.bios-upload-options { display: grid; gap: 10px; }
.bios-upload-options button { display: grid; gap: 4px; width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.bios-upload-options button:hover,
.bios-upload-options button:focus-visible { border-color: var(--violet); outline: 2px solid rgba(105, 84, 255, .14); }
.bios-upload-options span { color: var(--muted); font-size: 13px; line-height: 1.45; }

body.bios-live form.privacy-group {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
body.bios-live form.privacy-group > h2 { margin-bottom: 0; }
body.bios-live form.privacy-group > label:not(.form-check) {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}
body.bios-live form.privacy-group input:not([type="checkbox"]),
body.bios-live form.privacy-group select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
body.bios-live form.privacy-group input:focus,
body.bios-live form.privacy-group select:focus {
  border-color: var(--violet);
  outline: 2px solid rgba(105, 84, 255, .14);
}
body.bios-live form.privacy-group .form-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}
body.bios-live form.privacy-group .form-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--violet);
}
body.bios-live form.privacy-group > button { justify-self: start; }

@media (max-width: 760px) {
  .bios-confirm-dialog-panel { padding: 24px 20px 20px; }
  .bios-confirm-dialog-actions { flex-direction: column-reverse; }
  .bios-confirm-dialog-actions button { width: 100%; justify-content: center; }
  .bios-live-panel { padding: 20px; }
  .bios-live-row { align-items: flex-start; flex-direction: column; gap: 5px; }
  .bios-consent-trailing { justify-items: start; width: 100%; }
  .bios-consent-actions { justify-content: flex-start; }
  .bios-live-toast { right: 16px; bottom: 16px; max-width: calc(100vw - 32px); }
  .bios-memory-record-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .bios-document-modal { padding: 12px; }
  .bios-document-dialog { max-height: calc(100vh - 24px); padding: 22px; }
  .bios-document-stats { grid-template-columns: 1fr; }
  .bios-document-stats > div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .bios-document-status { justify-content: flex-start; }
  .bios-upload-modal { padding: 12px; }
  .bios-upload-dialog { max-height: calc(100vh - 24px); padding: 22px; }
  .bios-profile-heading { align-items: stretch; flex-direction: column; }
  .bios-profile-form { grid-template-columns: 1fr; }
}
