:root {
  --bt-accent: #3b82f6;
  --bt-ok: #2fb344;
  --bt-warn: #f59f00;
  --bt-danger: #d63939;
  --bt-low: #7c3aed;
}

body {
  letter-spacing: 0;
}

.landing {
  background: #f8f8f9;
  color: #151821;
  min-height: 100vh;
}

.landing-nav {
  background: #f8f8f9;
  border-bottom: 1px solid #dfdfe3;
  height: 58px;
}

.landing-brand {
  align-items: center;
  display: flex;
  font-size: 1.05rem;
  font-weight: 700;
  gap: .55rem;
  height: 58px;
}

.landing-pulse {
  color: #6372ff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.landing-hero {
  padding: 5rem 0 5.75rem;
}

.landing-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: .98;
  margin: 0 0 1.5rem;
}

.landing-title span {
  color: #6472ff;
}

.landing-copy {
  color: #626b78;
  font-size: 1.08rem;
  line-height: 1.55;
  max-width: 32rem;
}

.landing-meta {
  color: #68717e;
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  margin: 2rem 0 1.5rem;
}

.landing-login-card,
.landing-preview-card,
.landing-feature-card {
  background: #fff;
  border: 1px solid #e1e2e6;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .04);
}

.landing-login-card {
  max-width: 24rem;
  padding: 1.5rem;
}

.landing-form-heading {
  color: #101624;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.landing-preview-card {
  margin-top: 1.2rem;
  max-width: 33rem;
  padding: 1.65rem;
}

.preview-marker {
  margin-bottom: 1.35rem;
}

.preview-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.preview-track {
  background: #eff0f2;
  border-radius: 999px;
  height: 7px;
  margin: .5rem 0 .35rem;
  overflow: hidden;
}

.preview-track span {
  background: #55b879;
  border-radius: inherit;
  display: block;
  height: 100%;
}

.preview-track-high span {
  background: #d94b42;
}

.landing-features {
  background: #f8f8f9;
  border-top: 1px solid #dfdfe3;
  padding: 5rem 0;
}

.landing-features h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 3rem;
  text-align: center;
}

.landing-feature-card {
  height: 100%;
  padding: 1.65rem;
}

.landing-feature-icon {
  align-items: center;
  background: #eef0ff;
  border-radius: 6px;
  color: #6372ff;
  display: flex;
  font-size: 1.35rem;
  font-weight: 700;
  height: 2.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 2.5rem;
}

.landing-feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .75rem;
}

.landing-feature-card p {
  color: #68717e;
  line-height: 1.55;
  margin: 0;
}

.landing-footer {
  border-top: 1px solid #dfdfe3;
  color: #717986;
  padding: 1.75rem;
  text-align: center;
}

.page-body {
  padding-top: 1rem;
}

.navbar {
  min-height: 4.25rem;
}

.header-actions,
.account-area {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: .55rem;
  margin-left: auto;
  min-width: 0;
}

.header-icon-btn {
  align-items: center;
  appearance: none;
  border: 0;
  color: var(--tblr-secondary);
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.theme-toggle-btn {
  background: color-mix(in srgb, var(--tblr-bg-surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--tblr-border-color) 82%, transparent);
  border-radius: 999px;
  flex: 0 0 auto;
  height: 2.4rem;
  min-height: 2.4rem;
  padding: 0;
  width: 2.4rem;
}

.theme-toggle-btn:hover,
.signout-btn:hover {
  background: color-mix(in srgb, var(--tblr-primary) 12%, transparent);
  color: var(--tblr-primary);
}

.account-chip,
.account-cluster {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  display: inline-grid;
  flex: 0 1 auto;
  gap: .45rem;
  grid-template-columns: auto minmax(0, max-content) auto;
  height: 2.4rem;
  min-width: 0;
  padding: 0;
  white-space: nowrap;
}

.account-pill {
  align-items: center;
  display: flex;
  gap: .55rem;
  min-height: 2rem;
  min-width: 0;
  padding: 0 .55rem 0 0;
}

.account-avatar {
  background: color-mix(in srgb, var(--tblr-primary) 18%, var(--tblr-bg-surface));
  color: var(--tblr-primary);
  flex: 0 0 auto;
  font-weight: 700;
}

.account-copy {
  display: block;
  line-height: 1;
  min-width: 0;
}

.account-name {
  font-size: .84rem;
  font-weight: 650;
  max-width: 11rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-email {
  display: none !important;
  height: 0;
  overflow: hidden;
  position: absolute;
  width: 0;
}

.signout-btn {
  align-items: center;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tblr-bg-surface) 88%, transparent);
  display: inline-flex;
  flex: 0 0 auto;
  height: 2rem;
  justify-content: center;
  min-height: 2rem;
  padding: 0;
  width: 2rem;
}

.signout-icon {
  background: currentColor;
  display: block;
  font-size: 0;
  height: 1.08rem;
  line-height: 0;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / contain no-repeat;
  overflow: hidden;
  width: 1.08rem;
}

