/* Native LibreChat retains authentication, keyboard behavior and message rendering. */
/* Keep the rounded composer over the artwork without a rectangular canvas panel. */
.biomed-chat [class*='view-transition-name:chat-form'] {
  background: transparent !important;
}
/* The header owns the persisted effort selection. */
.biomed-chat [data-testid='composer-thinking-button'] {
  display: none;
}
.biomed-auth .login-card {
  margin-left: 48vw;
  width: min(calc(52vw - 64px), 440px);
  border-radius: 24px;
  box-shadow: 0 20px 65px #173f2910;
}
@media (max-width: 850px) {
  .biomed-auth .login-card {
    margin-left: 0;
    width: min(100%, 440px);
  }
}
:root {
  --biomed-ink: #163c35;
  --biomed-lime: #d0ef98;
  --biomed-line: #d9e3da;
  --biomed-paper: #f8faf5;
}
#biomed-auth-hero[hidden] {
  display: none;
}
#biomed-auth-hero {
  position: fixed;
  inset: 18px auto 18px 18px;
  width: calc(48vw - 36px);
  border-radius: 28px;
  overflow: hidden;
  background: #103b32 url('/research/static/branding/research-hero.png') center/cover;
  color: #f8fff3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  box-shadow: 0 24px 70px #0d30252b;
}
#biomed-auth-hero:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #072b2570, transparent 30%, #072b2580 60%, #072b25ef);
  pointer-events: none;
}
.biomed-hero-brand,
.biomed-hero-copy {
  position: relative;
  z-index: 1;
}
.biomed-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.4px;
}
.biomed-hero-brand img {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}
.biomed-hero-copy {
  max-width: 520px;
}
.biomed-hero-copy h2 {
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -1.8px;
  margin: 12px 0 20px;
  font-weight: 650;
  text-wrap: balance;
}
.biomed-hero-copy > p {
  font-size: 16px;
  line-height: 1.65;
  color: #e8f5e8;
  max-width: 420px;
}
.biomed-hero-copy .biomed-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--biomed-lime);
}
.biomed-hero-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.biomed-hero-capabilities span {
  font-size: 11px;
  border: 1px solid #e4ffd533;
  border-radius: 30px;
  padding: 7px 11px;
  background: #0b342780;
  backdrop-filter: blur(10px);
}
body.biomed-auth {
  background: var(--biomed-paper);
}
.biomed-auth #root {
  margin-left: 48vw;
  width: 52vw;
}
.biomed-auth #root [class*='min-h-screen'] {
  background: transparent !important;
}
.biomed-auth main h1 {
  font-weight: 650;
  letter-spacing: -1px;
}
.biomed-auth form input {
  border-radius: 12px;
  min-height: 48px;
}
.biomed-auth form button[type='submit'] {
  border-radius: 12px;
  min-height: 48px;
  box-shadow: 0 5px 15px #1c594b16;
}
.dark body.biomed-auth {
  background: #14211f;
}
/* One continuous workspace background includes the sidebar and chat. */
body.biomed-chat {
  min-height: 100dvh;
  isolation: isolate;
  background: linear-gradient(135deg, #f8faf6, #f2f7f1 50%, #f5f3fa);
}
body.biomed-chat:before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('/research/static/branding/research-hero.png') center/cover;
  opacity: 0.055;
  pointer-events: none;
}
.dark body.biomed-chat {
  background: linear-gradient(135deg, #152923, #14221f 60%, #232334);
}
.dark body.biomed-chat:before {
  opacity: 0.105;
}
.biomed-chat main {
  position: relative;
  isolation: isolate;
  background: transparent !important;
}
.biomed-chat #root .bg-surface-canvas:has(main) {
  background: transparent !important;
}
.biomed-chat aside[aria-label='Control Panel'] .bg-surface-primary-alt {
  background: #f8faf540 !important;
  border-color: #8eaa8c22 !important;
}
.dark .biomed-chat aside[aria-label='Control Panel'] .bg-surface-primary-alt {
  background: #10271f30 !important;
  border-color: #9bbf9b22 !important;
}
.biomed-chat main table {
  display: block;
  max-width: 100%;
  max-height: 370px;
  overflow: auto;
  border: 1px solid var(--biomed-line);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0;
  background: #fffffff2;
  font-size: 13px;
}
.biomed-chat main table th {
  position: sticky;
  top: 0;
  background: #eaf2e5;
  color: #204637;
  text-align: left;
  font-weight: 650;
}
.biomed-chat main table td,
.biomed-chat main table th {
  padding: 10px 14px;
  white-space: nowrap;
}
.biomed-chat main table tbody tr:nth-child(even) {
  background: #f5f8f2;
}
.dark .biomed-chat main table {
  background: #192d27;
  border-color: #365448;
}
.dark .biomed-chat main table th {
  background: #284338;
  color: #dcf3cd;
}
.dark .biomed-chat main table tbody tr:nth-child(even) {
  background: #20382e;
}
.biomed-chat main img[src*='/artifacts/'] {
  border-radius: 14px;
  box-shadow: 0 12px 30px #173f2920;
  max-height: min(650px, calc(100dvh - 210px));
  object-fit: contain;
  background: white;
  margin: 18px 0;
}
.biomed-original-progress {
  display: none !important;
}
.biomed-activity {
  margin: 14px 0 24px;
  padding: 18px 20px;
  border: 1px solid #a5c4a66b;
  border-radius: 16px;
  background: #f9fcf4e8;
  font-size: 13px;
  color: #244d3b;
  max-width: 900px;
}
.biomed-activity h3 {
  font-size: 12px;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
  font-weight: 650;
}
.biomed-phase {
  border-top: 1px solid #dbe7d4;
  padding: 8px 0;
}
.biomed-phase > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 2px 0;
  list-style: disclosure-closed;
}
.biomed-phase[open] > summary {
  list-style: disclosure-open;
}
.biomed-phase > div {
  padding: 8px 4px 12px 18px;
}
.biomed-phase li {
  margin: 4px 0;
}
.biomed-phase pre,
.biomed-evidence-record pre {
  font-size: 11px;
  max-height: 350px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #edf3e8;
  padding: 12px;
  border-radius: 10px;
}
.biomed-evidence-record {
  margin: 8px 0;
}
.biomed-evidence-record summary {
  cursor: pointer;
}
.biomed-evidence-record h4 {
  font-size: 11px;
  text-transform: capitalize;
  margin-top: 10px;
}
.dark .biomed-activity {
  background: #1b3029f0;
  border-color: #45684b;
  color: #cbe1c8;
}
.dark .biomed-phase {
  border-color: #365544;
}
.dark .biomed-phase pre {
  background: #14271e;
}
.biomed-artifacts {
  border: 1px solid #cedecc;
  box-shadow: 0 30px 90px #06281c35;
  font-size: 14px;
}
.biomed-artifacts::backdrop {
  background: #09281d77;
  backdrop-filter: blur(5px);
}
.biomed-artifacts h2 {
  font-size: 25px;
  letter-spacing: -0.7px;
  font-weight: 650;
}
.biomed-artifacts > p {
  font-size: 12px;
  line-height: 1.6;
  color: #496353;
}
.biomed-artifacts button,
.biomed-artifacts a {
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 10px;
  margin: 4px;
  border: 1px solid #b8ccb4;
  font-size: 12px;
}
.biomed-artifacts button:hover,
.biomed-artifacts a:hover {
  background: #e3f0d5;
}
.biomed-artifact-tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.biomed-file-row {
  padding: 14px 0;
  border-top: 1px solid #d5e1cd;
}
.biomed-file-row > p {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.biomed-file-row small {
  display: block;
  color: #627460;
  margin: 5px 0;
}
.biomed-file-preview {
  background: #edf3e5;
  padding: 12px;
  max-height: 220px;
  overflow: auto;
  font-size: 11px;
  white-space: pre-wrap;
}
@media (max-width: 850px) {
  #biomed-auth-hero {
    display: none;
  }
  .biomed-auth #root {
    margin-left: 0;
    width: 100%;
  }
  body.biomed-auth {
    background: linear-gradient(180deg, #e5f1e1, transparent 50%), var(--biomed-paper);
  }
  .dark body.biomed-auth {
    background: linear-gradient(180deg, #203c30, transparent 50%), #14211f;
  }
  .biomed-activity {
    padding: 12px;
  }
  .biomed-chat main img[src*='/artifacts/'] {
    max-height: min(500px, calc(100dvh - 210px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .biomed-chat *,
  #biomed-auth-hero * {
    scroll-behavior: auto !important;
  }
}

.biomed-artifacts {
  background: var(--biomed-paper);
  color: var(--biomed-ink);
}
.dark .biomed-artifacts {
  background: #193128;
  color: #dae9d3;
}
.dark .biomed-artifacts > p,
.dark .biomed-file-row small {
  color: #b6cdb0;
}
.dark .biomed-artifacts button:hover {
  background: #2b4938;
}
.biomed-table-preview {
  padding: 12px 0;
}
.biomed-table-preview > summary {
  cursor: pointer;
  font-weight: 600;
}
.biomed-table-preview p {
  font-size: 12px;
  color: #6b8066;
}

/* Artifact dates, filtering and account storage totals. */
.biomed-artifact-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 8px;
}
.biomed-artifact-filters label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
}
.biomed-artifact-search {
  grid-column: 1/-1;
}
.biomed-artifact-filters input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 9px;
  border: 1px solid #b8ccb4;
  border-radius: 9px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 13px;
}
.biomed-storage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.biomed-storage-summary > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #e7f0e1;
  border-radius: 11px;
}
.biomed-storage-summary span {
  font-size: 11px;
  color: #55734d;
}
.biomed-storage-summary strong {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.5px;
}
.biomed-file-list {
  flex: 1;
  overflow: auto;
  min-height: 100px;
  padding-right: 8px;
}
.biomed-artifacts .biomed-storage-note {
  font-size: 11px;
}
.biomed-artifact-tabs button[aria-pressed='true'] {
  background: #d7e9c8;
  border-color: #7c9f69;
}
.dark .biomed-artifact-filters input {
  background: #11271e;
  border-color: #476950;
  color-scheme: dark;
}
.dark .biomed-storage-summary > div {
  background: #274637;
}
.dark .biomed-storage-summary span {
  color: #b1cba6;
}
.dark .biomed-artifact-tabs button[aria-pressed='true'] {
  background: #365b3c;
  border-color: #719b65;
}
@media (max-width: 650px) {
  .biomed-artifact-filters,
  .biomed-storage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .biomed-storage-summary > div {
    padding: 9px;
  }
  .biomed-storage-summary strong {
    font-size: 17px;
  }
}

.biomed-artifacts {
  margin: auto;
}
.biomed-artifacts[open] {
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.biomed-artifacts[open] > :not(.biomed-file-list) {
  flex-shrink: 0;
}
.biomed-artifact-header,
.biomed-artifact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.biomed-artifact-header {
  justify-content: space-between;
  margin-bottom: 10px;
}
.biomed-artifact-actions {
  margin: 4px 0 8px;
}
.biomed-artifact-header h2 {
  margin: 0;
}
.biomed-artifact-actions input[type='file'] {
  min-width: 0;
  max-width: 100%;
  font-size: 12px;
}
/* Scroll the whole dialog on phones so filters cannot squeeze out the results. */
@media (max-width: 650px) {
  .biomed-artifacts[open] {
    display: block;
  }
  .biomed-file-list {
    overflow: visible;
  }
}
@media (min-width: 901px) {
  .biomed-artifact-filters {
    grid-template-columns: minmax(190px, 2fr) repeat(2, minmax(135px, 1fr)) repeat(
        2,
        minmax(90px, 0.7fr)
      );
  }
  .biomed-artifact-search {
    grid-column: auto;
  }
}
