/* BIOS patient product theme: quiet, precise and shared with the public patient site. */

@font-face {
  font-family: "Inter BIOS";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("/frontend/inter-cyrillic-700-800.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter BIOS";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("/frontend/inter-latin-700-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.bios-auth,
body.bios-live {
  --premium-ink: #0b1020;
  --premium-ink-soft: #151c31;
  --premium-muted: #5f687c;
  --premium-faint: #8a94a4;
  --premium-line: #dce1e8;
  --premium-line-strong: #cbd3de;
  --premium-page: #f4f4f8;
  --premium-surface: #ffffff;
  --premium-soft: #f6f8fc;
  --premium-accent: #087cf0;
  --premium-accent-dark: #173f73;
  --premium-accent-soft: #eef5ff;
  --premium-green: #5578e7;
  --premium-amber: #b56a13;
  --premium-red: #ad3348;
  --premium-shadow: 0 24px 64px rgba(34, 49, 84, .11);
  --premium-shadow-soft: 0 2px 12px rgba(34, 49, 84, .055);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-feature-settings: "kern" 1, "liga" 1;
  letter-spacing: 0;
  color: var(--premium-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.bios-auth *,
body.bios-live * { letter-spacing: 0 !important; }

body.bios-auth :focus-visible,
body.bios-live :focus-visible {
  outline: 3px solid rgba(8, 124, 240, .24) !important;
  outline-offset: 3px;
}

/* Authentication and onboarding */
body.bios-auth {
  --violet: var(--premium-accent);
  --violet-2: var(--premium-accent-dark);
  --grad: linear-gradient(135deg, #111925, #0b1020);
  --ink: var(--premium-ink);
  --ink-soft: var(--premium-ink-soft);
  --muted: var(--premium-muted);
  --muted-2: var(--premium-faint);
  --line: var(--premium-line);
  --field: #f7f9f9;
  --field-line: var(--premium-line);
  --white: var(--premium-surface);
  --page: var(--premium-page);
  --surface: var(--premium-surface);
  --soft: var(--premium-soft);
  --panel-1: #edf1f6;
  --panel-2: #dfe5ee;
  --green: var(--premium-green);
  --r-card: 8px;
  --r-field: 8px;
  --r-btn: 8px;
  min-height: 100%;
  background: var(--premium-page);
}

body.bios-auth .screen { padding: 28px; }
body.bios-auth .screen.active > * { animation: premiumEnter .62s cubic-bezier(.2,.7,.2,1) both; }

body.bios-auth .card,
body.bios-auth .login-card,
body.bios-auth .surface {
  border: 1px solid rgba(13, 24, 32, .08);
  border-radius: 8px;
  box-shadow: var(--premium-shadow);
}

body.bios-auth .card,
body.bios-auth .login-card { min-height: min(760px, calc(100vh - 56px)); }

body.bios-auth .pane,
body.bios-auth .login-pane { padding: 42px 56px 38px; }

body.bios-auth .statusbar,
body.bios-auth .eyebrow { display: none !important; }

body.bios-auth .brand {
  display: block;
  flex: 0 0 136px;
  width: 136px;
  height: 38px;
  overflow: hidden;
  background: url("/frontend/bios-wordmark-dark-original.png") -30px -22px / 190px auto no-repeat;
}
body.bios-auth .brand .mark,
body.bios-auth .brand .name { display: none; }

body.bios-auth .top-login a,
body.bios-auth .forgot,
body.bios-auth .login-bottom a,
body.bios-auth .legal a,
body.bios-auth .consent a {
  color: var(--premium-accent-dark) !important;
}

body.bios-auth .eyebrow {
  color: var(--premium-accent-dark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

body.bios-auth .pane h1,
body.bios-auth .login-copy h1,
body.bios-auth h1.title {
  color: var(--premium-ink);
  font-family: "Inter BIOS", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.06;
  font-synthesis: none;
}

body.bios-auth .pane h1 .accent,
body.bios-auth .login-copy .accent { color: inherit; }

body.bios-auth .lede,
body.bios-auth .sub { color: var(--premium-muted); line-height: 1.38; }

body.bios-auth .field label,
body.bios-auth .about-field label { color: var(--premium-ink-soft); font-weight: 620; }

body.bios-auth .control input,
body.bios-auth .about-input,
body.bios-auth textarea.ob-ta,
body.bios-auth .recovery-dialog input {
  border-color: var(--premium-line);
  border-radius: 8px;
  background: #f8fafa;
  color: var(--premium-ink);
  box-shadow: inset 0 1px 1px rgba(13, 24, 32, .02);
}

body.bios-auth .control input:hover,
body.bios-auth .about-input:hover,
body.bios-auth textarea.ob-ta:hover { border-color: var(--premium-line-strong); }

body.bios-auth .control input:focus,
body.bios-auth textarea.ob-ta:focus,
body.bios-auth .recovery-dialog input:focus {
  border-color: var(--premium-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 124, 240, .1);
}

body.bios-auth .btn-primary {
  border-radius: 8px;
  background: var(--premium-accent);
  box-shadow: 0 8px 20px rgba(8, 124, 240, .18);
  transition: transform .22s cubic-bezier(.2,.7,.2,1), background .22s ease, box-shadow .22s ease;
}

body.bios-auth .btn-primary:hover {
  background: #0670da;
  filter: none;
  box-shadow: 0 10px 24px rgba(8, 124, 240, .22);
  transform: translateY(-1px);
}

body.bios-auth .btn-ghost,
body.bios-auth .btn-oauth {
  border-color: var(--premium-line);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
}

body.bios-auth .btn-ghost:hover,
body.bios-auth .btn-oauth:hover { border-color: var(--premium-line-strong); background: #fff; }

body.bios-auth .visual,
body.bios-auth .login-visual {
  position: relative;
  isolation: isolate;
  justify-content: center;
  overflow: hidden;
  padding: 56px;
  border-left: 1px solid var(--premium-line);
  background: #f2f3f5;
}

body.bios-auth .visual::before,
body.bios-auth .login-visual::before { display: none; }

body.bios-auth .visual .stage,
body.bios-auth .login-orbit { display: none; }

body.bios-auth .benefits,
body.bios-auth .login-visual h2 {
  position: relative;
  z-index: 1;
  width: 100%;
  color: var(--premium-ink);
  text-align: left;
  text-shadow: none;
}

body.bios-auth .benefits { width: 100%; margin: 0; }
body.bios-auth .benefits h3,
body.bios-auth .login-visual h2 {
  max-width: 430px;
  color: var(--premium-ink);
  font-family: "Inter BIOS", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.08;
  font-synthesis: none;
}
body.bios-auth .benefits ul { display: none; }
body.bios-auth .login-visual h2 .accent { color: inherit; }

body.bios-auth .surface { background: rgba(255,255,255,.97); }

body.bios-auth .opt,
body.bios-auth .choice-btn,
body.bios-auth .dcard,
body.bios-auth .aside-card {
  border-color: var(--premium-line);
  border-radius: 8px;
  background: #fff;
}

body.bios-auth .opt:hover,
body.bios-auth .choice-btn:hover { border-color: var(--premium-accent); background: var(--premium-soft); }

body.bios-auth .opt.sel,
body.bios-auth .choice-btn.sel {
  border-color: var(--premium-accent);
  background: var(--premium-accent-soft);
  color: var(--premium-accent-dark);
  box-shadow: 0 0 0 3px rgba(8, 124, 240, .09);
}

body.bios-auth .opt.sel .radio,
body.bios-auth .consent input:checked { border-color: var(--premium-accent); background: var(--premium-accent); }
body.bios-auth .steps .bar.on { background: var(--premium-accent); }
body.bios-auth .aside-orb { background: #edf3f4; box-shadow: none; }
body.bios-auth .recovery-dialog { border-radius: 8px; box-shadow: var(--premium-shadow); }
body.bios-auth .recovery-dialog::backdrop { background: rgba(10, 20, 25, .48); backdrop-filter: blur(8px); }

/* Recolor the legacy inline artwork where it remains visible during onboarding. */
body.bios-auth svg [stroke="#6d5cf0"],
body.bios-auth svg [stroke="#7c6bf3"],
body.bios-auth svg [stroke="#4438ff"],
body.bios-auth svg [stroke="#8f7bf3"] { stroke: var(--premium-accent); }
body.bios-auth svg [fill="#6d5cf0"],
body.bios-auth svg [fill="#7c6bf3"],
body.bios-auth svg [fill="#8d7cf0"] { fill: var(--premium-accent); }

/* Patient dashboard */
body.bios-live {
  --violet: var(--premium-accent);
  --indigo: var(--premium-accent-dark);
  --peri: #8facff;
  --blue: #087cf0;
  --violet-soft: #e5edff;
  --violet-tint: #f2f6ff;
  --card: var(--premium-surface);
  --surface: var(--premium-soft);
  --surface-tint: #f2f5fa;
  --ink: var(--premium-ink);
  --ink-2: var(--premium-ink-soft);
  --muted: var(--premium-muted);
  --faint: var(--premium-faint);
  --hair: rgba(13, 24, 32, .09);
  --line: var(--premium-line);
  --r: 8px;
  --sh-card: 0 6px 22px rgba(23, 42, 50, .055);
  --sh-hover: 0 12px 32px rgba(23, 42, 50, .09);
  --sh-btn: 0 10px 24px rgba(13, 24, 32, .16);
  background: var(--premium-page);
}

body.bios-live .app { grid-template-columns: 264px minmax(0, 1fr); }

body.bios-live .sidebar {
  border-right-color: var(--premium-line);
  background: rgba(255,255,255,.86);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

body.bios-live .brand {
  display: block;
  width: 136px;
  height: 38px;
  overflow: hidden;
  background: url("/frontend/bios-wordmark-dark-original.png") -30px -22px / 190px auto no-repeat;
}
body.bios-live .brand-mark,
body.bios-live .brand-name { display: none; }

body.bios-live .nav { gap: 5px; }
body.bios-live .nav-item { min-height: 44px; border-radius: 8px; color: #56666f; font-weight: 570; }
body.bios-live .nav-item:hover { background: #eef2f7; color: var(--premium-ink); }
body.bios-live .nav-item.active {
  background: #eceef2;
  color: var(--premium-ink);
  box-shadow: none;
}
body.bios-live .nav-item.active svg { color: var(--premium-ink); }
body.bios-live .nav-lock { background: #e8ecf2; color: #748091; }

body.bios-live .profile,
body.bios-live .help { border-radius: 8px; }
body.bios-live .profile:hover,
body.bios-live .sidebar .profile:hover { background: #edf1f6; box-shadow: none; }
body.bios-live .help { border-color: var(--premium-line); background: #f2f5f9; }
body.bios-live .help .btn-chat {
  border-radius: 8px;
  background: var(--premium-accent);
  box-shadow: none;
}

body.bios-live .avatar rect:first-of-type { fill: #b8c2d2; }
body.bios-live .pulse-line polyline { stroke: var(--premium-accent); }

body.bios-live .main { width: 100%; max-width: 1440px; padding: 42px 52px 56px; }
body.bios-live .greeting h1,
body.bios-live .page-head h1 {
  color: var(--premium-ink);
  font-family: "Inter BIOS", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  font-synthesis: none;
}

body.bios-live h2,
body.bios-live h3 {
  font-family: "Inter BIOS", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
body.bios-live .greeting p,
body.bios-live .page-head p { color: var(--premium-muted); }

body.bios-live .panel,
body.bios-live .card,
body.bios-live .bios-live-profile-panel > *,
body.bios-live .bios-result-record,
body.bios-live .bios-memory-record {
  border-color: var(--premium-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--premium-shadow-soft);
}

body.bios-live .panel:hover { box-shadow: var(--premium-shadow-soft); }

body.bios-live .btn-primary,
body.bios-live .consent-submit,
body.bios-live [data-accept-consent] {
  border-radius: 8px;
  background: var(--premium-accent);
  box-shadow: none;
}

body.bios-live .btn-primary:hover,
body.bios-live .consent-submit:hover,
body.bios-live [data-accept-consent]:hover {
  background: #0670da;
  box-shadow: 0 8px 20px rgba(8, 124, 240, .18);
}

body.bios-live .voice-btn,
body.bios-live .composer-send,
body.bios-live .consent-icon,
body.bios-live .pdf-logo,
body.bios-live .create-step,
body.bios-live .invite-plus {
  background: var(--premium-accent) !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.bios-live .protocol-tab.active,
body.bios-live .data-tab.active,
body.bios-live .grant-tab.active,
body.bios-live .duration-btn.active,
body.bios-live .page-btn.active,
body.bios-live .format-card.active,
body.bios-live .structure-row.active {
  border-color: #e0e3e8 !important;
  background: #eceef2 !important;
  color: var(--premium-ink) !important;
  box-shadow: none !important;
}

body.bios-live .chip svg,
body.bios-live .chip.sleep svg,
body.bios-live .chip.energy svg,
body.bios-live .chip.lab svg,
body.bios-live .chip.stress svg {
  color: #5578e7 !important;
  stroke: currentColor !important;
}

body.bios-live .consent-info-icon,
body.bios-live .step-icon,
body.bios-live .system-chip svg,
body.bios-live .metric-card svg,
body.bios-live .source-icon:not(.apple):not(.garmin),
body.bios-live .success-feature-icon,
body.bios-live .success-feature-icon.green,
body.bios-live .success-feature-icon.gold {
  color: #5578e7 !important;
  background: #eef4fd !important;
}

body.bios-live .btn-outline,
body.bios-live .btn-soft,
body.bios-live .btn-secondary {
  border-color: var(--premium-line-strong);
  border-radius: 8px;
  color: var(--premium-ink-soft);
  background: #fff;
}

body.bios-live .link,
body.bios-live .bios-protocol-status,
body.bios-live .notifications-head button,
body.bios-live .bios-memory-action { color: var(--premium-accent-dark); }

body.bios-live input,
body.bios-live textarea,
body.bios-live select,
body.bios-live .chat-input,
body.bios-live .home-chat-input {
  border-color: var(--premium-line) !important;
  border-radius: 8px !important;
  background: #fff;
}

body.bios-live input:focus,
body.bios-live textarea:focus,
body.bios-live select:focus,
body.bios-live .chat-input:focus,
body.bios-live .home-chat-input:focus {
  border-color: var(--premium-accent) !important;
  box-shadow: 0 0 0 4px rgba(8, 124, 240, .09) !important;
  outline: 0 !important;
}

body.bios-live .bell {
  border-color: var(--premium-line);
  border-radius: 50%;
  box-shadow: var(--premium-shadow-soft);
}
body.bios-live .bell .badge { background: var(--premium-amber); border-color: var(--premium-page); box-shadow: none; }
body.bios-live .notifications-popover {
  border-color: var(--premium-line);
  border-radius: 8px;
  box-shadow: var(--premium-shadow);
}
body.bios-live .notification-dot { background: var(--premium-accent); }

body.bios-live .message.ai,
body.bios-live .bios-assistant-message { border-color: var(--premium-line); background: #fff; }
body.bios-live .message.user,
body.bios-live .bios-user-message { border-color: #cfdaee; background: #f0f5fd; }
body.bios-live .bios-thinking-dots span { background: var(--premium-accent); }

body.bios-live .bios-document-row:hover { background: #f4f7fb; }
body.bios-live .bios-memory-action { background: #eef4fd; }
body.bios-live .bios-profile-photo-live { background: #b8c2d2; }
body.bios-live .bios-profile-photo-button { background: var(--premium-accent); }

body.bios-live .bios-document-modal,
body.bios-live .bios-upload-modal { background: rgba(10, 20, 25, .48); backdrop-filter: blur(8px); }
body.bios-live .bios-document-dialog,
body.bios-live .bios-upload-dialog,
body.bios-live dialog { border-radius: 8px; box-shadow: var(--premium-shadow); }

body.bios-live svg [stroke="#5B4DF0"],
body.bios-live svg [stroke="#6B5CF6"],
body.bios-live svg [stroke="#7466FF"],
body.bios-live svg [stroke="#8B83FF"] { stroke: var(--premium-accent); }
body.bios-live svg [fill="#5B4DF0"],
body.bios-live svg [fill="#6B5CF6"],
body.bios-live svg [fill="#7466FF"] { fill: var(--premium-accent); }

@keyframes premiumEnter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  body.bios-auth .screen { padding: 0; }
  body.bios-auth .card,
  body.bios-auth .login-card,
  body.bios-auth .surface {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #f7f9f9;
  }
  body.bios-auth .pane,
  body.bios-auth .login-pane { padding: 22px 26px 36px; }
  body.bios-auth .pane h1,
  body.bios-auth .login-copy h1 { font-size: 36px; }

  body.bios-live .app { grid-template-columns: 1fr; }
  body.bios-live .main { padding: 28px 22px 110px; }
  body.bios-live .sidebar { box-shadow: 0 -10px 30px rgba(23,42,50,.08); }
}

@media (max-width: 520px) {
  body.bios-auth .pane,
  body.bios-auth .login-pane { padding-inline: 20px; }
  body.bios-auth .pane h1,
  body.bios-auth .login-copy h1,
  body.bios-auth h1.title { font-size: 34px; line-height: 1.05; }
  body.bios-live .main { padding-inline: 16px; }
  body.bios-live .greeting h1,
  body.bios-live .page-head h1 { font-size: 26px; }
}

@media (max-width: 760px) {
  body.bios-live .app { display: block; }
  body.bios-live .sidebar {
    position: fixed;
    z-index: 80;
    inset: auto 0 0;
    display: block;
    width: 100%;
    height: auto;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--premium-line);
    border-right: 0;
    background: rgba(255,255,255,.96);
    box-shadow: 0 -12px 34px rgba(34,49,84,.1);
    backdrop-filter: blur(24px) saturate(1.15);
  }

  body.bios-live .sidebar > .brand,
  body.bios-live .sidebar > .pulse-line,
  body.bios-live .sidebar-foot { display: none !important; }

  body.bios-live .sidebar .nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  body.bios-live .sidebar .nav-item {
    display: flex;
    min-width: 0;
    min-height: 58px;
    padding: 7px 3px 6px;
    border-radius: 8px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    font-size: 10.5px;
    line-height: 1.05;
    text-align: center;
  }

  body.bios-live .sidebar .nav-item svg { width: 20px; height: 20px; }
  body.bios-live .sidebar .nav-item.active { box-shadow: none; }
  body.bios-live .nav-lock {
    top: 5px;
    right: calc(50% - 23px);
    width: 15px;
    height: 15px;
  }
  body.bios-live .nav-lock svg { width: 9px; height: 9px; }

  body.bios-live .main {
    padding: 24px 16px calc(92px + env(safe-area-inset-bottom));
  }
}

/* Live controlled-access invitation flow. */
.personal-grant-layout {
  align-items: start;
}

.personal-grant-form {
  display: grid;
  gap: 24px;
}

.personal-grant-form .grant-step,
.personal-pending-invitations {
  margin: 0;
  padding: 30px 32px;
  border: 1px solid var(--line, #dce5ee);
  border-radius: 26px;
  background: #fff;
  box-shadow: none;
}

.personal-step-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.personal-step-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #1478d4;
  background: #eaf5ff;
  font-weight: 750;
}

.personal-step-heading h2,
.personal-step-heading p {
  margin: 0;
}

.personal-step-heading p {
  margin-top: 5px;
  color: #7d8da3;
}

.personal-grant-form label:not(.grant-row) {
  display: grid;
  gap: 9px;
  color: #536985;
  font-weight: 700;
}

.personal-grant-form input[type="email"],
.personal-grant-form input[type="date"] {
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid #d8e3ed;
  border-radius: 17px;
  color: #14243b;
  background: #fff;
  font: inherit;
}

.personal-live-scope-list .grant-row {
  position: relative;
  cursor: pointer;
}

.personal-live-scope-list .grant-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.personal-live-scope-list .grant-row small {
  display: block;
  margin-top: 4px;
  color: #8494a9;
  font-size: .92rem;
  font-weight: 450;
}

.personal-live-scope-list input:checked + .check-square {
  border-color: #1d86e5;
  background: #1d86e5;
}

.personal-live-scope-list input:checked + .check-square::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.personal-custom-period {
  max-width: 330px;
  margin-top: 18px;
}

.personal-context-card {
  position: sticky;
  top: 24px;
  padding: 34px;
  border: 1px solid #cfe3f5;
  border-radius: 28px;
  background: linear-gradient(150deg, #f7fbff 0%, #edf7ff 100%);
}

.personal-context-card h2 {
  margin: 18px 0 12px;
  color: #14243b;
  font-size: clamp(25px, 2vw, 34px);
  line-height: 1.13;
}

.personal-context-card > p,
.personal-context-card span {
  color: #71849b;
  line-height: 1.55;
}

.personal-context-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #d5e6f4;
}

.personal-context-facts b {
  color: #27405f;
}

.personal-pending-invitations {
  margin-top: 24px;
}

.personal-pending-invitations article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid #e3eaf0;
}

.personal-pending-invitations p {
  margin: 4px 0 0;
  color: #8292a7;
}

.personal-invitation-result input[readonly] {
  width: 100%;
}

@media (max-width: 980px) {
  .personal-context-card { position: static; }
}

@media (max-width: 680px) {
  .personal-grant-form .grant-step,
  .personal-pending-invitations { padding: 22px 18px; }
  .personal-pending-invitations article { align-items: flex-start; flex-direction: column; }
}
/* --------------------------------------------------------------------------
   BIOS product system v2: quiet confidence, clear hierarchy, one blue accent.
   This final layer intentionally replaces the earlier transitional styling.
   -------------------------------------------------------------------------- */

body.bios-auth,
body.bios-live {
  --premium-ink: #1d1d1f;
  --premium-ink-soft: #34343a;
  --premium-muted: #6e6e73;
  --premium-faint: #929298;
  --premium-line: #dedee3;
  --premium-line-strong: #c8c8ce;
  --premium-page: #f5f5f7;
  --premium-surface: #ffffff;
  --premium-soft: #f7f7f9;
  --premium-accent: #1688ff;
  --premium-accent-dark: #006dcc;
  --premium-accent-soft: #eef6ff;
  --premium-selection: #f4f6fa;
  --premium-selection-hover: #f7f8fb;
  --premium-amber: #b55f00;
  --premium-red: #b4233a;
  --premium-shadow: 0 26px 80px rgba(0, 0, 0, .08);
  --premium-shadow-soft: 0 1px 2px rgba(0, 0, 0, .025);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Arial, sans-serif;
  font-feature-settings: "kern" 1, "liga" 1;
  letter-spacing: 0;
}

body.bios-auth *,
body.bios-live * {
  letter-spacing: 0 !important;
}

body.bios-auth :focus-visible,
body.bios-live :focus-visible {
  outline: 3px solid rgba(22, 136, 255, .22) !important;
  outline-offset: 3px;
}

/* Entry screens */
body.bios-auth #screen-register,
body.bios-auth #screen-login {
  min-height: 100svh;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: #fff;
}

body.bios-auth #screen-register .card,
body.bios-auth #screen-login .login-card {
  display: grid;
  width: min(1440px, 100%);
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body.bios-auth #screen-register .pane,
body.bios-auth #screen-login .login-pane {
  display: flex;
  width: 100%;
  min-height: 0;
  padding: 72px clamp(64px, 7vw, 112px) 52px;
  justify-content: center;
}

body.bios-auth #screen-register .pane > h1,
body.bios-auth #screen-register .pane > .lede,
body.bios-auth #screen-register .pane > form,
body.bios-auth #screen-register .pane > .auth-switch,
body.bios-auth #screen-login .login-copy,
body.bios-auth #screen-login .login-form,
body.bios-auth #screen-login .login-bottom {
  width: 100%;
  max-width: 460px;
  align-self: center;
}

body.bios-auth #screen-register .pane > h1,
body.bios-auth #screen-login .login-copy h1 {
  max-width: 500px;
  margin: 0 0 16px;
  color: var(--premium-ink);
  font-family: inherit;
  font-size: 48px;
  font-weight: 650;
  line-height: 1.02;
}

body.bios-auth #screen-register .lede,
body.bios-auth #screen-login .lede {
  max-width: 440px;
  margin: 0 0 42px;
  color: var(--premium-muted);
  font-size: 18px;
  line-height: 1.4;
}

body.bios-auth #screen-register .field,
body.bios-auth #screen-login .field {
  margin-bottom: 18px;
}

body.bios-auth #screen-register .field label,
body.bios-auth #screen-login .field label {
  margin-bottom: 8px;
  color: var(--premium-ink);
  font-size: 14px;
  font-weight: 600;
}

body.bios-auth #screen-register .control input,
body.bios-auth #screen-login .control input {
  height: 58px;
  padding: 0 48px 0 17px;
  border: 1px solid var(--premium-line);
  border-radius: 8px;
  background: #fff;
  color: var(--premium-ink);
  font-family: inherit;
  font-size: 16px;
  box-shadow: none;
}

body.bios-auth #screen-register .control input::placeholder,
body.bios-auth #screen-login .control input::placeholder {
  color: #9a9aa0;
}

body.bios-auth #screen-register .control input:hover,
body.bios-auth #screen-login .control input:hover {
  border-color: var(--premium-line-strong);
}

body.bios-auth #screen-register .control input:focus,
body.bios-auth #screen-login .control input:focus {
  border-color: var(--premium-accent);
  box-shadow: 0 0 0 4px rgba(22, 136, 255, .1);
}

body.bios-auth #screen-register .icon-mobile,
body.bios-auth #screen-login .field-icon:not(.tap) {
  display: none;
}

body.bios-auth #screen-login .control input {
  padding-left: 17px;
}

body.bios-auth #screen-register .btn-primary,
body.bios-auth #screen-login .btn-primary {
  height: 52px;
  margin-top: 8px;
  border-radius: 8px;
  background: var(--premium-accent);
  box-shadow: none;
  font-size: 16px;
  font-weight: 600;
}

body.bios-auth #screen-register .btn-primary:hover,
body.bios-auth #screen-login .btn-primary:hover {
  background: #087bf0;
  box-shadow: 0 8px 22px rgba(22, 136, 255, .18);
  transform: translateY(-1px);
}

body.bios-auth #screen-login .login-passkey-actions {
  margin-top: 18px;
  color: var(--premium-muted);
  font-size: 13px;
  text-align: center;
}

body.bios-auth #screen-login .login-passkey-actions span {
  display: block;
  margin-bottom: 12px;
}

body.bios-auth #screen-login .btn-passkey {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid var(--premium-line);
  border-radius: 8px;
  background: #fff;
  color: var(--premium-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

body.bios-auth #screen-login .btn-passkey:hover {
  border-color: #b9dafa;
  background: var(--premium-selection);
}

body.bios-auth #screen-register .legal {
  max-width: 450px;
  margin: 18px auto 0;
  color: #85858b;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

body.bios-auth #screen-register .auth-switch,
body.bios-auth #screen-login .login-bottom {
  margin-top: 28px;
  color: var(--premium-muted);
  font-size: 14px;
  text-align: center;
}

body.bios-auth #screen-login .login-form .forgot {
  margin: -5px 0 25px;
  color: var(--premium-accent-dark);
  font-size: 14px;
}

body.bios-auth #screen-register .auth-switch a,
body.bios-auth #screen-login .login-bottom a,
body.bios-auth #screen-login .forgot,
body.bios-auth #screen-register .legal a {
  color: var(--premium-accent-dark) !important;
  font-weight: 600;
  text-decoration: none;
}

body.bios-auth #screen-register .visual,
body.bios-auth #screen-login .login-visual {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 88px clamp(58px, 6vw, 88px);
  border-left: 1px solid var(--premium-line);
  background: var(--premium-selection);
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  text-align: left;
}

