:root {
  --ink: #17252c;
  --muted: #60727a;
  --line: #d9e1e2;
  --soft: #f5f8f7;
  --paper: #ffffff;
  --accent: #176b67;
  --accent-dark: #10514f;
  --accent-soft: #e4f1ef;
  --warm: #eef3ed;
  --shadow: 0 10px 28px rgba(22, 47, 52, 0.08);
  --feature-color-0: #3978c2;
  --feature-color-1: #3f9d72;
  --feature-color-2: #b86b2b;
  --feature-color-3: #7f63b8;
  --feature-color-4: #b54869;
  --feature-color-5: #59747b;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--soft);
  color: var(--ink);
  margin: 0;
  min-width: 320px;
}

html {
  scroll-behavior: smooth;
}

a {
  color: var(--accent-dark);
}

a:hover {
  color: var(--accent);
}

.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1440px;
  padding: 0.85rem 1.4rem;
}

.brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
  color: var(--accent-dark);
}

.page,
.wide-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 2.5rem 1.4rem 4rem;
}

.wide-page {
  max-width: 1480px;
}

body[data-page="home"] .page {
  max-width: 1480px;
}

body[data-page="record"] .page {
  max-width: 1680px;
}

.hero {
  background: linear-gradient(135deg, #fdfefe 0%, #e8f2ef 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: clamp(2rem, 6vw, 5.5rem);
}

.eyebrow,
.field-label {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.12;
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 5rem);
  max-width: 820px;
}

h2 {
  font-size: 1.65rem;
}

h3 {
  font-size: 1.1rem;
}

.hero-copy,
.page-intro {
  color: #4c6268;
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 760px;
}

.hero-copy {
  margin: 1.2rem 0 1.75rem;
}

.database-title {
  display: grid;
  gap: 0.45rem;
  max-width: 1280px;
}

.database-name,
.database-tagline {
  display: block;
}

.database-name {
  color: var(--ink);
  font-size: 5rem;
  line-height: 0.95;
}

.database-tagline {
  color: #243a41;
  font-size: 2.25rem;
  line-height: 1.12;
}

.database-tagline > span {
  display: block;
  white-space: nowrap;
}

.hero-points {
  color: #314b52;
  display: grid;
  gap: 0.55rem;
  line-height: 1.55;
  margin: 0.85rem 0 1.75rem;
  max-width: 780px;
  padding-left: 1.2rem;
}

.hero-points li::marker {
  color: var(--accent);
}

.page-title {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.page-title h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.button,
button {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 7px;
  color: white;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  padding: 0.68rem 0.95rem;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}

.button:hover,
button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: white;
}

.button.secondary,
button.secondary {
  background: var(--paper);
  border-color: var(--line);
  color: var(--accent-dark);
}

.button.secondary:hover,
button.secondary:hover {
  background: var(--accent-soft);
  border-color: #b3ceca;
}

.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-top: 1.5rem;
}

.stat-card,
.panel,
.download-card,
.detail-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.stat-card {
  padding: 1.15rem;
}

.stat-card .field-label {
  letter-spacing: 0.01em;
  text-transform: none;
}