.marker-finder {
  align-items: end;
  background: color-mix(in srgb, var(--tblr-bg-surface) 88%, transparent);
  border: 1px solid var(--tblr-border-color);
  border-radius: 8px;
  display: grid;
  gap: .85rem;
  grid-template-columns: minmax(16rem, 1.4fr) minmax(10rem, .75fr) minmax(9rem, .65fr) minmax(13rem, 1fr) auto;
  margin-top: 1rem;
  padding: .85rem;
}

.marker-finder-main,
.marker-finder-field {
  min-width: 0;
}

.marker-finder-actions {
  align-items: end;
  display: flex;
}

.marker-finder-meta {
  color: var(--tblr-secondary);
  font-size: .8125rem;
  grid-column: 1 / -1;
  min-height: 1rem;
}

.filter-empty {
  align-items: center;
  border: 1px dashed var(--tblr-border-color);
  border-radius: 8px;
  color: var(--tblr-secondary);
  display: flex;
  justify-content: center;
  min-height: 8rem;
  padding: 1.25rem;
  text-align: center;
}

.group-heading-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.group-top-link {
  color: var(--tblr-secondary);
  font-size: .75rem;
  text-decoration: none;
}

.group-top-link:hover {
  color: var(--tblr-primary);
}

.anchor-highlight {
  outline: 2px solid color-mix(in srgb, var(--tblr-primary) 60%, transparent);
  outline-offset: 2px;
}

.back-to-top-btn {
  align-items: center;
  background: var(--tblr-bg-surface);
  border: 1px solid var(--tblr-border-color);
  border-radius: 999px;
  bottom: 1.25rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  color: var(--tblr-body-color);
  display: none;
  font-size: 1.05rem;
  height: 2.55rem;
  justify-content: center;
  position: fixed;
  right: 1.25rem;
  width: 2.55rem;
  z-index: 1040;
}

.back-to-top-btn.is-visible {
  display: flex;
}

.section-shell {
  background: color-mix(in srgb, var(--tblr-bg-surface) 86%, transparent);
  border: 1px solid var(--tblr-border-color);
  border-radius: 8px;
  padding: 1.25rem;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: 0;
  margin: 0;
}

.section-heading > .text-secondary {
  max-width: 34rem;
  text-align: right;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #206bc4, #2fb344);
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-weight: 700;
  height: 56px;
  justify-content: center;
  width: 56px;
}

.brand-dot {
  background: linear-gradient(135deg, #206bc4, #2fb344);
  border-radius: 50%;
  display: inline-block;
  height: 12px;
  width: 12px;
}

.marker-card {
  border-left: 3px solid var(--tblr-border-color);
  min-height: 100%;
  transition: border-color .15s ease, transform .15s ease;
}

.marker-card:hover {
  transform: translateY(-1px);
}

.marker-card.status-in {
  border-left-color: var(--bt-ok);
}

.marker-card.status-low,
.marker-card.status-high {
  border-left-color: var(--bt-danger);
}

.marker-card.status-unknown {
  border-left-color: var(--bt-warn);
}

.result-chip {
  border: 1px solid var(--tblr-border-color);
  border-radius: 6px;
  display: inline-flex;
  gap: 6px;
  padding: 3px 8px;
}

.result-history {
  border-top: 1px solid var(--tblr-border-color);
  padding-top: .75rem;
}

.result-row {
  align-items: center;
  border-radius: 6px;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .35rem .25rem;
}

.result-row + .result-row {
  border-top: 1px solid color-mix(in srgb, var(--tblr-border-color) 55%, transparent);
}

.range-track {
  background: var(--tblr-border-color);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  position: relative;
}

#range-list {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.range-item {
  align-items: center;
  border-radius: 6px;
  border-left: 3px solid transparent;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(18rem, 1fr) minmax(18rem, 2fr);
  min-width: 0;
  padding: .65rem .5rem;
}

.range-status-high {
  background: color-mix(in srgb, var(--bt-danger) 9%, transparent);
  border-left-color: var(--bt-danger);
}

.range-status-low {
  background: color-mix(in srgb, var(--bt-low) 9%, transparent);
  border-left-color: var(--bt-low);
}

.range-item + .range-item {
  border-top: 1px solid color-mix(in srgb, var(--tblr-border-color) 60%, transparent);
}

.range-label {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-width: 0;
}