body.bios-auth #screen-register .visual::after,
body.bios-auth #screen-login .login-visual::after {
  content: "ЗАЩИЩЁННОЕ ЛИЧНОЕ ПРОСТРАНСТВО";
  position: absolute;
  right: clamp(58px, 6vw, 88px);
  bottom: 48px;
  left: clamp(58px, 6vw, 88px);
  padding-top: 18px;
  border-top: 1px solid #d7d7dc;
  color: #8b8b91;
  font-size: 11px;
  font-weight: 650;
}

body.bios-auth #screen-register .stage,
body.bios-auth #screen-login .login-orbit,
body.bios-auth #screen-register .benefits ul {
  display: none;
}

body.bios-auth #screen-register .benefits,
body.bios-auth #screen-login .login-visual h2,
body.bios-auth .auth-visual-note {
  width: 100%;
  max-width: 460px;
}

body.bios-auth #screen-register .benefits h3,
body.bios-auth #screen-login .login-visual h2 {
  margin: 0;
  color: var(--premium-ink);
  font-family: inherit;
  font-size: clamp(42px, 3.7vw, 56px);
  font-weight: 600;
  line-height: 1.06;
  text-align: left;
}

body.bios-auth #screen-register .benefits h3 span {
  color: #46728f;
  font-weight: 500;
}