.stat-value {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.statistics-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.statistics-figure {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(22, 47, 52, 0.04);
  margin: 0;
  padding: 1rem;
}

.statistics-figure-wide {
  grid-column: 1 / -1;
}

.statistics-figure img {
  display: block;
  height: auto;
  width: 100%;
}

.panel {
  box-shadow: 0 4px 16px rgba(22, 47, 52, 0.04);
  margin-top: 1rem;
  padding: 1rem;
}

.toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.toolbar-group {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.toolbar-primary {
  align-items: end;
  display: grid;
  flex: 1 1 680px;
  grid-template-areas:
    "search page-size"
    "result-count .";
  grid-template-columns: minmax(320px, 720px) minmax(150px, 190px);
}

.toolbar-primary > .search-field {
  grid-area: search;
}

.toolbar-primary > .page-size-field {
  grid-area: page-size;
}

.toolbar-primary > .result-count {
  grid-area: result-count;
}

.dataset-loader {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  margin-bottom: 0.85rem;
  padding: 0.45rem 0.65rem;
}

.dataset-loader-copy {
  color: var(--muted);
  align-items: center;
  display: flex;
  font-size: 0.78rem;
  gap: 0.45rem;
  line-height: 1.4;
}

.dataset-loader-copy strong {
  color: var(--ink);
  font-size: 0.78rem;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.75rem;
  font-weight: 800;
  gap: 0.32rem;
  letter-spacing: 0.02em;
}

input,
select {
  background: var(--paper);
  border: 1px solid #c8d4d5;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  min-height: 40px;
  padding: 0.48rem 0.58rem;
}

input:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(23, 107, 103, 0.22);
  outline-offset: 2px;
}

.search-field {
  min-width: 0;
}

.page-size-field {
  min-width: 150px;
}

.search-control {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.search-control input {
  border-radius: 6px 0 0 6px;
  min-width: 0;
}

.search-control button {
  border-radius: 0 6px 6px 0;
  min-height: 38px;
  padding-inline: 1.35rem;
}

#global-search {
  width: 100%;
}

.semantic-search-panel {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 1rem;
  padding-top: 1rem;
}

.semantic-search-field {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.semantic-search-actions {
  align-items: end;
  display: grid;
  gap: 0.45rem;
  justify-items: end;
  min-width: 260px;
}

.semantic-search-actions .status-line {
  margin: 0;
  max-width: 34rem;
  text-align: right;
}

.semantic-score {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-top: 0.2rem;
}

.filter-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.filter-row {
  display: grid;
  gap: 0.85rem;
}

.filter-row-inline {
  align-items: end;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, max-content);
}

.filter-field {
  display: grid;
  gap: 0.32rem;
  max-width: 100%;
}

.filter-field-wide {
  max-width: none;
}

.filter-field-full {
  max-width: none;
}

.filter-field-checkbox {
  justify-content: end;
}

.filter-field.is-disabled,
.filter-field-full.is-disabled,
.filter-field-wide.is-disabled,
.filter-field-checkbox.is-disabled {
  color: #8c98a0;
  opacity: 0.58;
}

.filter-field.is-disabled input,
.filter-field.is-disabled select,
.filter-field-full.is-disabled input,
.filter-field-full.is-disabled select,
.filter-field-wide.is-disabled input,
.filter-field-wide.is-disabled select,
.filter-field-checkbox.is-disabled input,
.filter-field-checkbox.is-disabled select {
  background: #eef1f3;
  border-color: #d5dce1;
  color: #7b878f;
  cursor: not-allowed;
}

.range-inputs {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: 1fr 1fr;
}

.compact-checkbox {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.8rem;
  font-weight: 650;
  gap: 0.4rem;
  letter-spacing: 0;
}

.compact-checkbox input {
  min-height: auto;
}

.regex-option-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-note {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
}

.filter-warning {
  color: #9a4a1d;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0;
  min-height: 1em;
}

@media (max-width: 760px) {
  .statistics-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-primary {
    grid-template-areas:
      "search"
      "result-count"
      "page-size";
    grid-template-columns: 1fr;
  }

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

  .search-control input,
  .search-control button {
    border-radius: 6px;
  }

  .semantic-search-panel {
    grid-template-columns: 1fr;
  }

  .semantic-search-actions {
    justify-items: stretch;
    min-width: 0;
  }

  .semantic-search-actions .status-line {
    text-align: left;
  }

  .filter-row-inline {
    grid-template-columns: 1fr;
  }

  .dataset-loader {
    align-items: stretch;
    display: grid;
  }

  .filter-field-checkbox {
    justify-content: start;
  }
}

.filter-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.results-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.filter-heading p,
.status-line,
.muted {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.5;
  margin: 0;
}

.status-line.result-count {
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 800;
}

details {
  position: relative;
}

.column-selector summary {
  min-width: 172px;
  text-align: center;
}

summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 750;
  list-style: none;
  padding: 0.65rem 0.82rem;
}

summary::-webkit-details-marker {
  display: none;
}

.column-menu {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  left: 0;
  max-height: min(420px, 60vh);
  max-width: calc(100vw - 2rem);
  overflow-y: auto;
  padding: 0.65rem;
  position: absolute;
  right: auto;
  top: calc(100% + 0.35rem);
  width: 280px;
  z-index: 5;
}

.column-menu label {
  align-items: center;
  display: flex;
  font-size: 0.8rem;
  gap: 0.45rem;
  letter-spacing: 0;
  padding: 0.25rem;
}

.column-menu label.is-disabled {
  color: #8c98a0;
  cursor: not-allowed;
  opacity: 0.55;
}

.column-menu label.is-disabled input {
  cursor: not-allowed;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 1rem;
  overflow: auto;
}

table {
  border-collapse: collapse;
  font-size: 0.82rem;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e6ecec;
  max-width: 260px;
  padding: 0.68rem 0.72rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #edf4f2;
  color: var(--accent-dark);
  font-size: 0.73rem;
  letter-spacing: 0.035em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  white-space: nowrap;
  z-index: 1;
}