.range-value {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.range-result {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.range-flag {
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  padding: .25rem .45rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.range-flag-high {
  background: var(--bt-danger);
  color: #fff;
}

.range-flag-low {
  background: var(--bt-low);
  color: #fff;
}

.range-fill {
  background: var(--bt-ok);
  height: 100%;
  left: 25%;
  position: absolute;
  width: 50%;
}

.range-pin {
  background: var(--tblr-primary);
  border: 2px solid var(--tblr-body-bg);
  border-radius: 50%;
  height: 14px;
  position: absolute;
  top: -3px;
  transform: translateX(-50%);
  width: 14px;
}

.range-status-high .range-pin {
  background: var(--bt-danger);
}

.range-status-low .range-pin {
  background: var(--bt-low);
}

.test-row-high > td:first-child {
  border-left: 3px solid var(--bt-danger);
}

.test-row-low > td:first-child {
  border-left: 3px solid var(--bt-low);
}

.test-row-high {
  background: color-mix(in srgb, var(--bt-danger) 7%, transparent);
}

.test-row-low {
  background: color-mix(in srgb, var(--bt-low) 7%, transparent);
}

.latest-table-result {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: flex-start;
  min-width: 0;
}

.table-actions {
  display: inline-flex;
  gap: .25rem;
  justify-content: flex-end;
  white-space: nowrap;
}

.one-time-key {
  background: color-mix(in srgb, var(--tblr-bg-surface) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--bt-warn) 45%, transparent);
  border-radius: 6px;
  display: block;
  margin-top: .5rem;
  max-width: 100%;
  overflow-x: auto;
  padding: .45rem .6rem;
  white-space: nowrap;
}

.group-field-row {
  max-width: 48rem;
}

.group-field-control {
  align-items: center;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(16rem, 1fr) auto;
}

.group-hint-pill {
  background: var(--tblr-bg-surface-secondary);
  border: 1px solid var(--tblr-border-color);
  border-radius: 999px;
  color: var(--tblr-secondary);
  font-size: .8125rem;
  line-height: 1;
  padding: .55rem .75rem;
  white-space: nowrap;
}

.group-hint-pill.text-primary {
  background: color-mix(in srgb, var(--tblr-primary) 12%, transparent);
  border-color: color-mix(in srgb, var(--tblr-primary) 36%, transparent);
  color: var(--tblr-primary);
}

.group-hint-pill.text-warning {
  background: color-mix(in srgb, var(--bt-warn) 13%, transparent);
  border-color: color-mix(in srgb, var(--bt-warn) 42%, transparent);
  color: var(--bt-warn);
}

.col-test-name {
  min-width: 17rem;
  width: 34%;
}

.col-group {
  min-width: 11rem;
  width: 18%;
}

.col-unit {
  min-width: 8rem;
  width: 12%;
}

.col-ref {
  width: 7rem;
}

.col-latest {
  min-width: 12rem;
  width: 18%;
}

.col-actions {
  width: 1%;
  white-space: nowrap;
}

.chart-lg {
  min-height: 340px;
}

.marker-chart-panel {
  background: var(--tblr-bg-surface-secondary);
  border: 1px solid var(--tblr-border-color);
  border-radius: 8px;
  height: 100%;
  padding: 1rem;
}

.marker-chart {
  min-height: 340px;
}

.export-payload {
  background: var(--tblr-bg-surface-secondary);
  border: 1px solid var(--tblr-border-color);
  border-radius: 8px;
  font-size: .78rem;
  line-height: 1.55;
  margin: 0;
  max-height: 62vh;
  overflow: auto;
  padding: 1rem;
  white-space: pre;
}

.ai-export-dialog {
  max-width: min(920px, calc(100vw - 2rem));
}

.ai-export-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ai-export-toolbar .btn-list {
  flex-wrap: nowrap;
}

.nav-link.active {
  color: var(--tblr-primary);
  font-weight: 600;
}

.nav-link-doc {
  align-items: center;
  color: #6aa9e3;
  display: inline-flex;
  gap: .32rem;
}

.nav-link-doc:hover,
.nav-link-doc:focus {
  color: #8fc2f0;
}

.external-link-icon {
  background: currentColor;
  display: inline-block;
  height: .78rem;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
  width: .78rem;
}

.latest-value {
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: 0;
}

.btn-icon-text {
  min-width: 2rem;
}

.iso-date-input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  max-width: 11rem;
}

@media (max-width: 991.98px) {
  .marker-finder {
    grid-template-columns: minmax(16rem, 1fr) minmax(10rem, 1fr);
  }

  .marker-finder-actions,
  .marker-finder-meta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .navbar {
    min-height: auto;
  }

  .account-copy {
    display: none;
  }

  .account-pill {
    gap: 0;
    padding: 0;
  }

  .account-cluster {
    gap: .18rem;
  }

  .account-name {
    max-width: 7rem;
  }

  .marker-finder {
    grid-template-columns: 1fr;
  }

  .marker-finder-actions {
    align-items: stretch;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading > .text-secondary {
    text-align: left;
  }

  #range-list {
    gap: .5rem;
  }

  .range-item {
    grid-template-columns: 1fr;
  }

  .range-label {
    align-items: flex-start;
  }

  .group-field-control {
    grid-template-columns: 1fr;
  }

  .group-hint-pill {
    white-space: normal;
  }

  .ai-export-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-export-toolbar .btn-list {
    width: 100%;
  }

  .ai-export-toolbar .btn {
    flex: 1;
  }
}