body.bios-auth .auth-visual-note {
  margin: 24px 0 0;
  color: var(--premium-muted);
  font-size: 17px;
  line-height: 1.5;
  text-align: left;
}

/* Onboarding */
body.bios-auth .screen:not(#screen-register):not(#screen-login) {
  min-height: 100svh;
  padding: 28px;
  background: var(--premium-page);
}

body.bios-auth .surface,
body.bios-auth #screen-welcome .card {
  width: min(1120px, 100%);
  min-height: min(700px, calc(100svh - 56px));
  padding: 38px 48px 42px;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--premium-shadow);
}

body.bios-auth #screen-welcome .card {
  display: grid;
  padding: 0;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  overflow: hidden;
}

body.bios-auth #screen-welcome .pane,
body.bios-auth #screen-welcome .visual {
  padding: 56px;
}

body.bios-auth #screen-welcome .visual {
  border-left: 1px solid var(--premium-line);
  background: #f5f5f7;
}

body.bios-auth #screen-welcome .biglogo,
body.bios-auth #screen-welcome .hex-mobile {
  display: none;
}

body.bios-auth #screen-welcome .feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

body.bios-auth #screen-welcome .feat {
  display: grid;
  padding: 20px 0;
  grid-template-columns: 42px 1fr;
  gap: 0 14px;
  border-bottom: 1px solid var(--premium-line);
  text-align: left;
  align-items: center;
}

body.bios-auth #screen-welcome .feat:last-child {
  border-bottom: 0;
}

body.bios-auth #screen-welcome .feat .tile {
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #fff;
  color: var(--premium-accent-dark);
  box-shadow: none;
}

body.bios-auth #screen-welcome .feat b {
  font-size: 15px;
  font-weight: 650;
}

body.bios-auth #screen-welcome .feat span {
  color: var(--premium-muted);
  font-size: 13px;
}

body.bios-auth .surface .brand,
body.bios-auth #screen-welcome .brand {
  display: flex;
  width: auto;
  height: auto;
  overflow: visible;
  background: none;
  align-items: center;
}

body.bios-auth .surface .brand .mark,
body.bios-auth #screen-welcome .brand .mark {
  display: none;
}

body.bios-auth .surface .brand .name,
body.bios-auth #screen-welcome .brand .name {
  display: block;
  color: var(--premium-ink);
  font-size: 18px;
  font-weight: 700;
}

body.bios-auth .navrow {
  margin-bottom: 28px;
}

body.bios-auth .steps .bar {
  height: 3px;
  background: #e8e8ed;
}

body.bios-auth .steps .bar.on {
  background: var(--premium-accent);
}

body.bios-auth h1.title,
body.bios-auth #screen-welcome .pane h1 {
  font-family: inherit;
  font-size: 42px;
  font-weight: 650;
  line-height: 1.05;
}

body.bios-auth .sub,
body.bios-auth #screen-welcome .lede {
  color: var(--premium-muted);
  font-size: 16px;
  line-height: 1.42;
}

body.bios-auth .ob-grid {
  gap: 40px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
}

body.bios-auth .aside-card {
  padding: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--premium-selection);
  align-items: flex-start;
  text-align: left;
}

body.bios-auth .aside-orb,
body.bios-auth .aside-card .info-i {
  display: none;
}

body.bios-auth .aside-card h4 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 650;
}

body.bios-auth .aside-card p {
  max-width: 320px;
  color: var(--premium-muted);
  font-size: 14px;
  line-height: 1.55;
}

body.bios-auth .opt,
body.bios-auth .choice-btn,
body.bios-auth .dcard {
  border: 1px solid var(--premium-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

body.bios-auth .opt:hover,
body.bios-auth .choice-btn:hover {
  border-color: var(--premium-line-strong);
  background: var(--premium-selection-hover);
}

body.bios-auth .opt.sel,
body.bios-auth .choice-btn.sel {
  border-color: #dfe4ed;
  background: var(--premium-selection);
  color: var(--premium-ink);
  box-shadow: none;
}

body.bios-auth .opt.sel .radio,
body.bios-auth .consent input:checked {
  border-color: var(--premium-accent);
  background: var(--premium-accent);
}

body.bios-auth .opt .oic,
body.bios-auth .choice-btn svg,
body.bios-auth .dcard .dic {
  color: var(--premium-accent-dark);
}

body.bios-auth .btn-primary {
  border-radius: 8px;
  background: var(--premium-accent);
  box-shadow: none;
}

body.bios-auth .btn-primary:hover {
  background: #087bf0;
  filter: none;
  box-shadow: 0 8px 22px rgba(22, 136, 255, .18);
}

body.bios-auth .btn-ghost,
body.bios-auth .btn-oauth {
  border-color: var(--premium-line);
  border-radius: 8px;
  background: #fff;
}

body.bios-auth .control input,
body.bios-auth .about-input,
body.bios-auth textarea.ob-ta,
body.bios-auth .recovery-dialog input {
  border-color: var(--premium-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

/* Patient Web */
body.bios-live {
  --violet: var(--premium-accent);
  --indigo: var(--premium-accent-dark);
  --blue: var(--premium-accent);
  --violet-soft: #eaf4ff;
  --violet-tint: #f4f8fc;
  --card: #f5f5f7;
  --surface: #fbfbfd;
  --surface-tint: #efeff2;
  --ink: var(--premium-ink);
  --ink-2: var(--premium-ink-soft);
  --muted: var(--premium-muted);
  --faint: var(--premium-faint);
  --hair: rgba(0, 0, 0, .08);
  --line: var(--premium-line);
  --r: 8px;
  --sh-card: none;
  --sh-hover: none;
  --sh-btn: none;
  background: #fbfbfd;
}

body.bios-live .app {
  min-height: 100svh;
  grid-template-columns: 248px minmax(0, 1fr);
}

body.bios-live .sidebar {
  padding: 28px 18px 20px;
  border-right: 1px solid var(--premium-line);
  background: rgba(251, 251, 253, .96);
  box-shadow: none;
  backdrop-filter: blur(20px) saturate(1.1);
}

body.bios-live .brand {
  display: flex;
  width: auto;
  height: auto;
  padding: 0 12px 30px;
  overflow: visible;
  background: none;
  align-items: center;
}

body.bios-live .brand-mark {
  display: none;
}

body.bios-live .brand-name {
  display: block;
  color: var(--premium-ink);
  font-size: 21px;
  font-weight: 700;
}

body.bios-live .nav {
  gap: 4px;
}

body.bios-live .nav-item {
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 8px;
  color: #5f636b;
  font-size: 14px;
  font-weight: 560;
}

body.bios-live .nav-item:hover {
  background: var(--premium-selection-hover);
  color: var(--premium-ink);
}

body.bios-live .nav-item:hover svg {
  transform: none;
}

body.bios-live .nav-item.active {
  background: var(--premium-selection);
  color: var(--premium-ink);
  box-shadow: none;
}

body.bios-live .nav-lock {
  background: #dddde2;
  color: #707078;
}

body.bios-live .pulse-card {
  display: none;
}

body.bios-live .profile,
body.bios-live .help {
  border-radius: 8px;
}

body.bios-live .profile:hover {
  background: #eeeeF1;
}

body.bios-live .help {
  padding: 16px;
  border: 0;
  background: var(--premium-selection);
  box-shadow: none;
}

body.bios-live .help .btn-chat {
  border-radius: 8px;
  background: var(--premium-accent);
}

body.bios-live .main {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 46px 54px 64px;
}

body.bios-live .topbar {
  margin-bottom: 34px;
}

body.bios-live .greeting h1,
body.bios-live .page-head h1 {
  color: var(--premium-ink);
  font-family: inherit;
  font-size: 36px;
  font-weight: 650;
  line-height: 1.08;
}

body.bios-live .greeting h1 .sun {
  display: none;
}

body.bios-live .greeting p,
body.bios-live .page-head p {
  margin-top: 8px;
  color: var(--premium-muted);
  font-size: 15px;
}

body.bios-live h2,
body.bios-live h3 {
  font-family: inherit;
  color: var(--premium-ink);
}

body.bios-live .panel,
body.bios-live .card,
body.bios-live .bios-live-profile-panel > *,
body.bios-live .bios-result-record,
body.bios-live .bios-memory-record {
  border-color: var(--premium-line);
  border-radius: 8px;
  background: #f5f5f7;
  box-shadow: none;
}

body.bios-live .panel:hover {
  transform: none;
  box-shadow: none;
}

body.bios-live .view-today .ai-hero {
  padding: 8px 0 30px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.bios-live .view-today .ai-title h2 {
  font-size: 24px;
  font-weight: 620;
}

body.bios-live .ask-box {
  height: 64px;
  margin: 26px 0 18px;
  padding: 0 10px 0 18px;
  border: 1px solid #e1e1e5;
  border-radius: 8px;
  background: #f5f5f7;
  box-shadow: none;
}

body.bios-live .home-chat-input,
body.bios-live .chat-input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.bios-live .home-chat-upload,
body.bios-live .composer-plus {
  color: var(--premium-muted);
}

body.bios-live .voice-btn,
body.bios-live .composer-send,
body.bios-live .consent-icon,
body.bios-live .pdf-logo,
body.bios-live .create-step,
body.bios-live .invite-plus {
  background: var(--premium-accent) !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.bios-live .prompt-chips {
  gap: 10px;
}

body.bios-live .chip {
  min-height: 46px;
  border: 1px solid var(--premium-line);
  border-radius: 8px;
  background: #f5f5f7;
  color: var(--premium-ink-soft);
  font-size: 13px;
  font-weight: 560;
}

body.bios-live .chip:hover {
  border-color: var(--premium-line-strong);
  background: var(--premium-selection-hover);
}

body.bios-live .chip svg,
body.bios-live .chip.sleep svg,
body.bios-live .chip.energy svg,
body.bios-live .chip.lab svg,
body.bios-live .chip.stress svg {
  color: var(--premium-accent-dark) !important;
  stroke: currentColor !important;
}

body.bios-live .bios-live-panel,
body.bios-live .bios-live-protocols,
body.bios-live .settings-section,
body.bios-live .consent-strip {
  padding: 28px;
}

body.bios-live .btn-primary,
body.bios-live .consent-submit,
body.bios-live [data-accept-consent] {
  border-radius: 8px;
  background: var(--premium-accent);
  box-shadow: none;
}

body.bios-live .btn-primary:hover,
body.bios-live .consent-submit:hover,
body.bios-live [data-accept-consent]:hover {
  background: #087bf0;
  box-shadow: 0 8px 22px rgba(22, 136, 255, .18);
}

body.bios-live .btn-outline,
body.bios-live .btn-soft,
body.bios-live .btn-secondary {
  border-color: var(--premium-line);
  border-radius: 8px;
  background: #f5f5f7;
  color: var(--premium-ink-soft);
  box-shadow: none;
}

body.bios-live .protocol-tab.active,
body.bios-live .data-tab.active,
body.bios-live .grant-tab.active,
body.bios-live .duration-btn.active,
body.bios-live .page-btn.active,
body.bios-live .format-card.active,
body.bios-live .structure-row.active {
  border-color: #dfe4ed !important;
  background: var(--premium-selection) !important;
  color: var(--premium-ink) !important;
  box-shadow: none !important;
}

body.bios-live input,
body.bios-live textarea,
body.bios-live select {
  border-color: var(--premium-line) !important;
  border-radius: 8px !important;
  background: #fff;
}

body.bios-live input:focus,
body.bios-live textarea:focus,
body.bios-live select:focus {
  border-color: var(--premium-accent) !important;
  box-shadow: 0 0 0 4px rgba(22, 136, 255, .1) !important;
}

body.bios-live .settings-list,
body.bios-live .privacy-group,
body.bios-live .bios-profile-facts-list {
  border-color: var(--premium-line);
  border-radius: 8px;
  box-shadow: none;
}

body.bios-live .settings-list,
body.bios-live .privacy-list,
body.bios-live .bios-profile-facts-list {
  background: #f5f5f7;
}

body.bios-live .settings-row:hover,
body.bios-live .privacy-row:hover,
body.bios-live .bios-document-row:hover {
  background: var(--premium-selection-hover);
}

body.bios-live .bell {
  width: 44px;
  height: 44px;
  border-color: var(--premium-line);
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
}

body.bios-live .bell:hover {
  background: #f2f2f4;
  transform: none;
}

body.bios-live .bell .badge {
  background: var(--premium-amber);
  border-color: var(--premium-page);
  box-shadow: none;
}

body.bios-live .notifications-popover,
body.bios-live .bios-document-dialog,
body.bios-live .bios-upload-dialog,
body.bios-live dialog {
  border-color: var(--premium-line);
  border-radius: 8px;
  box-shadow: var(--premium-shadow);
}

body.bios-live .notifications-popover {
  overflow: hidden;
}

body.bios-live .message.ai,
body.bios-live .bios-assistant-message {
  border-color: var(--premium-line);
  background: #f5f5f7;
}

body.bios-live .message.user,
body.bios-live .bios-user-message {
  border-color: #d8e7f8;
  background: #f0f7ff;
}

body.bios-live .bios-thinking-dots span,
body.bios-live .notification-dot {
  background: var(--premium-accent);
}

body.bios-live .link,
body.bios-live .bios-protocol-status,
body.bios-live .notifications-head button,
body.bios-live .bios-memory-action {
  color: var(--premium-accent-dark);
}

body.bios-live .bios-memory-action {
  background: var(--premium-accent-soft);
}

body.bios-live .bios-live-empty {
  color: var(--premium-muted);
}

body.bios-live .bios-document-modal,
body.bios-live .bios-upload-modal {
  background: rgba(0, 0, 0, .38);
  backdrop-filter: blur(12px);
}

body.bios-live .view-settings .settings-section {
  max-width: 920px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.bios-live .view-settings .settings-section > h2 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 650;
}

body.bios-live .view-settings .settings-grid {
  grid-template-columns: 1fr;
}

body.bios-live .view-settings .security-art {
  display: none;
}

body.bios-live .view-settings .settings-list {
  border-radius: 8px;
}

@media (max-width: 980px) {
  body.bios-auth #screen-register,
  body.bios-auth #screen-login,
  body.bios-auth .screen:not(#screen-register):not(#screen-login) {
    padding: 0;
    background: #fff;
  }

  body.bios-auth #screen-register .card,
  body.bios-auth #screen-login .login-card,
  body.bios-auth .surface,
  body.bios-auth #screen-welcome .card {
    display: block;
    width: 100%;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.bios-auth #screen-register .pane,
  body.bios-auth #screen-login .login-pane {
    width: min(600px, 100%);
    min-height: 100svh;
    margin: 0 auto;
    padding: 64px 32px 40px;
  }

  body.bios-auth #screen-register .visual,
  body.bios-auth #screen-login .login-visual,
  body.bios-auth #screen-welcome .visual {
    display: none;
  }

  body.bios-auth .surface {
    padding: 30px 32px 42px;
  }

  body.bios-auth .ob-grid {
    grid-template-columns: 1fr;
  }

  body.bios-auth .ob-aside {
    display: none;
  }

  body.bios-auth #screen-welcome .pane {
    min-height: 100svh;
    padding: 42px 32px;
  }

  body.bios-live .app {
    grid-template-columns: 1fr;
  }

  body.bios-live .main {
    padding: 30px 24px 112px;
  }
}

@media (max-width: 760px) {
  body.bios-auth #screen-register .pane,
  body.bios-auth #screen-login .login-pane {
    padding: 42px 22px 34px;
  }

  body.bios-auth #screen-register .pane > h1,
  body.bios-auth #screen-login .login-copy h1 {
    font-size: 40px;
    line-height: 1.04;
  }

  body.bios-auth #screen-register .lede,
  body.bios-auth #screen-login .lede {
    margin-bottom: 34px;
    font-size: 17px;
  }

  body.bios-auth .surface {
    padding: 24px 20px 36px;
  }

  body.bios-auth h1.title,
  body.bios-auth #screen-welcome .pane h1 {
    font-size: 36px;
  }

  body.bios-live .sidebar {
    position: fixed;
    z-index: 80;
    inset: auto 0 0;
    display: block;
    width: 100%;
    height: auto;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--premium-line);
    border-right: 0;
    background: rgba(251, 251, 253, .95);
    box-shadow: 0 -8px 26px rgba(0, 0, 0, .065);
    backdrop-filter: blur(24px) saturate(1.2);
  }

  body.bios-live .sidebar > .brand,
  body.bios-live .sidebar-foot,
  body.bios-live .pulse-card {
    display: none !important;
  }

  body.bios-live .sidebar .nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }

  body.bios-live .sidebar .nav-item {
    min-height: 57px;
    padding: 7px 2px 6px;
    border-radius: 8px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    line-height: 1;
  }

  body.bios-live .sidebar .nav-item svg {
    width: 20px;
    height: 20px;
  }

  body.bios-live .main {
    padding: 24px 16px calc(92px + env(safe-area-inset-bottom));
  }

  body.bios-live .greeting h1,
  body.bios-live .page-head h1 {
    font-size: 30px;
  }

  body.bios-live .view-today .ai-title h2 {
    font-size: 22px;
  }

  body.bios-live .prompt-chips {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 430px) {
  body.bios-auth #screen-register .pane,
  body.bios-auth #screen-login .login-pane {
    padding: 34px 20px 28px;
  }

  body.bios-auth #screen-register .pane > h1,
  body.bios-auth #screen-login .login-copy h1 {
    font-size: 36px;
  }

  body.bios-auth #screen-register .lede,
  body.bios-auth #screen-login .lede {
    font-size: 16px;
    line-height: 1.38;
  }

  body.bios-auth #screen-register .control input,
  body.bios-auth #screen-login .control input {
    height: 56px;
  }

  body.bios-auth #screen-register .btn-primary,
  body.bios-auth #screen-login .btn-primary {
    height: 54px;
  }

  body.bios-live .prompt-chips {
    grid-template-columns: 1fr;
  }

  body.bios-live .ask-box {
    height: 60px;
  }
}