.column-heading,
th button {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  font-size: inherit;
  gap: 0.35rem;
  letter-spacing: inherit;
  padding: 0;
  text-transform: none;
}

th button:hover {
  background: transparent;
  color: var(--accent);
}

.sort-button {
  cursor: pointer;
}

.field-help-link {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #5f777b;
  display: inline-flex;
  font-size: 0.62rem;
  font-weight: 900;
  height: 0.92rem;
  justify-content: center;
  line-height: 1;
  margin-left: 0.3rem;
  text-decoration: none;
  text-transform: none;
  width: 0.92rem;
}

.field-help-link:hover {
  color: var(--accent);
}

.sort-indicator {
  color: #789195;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-width: 1.3rem;
}

.sort-indicator.active {
  color: var(--accent-dark);
}

tbody tr {
  background: var(--paper);
  cursor: pointer;
}

tbody tr:hover {
  background: #f0f8f6;
}

td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sequence-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.table-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  margin-top: 0.85rem;
}

.pagination {
  align-items: center;
  display: flex;
  gap: 0.45rem;
}

.pagination button {
  padding: 0.42rem 0.65rem;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.loading,
.empty-state {
  color: var(--muted);
  padding: 2rem 1rem;
  text-align: center;
}

.download-grid,
.detail-grid,
.key-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.download-card,
.detail-card {
  padding: 1rem;
}

.download-card-wide {
  grid-column: 1 / -1;
  max-width: 960px;
}

.download-meta {
  border-top: 1px solid #e6ecec;
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  padding-top: 1rem;
}

.download-meta div {
  display: grid;
  gap: 0.25rem;
}

.download-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.download-meta dd {
  color: var(--ink);
  font-size: 0.9rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.download-meta code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.text-link {
  color: var(--accent);
  display: inline-block;
  font-weight: 800;
  margin-left: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.field-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 1rem;
  overflow-x: auto;
}

.field-table {
  border-collapse: collapse;
  font-size: 0.92rem;
  width: 100%;
}

.field-table th:first-child,
.field-table td:first-child {
  width: 18rem;
}

.field-table th,
.field-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.field-table th {
  background: var(--soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  text-transform: none;
}

.field-table tr:last-child td {
  border-bottom: 0;
}

.field-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  white-space: normal;
}

.contact-panel {
  max-width: 640px;
}

.help-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.help-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(22, 47, 52, 0.04);
  color: var(--ink);
  display: grid;
  gap: 0.65rem;
  min-height: 170px;
  padding: 1.1rem;
  position: relative;
  text-decoration: none;
}

.help-card h2 {
  font-size: 1.35rem;
  margin-top: 0;
}

.help-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

.help-card-active:hover {
  border-color: #b3ceca;
  box-shadow: var(--shadow);
  color: var(--ink);
}

.help-card-disabled {
  cursor: default;
}

.help-citation-card {
  grid-column: 1 / -1;
}

.help-badge {
  align-self: start;
  background: #edf3f2;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  justify-self: start;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.5rem;
  text-transform: uppercase;
}

.help-badge.active {
  background: var(--accent-soft);
  border-color: #b3ceca;
  color: var(--accent-dark);
}

.help-detail-page {
  max-width: 1180px;
}

.help-detail-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(22, 47, 52, 0.04);
  margin-top: 1rem;
  padding: 1rem;
}

.help-preview-image {
  border: 1px solid #e6ecec;
  border-radius: 8px;
  display: block;
  height: auto;
  width: 100%;
}

.help-explainer-list {
  display: grid;
  gap: 1rem;
}

.help-explainer-list article {
  border-bottom: 1px solid #e6ecec;
  padding-bottom: 0.9rem;
}

.help-explainer-list article:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.help-explainer-list h2 {
  font-size: 1.25rem;
}

.help-explainer-list p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0.5rem 0 0;
}

.help-explainer-list .button {
  justify-self: start;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.download-card p,
.detail-card p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.detail-grid {
  margin-top: 1rem;
}

.key-grid {
  margin-top: 1rem;
}

.key-grid .detail-card {
  background: var(--accent-soft);
  border-color: #c6ddda;
}

.detail-value {
  font-size: 0.9rem;
  line-height: 1.55;
  margin-top: 0.45rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.detail-card .field-label {
  letter-spacing: 0.01em;
  text-transform: none;
}

.detail-value.sequence {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.79rem;
}

.rna-motif-hit {
  background: #ffe59a;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 rgba(154, 111, 24, 0.35);
  color: #203238;
  padding: 0.03rem 0.06rem;
}

.record-header {
  margin-bottom: 1.1rem;
}

.record-header h1 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  max-width: 980px;
}

.record-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0.6rem 0 0;
}

.record-layout {
  align-items: start;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 220px minmax(0, 1fr);
  margin-top: 1rem;
}

.record-main {
  min-width: 0;
}

.record-main a {
  overflow-wrap: anywhere;
}

.record-sidebar {
  align-self: start;
  position: sticky;
  top: 86px;
  z-index: 2;
}

.record-section-nav {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(22, 47, 52, 0.04);
  display: grid;
  gap: 0.2rem;
  padding: 0.45rem;
}

.section-nav-link {
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.25;
  padding: 0.56rem 0.62rem;
  text-decoration: none;
}

.section-nav-link:hover,
.section-nav-link:focus {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.section-nav-link.active {
  background: #f0f7f5;
  border-left-color: var(--accent);
  color: var(--accent-dark);
}

.record-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(22, 47, 52, 0.04);
  margin-top: 1.25rem;
  padding: 1rem;
  scroll-margin-top: 96px;
}

.record-section h2 {
  margin-bottom: 0.85rem;
}

.record-section h3 {
  color: var(--accent-dark);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  margin: 1rem 0 0.55rem;
}

.record-overview-section {
  margin-top: 0;
}

.record-overview-grid {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.affinity-summary,
.structure-panel {
  background: #fbfdfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  scroll-margin-top: 96px;
}

.affinity-summary {
  max-width: 720px;
}

.affinity-summary h3,
.structure-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.affinity-value {
  color: var(--accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  margin: 0.75rem 0 1rem;
}

.field-rows {
  display: grid;
  gap: 0;
  margin: 0;
}

.field-row {
  border-top: 1px solid #e6ecec;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  padding: 0.54rem 0;
}

.field-row:first-child {
  border-top: 0;
}

.field-row dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
}

.field-row dd {
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.key-section {
  background: linear-gradient(135deg, #ffffff 0%, #edf7f5 100%);
}

.section-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sequence-block,
.annotation-text {
  margin-top: 0.95rem;
}

.annotation-text p {
  color: #435a60;
  line-height: 1.65;
  margin: 0.45rem 0 0;
}

.sequence-pre,
.raw-details pre {
  background: #f6faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #203238;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  max-height: 260px;
  overflow: auto;
  padding: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  background: #eef5f3;
  border: 1px solid #c9ddda;
  border-radius: 999px;
  color: #224b4a;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.25;
  padding: 0.35rem 0.58rem;
}

.domain-chip {
  background: #e8f1ff;
  border-color: #bdd0ee;
  color: #233d6b;
}

.colored-domain-chip {
  background: color-mix(in srgb, var(--domain-color) 16%, white);
  border-color: color-mix(in srgb, var(--domain-color) 55%, white);
  border-left: 0.38rem solid var(--domain-color);
  color: #1f3136;
}

.go-chip {
  background: #f5f0df;
  border: 1px solid #ded1a7;
  border-radius: 999px;
  border-color: #ded1a7;
  color: #5d4b19;
  display: inline-flex;
  flex-wrap: wrap;
  font-size: 0.76rem;
  font-weight: 750;
  gap: 0.35rem;
  line-height: 1.25;
  padding: 0.35rem 0.58rem;
}

.go-id {
  color: #6c5d2a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.go-id a {
  color: inherit;
}

.go-groups {
  display: grid;
  gap: 0.8rem;
}

.go-group {
  background: #fbfdfd;
  border: 1px solid #e0e8e8;
  border-radius: 8px;
  padding: 0.8rem;
}

.go-group h3 {
  margin-top: 0;
}

.go-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.go-more {
  margin-top: 0.6rem;
}

.go-more summary {
  background: transparent;
  border: 0;
  display: inline-flex;
  padding: 0.25rem 0;
}

.go-more .go-chip-list {
  margin-top: 0.45rem;
}

.collapsible-description {
  color: #435a60;
  display: -webkit-box;
  line-height: 1.65;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.collapsible-description.expanded {
  display: block;
}

.collapsible-description p {
  margin: 0.45rem 0 0;
}

.description-toggle {
  margin-top: 0.65rem;
}

.sequence-track {
  background: #e4eceb;
  border: 1px solid #cfdbdb;
  border-radius: 999px;
  height: 20px;
  margin: 0.45rem 0;
  overflow: hidden;
  position: relative;
}

.track-feature {
  border-radius: 999px;
  height: 100%;
  min-width: 3px;
  opacity: 0.9;
  position: absolute;
  top: 0;
}

.feature-color-0 {
  background: var(--feature-color-0);
}

.feature-color-1 {
  background: var(--feature-color-1);
}

.feature-color-2 {
  background: var(--feature-color-2);
}

.feature-color-3 {
  background: var(--feature-color-3);
}

.feature-color-4 {
  background: var(--feature-color-4);
}

.feature-color-5 {
  background: var(--feature-color-5);
}

.colored-sequence {
  background: #fcfdfd;
}

.sequence-domain-span {
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0.08rem 0;
}

.feature-bg-0 {
  background: color-mix(in srgb, var(--feature-color-0) 22%, transparent);
}

.feature-bg-1 {
  background: color-mix(in srgb, var(--feature-color-1) 22%, transparent);
}

.feature-bg-2 {
  background: color-mix(in srgb, var(--feature-color-2) 22%, transparent);
}

.feature-bg-3 {
  background: color-mix(in srgb, var(--feature-color-3) 22%, transparent);
}

.feature-bg-4 {
  background: color-mix(in srgb, var(--feature-color-4) 22%, transparent);
}

.feature-bg-5 {
  background: color-mix(in srgb, var(--feature-color-5) 22%, transparent);
}

.raw-details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 1rem;
  padding: 0.75rem;
}

.raw-details summary {
  border: 0;
  padding: 0.2rem;
}

.mapped-feature-details {
  background: #fbfdfd;
}

.mini-table-wrap {
  overflow: auto;
}

.mini-table {
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-top: 0.55rem;
  width: 100%;
}

.mini-table th,
.mini-table td {
  max-width: none;
  padding: 0.5rem;
  white-space: normal;
}

.structure-panel {
  margin-top: 0;
}

.structure-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  margin: 0.65rem 0 1rem;
}

.structure-actions,
.structure-color-controls,
.structure-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.structure-actions {
  align-items: center;
}

.structure-color-mode,
.structure-color-chip {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 0.9rem;
  gap: 0.45rem;
  line-height: 1.2;
  padding: 0.38rem 0.6rem;
  text-decoration: none;
}

.structure-color-mode {
  min-height: 2.1rem;
}

.structure-color-mode.active {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: white;
}

.structure-color-mode.mutation-toggle.active {
  background: #6c2442;
  border-color: #4a152b;
}

.structure-mode-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 1rem;
  justify-content: center;
  width: 1rem;
}

.structure-mode-icon svg {
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1rem;
}

.structure-color-legend {
  margin: 0 0 0.75rem;
}

.structure-color-chip {
  color: var(--ink);
}

.structure-color-swatch {
  background: var(--swatch-color);
  border-radius: 999px;
  display: inline-block;
  height: 0.78rem;
  width: 0.78rem;
}

.structure-color-chip.mutation-chip {
  border-color: #9b6a12;
  font-weight: 700;
}

.molstar-box {
  background: #11191c;
  border: 1px solid var(--line);
  border-radius: 10px;
  height: min(620px, 72vh);
  max-width: 100%;
  min-height: 420px;
  min-width: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.structure-panel-loading .molstar-box::after {
  align-items: center;
  background: rgb(17 25 28 / 0.58);
  color: white;
  content: "Updating structure...";
  display: flex;
  font-size: 0.92rem;
  inset: 0;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  z-index: 3;
}

.molstar-box > div {
  height: 100%;
  inset: 0;
  max-width: 100%;
  min-width: 0;
  position: absolute;
  width: 100%;
}

.structure-message {
  align-items: center;
  color: #dce8e6;
  display: flex;
  height: 100%;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.structure-message.compact {
  background: #f5f8f7;
  border: 1px dashed #c8d4d5;
  border-radius: 8px;
  color: var(--muted);
  height: auto;
  min-height: 96px;
}

.footer-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 1.6rem;
}

@media (max-width: 980px) {
  .record-layout {
    display: block;
  }

  .record-sidebar {
    margin: 1rem 0;
    position: sticky;
    top: 58px;
  }

  .record-section-nav {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.4rem;
  }

  .section-nav-link {
    border-left: 0;
    border-bottom: 3px solid transparent;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .section-nav-link.active {
    border-bottom-color: var(--accent);
  }

  .record-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .page,
  .wide-page {
    padding: 1.5rem 0.85rem 3rem;
  }

  .hero {
    padding: 1.5rem;
  }

  .database-name {
    font-size: 3rem;
  }

  .database-tagline {
    font-size: 1.55rem;
  }

  .database-tagline > span {
    white-space: normal;
  }

  .record-header h1 {
    font-size: 1.75rem;
  }

  .record-section {
    padding: 0.85rem;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .affinity-summary,
  .structure-panel {
    padding: 0.85rem;
  }

  .molstar-box {
    height: 70vh;
    min-height: 360px;
  }
}