/* --------------------------------------------------------------------------
   BIOS product system v3: composition and overlay audit.
   Keeps the established palette while tightening rhythm and window behavior.
   -------------------------------------------------------------------------- */

@media (min-width: 981px) {
  body.bios-auth #screen-register .card,
  body.bios-auth #screen-login .login-card {
    grid-template-columns: minmax(0, 1.18fr) minmax(430px, .82fr);
  }

  body.bios-auth #screen-register .pane,
  body.bios-auth #screen-login .login-pane {
    padding: clamp(30px, 4.5vh, 62px) clamp(56px, 6.2vw, 96px);
  }

  body.bios-auth #screen-register .pane > h1,
  body.bios-auth #screen-login .login-copy h1 {
    margin-bottom: 13px;
    font-size: clamp(42px, 3.15vw, 48px);
    line-height: 1.03;
  }

  body.bios-auth #screen-register .lede,
  body.bios-auth #screen-login .lede {
    margin-bottom: clamp(26px, 3.8vh, 38px);
    font-size: 17px;
  }

  body.bios-auth #screen-register .field,
  body.bios-auth #screen-login .field {
    margin-bottom: 14px;
  }

  body.bios-auth #screen-register .control input,
  body.bios-auth #screen-login .control input {
    height: 54px;
  }

  body.bios-auth #screen-register .btn-primary,
  body.bios-auth #screen-login .btn-primary {
    height: 50px;
    margin-top: 6px;
  }

  body.bios-auth #screen-register .legal {
    margin-top: 14px;
  }

  body.bios-auth #screen-register .auth-switch,
  body.bios-auth #screen-login .login-bottom {
    margin-top: 20px;
  }

  body.bios-auth #screen-register .visual,
  body.bios-auth #screen-login .login-visual {
    padding: clamp(54px, 7vh, 86px) clamp(48px, 5vw, 72px);
  }

  body.bios-auth #screen-register .visual::after,
  body.bios-auth #screen-login .login-visual::after {
    display: none;
  }

  body.bios-auth #screen-register .benefits,
  body.bios-auth #screen-login .login-visual h2,
  body.bios-auth .auth-visual-note {
    max-width: 390px;
  }

  body.bios-auth #screen-register .benefits h3,
  body.bios-auth #screen-login .login-visual h2 {
    font-size: clamp(40px, 3.25vw, 48px);
    font-weight: 600;
    line-height: 1.04;
    text-wrap: balance;
  }

  body.bios-auth #screen-register .benefits h3 span {
    color: inherit;
    font-weight: inherit;
  }

  body.bios-auth .auth-visual-note {
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.45;
  }
}

/* Native auth dialogs must behave like centered system windows. */
body.bios-auth .recovery-dialog {
  position: fixed;
  inset: 0;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  margin: auto;
  overflow: auto;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}

body.bios-auth .recovery-dialog::backdrop {
  background: rgba(24, 24, 28, .42);
  backdrop-filter: blur(12px);
}

body.bios-auth .recovery-dialog form,
body.bios-auth .verification-state {
  gap: 20px;
  padding: 30px;
}

body.bios-auth .recovery-dialog h2,
body.bios-auth .verification-state h2 {
  color: var(--premium-ink);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.2;
}

body.bios-auth .recovery-dialog p,
body.bios-auth .verification-state p {
  color: var(--premium-muted);
  font-size: 14px;
  line-height: 1.5;
}

body.bios-auth .recovery-dialog .recovery-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--premium-selection);
  color: var(--premium-muted);
  font-size: 20px;
}

body.bios-auth .toast {
  border-radius: 8px;
  background: rgba(29, 29, 31, .94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
  backdrop-filter: blur(16px);
}

/* Patient windows and popovers share one quiet, system-like language. */
body.bios-live .notifications-popover {
  width: 368px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .14);
}

body.bios-live .notification-item {
  margin-inline: -10px;
  padding-inline: 10px;
  border-radius: 8px;
}

body.bios-live .notification-item:hover {
  background: var(--premium-selection-hover);
}

body.bios-live .consent-info-modal,
body.bios-live .diag-modal,
body.bios-live .bios-document-modal,
body.bios-live .bios-upload-modal {
  background: rgba(24, 24, 28, .42);
  backdrop-filter: blur(12px);
}

body.bios-live .consent-info-card,
body.bios-live .diag-card,
body.bios-live .bios-document-dialog,
body.bios-live .bios-upload-dialog,
body.bios-live dialog {
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}

body.bios-live dialog {
  position: fixed;
  inset: 0;
  margin: auto;
}

body.bios-live .consent-info-card {
  width: min(470px, calc(100vw - 32px));
  padding: 30px;
}

body.bios-live .consent-info-list {
  gap: 18px;
}

body.bios-live .consent-info-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--premium-selection);
  color: var(--premium-accent-dark);
}

body.bios-live .consent-info-item h3 {
  font-size: 14px;
  font-weight: 650;
}

body.bios-live .consent-info-item p,
body.bios-live .consent-info-item li {
  color: var(--premium-muted);
  font-size: 12.5px;
  font-weight: 500;
}

body.bios-live .diag-card {
  width: min(920px, calc(100vw - 48px));
}

body.bios-live .diag-welcome {
  padding: 46px;
  grid-template-columns: 1fr;
  gap: 22px;
}

body.bios-live .diag-welcome .diag-illo {
  display: none;
}

body.bios-live .diag-facts {
  gap: 0;
  margin-top: 8px;
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--premium-line);
  border-bottom: 1px solid var(--premium-line);
  border-radius: 0;
  background: transparent;
}

body.bios-live .diag-fact {
  padding: 0 18px;
  border-right: 1px solid var(--premium-line);
}

body.bios-live .diag-fact:last-child {
  border-right: 0;
}

body.bios-live .diag-option {
  border-radius: 8px;
}

body.bios-live .diag-option:hover,
body.bios-live .diag-option.selected {
  border-color: #dfe4ed;
  background: var(--premium-selection);
}

@media (max-width: 760px) {
  body.bios-auth .recovery-dialog form,
  body.bios-auth .verification-state {
    padding: 24px;
  }

  body.bios-live .notifications-popover {
    top: 70px;
    right: 12px;
    width: calc(100vw - 24px);
    max-width: none;
  }

  body.bios-live .consent-info-modal,
  body.bios-live .diag-modal,
  body.bios-live .bios-document-modal,
  body.bios-live .bios-upload-modal {
    padding: 12px;
  }

  body.bios-live .diag-card {
    width: 100%;
    max-height: calc(100svh - 24px);
  }

  body.bios-live .diag-welcome {
    padding: 34px 22px 24px;
  }

  body.bios-live .diag-facts {
    grid-template-columns: 1fr;
  }

  body.bios-live .diag-fact {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--premium-line);
  }

body.bios-live .diag-fact:last-child {
    border-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   BIOS product system v4: dimensional surfaces.
   A restrained, mature hierarchy shared by auth, onboarding and Patient Web.
   -------------------------------------------------------------------------- */

body.bios-auth,
body.bios-live {
  --premium-ink: #101522;
  --premium-ink-soft: #252d3d;
  --premium-muted: #657085;
  --premium-faint: #8e98a8;
  --premium-line: rgba(28, 39, 61, .10);
  --premium-line-strong: rgba(28, 39, 61, .17);
  --premium-page: #f2f5f8;
  --premium-surface: #ffffff;
  --premium-soft: #f7f9fc;
  --premium-accent: #0a72d6;
  --premium-accent-dark: #075fb5;
  --premium-accent-soft: #edf6ff;
  --premium-selection: #eef2f6;
  --premium-selection-hover: #f4f6f9;
  --premium-shadow-card: 0 18px 46px -30px rgba(24, 42, 72, .34),
    0 3px 12px rgba(24, 42, 72, .045), inset 0 1px 0 rgba(255, 255, 255, .8);
  --premium-shadow-control: 0 10px 28px -22px rgba(24, 42, 72, .32),
    0 1px 4px rgba(24, 42, 72, .035);
  --premium-shadow-window: 0 34px 92px -38px rgba(16, 31, 58, .44),
    0 12px 34px rgba(16, 31, 58, .09);
  letter-spacing: 0;
}

/* Authentication: a calm form surface and a contained editorial counterpoint. */
body.bios-auth {
  background: var(--premium-page);
}

body.bios-auth #screen-register .card,
body.bios-auth #screen-login .login-card {
  background: var(--premium-surface);
}

body.bios-auth #screen-register .control input,
body.bios-auth #screen-login .control input,
body.bios-auth .about-field input,
body.bios-auth .about-field select,
body.bios-auth textarea.ob-ta {
  border-color: var(--premium-line);
  border-radius: 13px;
  background: #fbfcfe;
  box-shadow: inset 0 1px 1px rgba(22, 35, 57, .025);
}

body.bios-auth #screen-register .control input:hover,
body.bios-auth #screen-login .control input:hover,
body.bios-auth .about-field input:hover,
body.bios-auth .about-field select:hover,
body.bios-auth textarea.ob-ta:hover {
  border-color: var(--premium-line-strong);
  background: #fff;
}

body.bios-auth #screen-register .control input:focus,
body.bios-auth #screen-login .control input:focus,
body.bios-auth .about-field input:focus,
body.bios-auth .about-field select:focus,
body.bios-auth textarea.ob-ta:focus {
  border-color: rgba(10, 114, 214, .7);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(10, 114, 214, .10);
}

body.bios-auth #screen-register .btn-primary,
body.bios-auth #screen-login .btn-primary,
body.bios-auth .ob-primary {
  border-radius: 13px;
  background: var(--premium-accent);
  box-shadow: 0 12px 26px -18px rgba(10, 93, 181, .75);
}

body.bios-auth #screen-register .btn-primary:hover,
body.bios-auth #screen-login .btn-primary:hover,
body.bios-auth .ob-primary:hover {
  background: var(--premium-accent-dark);
  box-shadow: 0 16px 30px -18px rgba(10, 93, 181, .82);
}

body.bios-auth .choice-btn,
body.bios-auth .consent,
body.bios-auth .dcard,
body.bios-auth .aside-card {
  border-color: var(--premium-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--premium-shadow-control);
}

body.bios-auth .choice-btn:hover,
body.bios-auth .consent:hover {
  border-color: rgba(10, 114, 214, .28);
  background: var(--premium-accent-soft);
}

body.bios-auth .choice-btn.selected,
body.bios-auth .consent.checked {
  border-color: rgba(10, 114, 214, .52);
  background: var(--premium-accent-soft);
  box-shadow: 0 0 0 3px rgba(10, 114, 214, .07);
}

body.bios-auth .surface,
body.bios-auth #screen-welcome .card {
  border: 1px solid var(--premium-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--premium-shadow-window);
}

body.bios-auth .recovery-dialog,
body.bios-auth .verification-dialog {
  border-color: var(--premium-line);
  border-radius: 20px;
  box-shadow: var(--premium-shadow-window);
}

@media (min-width: 981px) {
  body.bios-auth #screen-register .visual,
  body.bios-auth #screen-login .login-visual {
    min-height: calc(100svh - 40px);
    margin: 20px 20px 20px 0;
    border: 1px solid rgba(28, 39, 61, .08);
    border-radius: 24px;
    background: linear-gradient(145deg, #f7f9fc 0%, #edf2f7 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86),
      0 24px 70px -48px rgba(24, 42, 72, .4);
  }

  body.bios-auth #screen-register .visual {
    border-left: 1px solid rgba(28, 39, 61, .08);
  }
}

/* Patient Web canvas and navigation. */
body.bios-live {
  --card: #ffffff;
  --surface: #f7f9fc;
  --surface-tint: #eef2f6;
  --hair: var(--premium-line);
  background: var(--premium-page);
}

body.bios-live .sidebar {
  border-right: 1px solid rgba(28, 39, 61, .09);
  background: rgba(249, 250, 252, .93);
  box-shadow: 8px 0 32px -30px rgba(24, 42, 72, .32);
  backdrop-filter: blur(24px) saturate(125%);
}

body.bios-live .nav-item {
  border: 1px solid transparent;
  border-radius: 13px;
  color: #596477;
}

body.bios-live .nav-item:hover {
  border-color: rgba(28, 39, 61, .06);
  background: rgba(255, 255, 255, .66);
  color: var(--premium-ink);
}

body.bios-live .nav-item.active {
  border-color: rgba(28, 39, 61, .08);
  background: rgba(255, 255, 255, .92);
  color: var(--premium-ink);
  box-shadow: 0 12px 28px -22px rgba(24, 42, 72, .42),
    0 2px 7px rgba(24, 42, 72, .035);
}

body.bios-live .nav-item.active svg {
  color: var(--premium-accent);
}

body.bios-live .help {
  padding: 15px 0 0;
  border: 0;
  border-top: 1px solid var(--premium-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.bios-live .help .btn-chat {
  border: 1px solid var(--premium-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  color: var(--premium-ink);
  box-shadow: var(--premium-shadow-control);
}

body.bios-live .help .btn-chat:hover {
  border-color: rgba(10, 114, 214, .2);
  background: var(--premium-accent-soft);
  color: var(--premium-accent-dark);
}

body.bios-live .main {
  background: transparent;
}

/* Shared surfaces: cards are white, page is cool gray, nested areas are quiet. */
body.bios-live .panel,
body.bios-live .protocol-empty,
body.bios-live .profile-table,
body.bios-live .history-card,
body.bios-live .privacy-card,
body.bios-live .export-panel,
body.bios-live .backup-card,
body.bios-live .format-card,
body.bios-live .protected-banner,
body.bios-live .family-protection {
  border: 1px solid var(--premium-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--premium-shadow-card);
}

body.bios-live .panel:hover {
  box-shadow: var(--premium-shadow-card);
}

body.bios-live .protocol-empty {
  min-height: 280px;
}

body.bios-live .protocol-empty .step-icon,
body.bios-live .source-icon,
body.bios-live .step-icon,
body.bios-live .mini-icon,
body.bios-live .import-art,
body.bios-live .security-art,
body.bios-live .about-brand {
  background: var(--premium-soft);
}

body.bios-live .ask-box,
body.bios-live .chat-composer {
  border: 1px solid rgba(28, 39, 61, .11);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 18px 42px -30px rgba(24, 42, 72, .38),
    0 3px 10px rgba(24, 42, 72, .04);
}

body.bios-live .prompt-chip,
body.bios-live .chip {
  border-color: rgba(28, 39, 61, .09);
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--premium-shadow-control);
}

body.bios-live .prompt-chip:hover,
body.bios-live .chip:hover {
  border-color: rgba(10, 114, 214, .22);
  background: var(--premium-accent-soft);
}

/* Controls and segmented navigation. */
body.bios-live .protocol-tabs,
body.bios-live .data-tabs,
body.bios-live .grant-tabs {
  border-color: rgba(28, 39, 61, .08);
  border-radius: 15px;
  background: #e9edf2;
  box-shadow: inset 0 1px 2px rgba(24, 42, 72, .035);
}

body.bios-live .protocol-tab,
body.bios-live .data-tab,
body.bios-live .grant-tab {
  border-radius: 11px;
}

body.bios-live .protocol-tab.active,
body.bios-live .data-tab.active,
body.bios-live .grant-tab.active {
  background: #fff;
  color: var(--premium-ink);
  box-shadow: 0 8px 18px -14px rgba(24, 42, 72, .42),
    0 1px 4px rgba(24, 42, 72, .05);
}

body.bios-live .view-protocols .protocol-tab.active {
  border-color: var(--premium-line) !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 8px 18px -14px rgba(24, 42, 72, .42),
    0 1px 4px rgba(24, 42, 72, .05) !important;
}

body.bios-live .btn-primary,
body.bios-live .btn-chat-primary,
body.bios-live .composer-send,
body.bios-live .ask-send,
body.bios-live .upload-btn,
body.bios-live button.primary {
  border-radius: 12px;
  background: var(--premium-accent) !important;
  box-shadow: 0 12px 28px -19px rgba(7, 95, 181, .72);
}

body.bios-live .btn-primary:hover,
body.bios-live .btn-chat-primary:hover,
body.bios-live .composer-send:hover,
body.bios-live .ask-send:hover,
body.bios-live .upload-btn:hover,
body.bios-live button.primary:hover {
  background: var(--premium-accent-dark) !important;
}

body.bios-live input,
body.bios-live textarea,
body.bios-live select,
body.bios-live .create-input,
body.bios-live .create-textarea,
body.bios-live .create-select {
  border-color: var(--premium-line);
  border-radius: 12px;
  background: #fbfcfe;
}

body.bios-live input:focus,
body.bios-live textarea:focus,
body.bios-live select:focus {
  border-color: rgba(10, 114, 214, .65);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(10, 114, 214, .09);
}

/* Conversation: clean paper for BIOS, a quiet blue tint for the patient. */
body.bios-live .message .bubble,
body.bios-live .bios-assistant-message {
  border: 1px solid rgba(28, 39, 61, .09);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--premium-shadow-control);
}

body.bios-live .message.user .bubble {
  border-color: rgba(10, 114, 214, .10);
  background: var(--premium-accent-soft);
  box-shadow: 0 10px 26px -22px rgba(10, 93, 181, .45);
}

body.bios-live .message-avatar,
body.bios-live .ai-orb {
  background: #fff;
  color: var(--premium-accent);
  box-shadow: var(--premium-shadow-control);
}

body.bios-live .composer-plus {
  border-color: var(--premium-line);
  background: var(--premium-soft);
  color: var(--premium-accent-dark);
}

/* Tables and profile rows gain separation without becoming boxes inside boxes. */
body.bios-live .data-row,
body.bios-live .profile-row,
body.bios-live .settings-row {
  border-color: rgba(28, 39, 61, .08);
}

body.bios-live .data-row:hover,
body.bios-live .profile-row:hover,
body.bios-live .settings-row:hover {
  background: var(--premium-soft);
}

body.bios-live .profile-tag,
body.bios-live .value-pill,
body.bios-live .access-badge {
  background: var(--premium-accent-soft);
  color: var(--premium-accent-dark);
}

/* Popovers and modal windows sit clearly above the application. */
body.bios-live .notifications-popover,
body.bios-live .consent-info-card,
body.bios-live .diag-card,
body.bios-live .bios-document-dialog,
body.bios-live .bios-upload-dialog,
body.bios-live dialog {
  border-color: rgba(28, 39, 61, .10);
  border-radius: 20px;
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--premium-shadow-window);
}

body.bios-live .notifications-popover {
  border-radius: 16px;
}

body.bios-live .notification-item,
body.bios-live .diag-option {
  border-radius: 13px;
}

body.bios-live .consent-info-icon {
  border-radius: 12px;
  background: var(--premium-accent-soft);
}

@media (max-width: 980px) {
  body.bios-auth #screen-register .card,
  body.bios-auth #screen-login .login-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.bios-live .sidebar {
    background: rgba(250, 251, 253, .96);
    box-shadow: 0 -12px 34px -28px rgba(24, 42, 72, .45);
  }
}

@media (max-width: 760px) {
  body.bios-live .panel,
  body.bios-live .protocol-empty,
  body.bios-live .profile-table,
  body.bios-live .history-card,
  body.bios-live .privacy-card,
  body.bios-live .export-panel,
  body.bios-live .backup-card,
  body.bios-live .protected-banner {
    border-radius: 16px;
  }

  body.bios-live .notifications-popover,
  body.bios-live .consent-info-card,
  body.bios-live .diag-card,
  body.bios-live .bios-document-dialog,
  body.bios-live .bios-upload-dialog,
  body.bios-live dialog {
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.bios-auth *,
  body.bios-live * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Functional Personal workspace surfaces share the current quiet card language. */
body.bios-live .bios-full-width {
  width: 100%;
  max-width: none;
}

body.bios-live .bios-export-layout {
  grid-template-columns: minmax(0, 1fr) minmax(286px, 340px);
  align-items: start;
}

body.bios-live .bios-export-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 24px;
}

body.bios-live .bios-choice-row,
body.bios-live .bios-action-row,
body.bios-live .bios-toggle-row {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border: 0;
}

body.bios-live .bios-choice-row:hover,
body.bios-live .bios-choice-row.is-selected,
body.bios-live .format-card:hover,
body.bios-live .format-card.active {
  background: #eef7ff;
}

body.bios-live .bios-choice-row.is-selected,
body.bios-live .format-card.active {
  box-shadow: inset 0 0 0 1px #c7e3fb;
}

body.bios-live .bios-check {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid #cbd9e6;
  border-radius: 9px;
  color: #fff;
  background: #fff;
  font-weight: 800;
}

body.bios-live .is-selected > .bios-check {
  border-color: #2185df;
  background: #2185df;
}

body.bios-live .bios-format-grid .format-card {
  appearance: none;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

body.bios-live .bios-select-label {
  display: grid;
  gap: 9px;
  color: #60738c;
  font-size: 13px;
  font-weight: 700;
}

body.bios-live .bios-muted {
  margin-top: 12px;
  color: #8293a8;
  font-size: 12px;
  line-height: 1.5;
}

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

body.bios-live .bios-backup-overview .backup-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

body.bios-live .bios-backup-overview .backup-action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

body.bios-live .bios-select-row {
  cursor: default;
}

body.bios-live .toggle-switch.is-off {
  background: #d6e0ea;
  box-shadow: none;
}

body.bios-live .toggle-switch.is-off::after {
  left: 3px;
  right: auto;
}

body.bios-live .toggle-switch.is-on {
  background: #2185df;
}

body.bios-live .bios-action-row > span:not(.toggle-switch) {
  color: #1673c9;
  font-weight: 750;
}

body.bios-live .bios-empty-state {
  padding: 28px;
  color: #30445d;
}

body.bios-live .bios-empty-state p {
  margin-top: 6px;
  color: #8192a7;
}

body.bios-live .view-access-history .history-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

@media (max-width: 980px) {
  body.bios-live .bios-export-layout,
  body.bios-live .bios-backup-overview,
  body.bios-live .bios-backup-overview .backup-facts {
    grid-template-columns: 1fr;
  }

  body.bios-live .bios-export-side {
    position: static;
  }
}

/* BIOS premium UI v5: settings hierarchy and open conversation. */
body.bios-live .view-settings {
  --settings-surface: rgba(255, 255, 255, .96);
  --settings-border: rgba(24, 42, 72, .095);
  --settings-hover: #f3f7fb;
}

body.bios-live .view-settings .page-head,
body.bios-live .view-settings .settings-section {
  width: min(100%, 1020px);
}

body.bios-live .view-settings .page-head {
  margin-bottom: 34px;
}

body.bios-live .view-settings .settings-section {
  max-width: none;
  margin-bottom: 34px;
}

body.bios-live .view-settings .settings-section > h2 {
  margin: 0 0 14px 2px;
  color: var(--premium-ink);
  font-size: 18px;
  font-weight: 680;
}

body.bios-live .view-settings .settings-list {
  overflow: hidden;
  border: 1px solid var(--settings-border);
  border-radius: 20px;
  background: var(--settings-surface);
  box-shadow: 0 24px 54px -44px rgba(24, 42, 72, .44),
    0 4px 16px -12px rgba(24, 42, 72, .16);
}

body.bios-live .view-settings .settings-row {
  min-height: 82px;
  padding: 15px 20px;
  gap: 16px;
  border-color: rgba(24, 42, 72, .075);
  background: transparent;
  color: var(--premium-ink);
  transition: background-color .18s ease, transform .18s ease;
}

body.bios-live .view-settings .settings-row:hover {
  background: var(--settings-hover);
}

body.bios-live .view-settings .settings-row .step-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(10, 114, 214, .08);
  border-radius: 13px;
  background: #edf5fd;
  color: var(--premium-accent-dark);
}

body.bios-live .view-settings .settings-row .step-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}

body.bios-live .view-settings .settings-row b {
  display: block;
  color: var(--premium-ink);
  font-size: 15px;
  font-weight: 650;
}

body.bios-live .view-settings .settings-row p {
  margin-top: 5px;
  color: var(--premium-muted);
  font-size: 13px;
  line-height: 1.42;
}

body.bios-live .view-settings .bios-settings-arrow,
body.bios-live .view-settings .settings-row .chev {
  color: #8090a4;
  transition: transform .18s ease, color .18s ease;
}

body.bios-live .view-settings .settings-row:hover .bios-settings-arrow,
body.bios-live .view-settings .settings-row:hover .chev {
  color: var(--premium-accent-dark);
  transform: translateX(2px);
}

body.bios-live .view-settings .bios-settings-account .settings-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.bios-live .view-settings .bios-settings-account .settings-row {
  min-height: 104px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  border: 1px solid var(--settings-border);
  border-radius: 18px;
  background: var(--settings-surface);
  box-shadow: 0 20px 46px -40px rgba(24, 42, 72, .52),
    0 3px 12px -10px rgba(24, 42, 72, .18);
}

body.bios-live .view-settings .bios-settings-account .settings-row:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 24px 52px -38px rgba(24, 42, 72, .52),
    0 5px 16px -12px rgba(24, 42, 72, .22);
}

body.bios-live .view-settings .bios-settings-account-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

body.bios-live .view-settings .bios-settings-security .settings-row:last-child .step-icon {
  border-color: rgba(183, 73, 82, .08);
  background: #fff3f3;
  color: #a63f49;
}

body.bios-live .view-settings .bios-live-settings-about .settings-row {
  min-height: 72px;
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 760px) {
  body.bios-live .view-settings .page-head {
    margin-bottom: 26px;
  }

  body.bios-live .view-settings .settings-section {
    margin-bottom: 28px;
  }

  body.bios-live .view-settings .bios-settings-account .settings-list {
    grid-template-columns: 1fr;
  }

  body.bios-live .view-settings .settings-list,
  body.bios-live .view-settings .bios-settings-account .settings-row {
    border-radius: 17px;
  }

  body.bios-live .view-settings .settings-row {
    min-height: 76px;
    padding: 13px 15px;
  }

}

/* Conversation accent: the patient's request and BIOS thinking state. */
body.bios-live .view-ai-chat .message.user .bubble {
  border-color: transparent;
  border-radius: 17px;
  background: linear-gradient(135deg, #1688ff 0%, #087cf0 58%, #076ed8 100%);
  color: #fff;
  box-shadow: 0 16px 34px -24px rgba(5, 91, 181, .78);
}

body.bios-live .view-ai-chat .message.user .bubble-time {
  color: rgba(255, 255, 255, .72);
}

body.bios-live .view-ai-chat .message.user .bubble-checks {
  color: rgba(255, 255, 255, .92);
}

body.bios-live .view-ai-chat .bios-thinking-message {
  display: flex;
  align-items: center;
  max-width: none;
}

body.bios-live .view-ai-chat .bios-thinking-message .message-avatar {
  display: none;
}

body.bios-live .view-ai-chat .bios-thinking-message .bubble {
  min-width: min(520px, 100%);
  min-height: 0;
  gap: 10px;
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--premium-ink-soft);
  box-shadow: none;
}

body.bios-live .view-ai-chat .bios-thinking-label {
  font-size: 14px;
  font-weight: 650;
}

body.bios-live .view-ai-chat .bios-thinking-dots {
  width: 27px;
  gap: 4px;
}

body.bios-live .view-ai-chat .bios-thinking-dots span {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  background: #087cf0;
  box-shadow: 0 0 0 3px rgba(8, 124, 240, .08);
}

body.bios-live .view-ai-chat .bios-chat-feedback {
  padding-inline: 2px;
}

body.bios-live .view-ai-chat .bios-chat-feedback-button {
  border-color: rgba(28, 39, 61, .10);
  background: rgba(255, 255, 255, .82);
  color: var(--premium-muted);
}

body.bios-live .view-ai-chat .bios-chat-feedback-button:hover,
body.bios-live .view-ai-chat .bios-chat-feedback-button.is-active {
  border-color: rgba(8, 124, 240, .22);
  background: #edf6ff;
  color: #076ed8;
}

body.bios-live .view-ai-chat .bios-chat-intelligence {
  border-top-color: rgba(28, 39, 61, .075);
}

/* Conversation v0.22.2: an open, editorial answer surface instead of cards. */
body.bios-live .view-ai-chat .message:not(.user) {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 15px;
  width: min(100%, 900px);
  max-width: 900px;
  align-items: start;
}

body.bios-live .view-ai-chat .message:not(.user) > .message-avatar {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 560;
}

body.bios-live .view-ai-chat .message:not(.user) .bubble {
  padding: 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.bios-live .view-ai-chat .message:not(.user) .bios-message-text {
  color: #1f2d40;
  font-size: 16.5px;
  font-weight: 430;
  line-height: 1.68;
  letter-spacing: -.006em;
  text-wrap: pretty;
}

body.bios-live .view-ai-chat .message:not(.user) .bios-message-text p + p,
body.bios-live .view-ai-chat .message:not(.user) .bios-message-text p + ul,
body.bios-live .view-ai-chat .message:not(.user) .bios-message-text p + ol,
body.bios-live .view-ai-chat .message:not(.user) .bios-message-text ul + p,
body.bios-live .view-ai-chat .message:not(.user) .bios-message-text ol + p {
  margin-top: 15px;
}

body.bios-live .view-ai-chat .message:not(.user) .bubble-time {
  display: block;
  margin-top: 9px;
  color: rgba(55, 72, 96, .52);
  font-size: 11px;
}

body.bios-live .view-ai-chat .message:not(.user) .bios-typewriter-active {
  min-height: 58px;
}

body.bios-live .view-ai-chat .bios-chat-intelligence {
  display: none;
}

body.bios-live .view-ai-chat .bios-chat-feedback {
  margin: 0;
  padding: 0;
}

body.bios-live .view-ai-chat .bios-chat-feedback-button,
body.bios-live .view-ai-chat .bios-chat-feedback-button:hover,
body.bios-live .view-ai-chat .bios-chat-feedback-button.is-active {
  min-height: 27px;
  padding: 3px 7px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.bios-live .view-ai-chat .bios-chat-feedback-button:hover,
body.bios-live .view-ai-chat .bios-chat-feedback-button.is-active {
  color: #076ed8;
}

@media (max-width: 760px) {
  body.bios-live .view-ai-chat .message:not(.user) {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 11px;
  }

  body.bios-live .view-ai-chat .message:not(.user) > .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  body.bios-live .view-ai-chat .message:not(.user) .bios-message-text {
    font-size: 16px;
    line-height: 1.62;
  }
}

/* --------------------------------------------------------------------------
   BIOS Patient Web home enrichment: promotions and useful reading.
   Keeps the established dashboard composition and adds content below
   Health Memory without changing navigation, AI composer or runtime states.
   -------------------------------------------------------------------------- */

body.bios-live .home-discovery {
  width: 100%;
  margin-top: 30px;
}

body.bios-live .home-discovery-title {
  margin: 0 0 17px;
  color: var(--premium-ink);
  font-size: 23px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.025em !important;
}

body.bios-live .home-promo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 18px;
}

body.bios-live .home-promo {
  position: relative;
  min-height: 224px;
  overflow: hidden;
  border: 1px solid var(--premium-line);
  border-radius: 22px;
  box-shadow: var(--premium-shadow-card);
}

body.bios-live .home-promo-referral {
  display: grid;
  padding: 30px 32px;
  background:
    radial-gradient(circle at 92% -18%, rgba(79, 151, 235, .25), transparent 45%),
    linear-gradient(125deg, #eef6ff 0%, #f7fbff 58%, #e7f2fd 100%);
  grid-template-columns: minmax(0, 1fr) 245px;
  align-items: center;
}

body.bios-live .home-promo-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

body.bios-live .home-promo-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #426786;
  font-size: 11px;
  font-weight: 680;
  letter-spacing: .045em !important;
  text-transform: uppercase;
}

body.bios-live .home-promo-meta em {
  display: inline-flex;
  min-height: 23px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--premium-accent-dark);
  align-items: center;
  font-size: 9px;
  font-style: normal;
  letter-spacing: .055em !important;
}

body.bios-live .home-promo h2 {
  max-width: 600px;
  margin: 16px 0 10px;
  color: #14253a;
  font-size: clamp(23px, 2.25vw, 31px);
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -.032em !important;
  text-wrap: balance;
}

body.bios-live .home-promo p {
  max-width: 610px;
  margin: 0;
  color: #627286;
  font-size: 13.5px;
  line-height: 1.5;
}

body.bios-live .home-promo-note {
  display: block;
  margin-top: 15px;
  color: #8491a1;
  font-size: 10.5px;
}

body.bios-live .home-referral-link {
  display: flex;
  max-width: 520px;
  margin-top: 18px;
  padding: 5px;
  border: 1px solid rgba(47, 120, 223, .17);
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 26px -22px rgba(30, 78, 138, .5);
  gap: 7px;
}

body.bios-live .home-referral-link input {
  min-width: 0;
  padding: 7px 9px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #38536f;
  flex: 1;
  font: inherit;
  font-size: 12px;
}

body.bios-live .home-referral-link button {
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--premium-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  transition: background .2s ease, transform .2s ease;
}

body.bios-live .home-referral-link button:hover {
  background: var(--premium-accent-dark);
  transform: translateY(-1px);
}

body.bios-live .home-referral-link button:focus-visible {
  outline: 3px solid rgba(47, 120, 223, .22);
  outline-offset: 2px;
}

body.bios-live .home-promo-object {
  position: relative;
  z-index: 1;
  height: 180px;
}

body.bios-live .home-promo-object img {
  position: absolute;
  z-index: 2;
  width: 255px;
  max-width: none;
  top: 50%;
  left: 50%;
  filter: drop-shadow(0 20px 20px rgba(41, 83, 128, .14));
  transform: translate(-50%, -50%) rotate(-2deg);
  transition: transform .35s ease;
}

body.bios-live .home-promo-referral:hover .home-promo-object img {
  transform: translate(-50%, -54%) rotate(0);
}

body.bios-live .home-promo-orbit {
  position: absolute;
  width: 190px;
  height: 190px;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(47, 120, 223, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 255, 255, .20), 0 0 0 48px rgba(47, 120, 223, .025);
  transform: translate(-50%, -50%);
}

body.bios-live .home-promo-balance {
  padding: 28px;
  background: #fff;
}

body.bios-live .home-promo-balance .home-promo-meta {
  justify-content: space-between;
}

body.bios-live .home-balance-value {
  position: relative;
  z-index: 2;
  margin: 31px 0 12px;
  color: #17283e;
  font-size: 46px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em !important;
  font-variant-numeric: tabular-nums;
}

body.bios-live .home-balance-value small {
  color: var(--premium-accent);
  font-size: 22px;
}

body.bios-live .home-promo-balance p {
  position: relative;
  z-index: 2;
  max-width: 280px;
  font-size: 12.5px;
}

body.bios-live .home-bonus-stats {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: 220px;
  margin-top: 18px;
  gap: 24px;
}

body.bios-live .home-bonus-stats span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

body.bios-live .home-bonus-stats b {
  color: #22364f;
  font-size: 17px;
  font-weight: 650;
}

body.bios-live .home-bonus-stats small {
  color: #8693a2;
  font-size: 9.5px;
}

body.bios-live .home-balance-coins {
  position: absolute;
  width: 108px;
  height: 86px;
  right: -5px;
  bottom: -2px;
  opacity: .92;
}

body.bios-live .home-balance-coins i {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(47, 120, 223, .20);
  border-radius: 50%;
  background: linear-gradient(145deg, #fff 0%, #dfeeff 100%);
  box-shadow: 0 16px 24px -19px rgba(30, 78, 138, .42), inset 0 1px 0 #fff;
}

body.bios-live .home-balance-coins i::before {
  content: "B";
  position: absolute;
  inset: 8px;
  display: grid;
  border: 1px solid rgba(47, 120, 223, .24);
  border-radius: 50%;
  color: var(--premium-accent-dark);
  font-size: 14px;
  font-style: normal;
  font-weight: 720;
  place-items: center;
}

body.bios-live .home-balance-coins i:nth-child(1) { right: 8px; bottom: 6px; transform: rotate(10deg); }
body.bios-live .home-balance-coins i:nth-child(2) { right: 38px; bottom: 21px; transform: rotate(-13deg); }
body.bios-live .home-balance-coins i:nth-child(3) { right: 3px; bottom: 43px; transform: rotate(22deg) scale(.82); }

body.bios-live .home-articles-head {
  display: flex;
  margin: 44px 0 18px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

body.bios-live .home-articles-head > div > span {
  display: block;
  margin-bottom: 7px;
  color: var(--premium-accent-dark);
  font-size: 10px;
  font-weight: 690;
  letter-spacing: .065em !important;
  text-transform: uppercase;
}

body.bios-live .home-articles-head h2 {
  margin: 0;
  color: var(--premium-ink);
  font-size: 27px;
  font-weight: 620;
  letter-spacing: -.028em !important;
}

body.bios-live .home-articles-head > a {
  display: inline-flex;
  padding-bottom: 3px;
  color: var(--premium-accent-dark);
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
}

body.bios-live .home-articles-head > a span {
  transition: transform .2s ease;
}

body.bios-live .home-articles-head > a:hover span {
  transform: translateX(3px);
}

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

body.bios-live .home-article-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--premium-line);
  border-radius: 19px;
  background: #fff;
  color: inherit;
  box-shadow: var(--premium-shadow-card);
  flex-direction: column;
  text-decoration: none;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

body.bios-live .home-article-card:hover {
  border-color: rgba(47, 120, 223, .20);
  box-shadow: 0 24px 54px -38px rgba(24, 53, 90, .42);
  transform: translateY(-3px);
}

body.bios-live .home-article-media {
  display: block;
  height: 148px;
  overflow: hidden;
  background: #eef3f7;
}

body.bios-live .home-article-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

body.bios-live .home-article-media.is-brand img {
  object-fit: cover;
  object-position: center;
}

body.bios-live .home-article-card:hover .home-article-media img {
  transform: scale(1.035);
}

body.bios-live .home-article-copy {
  display: flex;
  min-height: 188px;
  padding: 21px 22px 19px;
  flex-direction: column;
}

body.bios-live .home-article-copy small {
  color: #7c8999;
  font-size: 10px;
  font-weight: 590;
  line-height: 1.4;
}

body.bios-live .home-article-copy strong {
  margin-top: 12px;
  color: #1a2a3e;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.28;
  letter-spacing: -.018em !important;
  text-wrap: balance;
}

body.bios-live .home-article-copy em {
  display: inline-flex;
  margin-top: auto;
  padding-top: 19px;
  color: var(--premium-accent-dark);
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 650;
}

@media (max-width: 1050px) {
  body.bios-live .home-promo-grid {
    grid-template-columns: 1fr;
  }

  body.bios-live .home-promo-balance {
    min-height: 190px;
  }
}

@media (max-width: 820px) {
  body.bios-live .home-promo-referral {
    grid-template-columns: 1fr 190px;
  }

  body.bios-live .home-articles-grid {
    grid-template-columns: 1fr;
  }

  body.bios-live .home-article-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
  }

  body.bios-live .home-article-media {
    height: 100%;
    min-height: 180px;
  }
}

@media (max-width: 600px) {
  body.bios-live .home-discovery {
    margin-top: 22px;
  }

  body.bios-live .home-promo-referral {
    min-height: 0;
    padding: 24px;
    grid-template-columns: 1fr;
  }

  body.bios-live .home-promo h2 {
    font-size: 24px;
  }

  body.bios-live .home-referral-link {
    align-items: stretch;
    flex-direction: column;
  }

  body.bios-live .home-referral-link button {
    min-height: 40px;
  }

  body.bios-live .home-promo-object {
    height: 155px;
    margin-top: 6px;
  }

  body.bios-live .home-promo-object img {
    width: 225px;
  }

  body.bios-live .home-articles-head {
    margin-top: 34px;
  }

  body.bios-live .home-articles-head h2 {
    font-size: 24px;
  }

  body.bios-live .home-articles-head > a {
    font-size: 0;
  }

  body.bios-live .home-articles-head > a span {
    font-size: 18px;
  }

  body.bios-live .home-article-card {
    display: flex;
  }

  body.bios-live .home-article-media {
    height: 150px;
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.bios-live .home-promo-object img,
  body.bios-live .home-article-card,
  body.bios-live .home-article-media img {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   BIOS Conversation v0.23: a focused, human-scale dialogue space.
   The conversation stays inside the current patient dashboard and preserves
   the existing message, feedback, attachment and composer contracts.
   -------------------------------------------------------------------------- */

body.bios-live .view-ai-chat.active {
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  min-height: 620px;
}

body.bios-live .view-ai-chat .page-head,
body.bios-live .view-ai-chat .chat-intro,
body.bios-live .view-ai-chat .chat-experience {
  width: min(100%, 1180px);
  margin-inline: auto;
}

body.bios-live .view-ai-chat .page-head {
  align-items: center;
  margin-bottom: 18px;
}

body.bios-live .chat-title-cluster,
body.bios-live .chat-title-meta,
body.bios-live .chat-online {
  display: flex;
  align-items: center;
}

body.bios-live .chat-title-cluster {
  min-width: 0;
  gap: 15px;
}

body.bios-live .chat-identity-mark {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  overflow: visible;
  border: 1px solid rgba(8, 124, 240, .16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, .95) 0 8%, transparent 9%),
    linear-gradient(145deg, #1b92ff 0%, #087cf0 54%, #065ebc 100%);
  color: #fff;
  box-shadow: 0 18px 34px -22px rgba(6, 94, 188, .78),
    inset 0 1px 0 rgba(255, 255, 255, .35);
}

body.bios-live .chat-identity-mark::before,
body.bios-live .chat-identity-mark::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

body.bios-live .chat-identity-mark::before {
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 13px;
  transform: rotate(10deg);
}

body.bios-live .chat-identity-mark::after {
  right: -3px;
  bottom: -3px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--premium-page);
  border-radius: 50%;
  background: #3bbf78;
}

body.bios-live .chat-identity-mark span {
  position: relative;
  z-index: 1;
  font-family: "Inter BIOS", Inter, sans-serif;
  font-size: 21px;
  font-weight: 800;
}

body.bios-live .chat-identity-mark i {
  position: absolute;
  inset: -6px;
  z-index: -1;
  border: 1px solid rgba(8, 124, 240, .10);
  border-radius: 22px;
}

body.bios-live .view-ai-chat .page-title h1 {
  margin: 0 0 5px;
  font-family: "Inter BIOS", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: clamp(30px, 2.35vw, 38px);
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: -.035em !important;
}

body.bios-live .chat-title-meta {
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--premium-muted);
  font-size: 13px;
  font-weight: 540;
}

body.bios-live .chat-online {
  gap: 6px;
  color: #25714a;
  font-size: 12px;
  font-weight: 720;
}

body.bios-live .chat-online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39b975;
  box-shadow: 0 0 0 4px rgba(57, 185, 117, .11);
}

body.bios-live .view-ai-chat .chat-intro {
  margin-bottom: 16px;
  padding: 18px 24px;
  border-color: rgba(8, 124, 240, .10);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 10%, rgba(8, 124, 240, .08), transparent 35%),
    rgba(255, 255, 255, .97);
  box-shadow: 0 20px 50px -42px rgba(24, 42, 72, .52);
}

body.bios-live .view-ai-chat .chat-intro .ai-orb {
  width: 58px;
  height: 58px;
  color: #087cf0;
}

body.bios-live .view-ai-chat .chat-intro .ai-orb svg {
  width: 34px;
  height: 34px;
}

body.bios-live .view-ai-chat .chat-bios {
  gap: 17px;
}

body.bios-live .view-ai-chat .chat-bios h2 {
  margin-bottom: 4px;
  font-size: 16px;
}

body.bios-live .view-ai-chat .chat-bios p {
  font-size: 12.5px;
  line-height: 1.5;
}

body.bios-live .view-ai-chat .chat-capabilities {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
}

body.bios-live .view-ai-chat .capability {
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
}

body.bios-live .view-ai-chat .capability .step-icon {
  width: 27px;
  height: 27px;
  border-radius: 9px;
}

body.bios-live .chat-experience {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(28, 39, 61, .09);
  border-radius: 28px;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 32px 80px -62px rgba(18, 43, 78, .58),
    0 9px 26px -22px rgba(18, 43, 78, .24),
    inset 0 1px 0 rgba(255, 255, 255, .86);
  isolation: isolate;
}

body.bios-live .chat-experience::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 7% 3%, rgba(8, 124, 240, .055), transparent 29%),
    radial-gradient(circle at 96% 72%, rgba(62, 169, 218, .045), transparent 30%),
    linear-gradient(180deg, rgba(248, 251, 255, .78), rgba(255, 255, 255, .96));
}

body.bios-live .view-ai-chat .chat-day {
  width: min(100% - 48px, 890px);
  flex: 0 0 auto;
  align-self: center;
  gap: 14px;
  margin: 0;
  padding: 18px 0 8px;
  color: #8a94a4;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .08em !important;
  text-transform: uppercase;
}

body.bios-live .view-ai-chat .chat-day::before,
body.bios-live .view-ai-chat .chat-day::after {
  background: rgba(28, 39, 61, .075);
}

body.bios-live .view-ai-chat .chat-thread {
  width: 100%;
  flex: 1;
  gap: 28px;
  margin: 0;
  padding: 18px max(28px, calc((100% - 890px) / 2)) 24px;
  scroll-padding-bottom: 24px;
  scrollbar-color: rgba(81, 103, 133, .28) transparent;
}

body.bios-live .view-ai-chat .chat-thread::-webkit-scrollbar {
  width: 5px;
}

body.bios-live .view-ai-chat .chat-thread::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(81, 103, 133, .24);
}

body.bios-live .view-ai-chat .message {
  max-width: 100%;
}

body.bios-live .view-ai-chat .message:not(.user) {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  width: min(100%, 820px);
  max-width: 820px;
}

body.bios-live .view-ai-chat .message:not(.user) > .message-avatar {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(8, 124, 240, .16);
  border-radius: 15px;
  background: linear-gradient(145deg, #299bff, #087cf0 58%, #0766c8);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 15px 28px -19px rgba(7, 103, 200, .72),
    inset 0 1px 0 rgba(255, 255, 255, .34);
}

body.bios-live .view-ai-chat .message:not(.user) > .message-avatar::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
}

body.bios-live .view-ai-chat .message:not(.user) > .message-avatar svg {
  width: 22px;
  height: 22px;
}

body.bios-live .view-ai-chat .message:not(.user) .bios-message-column {
  width: 100%;
  gap: 7px;
}

body.bios-live .view-ai-chat .message:not(.user) .bubble {
  position: relative;
  padding: 17px 19px 13px;
  border: 1px solid rgba(28, 39, 61, .075);
  border-radius: 5px 20px 20px 20px;
  background: rgba(247, 249, 252, .94);
  box-shadow: 0 16px 34px -32px rgba(24, 42, 72, .42),
    inset 0 1px 0 rgba(255, 255, 255, .8);
}

body.bios-live .view-ai-chat .message:not(.user) .bubble::before {
  content: "BIOS";
  display: block;
  margin-bottom: 7px;
  color: #0872da;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em !important;
  text-transform: uppercase;
}

body.bios-live .view-ai-chat .message:not(.user) .bios-message-text {
  max-width: 72ch;
  color: #1d2b3e;
  font-size: 15px;
  font-weight: 430;
  line-height: 1.62;
}

body.bios-live .view-ai-chat .message:not(.user) .bios-message-text p + p,
body.bios-live .view-ai-chat .message:not(.user) .bios-message-text p + ul,
body.bios-live .view-ai-chat .message:not(.user) .bios-message-text p + ol,
body.bios-live .view-ai-chat .message:not(.user) .bios-message-text ul + p,
body.bios-live .view-ai-chat .message:not(.user) .bios-message-text ol + p {
  margin-top: 12px;
}

body.bios-live .view-ai-chat .message:not(.user) .bubble-time {
  margin-top: 8px;
  text-align: left;
  color: #9aa3b0;
  font-size: 10.5px;
}

body.bios-live .view-ai-chat .message.user {
  width: fit-content;
  max-width: min(68%, 540px);
  margin-left: auto;
}

body.bios-live .view-ai-chat .message.user .bubble {
  padding: 13px 16px 10px;
  border-radius: 20px 20px 6px 20px;
  background: linear-gradient(145deg, #178bfa 0%, #087cf0 62%, #086ed5 100%);
  font-size: 14.5px;
  font-weight: 510;
  line-height: 1.48;
  box-shadow: 0 18px 38px -26px rgba(5, 91, 181, .86),
    inset 0 1px 0 rgba(255, 255, 255, .19);
}

body.bios-live .view-ai-chat .message.user .bubble-time {
  margin-top: 5px;
  color: rgba(255, 255, 255, .67);
  font-size: 10.5px;
}

body.bios-live .view-ai-chat .bios-chat-feedback {
  margin: 0 0 0 2px;
}

body.bios-live .view-ai-chat .bios-chat-feedback-actions {
  gap: 2px;
}

body.bios-live .view-ai-chat .bios-chat-feedback-button,
body.bios-live .view-ai-chat .bios-chat-feedback-button:hover,
body.bios-live .view-ai-chat .bios-chat-feedback-button.is-active {
  min-height: 29px;
  padding: 4px 8px;
  border-radius: 9px;
  font-size: 10.5px;
}

body.bios-live .view-ai-chat .bios-chat-feedback-button:hover,
body.bios-live .view-ai-chat .bios-chat-feedback-button.is-active {
  background: rgba(8, 124, 240, .07);
}

body.bios-live .view-ai-chat .bios-live-empty {
  width: min(100%, 620px);
  margin: auto;
  padding: 32px;
  border: 1px dashed rgba(8, 124, 240, .18);
  border-radius: 22px;
  background: rgba(247, 250, 255, .72);
  color: var(--premium-muted);
  text-align: center;
}

body.bios-live .view-ai-chat .bios-thinking-message {
  width: min(100%, 820px);
  padding-left: 55px;
}

body.bios-live .view-ai-chat .bios-thinking-message .bubble {
  min-width: 0;
  padding: 4px 0;
}

body.bios-live .view-ai-chat .chat-bottom {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 11px max(28px, calc((100% - 890px) / 2)) 14px;
  border-top: 1px solid rgba(28, 39, 61, .07);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 -18px 38px -40px rgba(24, 42, 72, .6);
  backdrop-filter: blur(18px);
}

body.bios-live .view-ai-chat .chat-composer {
  min-height: 62px;
  padding: 9px 10px 9px 11px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  border-color: rgba(28, 39, 61, .12);
  border-radius: 20px;
  box-shadow: 0 20px 46px -32px rgba(24, 42, 72, .48),
    0 3px 10px rgba(24, 42, 72, .035);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

body.bios-live .view-ai-chat .chat-composer:focus-within {
  border-color: rgba(8, 124, 240, .42);
  box-shadow: 0 22px 48px -30px rgba(8, 104, 201, .42),
    0 0 0 4px rgba(8, 124, 240, .07);
  transform: translateY(-1px);
}

body.bios-live .view-ai-chat .composer-plus {
  width: 42px;
  height: 42px;
  border-color: rgba(28, 39, 61, .09);
  border-radius: 14px;
  background: #f4f7fb;
  color: #53647b;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

body.bios-live .view-ai-chat .composer-plus:hover {
  background: #edf5ff;
  color: #0872da;
  transform: rotate(3deg);
}

body.bios-live .view-ai-chat .chat-input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #18263a;
  font-size: 14px;
  font-weight: 500;
}

body.bios-live .view-ai-chat .chat-input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.bios-live .view-ai-chat .chat-input::placeholder {
  color: #919baa;
  opacity: 1;
}

body.bios-live .view-ai-chat .composer-send {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  box-shadow: 0 14px 24px -16px rgba(6, 94, 188, .8),
    inset 0 1px 0 rgba(255, 255, 255, .26);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

body.bios-live .view-ai-chat .composer-send:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 17px 28px -16px rgba(6, 94, 188, .9),
    inset 0 1px 0 rgba(255, 255, 255, .26);
}

body.bios-live .view-ai-chat .chat-disclaimer {
  margin-top: 8px;
  color: #8893a3;
  font-size: 10.5px;
  font-weight: 560;
  line-height: 1.35;
}

body.bios-live .view-ai-chat .chat-disclaimer svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 980px) {
  body.bios-live .view-ai-chat.active {
    height: auto;
    min-height: 0;
  }

  body.bios-live .chat-experience {
    min-height: 680px;
  }

  body.bios-live .view-ai-chat .chat-thread {
    overflow-y: auto;
    flex: 1;
  }
}

@media (max-width: 760px) {
  body.bios-live .view-ai-chat .page-head {
    margin-bottom: 14px;
  }

  body.bios-live .chat-title-cluster {
    gap: 11px;
  }

  body.bios-live .chat-identity-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 15px;
  }

  body.bios-live .chat-identity-mark span {
    font-size: 18px;
  }

  body.bios-live .view-ai-chat .page-title h1 {
    font-size: 28px;
  }

  body.bios-live .chat-title-meta > span:last-child {
    display: none;
  }

  body.bios-live .view-ai-chat .chat-intro {
    padding: 18px;
  }

  body.bios-live .view-ai-chat .chat-capabilities {
    grid-template-columns: 1fr;
  }

  body.bios-live .chat-experience {
    min-height: 620px;
    border-radius: 21px;
  }

  body.bios-live .view-ai-chat .chat-day {
    width: calc(100% - 28px);
    padding-top: 14px;
  }

  body.bios-live .view-ai-chat .chat-thread {
    gap: 23px;
    padding: 16px 14px 22px;
  }

  body.bios-live .view-ai-chat .message:not(.user) {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
  }

  body.bios-live .view-ai-chat .message:not(.user) > .message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 10px;
  }

  body.bios-live .view-ai-chat .message:not(.user) .bubble {
    padding: 14px 14px 11px;
    border-radius: 4px 17px 17px 17px;
  }

  body.bios-live .view-ai-chat .message:not(.user) .bios-message-text {
    font-size: 14.5px;
    line-height: 1.58;
  }

  body.bios-live .view-ai-chat .message.user {
    max-width: 86%;
  }

  body.bios-live .view-ai-chat .chat-bottom {
    padding: 10px 10px 12px;
  }

  body.bios-live .view-ai-chat .chat-composer {
    min-height: 58px;
    padding: 7px 8px;
    border-radius: 17px;
  }

  body.bios-live .view-ai-chat .composer-plus,
  body.bios-live .view-ai-chat .composer-send {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  body.bios-live .view-ai-chat .chat-input {
    font-size: 16px;
  }

  body.bios-live .view-ai-chat .chat-disclaimer {
    align-items: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.bios-live .view-ai-chat .chat-composer,
  body.bios-live .view-ai-chat .composer-plus,
  body.bios-live .view-ai-chat .composer-send {
    transition: none;
  }
}
/* Live BIOS Personal medical-card resources. */
.personal-feature-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 22px}.personal-feature-link{min-width:0;border:1px solid #d9e5ef;border-radius:24px;background:#fff;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left;color:#20364f;transition:background-color .18s,border-color .18s}.personal-feature-link:hover,.personal-feature-link:focus-visible{background:#eef8ff;border-color:#bfdff6;outline:0}.personal-feature-link span{display:grid;gap:7px}.personal-feature-link b{font-size:19px}.personal-feature-link small{font-size:14px;color:#7890a9;line-height:1.45}.personal-feature-link svg{width:20px;flex:0 0 20px}.personal-subpage .page-head{align-items:flex-end}.personal-subpage .page-title h1{font-size:clamp(38px,4.1vw,58px);line-height:1.02}.personal-back{border:0;background:transparent;padding:0;margin:0 0 28px;color:#263b53;font:inherit;font-weight:700;display:inline-flex;gap:10px;align-items:center}.personal-filterbar{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 22px}.personal-filterbar button{border:1px solid #d9e5ef;background:#fff;color:#6f849b;border-radius:999px;padding:11px 18px;font-weight:700}.personal-filterbar button.active,.personal-filterbar button:hover{background:#eaf6ff;border-color:#c8e4f8;color:#1677cf}.personal-resource-list{border:1px solid #d9e5ef;border-radius:28px;overflow:hidden;background:#fff}.personal-resource-card{border:0;border-bottom:1px solid #e5edf3;background:#fff;width:100%;padding:24px 28px;display:flex;align-items:center;justify-content:space-between;gap:24px;text-align:left;color:#20364f}.personal-resource-card:last-child{border-bottom:0}.personal-resource-card:hover{background:#f4faff}.personal-resource-copy{display:grid;gap:6px;min-width:0}.personal-resource-copy b{font-size:19px}.personal-resource-copy small,.personal-resource-copy em{font-size:14px;color:#7d91a7;font-style:normal;line-height:1.45}.personal-status{white-space:nowrap;border-radius:999px;padding:8px 12px;background:#f2f6f9;color:#60768d;font-size:13px;font-weight:800}.personal-status.is-completed{background:#eaf8f2;color:#23845c}.personal-status.is-in_progress{background:#eaf6ff;color:#1677cf}.personal-status.is-cancelled{background:#f4f4f5;color:#7a8490}.personal-empty-state{padding:54px 28px;display:grid;gap:8px;text-align:center}.personal-empty-state b{font-size:20px;color:#20364f}.personal-empty-state span{color:#7d91a7}.personal-hypothesis-list{border:0;background:transparent;display:grid;gap:18px;overflow:visible}.personal-hypothesis-card{border:1px solid #d9e5ef;border-radius:28px;background:#fff;padding:28px 30px;color:#20364f}.personal-hypothesis-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px;color:#1979d2;font-size:14px;font-weight:800}.personal-hypothesis-head mark{background:#fff6e6;color:#a26a13;border-radius:999px;padding:8px 12px}.personal-hypothesis-card h2{font-size:24px;max-width:900px;margin:0 0 12px}.personal-hypothesis-card>p{max-width:1050px;margin:0;color:#71879f;line-height:1.6}.personal-hypothesis-evidence{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:22px 0 0}.personal-hypothesis-evidence section{background:#f5f9fc;border-radius:20px;padding:20px;display:grid;gap:10px}.personal-hypothesis-evidence small{color:#8498ad}.personal-hypothesis-evidence b{font-size:15px;line-height:1.55}.personal-hypothesis-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}.personal-hypothesis-actions .btn-primary,.personal-hypothesis-actions .btn-soft{min-height:46px;padding:0 18px;border-radius:999px}.personal-form-modal{position:fixed;inset:0;z-index:10000;background:rgba(24,42,61,.28);backdrop-filter:blur(12px);display:grid;place-items:center;padding:24px}.personal-form-dialog{position:relative;width:min(720px,100%);max-height:calc(100vh - 48px);overflow:auto;background:#fff;border:1px solid #d9e5ef;border-radius:32px;padding:34px;box-shadow:0 24px 70px rgba(32,54,79,.18);display:grid;gap:18px}.personal-form-dialog h2{font-size:32px;margin:0;color:#172d47}.personal-form-dialog>p{margin:-8px 0 4px;color:#748aa2;line-height:1.55}.personal-eyebrow{color:#187bd5;font-size:13px;font-weight:900;letter-spacing:.08em}.personal-dialog-close{position:absolute;right:20px;top:18px;width:42px;height:42px;border-radius:50%;border:1px solid #d9e5ef;background:#f7fafc;color:#657d95;font-size:26px}.personal-form-dialog label{display:grid;gap:8px;color:#405b76;font-size:14px;font-weight:800}.personal-form-dialog input,.personal-form-dialog select,.personal-form-dialog textarea{width:100%;border:1px solid #d4e1eb;border-radius:16px;padding:14px 16px;background:#fff;color:#20364f;font:inherit;resize:vertical}.personal-form-dialog input:focus,.personal-form-dialog select:focus,.personal-form-dialog textarea:focus{outline:3px solid #dcefff;border-color:#7fc0ef}.personal-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.personal-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}.personal-form-actions .btn-primary,.personal-form-actions .btn-soft{min-height:50px;border-radius:999px;padding:0 22px}
@media(max-width:800px){.personal-feature-links,.personal-hypothesis-evidence,.personal-form-grid{grid-template-columns:1fr}.personal-subpage .page-head{align-items:flex-start}.personal-resource-card{align-items:flex-start;flex-direction:column}.personal-hypothesis-actions>*{width:100%}}

/* Live controlled-access invitation flow (final product layer). */
.personal-grant-layout{align-items:start}.personal-grant-form{display:grid;gap:24px}.personal-grant-form .grant-step,.personal-pending-invitations{margin:0;padding:30px 32px;border:1px solid #dce5ee;border-radius:26px;background:#fff;box-shadow:none}.personal-step-heading{display:flex;align-items:flex-start;gap:16px;margin-bottom:22px}.personal-step-heading>span{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:12px;color:#1478d4;background:#eaf5ff;font-weight:750}.personal-step-heading h2,.personal-step-heading p{margin:0}.personal-step-heading p{margin-top:5px;color:#7d8da3}.personal-grant-form label:not(.grant-row){display:grid;gap:9px;color:#536985;font-weight:700}.personal-grant-form input[type=email],.personal-grant-form input[type=date]{min-height:58px;padding:0 18px;border:1px solid #d8e3ed;border-radius:17px;color:#14243b;background:#fff;font:inherit}.personal-live-scope-list .grant-row{position:relative;cursor:pointer}.personal-live-scope-list .grant-row input{position:absolute;opacity:0;pointer-events:none}.personal-live-scope-list .grant-row small{display:block;margin-top:4px;color:#8494a9;font-size:.92rem;font-weight:450}.personal-live-scope-list input:checked+.check-square{border-color:#1d86e5;background:#1d86e5}.personal-live-scope-list input:checked+.check-square:after{content:"";width:8px;height:4px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translateY(-1px)}.personal-custom-period{max-width:330px;margin-top:18px}.personal-context-card{position:sticky;top:24px;padding:34px;border:1px solid #cfe3f5;border-radius:28px;background:linear-gradient(150deg,#f7fbff 0%,#edf7ff 100%)}.personal-context-card h2{margin:18px 0 12px;color:#14243b;font-size:clamp(25px,2vw,34px);line-height:1.13}.personal-context-card>p,.personal-context-card span{color:#71849b;line-height:1.55}.personal-context-facts{display:grid;grid-template-columns:auto 1fr;gap:16px 14px;margin-top:28px;padding-top:24px;border-top:1px solid #d5e6f4}.personal-context-facts b{color:#27405f}.personal-pending-invitations{margin-top:24px}.personal-pending-invitations article{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0;border-top:1px solid #e3eaf0}.personal-pending-invitations p{margin:4px 0 0;color:#8292a7}.personal-invitation-result input[readonly]{width:100%}
@media(max-width:980px){.personal-context-card{position:static}}@media(max-width:680px){.personal-grant-form .grant-step,.personal-pending-invitations{padding:22px 18px}.personal-pending-invitations article{align-items:flex-start;flex-direction:column}}

/* Live family history surface. */
.personal-family-layout{align-items:start}.personal-family-layout .family-main{display:grid;gap:30px}.personal-family-layout .family-overview{box-shadow:none;border-color:#dce6ef}.personal-family-layout .family-overview-grid{grid-template-columns:auto repeat(2,minmax(140px,1fr)) auto}.personal-family-layout .family-icon{display:grid;place-items:center;width:72px;height:72px;border-radius:22px;background:#edf7ff;color:#197bd3;font-size:25px;font-weight:850}.personal-family-list{box-shadow:none}.personal-family-list .relative-row{min-height:118px}.personal-family-list .relative-copy{display:grid;grid-template-columns:auto auto;justify-content:start;align-items:center;gap:8px 12px}.personal-family-list .relative-copy p{grid-column:1/-1}.personal-family-list .status-pill{margin:0}.personal-family-layout .personal-context-card{min-height:0}
@media(max-width:980px){.personal-family-layout .family-overview-grid{grid-template-columns:auto 1fr 1fr}.personal-family-layout .family-overview-grid>button{grid-column:1/-1;width:100%}}@media(max-width:680px){.personal-family-layout .family-overview-grid{grid-template-columns:1fr}.personal-family-layout .family-icon{width:58px;height:58px}.personal-family-list .relative-copy{grid-template-columns:1fr}.personal-family-list .relative-copy p{grid-column:auto}}

/* Mobile subpages must stay inside the viewport even when their desktop
   toolbars and access labels contain long, non-wrapping values. */
@media (max-width: 760px) {
  body.bios-live .view-access-history .history-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }

  body.bios-live .view-access-history .history-control {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  body.bios-live .view-access-history .history-actions {
    grid-column: 1 / -1;
    min-width: 0;
    flex-wrap: wrap;
  }

  body.bios-live .view-access-history .history-card,
  body.bios-live .view-access-history .history-row,
  body.bios-live .view-access-history .history-row > div,
  body.bios-live .view-permissions .privacy-layout,
  body.bios-live .view-permissions .privacy-main,
  body.bios-live .view-permissions .privacy-group,
  body.bios-live .view-permissions .privacy-list,
  body.bios-live .view-permissions .safe-note,
  body.bios-live .view-permissions .privacy-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}
