:root {
  --rnal-deep: #0B2545;
  --rnal-maroon: #800000;
  --rnal-primary: #1B6CA8;
  --rnal-ligand: #E07A5F;
  --rnal-bg: #F7F9FB;
  --rnal-surface: #FFFFFF;
  --rnal-border: #E2E8F0;
  --rnal-text: #1A2433;
  --rnal-muted: #64748B;
  --affinity-strong: #1A9850;
  --affinity-moderate: #FEE08B;
  --affinity-weak: #D73027;
  --font-sans: "Inter", "Source Sans 3", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(11, 37, 69, 0.08);
  --shadow-sm: 0 2px 8px rgba(11, 37, 69, 0.06);
  --shadow-lg: 0 4px 16px rgba(11, 37, 69, 0.12);
  --site-nav-offset: 76px;
  --help-scroll-offset: 88px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--help-scroll-offset);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--rnal-bg);
  color: var(--rnal-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--rnal-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Site header (logo + tagline) */
.site-header {
  background: var(--rnal-surface);
  border-bottom: 1px solid var(--rnal-border);
  padding: 1.1rem 1.5rem 1.25rem;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  line-height: 1.2;
}

.site-brand:hover {
  text-decoration: none;
  opacity: 0.96;
}

.site-logo {
  height: 72px;
  width: auto;
  max-width: min(420px, 94vw);
  display: block;
  shape-rendering: geometricPrecision;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.site-brand-tagline {
  margin: 0.5rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: #5b6b82;
  letter-spacing: 0.01em;
  line-height: 1.35;
  max-width: 34rem;
}

.site-title-block {
  flex: 1;
}

.site-title {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--rnal-maroon);
  line-height: 1.15;
}

.site-tagline {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  color: var(--rnal-muted);
  font-weight: 400;
}

/* Centered nav bar (HARIBOSS-style) */
.site-nav-bar {
  background: #111111;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.site-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.site-nav-link.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.nav-home-icon {
  width: 22px;
  height: 22px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .site-header { padding: 1rem 1rem 1.1rem; }
  .site-logo { height: 56px; }
  .site-brand-tagline { font-size: 0.875rem; max-width: 22rem; }
  .site-title { font-size: 1.75rem; }
  .site-nav-link { padding: 0.75rem 1rem; font-size: 0.7rem; letter-spacing: 0.08em; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--rnal-primary);
  color: #fff;
}
.btn-primary:hover { background: #155a8a; color: #fff; }

.btn-ligand {
  background: var(--rnal-ligand);
  color: #fff;
}
.btn-ligand:hover { background: #c96a52; color: #fff; }

.btn-outline {
  background: var(--rnal-surface);
  color: var(--rnal-text);
  border-color: var(--rnal-border);
}
.btn-outline:hover { background: var(--rnal-bg); color: var(--rnal-text); }

.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }

/* Main */
.rnal-main { flex: 1; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

.container-wide { max-width: 1440px; }

/* Footer */
.rnal-footer {
  background: var(--rnal-deep);
  color: rgba(255,255,255,0.75);
  padding: 2rem 1.5rem;
  margin-top: auto;
  font-size: 0.875rem;
}

.rnal-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.rnal-footer-brand {
  display: flex;
  align-items: center;
}

.rnal-footer-logo-link {
  display: inline-flex;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  line-height: 0;
  text-decoration: none;
}

.rnal-footer-logo-link:hover {
  opacity: 0.94;
  text-decoration: none;
}

.rnal-footer-logo {
  height: 48px;
  width: auto;
  max-width: 200px;
  display: block;
  shape-rendering: geometricPrecision;
}

.rnal-footer h4 {
  color: #fff;
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.rnal-footer a { color: rgba(255,255,255,0.85); }
.rnal-footer-bottom {
  max-width: 1280px;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 0.8rem;
}

/* Welcome section (home) */
/* Hero (home) */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 380px at 78% -8%, rgba(27, 108, 168, 0.07), transparent 60%),
    linear-gradient(180deg, #fbfcfe 0%, var(--rnal-surface) 100%);
  border-bottom: 1px solid var(--rnal-border);
  padding: 3rem 1.5rem 2.75rem;
}

.hero-accent {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rnal-maroon), var(--rnal-primary) 55%, var(--affinity-strong));
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.95fr);
  gap: 2.75rem;
  align-items: start;
}

.hero-copy p { margin: 0; }

.hero-title {
  margin: 0 0 0.3rem;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--rnal-maroon);
  line-height: 1.05;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rnal-deep);
  margin-bottom: 1.1rem !important;
}

.hero-lead {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--rnal-text);
  line-height: 1.55;
  margin-bottom: 0.85rem !important;
}

.hero-body {
  color: var(--rnal-muted);
  line-height: 1.7;
  max-width: 52ch;
  margin-bottom: 1.25rem !important;
}

.hero-badges {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-badges li {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rnal-deep);
  background: rgba(27, 108, 168, 0.08);
  border: 1px solid rgba(27, 108, 168, 0.18);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  font-size: 0.88rem;
  color: var(--rnal-muted);
}

.hero-meta-update {
  position: relative;
  padding-left: 1.1rem;
}

.hero-meta-update::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--affinity-strong);
  box-shadow: 0 0 0 3px rgba(26, 152, 80, 0.18);
}

.hero-meta-cite { font-weight: 600; }

/* Hero data panel */
.hero-figures {
  position: relative;
  overflow: hidden;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.hero-figures-mark {
  position: absolute;
  right: -28px;
  bottom: -28px;
  height: 150px;
  width: auto;
  opacity: 0.06;
  pointer-events: none;
  shape-rendering: geometricPrecision;
}

.hero-figures-title {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--rnal-muted);
}

.hero-figure-list {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.hero-figure {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rnal-border);
  text-decoration: none;
  transition: padding-left 0.18s ease, color 0.18s ease;
}

.hero-figure:first-child { border-top: none; }

.hero-figure:hover,
.hero-figure:focus-visible {
  text-decoration: none;
  padding-left: 0.35rem;
}

.hero-figure:focus-visible {
  outline: 2px solid var(--rnal-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.hero-figure-value {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  order: 2;
}

.hero-figure-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--rnal-text);
  order: 1;
}

.hero-figure--complex .hero-figure-value { color: var(--affinity-strong); }
.hero-figure--ligand .hero-figure-value { color: var(--rnal-ligand); }
.hero-figure--rna .hero-figure-value { color: var(--rnal-primary); }

.hero .search-hub {
  margin-top: 2.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rnal-border);
}

.hero .search-hub__frame--single {
  max-width: none;
}

/* Search hub (home + search page) */
.search-hub {
  margin-top: 1.25rem;
}

.search-hub__header {
  margin-bottom: 0.85rem;
}

.search-hub__heading {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rnal-text);
  letter-spacing: 0.01em;
}

.search-hub__intro {
  margin: 0;
  font-size: 0.9rem;
  color: var(--rnal-muted);
  line-height: 1.55;
}

.search-hub__frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-hub__frame--single {
  grid-template-columns: 1fr;
  max-width: 52rem;
}

.search-hub__panel--primary {
  gap: 1.35rem;
  padding: 1.35rem 1.5rem 1.5rem;
}

.search-hub__full-form-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  border: 2px solid var(--rnal-primary);
  background: linear-gradient(135deg, rgba(27, 108, 168, 0.1) 0%, rgba(27, 108, 168, 0.03) 55%, #fff 100%);
  box-shadow: 0 2px 12px rgba(27, 108, 168, 0.12);
}

.search-hub__full-form-copy {
  flex: 1 1 16rem;
  min-width: 0;
}

.search-hub__full-form-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--rnal-text);
  letter-spacing: 0.01em;
}

.search-hub__full-form-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--rnal-muted);
  max-width: 42rem;
}

.search-hub__full-form-btn {
  flex-shrink: 0;
  padding: 0.7rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.search-hub__starter {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--rnal-border);
}

.search-hub__actions--starter {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-hub__actions-hint {
  flex: 1 1 12rem;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--rnal-muted);
}

.search-hub__actions-hint a {
  font-weight: 600;
  color: var(--rnal-primary);
}

.search-hub__actions-hint a:hover {
  text-decoration: underline;
}

.search-hub__panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem;
  min-width: 0;
}

.search-hub__panel + .search-hub__panel {
  border-left: 1px solid var(--rnal-border);
}

.search-hub__panel-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rnal-text);
}

.search-hub__panel-desc {
  margin: -0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--rnal-muted);
  line-height: 1.5;
}

.search-hub__query-row {
  display: flex;
  gap: 0;
}

.search-hub__query-input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rnal-border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--rnal-text);
  background: #fff;
}

.search-hub__query-input:focus {
  outline: none;
  border-color: var(--rnal-primary);
  box-shadow: inset 0 0 0 1px var(--rnal-primary);
}

.search-hub__query-row .btn-primary {
  border-radius: 0 var(--radius) var(--radius) 0;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
  white-space: nowrap;
}

.search-hub__examples {
  margin: 0;
  font-size: 0.8rem;
  color: var(--rnal-muted);
  line-height: 1.6;
}

.search-hub__examples-label {
  margin-right: 0.25rem;
}

.search-hub__example {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--rnal-primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.search-hub__example:hover {
  color: #155a8a;
}

.search-hub__example + .search-hub__example::before {
  content: "·";
  display: inline-block;
  margin: 0 0.35rem;
  color: var(--rnal-border);
  text-decoration: none;
  pointer-events: none;
}

.search-hub__tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rnal-border);
  margin-top: 0.15rem;
}

.search-hub__tab {
  padding: 0.55rem 0.65rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rnal-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  white-space: nowrap;
}

.search-hub__tab:hover {
  color: var(--rnal-text);
}

.search-hub__tab.active {
  color: var(--rnal-primary);
  border-bottom-color: var(--rnal-primary);
}

.search-hub__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.search-hub__form--advanced {
  margin-top: 0.15rem;
}

.search-hub__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}

.search-hub__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.search-hub__field--wide {
  grid-column: 1 / -1;
}

.search-hub__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rnal-text);
}

.search-hub__field input[type="text"],
.search-hub__field input[type="number"],
.search-hub__field select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--rnal-text);
  background: #fff;
}

.search-hub__field input:focus {
  outline: none;
  border-color: var(--rnal-primary);
  box-shadow: 0 0 0 1px var(--rnal-primary);
}

.search-hub__field input:disabled {
  background: var(--rnal-bg);
  color: var(--rnal-muted);
}

.search-hub__field select:disabled {
  background: var(--rnal-bg);
  color: var(--rnal-muted);
}

.search-hub__mono {
  font-family: var(--font-mono);
  font-size: 0.82rem !important;
}

.search-hub__mode {
  display: none;
}

.search-hub__mode.active {
  display: block;
}

.search-hub__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rnal-border);
}

.search-hub__more {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--rnal-primary);
}

.search-hub__more:hover {
  text-decoration: underline;
}

.container > .search-hub {
  margin-bottom: 2rem;
}

.adv-search-tabs {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--rnal-border);
}

.adv-search-tab {
  padding: 0.55rem 0.85rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rnal-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}

.adv-search-tab:hover {
  color: var(--rnal-text);
}

.adv-search-tab.active {
  color: var(--rnal-primary);
  border-bottom-color: var(--rnal-primary);
}

/* Advanced search page */
.adv-search-card {
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.adv-search-card--featured {
  border-width: 2px;
  border-color: var(--rnal-primary);
  box-shadow: var(--shadow), 0 4px 20px rgba(27, 108, 168, 0.1);
  padding: 1.5rem 1.65rem 1.65rem;
}

.page-header--search h1 {
  font-size: 1.75rem;
  font-weight: 800;
}

.adv-search-form {
  margin-top: 1rem;
}

.adv-search-mode {
  display: none;
}

.adv-search-mode.active {
  display: block;
}

.adv-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
}

.adv-search-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.adv-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.adv-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rnal-text);
}

.adv-hint {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--rnal-muted);
  line-height: 1.45;
}

.adv-label small {
  font-weight: 500;
  color: var(--rnal-muted);
}

.adv-field input[type="text"],
.adv-field input[type="number"],
.adv-field select,
.adv-field textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: #fff;
}

.adv-field textarea {
  resize: vertical;
  min-height: 4.5rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8rem;
}

.adv-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.adv-range input {
  flex: 1;
  min-width: 0;
}

.adv-range span {
  font-size: 0.8rem;
  color: var(--rnal-muted);
}

.adv-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 8rem;
  overflow: auto;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  background: var(--rnal-bg);
}

.adv-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rnal-text);
}

.adv-search-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rnal-border);
}

.adv-search-results {
  margin-top: 1rem;
}

.adv-results-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.adv-results-header p {
  margin: 0 0 1rem;
  color: var(--rnal-muted);
  font-size: 0.9rem;
}

.adv-results-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--rnal-muted);
}

@media (max-width: 900px) {
  .search-hub__frame,
  .search-hub__frame--single {
    grid-template-columns: 1fr;
  }

  .search-hub__full-form-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .search-hub__full-form-btn {
    width: 100%;
    text-align: center;
  }

  .search-hub__panel + .search-hub__panel {
    border-left: none;
    border-top: 1px solid var(--rnal-border);
  }

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

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

.section-heading {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rnal-border);
  color: var(--rnal-deep);
}

.explore-section {
  padding: 3rem 0 3.5rem;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-figures { max-width: 460px; }
}

@media (max-width: 560px) {
  .hero { padding: 2.25rem 1.25rem 2rem; }
  .hero-title { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-figure { transition: none; }
}

/* Explore cards */
.explore-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}

.explore-card {
  position: relative;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: 10px;
  padding: 1.4rem 1.4rem 1.5rem;
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: var(--rnal-text);
  overflow: hidden;
}

.explore-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--rnal-border);
  transition: background 0.15s;
}

.explore-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--rnal-border);
  text-decoration: none;
  color: var(--rnal-text);
}

.explore-card--complex::before { background: var(--affinity-strong); }
.explore-card--stats::before { background: var(--rnal-primary); }
.explore-card--help::before { background: var(--rnal-ligand); }
.explore-card--about::before { background: var(--rnal-maroon); }

.explore-card-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--rnal-muted);
  margin-bottom: 0.6rem;
}

.explore-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--rnal-deep);
}

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

/* Affinity chip */
.affinity-chip {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  line-height: 1.2;
}

.affinity-chip.large {
  font-size: 1.5rem;
  padding: 0.5rem 1.25rem;
}

.affinity-chip__prefix {
  display: inline;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.affinity-chip__prefix sub,
.affinity-chip sub,
.complex-compare-value .affinity-chip__prefix sub {
  font-size: 0.62em;
  font-weight: 700;
  line-height: 1;
  vertical-align: sub;
  position: static;
}

.affinity-chip.large .affinity-chip__prefix sub,
.affinity-chip.large sub {
  font-size: 0.58em;
}

/* pKd color scale legend */
.affinity-scale {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  background: var(--rnal-surface-alt, #f8fafc);
}

.affinity-scale__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

.affinity-scale__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--rnal-text);
}

.affinity-scale__title .chem-label {
  font-weight: 700;
}

.affinity-scale__hint {
  font-size: 0.75rem;
  color: var(--rnal-muted);
}

.affinity-scale__bar {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.affinity-scale__labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.affinity-scale__endpoint {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.72rem;
  color: var(--rnal-muted);
}

.affinity-scale__endpoint--mid {
  text-align: center;
  align-items: center;
}

.affinity-scale__endpoint:last-child {
  text-align: right;
  align-items: flex-end;
}

.affinity-scale__qual {
  font-weight: 600;
  color: var(--rnal-text);
}

.affinity-scale__value {
  font-size: 0.68rem;
  line-height: 1.3;
}

.affinity-scale__examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
  justify-content: space-between;
}

.affinity-scale--compact {
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 0.55rem 0.75rem;
}

.affinity-scale--compact .affinity-scale__header {
  margin-bottom: 0.35rem;
}

.affinity-scale--compact .affinity-scale__bar {
  height: 8px;
}

.affinity-scale--compact .affinity-scale__labels {
  margin-top: 0.3rem;
}

.help-section .affinity-scale {
  margin: 0 0 1rem;
  max-width: 32rem;
}

.filter-section .affinity-scale {
  margin-top: 0.65rem;
  padding: 0.65rem;
}

@media (max-width: 900px) {
  .filter-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .filter-sidebar__scroll {
    overflow: visible;
    padding: 1rem;
  }

  .filter-actions {
    padding: 0 1rem 1rem;
    border-top: none;
  }
}

.prop-table th sub {
  font-size: 0.62em;
  font-weight: 600;
  vertical-align: sub;
  position: static;
  line-height: 1;
}

.prop-table th .prop-label,
.prop-table th .chem-label {
  display: inline;
  white-space: nowrap;
}

.prop-table th .prop-label {
  margin-right: 0.1rem;
}

/* Entity colors */
.text-rna { color: var(--rnal-primary); font-weight: 600; }
.text-ligand { color: var(--rnal-ligand); font-weight: 600; }

.ligand-molecule-name {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--rnal-muted);
  text-transform: none;
  letter-spacing: 0.01em;
}

.ligand-code-display {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.ligand-code-block {
  display: inline-block;
  vertical-align: top;
}

.ligand-code-block--combined {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ligand-code-block__codes {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--rnal-muted);
  letter-spacing: 0.02em;
}

.compound-card-identity .ligand-code-block__codes {
  font-size: 0.72rem;
}

/* Ligand page / header: large code, small molecule name below */
.ligand-page-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin: 0 0 0.25rem;
}

.ligand-page-title__code {
  display: block;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.ligand-page-title__name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rnal-deep);
  text-transform: none;
  letter-spacing: 0.02em;
  max-width: 42rem;
}

.page-header h1 .ligand-code-block .ligand-page-title__code {
  font-size: inherit;
  font-weight: inherit;
}

.page-header h1 .ligand-code-block .ligand-page-title__name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rnal-deep);
  margin-top: 0.1rem;
}

/* Page header */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

.page-header p {
  margin: 0;
  color: var(--rnal-muted);
}

/* Complex (entry) detail header */
.complex-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.complex-header__meta-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--rnal-border);
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.complex-header__meta-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 1 1 0;
  min-width: 0;
  padding: 0.85rem 1.15rem;
}

.complex-header__meta-group:not(:last-child) {
  border-right: 1px solid var(--rnal-border);
}

.complex-header__meta-group--pdb {
  flex: 0 1 auto;
  justify-content: flex-start;
  gap: 0.45rem;
  border-left: 4px solid var(--rnal-primary);
  padding-left: 1rem;
  background: linear-gradient(90deg, rgba(27, 108, 168, 0.06) 0%, transparent 100%);
}

.complex-header__meta-kv-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rnal-muted);
  white-space: nowrap;
}

.complex-header__meta-kv-value {
  margin-left: auto;
  text-align: right;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--rnal-deep);
  white-space: nowrap;
}

.complex-header__meta-group--pdb .complex-header__pdb {
  display: inline-block;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  color: var(--rnal-text);
}

.complex-header__meta-group--pdb .complex-header__pdb:hover {
  color: var(--rnal-deep);
}

.complex-header__meta-group--pdb .pdb-link__extended {
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--rnal-muted);
}

.complex-header__meta-group--pdb .pdb-link__sep {
  font-weight: 500;
  color: var(--rnal-muted);
}

@media (max-width: 768px) {
  .complex-header__meta-bar {
    flex-direction: column;
  }

  .complex-header__meta-group:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--rnal-border);
  }

  .complex-header__meta-group--pdb {
    border-left: none;
    border-top: 4px solid var(--rnal-primary);
  }

  .complex-header__meta-group {
    padding: 0.75rem 1rem;
  }

  .complex-header__meta-group--pdb .complex-header__pdb {
    font-size: 1.05rem;
  }
}

.complex-header__structure {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--rnal-border);
  background: linear-gradient(180deg, #f4f9fd 0%, #ffffff 100%);
  border-left: 4px solid var(--rnal-primary);
}

.complex-header__structure-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.45rem;
  line-height: 1.35;
}

.complex-header__section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rnal-muted);
}

.complex-header__inline-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rnal-muted);
}

.complex-header__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}

.complex-header__pdb,
.pdb-link {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--rnal-bg);
  border: 1px solid var(--rnal-border);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--rnal-primary);
}

.pdb-link__code,
.complex-header__pdb .pdb-link__code {
  font-weight: 800;
  color: var(--rnal-text);
}

.complex-header__pdb:hover {
  border-color: var(--rnal-primary);
}

.pdb-link__sep {
  margin: 0 0.15rem;
  color: var(--rnal-muted);
  font-weight: 500;
}

.pdb-link__extended {
  font-weight: 600;
}

.complex-header__ligand {
  width: 100%;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--rnal-border);
  background: linear-gradient(180deg, #fefaf8 0%, #ffffff 100%);
  border-left: 4px solid var(--rnal-ligand);
  overflow: hidden;
}

.complex-header__ligand-meta {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.complex-header__ligand-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 1 1 0;
  min-width: 0;
  padding: 0.85rem 1.15rem;
}

.complex-header__ligand-meta-item:not(:last-child) {
  border-right: 1px solid var(--rnal-border);
}

.complex-header__ligand-meta-item--code {
  flex: 1.4 1 0;
}

.complex-header__ligand-meta-item .complex-header__meta-kv-value {
  color: var(--rnal-ligand);
}

.complex-header__ligand-molecule {
  padding: 0.65rem 1.15rem 0.85rem;
  border-top: 1px solid var(--rnal-border);
  background: rgba(255, 255, 255, 0.65);
}

.complex-header__ligand-molecule-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.complex-header__ligand-molecule-label {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rnal-muted);
  white-space: nowrap;
}

.complex-header__ligand-molecule-row .rna-sequence-box--ligand-name {
  flex: 1 1 auto;
  min-width: 0;
}

.complex-header__ligand-molecule-list {
  display: grid;
  gap: 0.55rem;
}

.complex-header__ligand-molecule-item {
  display: grid;
  gap: 0.25rem;
}

.complex-header__ligand-molecule-code {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.complex-header__ligand .rna-sequence-box--ligand-name {
  max-width: none;
}

.complex-header__fields {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.complex-header__field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  width: 100%;
}

.complex-header__field-row .complex-header__field {
  flex: 0 1 auto;
}

.complex-header__field-row .complex-header__field dd {
  flex: 0 1 auto;
}

.complex-header__field {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.65rem;
}

.complex-header__field dt {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rnal-muted);
}

.complex-header__field dt::after {
  content: ' =';
}

.complex-header__field dd {
  margin: 0;
  flex: 1 1 10rem;
  min-width: 0;
}

@media (max-width: 520px) {
  .complex-header__field {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .complex-header__field dd {
    flex: none;
    width: 100%;
  }
}

.complex-header__field-row .complex-header__field:first-child {
  flex: 1 1 12rem;
  min-width: 0;
}

.complex-header__ligand-code,
.complex-header__ligand-chain,
.complex-header__ligand-res-num {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .complex-header__ligand-meta {
    flex-direction: column;
  }

  .complex-header__ligand-meta-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--rnal-border);
  }

  .complex-header__ligand-meta-item {
    padding: 0.75rem 1rem;
  }
}

.complex-header__ligand-name {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rnal-deep);
}

.complex-header__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.complex-header__meta-label {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 600;
  color: var(--rnal-muted);
}

.complex-header__meta-label::after {
  content: ' =';
}

.complex-header__meta-value {
  font-weight: 600;
  color: var(--rnal-text);
}

/* Browse layout */
.browse-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .browse-layout { grid-template-columns: 1fr; }
}

/* Filter sidebar */
.filter-sidebar {
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 0;
  position: sticky;
  top: calc(var(--site-nav-offset) + 0.75rem);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--site-nav-offset) - 1.5rem);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.filter-sidebar__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1rem 0.5rem;
  overscroll-behavior: contain;
}

.filter-section {
  border-bottom: 1px solid var(--rnal-border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.filter-section:last-child { border-bottom: none; margin-bottom: 0; }

.filter-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.filter-section__header h4 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.filter-section h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--rnal-muted);
  text-transform: none;
}

.filter-bulk-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.35rem;
}

.filter-bulk-btn {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--rnal-accent, #0b6e4f);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.filter-bulk-btn:hover {
  color: var(--rnal-text);
}

.filter-bulk-btn + .filter-bulk-btn::before {
  content: "·";
  margin-right: 0.35rem;
  color: var(--rnal-muted);
  text-decoration: none;
  display: inline-block;
}

.filter-section h4 .chem-label {
  color: var(--rnal-text);
}

.filter-section__hint {
  margin: -0.25rem 0 0.45rem;
  font-size: 0.7rem;
  color: var(--rnal-muted);
  line-height: 1.35;
}

.filter-check__count {
  font-size: 0.72rem;
  color: var(--rnal-muted);
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}

.filter-method-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.filter-method-group__row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.filter-check--solo {
  margin: 0;
  flex-shrink: 0;
}

.filter-method-group__toggle {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rnal-text);
  text-align: left;
  cursor: pointer;
  line-height: 1.25;
  min-width: 0;
}

.filter-method-group__toggle:hover .filter-method-group__name {
  color: var(--rnal-accent, #0b6e4f);
}

.filter-method-group__name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-method-group__name--md {
  font-size: 0.74rem;
}

.filter-method-group__name--sm {
  font-size: 0.68rem;
}

.filter-method-group__name--xs {
  font-size: 0.62rem;
  letter-spacing: -0.01em;
}

.filter-method-group__chevron {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0;
  border-right: 1.5px solid var(--rnal-muted);
  border-bottom: 1.5px solid var(--rnal-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.filter-method-group.is-expanded .filter-method-group__chevron {
  transform: rotate(45deg);
}

.filter-method-members {
  list-style: none;
  margin: 0 0 0.15rem 1.35rem;
  padding: 0.25rem 0 0.35rem 0.55rem;
  border-left: 2px solid var(--rnal-border);
  display: none;
  flex-direction: column;
  gap: 0.2rem;
}

.filter-method-group.is-expanded .filter-method-members {
  display: flex;
}

.filter-method-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--rnal-muted);
  min-width: 0;
}

.filter-method-member__label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-method-member__label--md {
  font-size: 0.68rem;
}

.filter-method-member__label--sm {
  font-size: 0.64rem;
}

.filter-method-member__label--xs {
  font-size: 0.6rem;
  letter-spacing: -0.01em;
}

.method-breakdown {
  padding: 0.15rem 0 0.35rem;
}

.method-breakdown__hint {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  color: var(--rnal-muted);
  line-height: 1.4;
}

.method-breakdown__list {
  max-height: 520px;
  overflow-y: auto;
}

.method-breakdown__group .filter-method-group__row {
  position: relative;
  align-items: stretch;
}

.method-breakdown__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(100%, calc(var(--method-pct, 0) * 1%));
  background: rgba(27, 108, 168, 0.1);
  border-radius: 4px;
  pointer-events: none;
  z-index: 0;
}

.method-breakdown__group .filter-method-group__toggle {
  position: relative;
  z-index: 1;
  width: 100%;
}

.chart-panel--method-breakdown .chart-canvas {
  min-height: 0;
  height: auto;
}

.filter-section label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  cursor: pointer;
}

.filter-section input[type="range"] { width: 100%; }

.filter-checklist {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  background: var(--rnal-bg);
}

.filter-checklist li {
  margin: 0;
  padding: 0;
}

.filter-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rnal-text);
  cursor: pointer;
  line-height: 1.35;
}

.filter-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.filter-range-field input[type="number"] {
  width: 100%;
  padding: 0.35rem;
}

.filter-range-field {
  display: block;
  margin-bottom: 0.35rem;
  cursor: default;
}

.filter-range-label {
  display: block;
  font-size: 0.75rem;
  color: var(--rnal-muted);
  margin-bottom: 0.2rem;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--rnal-muted);
}

.filter-actions {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--rnal-border);
  background: var(--rnal-surface);
}

.filter-actions .btn {
  flex: 1;
  min-width: 0;
}

/* Toolbar */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
}

.table-toolbar .result-count {
  font-weight: 600;
  margin-right: auto;
}

.browse-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.browse-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--rnal-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.browse-search-icon svg {
  width: 100%;
  height: 100%;
}

.browse-search input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.35rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--rnal-surface);
  color: var(--rnal-text);
}

.browse-search input:focus {
  outline: none;
  border-color: var(--rnal-primary);
  box-shadow: 0 0 0 3px rgba(27, 108, 168, 0.15);
}

.browse-search input::placeholder {
  color: var(--rnal-muted);
}

.detail-search-bar {
  width: 100%;
  margin-bottom: 1.25rem;
}

.detail-search-bar__form {
  display: flex;
  width: 100%;
  gap: 0.5rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.detail-search-bar__field {
  position: relative;
  flex: 1 1 280px;
  min-width: 0;
}

.detail-search-bar__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--rnal-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-search-bar__icon svg {
  width: 100%;
  height: 100%;
}

.detail-search-bar__input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.35rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--rnal-surface);
  color: var(--rnal-text);
}

.detail-search-bar__input:focus {
  outline: none;
  border-color: var(--rnal-primary);
  box-shadow: 0 0 0 3px rgba(27, 108, 168, 0.15);
}

.detail-search-bar__input::placeholder {
  color: var(--rnal-muted);
}

.detail-search-bar__submit {
  flex: 0 0 auto;
  align-self: stretch;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

/* Table */
.data-table-wrap {
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.data-table {
  width: 100%;
  min-width: 26rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: #f8fafc;
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--rnal-deep);
  border-bottom: 1px solid var(--rnal-border);
  white-space: normal;
  vertical-align: top;
}

.data-table th .th-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  line-height: 1.2;
  min-width: 3.25rem;
}

.data-table th .th-label__text {
  line-height: 1.25;
}

.data-table td {
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid var(--rnal-border);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: rgba(27, 108, 168, 0.04);
}

.data-table tr.row-current td {
  background: rgba(26, 152, 80, 0.07);
  box-shadow: inset 3px 0 0 var(--affinity-strong);
}

.complex-compare-chart {
  margin-bottom: 1rem;
}

.complex-compare-title {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rnal-muted);
}

.complex-compare-row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7rem) 1fr minmax(6.5rem, auto);
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.complex-compare-row:last-of-type {
  margin-bottom: 0.35rem;
}

.complex-compare-row--current .complex-compare-bar {
  box-shadow: 0 0 0 2px var(--rnal-text);
}

.complex-compare-label {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--rnal-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.complex-compare--wide-labels .complex-compare-row {
  grid-template-columns: minmax(10rem, 38%) 1fr minmax(7.5rem, auto);
}

.affinity-compare-chart {
  min-height: 0;
}

.complex-compare-bar-track {
  height: 1.35rem;
  background: var(--rnal-bg);
  border: 1px solid var(--rnal-border);
  border-radius: 4px;
  overflow: visible;
}

.complex-compare-bar {
  position: relative;
  height: 100%;
  min-width: 6px;
  border-radius: 3px;
  transition: width 0.35s ease;
  cursor: default;
}

.complex-compare-bar-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 0.3rem 0.55rem;
  background: var(--rnal-text);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(26, 36, 51, 0.18);
}

.complex-compare-bar-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--rnal-text);
}

.complex-compare-bar-track:hover .complex-compare-bar-tip {
  opacity: 1;
}

.complex-compare-value {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--rnal-text);
  white-space: nowrap;
  font-weight: 700;
}

.complex-compare--ligand-targets .complex-compare-value,
.complex-compare--ligand-targets .complex-compare-value .affinity-chip {
  font-weight: 800;
}

.complex-compare-link {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.complex-compare-scale {
  margin: 0.5rem 0 0;
  font-size: 0.68rem;
  color: var(--rnal-muted);
}

.complex-compare--ligand-targets .complex-compare-row--ligand-target,
.complex-compare--ligand-targets .ligand-targets-head {
  display: grid;
  grid-template-columns: minmax(8.5rem, 1.15fr) minmax(6.5rem, 0.9fr) 1.25fr minmax(6.75rem, auto);
  gap: 0.5rem 0.85rem;
  align-items: center;
}

.complex-compare--ligand-targets .ligand-targets-head {
  margin-bottom: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rnal-border);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rnal-text);
}

.complex-compare--ligand-targets .ligand-targets-head__bar {
  text-align: left;
}

.complex-compare--ligand-targets .complex-compare-col {
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.3;
}

.complex-compare--ligand-targets .complex-compare-col--rna {
  font-weight: 600;
}

.complex-compare-col__rna {
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.complex-compare-col__rna:hover {
  text-decoration: underline;
}

.complex-compare--ligand-targets .complex-compare-col--method {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--rnal-muted);
  white-space: normal;
  overflow-wrap: anywhere;
}

.complex-compare--ligand-targets .complex-compare-bar-track {
  width: 100%;
  min-width: 0;
}

.complex-compare-meta {
  min-width: 0;
}

.complex-compare-meta__rna {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.complex-compare-meta__rna:hover {
  text-decoration: underline;
}

.complex-compare-meta__method {
  margin-top: 0.12rem;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--rnal-muted);
  white-space: normal;
  overflow-wrap: anywhere;
}

.complex-compare-bar-track--compact {
  min-width: 0;
}

.complex-compare-bar-pdb {
  position: absolute;
  left: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--rnal-text);
  text-shadow: 0 0 2px #fff, 0 0 4px rgba(255, 255, 255, 0.85);
  pointer-events: none;
  max-width: calc(100% - 0.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.complex-compare-bar-pdb strong {
  font-weight: 800;
  color: inherit;
}

.complex-compare-label__pdb {
  font-weight: 800;
  color: var(--rnal-text);
}

.complex-compare-label__sep {
  font-weight: 500;
  color: var(--rnal-muted);
}

.complex-compare-label__method {
  font-weight: 600;
}

.complex-compare-value-link {
  text-decoration: none;
  color: inherit;
}

.complex-compare-value-link:hover .affinity-chip {
  text-decoration: underline;
}

.ligand-targets-chart {
  margin-top: 0.25rem;
}

.data-table a.entity-link { font-weight: 600; }

/* Affinity / complexes table column layout */
.data-table .col-check { width: 2.5rem; text-align: center; }
.data-table .col-complex { width: 6.5rem; text-align: center; }
.data-table .col-ligand { width: 5.5rem; text-align: center; }
.data-table .col-affinity { white-space: nowrap; }
.data-table .col-method { width: 4.5rem; white-space: nowrap; }
.data-table .col-rna { min-width: 10rem; max-width: 16rem; }
.data-table .col-ref { width: 4rem; white-space: nowrap; text-align: center; }

.complex-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.complex-pdb-link {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.complex-pdb-link:hover { text-decoration: underline; }

.ligand-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.ligand-stack-thumb {
  width: 56px;
  height: 48px;
  border: none;
  background: transparent;
}

.rna-cell-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.35;
  text-decoration: none;
}

.rna-cell-link:hover { text-decoration: none; }
.rna-cell-link:hover .rna-cell-name { text-decoration: underline; }

.rna-class-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rnal-primary);
  background: rgba(27, 108, 168, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  width: fit-content;
}

.rna-cell-name {
  font-size: 0.8rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mono { font-family: var(--font-mono); font-size: 0.8rem; word-break: break-all; }

/* Complex entry cards (RNA-SM complexes browse) */
.complex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.complex-card {
  position: relative;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.complex-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.complex-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.complex-card-top,
.complex-card-visual,
.complex-card-fields,
.complex-card-footer {
  position: relative;
  z-index: 1;
}

.complex-card-visual a,
.complex-card-fields a,
.complex-pdb-link {
  position: relative;
  z-index: 3;
}

.complex-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--rnal-border);
  background: var(--rnal-bg);
}

.complex-card-affinity {
  text-decoration: none;
  margin-left: auto;
}

.complex-card-affinity:hover { text-decoration: none; }

.field-value .rna-class-tag { margin-bottom: 0.15rem; }
.field-value .rna-cell-name { display: block; }

.complex-card-visual {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--rnal-border);
}

.visual-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.85rem 0.65rem;
  min-height: 150px;
}

.visual-cell--structure {
  border-right: 1px solid var(--rnal-border);
  background: linear-gradient(180deg, rgba(27, 108, 168, 0.04) 0%, transparent 100%);
}

.visual-cell--ligand {
  background: linear-gradient(180deg, rgba(224, 122, 95, 0.06) 0%, transparent 100%);
}

.visual-cell-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rnal-muted);
}

.visual-cell-code {
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.visual-cell-code:hover { text-decoration: underline; }

.structure-thumb--card-complex {
  width: 100%;
  height: auto;
  min-height: 110px;
  max-height: 130px;
  min-width: 0;
  padding: 0.25rem 0;
  overflow: visible;
}

.structure-thumb--card-complex canvas,
.structure-thumb--card-complex img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

.structure-thumb--card-ligand {
  width: 80px;
  height: 72px;
  border: none;
  background: transparent;
  overflow: visible;
}

.structure-thumb--card-ligand img,
.structure-thumb--card-ligand svg {
  width: auto !important;
  height: auto !important;
  max-width: 80px;
  max-height: 72px;
  object-fit: contain;
}

.complex-card-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  flex: 1;
}

.field-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--rnal-border);
  border-right: 1px solid var(--rnal-border);
  min-width: 0;
}

.field-cell:nth-child(2n) { border-right: none; }
.field-cell--wide {
  grid-column: 1 / -1;
  border-right: none;
}

.field-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rnal-muted);
}

.field-value {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  color: var(--rnal-text);
}

.field-value.text-rna { color: var(--rnal-primary); }
.field-value:hover .rna-cell-name { text-decoration: underline; }

.field-value-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rnal-primary);
  text-decoration: none;
}

.field-value-link:hover { text-decoration: underline; }

.field-value-muted { color: var(--rnal-muted); font-size: 0.85rem; }

.complex-card-footer {
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rnal-primary);
  text-align: center;
  text-decoration: none;
  background: rgba(27, 108, 168, 0.04);
}

.complex-card-footer:hover {
  background: rgba(27, 108, 168, 0.1);
  text-decoration: none;
}

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

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.entity-card {
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--rnal-text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.entity-card h3.text-rna {
  font-size: 0.95rem;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.entity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--rnal-text);
}

.entity-card.ligand-card { border-top: 3px solid var(--rnal-ligand); }
.entity-card.rna-card { border-top: 3px solid var(--rnal-primary); }

/* Compound browse cards (unique ligand + per-complex rows) */
.compound-card {
  position: relative;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-top: 3px solid var(--rnal-ligand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.compound-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(224, 122, 95, 0.06) 0%, transparent 100%);
}

.compound-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.compound-card-thumb,
.compound-card-identity,
.compound-card-footer {
  position: relative;
  z-index: 1;
}

.compound-card-thumb {
  width: 88px;
  height: 76px;
  flex-shrink: 0;
  border: none;
  background: transparent;
}

.compound-card-identity {
  min-width: 0;
  flex: 1;
}

.compound-card-identity h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: var(--rnal-ligand);
}

.compound-card-props {
  margin: 0;
  font-size: 0.85rem;
  color: var(--rnal-muted);
}

.compound-card-footer {
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rnal-ligand);
  text-align: center;
  background: rgba(224, 122, 95, 0.06);
  border-top: 1px solid var(--rnal-border);
}

.compound-card:hover .compound-card-footer {
  background: rgba(224, 122, 95, 0.12);
}

.compound-card:hover .compound-card-header {
  background: linear-gradient(180deg, rgba(224, 122, 95, 0.1) 0%, rgba(224, 122, 95, 0.02) 100%);
}

.ligand-complex-list {
  display: flex;
  flex-direction: column;
}

.ligand-complex-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rnal-border);
  cursor: pointer;
}

.ligand-complex-row:last-child {
  border-bottom: none;
}

.ligand-complex-row:hover {
  background: rgba(27, 108, 168, 0.04);
}

.ligand-complex-row-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.ligand-complex-affinity {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.ligand-complex-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.85rem;
  min-width: 0;
}

.ligand-complex-meta a {
  position: relative;
  z-index: 3;
}

.ligand-complex-meta-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rnal-muted);
  margin-right: 0.25rem;
}

.structure-thumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: var(--radius);
  overflow: hidden;
}

.structure-thumb canvas {
  object-fit: contain;
  flex-shrink: 0;
}

.structure-thumb--complex {
  height: 72px;
  min-width: 72px;
}

.structure-thumb--ligand {
  height: 120px;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
}

.structure-thumb--large {
  height: 240px;
}

.structure-thumb--hero {
  height: 280px;
}

.structure-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.structure-image--pdb {
  image-rendering: -webkit-optimize-contrast;
}

/* Fallback when canvas bg-removal is blocked by CORS */
.structure-image--blend {
  mix-blend-mode: multiply;
}

.structure-thumb canvas,
.structure-thumb svg,
.structure-thumb img { max-width: 100%; max-height: 100%; }

.structure-placeholder {
  color: var(--rnal-muted);
  font-size: 0.75rem;
}

.structure-thumb--multi-ligand {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: flex-start;
  justify-content: center;
  height: auto;
  min-height: 72px;
  padding: 0.25rem;
}

.ligand-thumb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  max-width: 56px;
}

.ligand-thumb-item .structure-thumb--multi-item {
  width: 48px;
  height: 48px;
  min-height: 48px;
  border-radius: 6px;
}

.ligand-thumb-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  word-break: break-all;
}

.ligand-thumb-name {
  font-size: 0.58rem;
  color: var(--rnal-muted);
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ligand-code-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ligand-code-list__item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.ligand-structure-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.ligand-structure-combined {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ligand-structure-combined__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.ligand-structure-combined__main-img {
  width: min(100%, 320px);
  max-height: 220px;
  object-fit: contain;
}

.ligand-structure-combined__hero-label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rnal-text);
}

.ligand-structure-combined__separator {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--rnal-border, rgba(0, 0, 0, 0.12));
}

.ligand-structure-grid--fragments {
  justify-content: center;
}

.structure-thumb--combined-assembly {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0.35rem;
}

.structure-thumb--card-ligand.structure-thumb--combined-assembly,
.structure-thumb--ligand.compound-card-thumb.structure-thumb--combined-assembly {
  min-height: 120px;
}

/* Multi-ligand browse cards: combined assembly thumb is full-width — stack name below */
.compound-card-header--combined-assembly,
.compound-card-header:has(.structure-thumb--combined-assembly) {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.compound-card-header--combined-assembly .compound-card-identity,
.compound-card-header:has(.structure-thumb--combined-assembly) .compound-card-identity {
  flex: none;
  width: 100%;
}

.compound-card-header--combined-assembly .compound-card-thumb,
.compound-card-header:has(.structure-thumb--combined-assembly) .compound-card-thumb {
  width: 100%;
  height: auto;
}

.ligand-assembly-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.ligand-assembly-hero .structure-image--assembly {
  width: min(100%, 140px);
  max-height: 88px;
  object-fit: contain;
}

.ligand-assembly-separator {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--rnal-border, rgba(0, 0, 0, 0.12));
}

.ligand-assembly-fragments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: flex-start;
}

.detail-grid--ligand-multi .ligand-structure-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.ligand-structure-item {
  flex: 1 1 160px;
  max-width: 220px;
  text-align: center;
}

.detail-grid--ligand-multi .ligand-structure-item {
  flex: 1 1 200px;
  max-width: none;
  min-width: 0;
}

.detail-grid--ligand-multi .ligand-structure-item .structure-thumb--large {
  width: 100%;
}

.ligand-structure-item__label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.5rem;
}

.ligand-structure-item__link {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--rnal-muted);
}

.detail-grid--ligand-multi {
  grid-template-columns: 1fr;
}

.ligand-fragments-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.ligand-fragment-panel {
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}

.ligand-fragment-panel__header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rnal-border);
}

.ligand-fragment-panel__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.ligand-fragment-panel__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.ligand-fragment-panel__section h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rnal-deep);
}

@media (max-width: 900px) {
  .ligand-fragment-panel__grid {
    grid-template-columns: 1fr;
  }
}

.ligand-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ligand-cell-thumb {
  flex-shrink: 0;
  width: 48px;
  min-height: 40px;
  border: none;
  background: transparent;
}

/* Detail page */
.entry-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
  padding: 0.85rem 1.1rem;
  min-height: 3.25rem;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.entry-hero__center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 13rem);
  pointer-events: none;
}

.entry-hero__affinity-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  white-space: nowrap;
  pointer-events: auto;
}

.entry-hero__affinity-group .affinity-chip {
  flex-shrink: 0;
}

.entry-hero__actions {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.entry-hero__download {
  flex-shrink: 0;
  white-space: nowrap;
}

.entry-correction-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid #f0c36d;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7e6 100%);
}

.entry-correction-banner__copy {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 280px;
}

.entry-correction-banner__icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

.entry-correction-banner__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #92400e;
}

.entry-correction-banner__text {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: #a16207;
  max-width: 52ch;
}

.entry-correction-banner__btn {
  flex-shrink: 0;
  padding: 0.55rem 1rem;
  border: 1px solid #d97706;
  border-radius: var(--radius);
  background: #fff;
  color: #92400e;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(146, 64, 14, 0.08);
}

.entry-correction-banner__btn:hover {
  background: #fff7ed;
  color: #7c2d12;
  border-color: #b45309;
  text-decoration: none;
}

@media (max-width: 640px) {
  .entry-hero {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    min-height: 0;
  }

  .entry-hero__center {
    position: static;
    transform: none;
    max-width: 100%;
  }

  .entry-hero__actions {
    align-self: flex-end;
    margin-left: auto;
  }

  .entry-correction-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .entry-correction-banner__btn {
    width: 100%;
    text-align: center;
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: stretch;
}

.detail-grid.detail-grid--ligand-multi {
  grid-template-columns: 1fr;
}

.detail-grid--single {
  grid-template-columns: 1fr;
}

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

.detail-grid > .detail-panel {
  min-width: 0;
}

.detail-panel {
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: var(--shadow);
}

.detail-panel--fill {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.detail-panel--fill .prop-table-wrap--fill {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.detail-panel--fill .prop-table-wrap--fill .prop-table {
  flex: 1;
  height: 100%;
}

.detail-panel--fill .prop-table-wrap--fill .prop-table tbody {
  height: 100%;
}

.detail-panel--fill .prop-table-wrap--fill .prop-table tr {
  height: 1%;
}

.detail-panel--fill .prop-table-wrap--fill .prop-table th,
.detail-panel--fill .prop-table-wrap--fill .prop-table td {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.detail-panel h2 {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rnal-deep);
  border-bottom: none;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.detail-panel h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--rnal-border), transparent);
}

.prop-table-wrap {
  border: 1px solid var(--rnal-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.prop-table-wrap--spaced {
  margin-top: 1rem;
}

.prop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.prop-table tr {
  transition: background 0.12s ease;
}

.prop-table tr:not(:last-child) th,
.prop-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--rnal-border);
}

.prop-table tr:hover td {
  background: rgba(27, 108, 168, 0.035);
}

.prop-table th {
  text-align: left;
  padding: 0.62rem 0.85rem;
  color: var(--rnal-deep);
  font-weight: 600;
  font-size: 0.78rem;
  width: 36%;
  min-width: 8.25rem;
  vertical-align: middle;
  background: #f8fafc;
  border-right: 1px solid var(--rnal-border);
}

.prop-table td {
  padding: 0.62rem 0.95rem;
  vertical-align: middle;
  color: var(--rnal-text);
  line-height: 1.5;
  word-break: break-word;
}

.prop-table td.mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.multiple-kd-list {
  margin: 0;
  padding-left: 1.1rem;
}

.multiple-kd-list li + li {
  margin-top: 0.35rem;
}

.prop-table a {
  font-weight: 500;
}

.prop-table .field-value-muted,
.prop-table .field-empty {
  color: var(--rnal-muted);
  font-style: normal;
}

/* Compact meta chips & floating help */
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.35rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--rnal-border);
  color: var(--rnal-muted);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.info-tip:hover,
.info-tip:focus-visible {
  background: var(--rnal-primary);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(27, 108, 168, 0.45);
  outline: none;
}

.info-tip.is-popover-open {
  background: var(--rnal-ligand);
  color: #fff;
  box-shadow: 0 2px 10px rgba(224, 122, 95, 0.45);
}

/* Detail popovers (pocket residues, alt copies, etc.) */
.detail-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(11, 37, 69, 0.18);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: auto;
}

.detail-popover-backdrop.is-visible {
  opacity: 1;
}

html.is-popover-locked,
html.is-popover-locked body {
  overflow: hidden;
  overscroll-behavior: none;
}

.detail-popover {
  position: fixed;
  z-index: 1500;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  pointer-events: none;
  max-width: calc(100vw - 24px);
  width: max-content;
}

.detail-popover.is-open {
  pointer-events: auto;
  animation: detail-popover-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-popover.is-open .popover-table__row {
  animation: popover-row-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.detail-popover.is-open .popover-table__row:nth-child(1) { animation-delay: 0.03s; }
.detail-popover.is-open .popover-table__row:nth-child(2) { animation-delay: 0.05s; }
.detail-popover.is-open .popover-table__row:nth-child(3) { animation-delay: 0.07s; }
.detail-popover.is-open .popover-table__row:nth-child(4) { animation-delay: 0.09s; }
.detail-popover.is-open .popover-table__row:nth-child(5) { animation-delay: 0.11s; }
.detail-popover.is-open .popover-table__row:nth-child(n+6) { animation-delay: 0.13s; }

@keyframes detail-popover-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes popover-row-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.detail-popover__card {
  position: relative;
  width: min(330px, calc(100vw - 24px));
  max-height: 380px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--rnal-text);
}

.detail-popover__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rnal-deep), var(--rnal-primary), #5ba3d0);
  z-index: 2;
}

.detail-popover--pocket .detail-popover__card::before {
  background: linear-gradient(90deg, #27ae60, var(--rnal-primary), #e74c3c);
}

.detail-popover--copies .detail-popover__card::before {
  background: linear-gradient(90deg, var(--rnal-ligand), #f4a261, var(--rnal-primary));
}

.detail-popover--residue .detail-popover__card::before {
  background: linear-gradient(90deg, #1a9850, var(--rnal-primary));
}

.detail-popover--text .detail-popover__card {
  width: min(290px, calc(100vw - 24px));
  max-height: none;
}

.detail-popover--text .detail-popover__card::before {
  height: 2px;
}

.detail-popover__arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 1px solid #e5eaf0;
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 1;
}

.detail-popover[data-placement="right"] .detail-popover__arrow {
  left: -6px;
  top: var(--arrow-offset, 50%);
  margin-top: -6px;
  border-right: none;
  border-top: none;
}

.detail-popover[data-placement="left"] .detail-popover__arrow {
  right: -6px;
  top: var(--arrow-offset, 50%);
  margin-top: -6px;
  border-left: none;
  border-bottom: none;
}

.detail-popover[data-placement="bottom"] .detail-popover__arrow {
  top: -6px;
  left: var(--arrow-offset, 50%);
  margin-left: -6px;
  border-right: none;
  border-bottom: none;
}

.detail-popover[data-placement="top"] .detail-popover__arrow {
  bottom: -6px;
  left: var(--arrow-offset, 50%);
  margin-left: -6px;
  border-left: none;
  border-top: none;
}

.detail-popover__header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 0.85rem 0.75rem 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #eef2f6;
  flex-shrink: 0;
}

.detail-popover__header--compact {
  grid-template-columns: auto 1fr;
  padding: 0.85rem 1rem;
  gap: 0.75rem;
}

.detail-popover__header-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  background: #e8f2fa;
  color: var(--rnal-primary);
  box-shadow: inset 0 0 0 1px rgba(27, 108, 168, 0.12);
}

.detail-popover__header-icon--pocket {
  background: linear-gradient(135deg, #e8f8ef, #e8f2fa);
  color: #1a7f4b;
}

.detail-popover__header-icon--pocket::before { content: "⬡"; font-size: 1rem; }

.detail-popover__header-icon--copies {
  background: linear-gradient(135deg, #fdeee8, #e8f2fa);
  color: var(--rnal-ligand);
}

.detail-popover__header-icon--copies::before { content: "◆"; font-size: 0.85rem; }

.detail-popover__header-icon--residue {
  background: linear-gradient(135deg, #e8f8ef, #edf7ff);
  color: #1a9850;
}

.detail-popover__header-icon--residue::before { content: "●"; font-size: 0.75rem; }

.detail-popover__header-icon--help {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.7rem;
}

.detail-popover__header-copy {
  min-width: 0;
}

.detail-popover__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--rnal-deep);
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.detail-popover__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--rnal-muted);
  line-height: 1.35;
}

.detail-popover__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--rnal-deep);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.detail-popover__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--rnal-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.detail-popover__close:hover,
.detail-popover__close:focus-visible {
  background: #eef2f6;
  color: var(--rnal-text);
  outline: none;
}

.detail-popover__body {
  padding: 0.65rem 0.75rem 0.85rem;
  overflow: auto;
  max-height: 300px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.detail-popover__body::-webkit-scrollbar {
  width: 6px;
}

.detail-popover__body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.detail-popover__text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--rnal-text);
}

.meta-chip.is-popover-open {
  background: var(--rnal-primary);
  border-color: var(--rnal-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(27, 108, 168, 0.28);
}

.meta-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--rnal-border);
  border-radius: 999px;
  background: var(--rnal-bg);
  color: var(--rnal-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.meta-chip:hover,
.meta-chip:focus-visible {
  background: var(--rnal-primary);
  border-color: var(--rnal-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 108, 168, 0.32);
  outline: none;
}

.meta-chip--subtle {
  font-weight: 500;
  color: var(--rnal-muted);
}

.meta-chip--subtle:hover,
.meta-chip--subtle:focus-visible {
  color: #fff;
}

.meta-chip--static {
  cursor: default;
  color: var(--rnal-text);
}

.meta-chip--static:hover,
.meta-chip--static:focus-visible {
  background: var(--rnal-bg);
  border-color: var(--rnal-border);
  color: var(--rnal-text);
  transform: none;
  box-shadow: none;
}

.pocket-summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pocket-nuc-row {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pocket-nuc-count {
  font-weight: 600;
  font-size: 1rem;
}

.pocket-nuc {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--rnal-bg);
  border: 1px solid var(--rnal-border);
}


.pocket-nuc--A { color: #e74c3c; }
.pocket-nuc--G { color: #f39c12; }
.pocket-nuc--C { color: #27ae60; }
.pocket-nuc--U { color: #3498db; }

.pocket-nuc--zero {
  opacity: 0.55;
}

.popover-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.35rem;
  font-size: 0.8125rem;
  background: transparent;
}

.popover-table th {
  padding: 0.25rem 0.5rem 0.35rem;
  text-align: left;
  color: var(--rnal-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.popover-table td {
  padding: 0.45rem 0.5rem;
  vertical-align: middle;
  color: var(--rnal-text);
}

.popover-table__row td {
  background: #f8fafc;
  border-top: 1px solid #eef2f6;
  border-bottom: 1px solid #eef2f6;
}

.popover-table__row td:first-child {
  border-left: 1px solid #eef2f6;
  border-radius: 8px 0 0 8px;
}

.popover-table__row td:last-child {
  border-right: 1px solid #eef2f6;
  border-radius: 0 8px 8px 0;
}

.popover-table__row:hover td {
  background: #edf6ff;
  border-color: #d6e8f7;
}

.popover-table__num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--rnal-deep);
}

.residue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #eef2f6;
  color: var(--rnal-deep);
}

.residue-badge--A { background: #fdecea; color: #c0392b; }
.residue-badge--G { background: #fef5e7; color: #d68910; }
.residue-badge--C { background: #e8f8ef; color: #1e8449; }
.residue-badge--U { background: #ebf5fb; color: #2471a3; }
.residue-badge--ligand { background: #fdeee8; color: var(--rnal-ligand); }

.chain-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dde4ec;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rnal-primary);
}

.chain-pill--rna {
  color: var(--rnal-deep);
  border-color: rgba(27, 108, 168, 0.28);
  background: rgba(27, 108, 168, 0.07);
}

/* Chemical features panel (HBD / HBA / aromatic) */
.chem-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 960px) {
  .chem-features {
    grid-template-columns: 1fr;
  }
}

.ligand-fragment-panel .chem-features {
  grid-template-columns: 1fr;
}

.chem-feature {
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 14px;
  border: 1px solid #e5eaf0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.chem-feature--donors {
  border-top: 4px solid #3b82c4;
}

.chem-feature--acceptors {
  border-top: 4px solid var(--rnal-ligand);
}

.chem-feature--aromatic {
  border-top: 4px solid #8b5cf6;
}

.chem-feature__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.chem-feature__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rnal-deep);
  line-height: 1.25;
}

.chem-feature__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--rnal-muted);
  line-height: 1.35;
}

.chem-feature__count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--rnal-deep);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.chem-feature__body--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.5rem;
}

@media (max-width: 520px) {
  .chem-feature__body--grid {
    grid-template-columns: 1fr;
  }
}

.chem-feature__body--row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chem-pair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e8eef4;
  white-space: nowrap;
}

.chem-bond {
  flex: 0 0 1.35rem;
  height: 2px;
  background: #64748b;
  border-radius: 1px;
}

.chem-atom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chem-atom--donor {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.chem-atom--hydrogen {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.chem-atom--acceptor {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
  min-width: 3rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

.chem-atom--aromatic {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.chem-ring {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #faf8ff;
  border: 1px solid #ebe4f7;
}

.chem-ring + .chem-ring {
  margin-top: 0.5rem;
}

.chem-ring__label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7c3aed;
}

.chem-ring__path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.chem-ring__sep {
  color: #a78bfa;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.1rem;
}

.chem-feature__empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--rnal-muted);
}

.chem-feature__empty--unavailable {
  font-style: italic;
}

/* Legacy badges used in popover tables */
.atom-badge-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.atom-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #fdeee8;
  border: 1px solid #f5d5c8;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rnal-ligand);
  white-space: nowrap;
}

.atom-badge--aromatic {
  background: #f3eef9;
  border-color: #ddd0ee;
  color: #6b3fa0;
}

.atom-badge-row--ring {
  padding-left: 0.15rem;
  border-left: 2px solid #ddd0ee;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-pass { background: #d1fae5; color: #065f46; }
.badge-fail { background: #fee2e2; color: #991b1b; }

/* RNA sequence scroll field */
.prop-table__sequence-row th,
.prop-table__sequence-row td {
  vertical-align: middle;
}

.prop-table td.prop-table__sequence-cell,
.rna-sequence-cell {
  padding: 0.5rem 0.62rem;
  word-break: normal;
  overflow: hidden;
  max-width: 0;
  box-sizing: border-box;
}

.rna-sequence-chain {
  display: block;
  width: fit-content;
  margin-top: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  color: var(--rnal-primary);
  background: rgba(27, 108, 168, 0.1);
}

.rna-sequence-multi {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

.rna-sequence-multi--single {
  gap: 0;
}

.rna-sequence-segment {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.rna-sequence-segment .rna-sequence-chain {
  margin-top: 0;
}

.rna-sequence-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  min-height: 3.5rem;
  padding: 0.4rem 0.5rem 0.38rem;
  border: 1px solid var(--rnal-border);
  border-radius: 8px;
  background: #f8fafc;
  box-sizing: border-box;
}

.rna-sequence-scroll {
  width: 100%;
  min-width: 0;
  height: auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
  padding: 0 0.2rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rna-sequence-scroll::-webkit-scrollbar {
  display: none;
}

.rna-sequence-bar {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.95);
  cursor: pointer;
}

.rna-sequence-bar__thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  min-width: 28px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.55);
  cursor: grab;
  transition: background 0.12s ease;
}

.rna-sequence-bar__thumb:hover,
.rna-sequence-bar__thumb.is-dragging {
  background: rgba(100, 116, 139, 0.75);
}

.rna-sequence-bar__thumb.is-dragging {
  cursor: grabbing;
}

.rna-sequence-bar--full .rna-sequence-bar__thumb {
  background: rgba(100, 116, 139, 0.35);
  cursor: default;
}

.rna-sequence-box--ligand-name {
  min-height: 0;
  width: 100%;
  max-width: 26rem;
  padding: 0.28rem 0.42rem 0.24rem;
}

.rna-sequence-box--ligand-name .rna-sequence-text.ligand-molecule-name {
  display: inline-block;
  white-space: nowrap;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--rnal-muted);
  text-transform: none;
  letter-spacing: 0.01em;
}

.rna-sequence-box--ligand-name .rna-sequence-bar {
  height: 6px;
}

.rna-sequence-scroll:focus-visible {
  outline: 2px solid rgba(27, 108, 168, 0.35);
  outline-offset: 1px;
  border-radius: 4px;
}

.rna-sequence-scroll--wrap {
  height: auto;
  max-height: 7.5rem;
  overflow-y: auto;
  align-items: flex-start;
}

.rna-sequence-text {
  display: inline-block;
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.4;
}

.rna-sequence-text--wrap {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.rna-sequence-text span {
  display: inline;
}

.rna-base-A { color: #e74c3c; }
.rna-base-U { color: #3498db; }
.rna-base-G { color: #f39c12; }
.rna-base-C { color: #27ae60; }

@media (max-width: 768px) {
  .prop-table td.prop-table__sequence-cell,
  .rna-sequence-cell {
    max-width: none;
  }
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.pagination button,
.pagination span {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  background: var(--rnal-surface);
  cursor: pointer;
  font-size: 0.875rem;
}

.pagination button:disabled { opacity: 0.4; cursor: default; }
.pagination .current { background: var(--rnal-primary); color: #fff; border-color: var(--rnal-primary); }

/* Statistics dashboard */
.stats-page .page-header {
  margin-bottom: 1.5rem;
}

.stats-release-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0.75rem;
}

.stats-release-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rnal-muted);
}

.stats-release-select {
  width: auto;
  min-width: 14rem;
  max-width: 100%;
  margin-bottom: 0;
}

.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.stats-kpi-card {
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stats-kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--rnal-primary);
}

.stats-kpi-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--rnal-text);
}

.stats-kpi-sub {
  font-size: 0.72rem;
  color: var(--rnal-muted);
  line-height: 1.35;
}

.stats-section {
  margin-bottom: 2.5rem;
}

.stats-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  color: var(--rnal-text);
}

.stats-section-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--rnal-muted);
  max-width: 52rem;
}

.stats-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stats-insight-card {
  background: linear-gradient(180deg, rgba(27, 108, 168, 0.06) 0%, var(--rnal-surface) 100%);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stats-insight-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rnal-muted);
}

.stats-insight-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rnal-text);
}

.stats-insight-hint {
  font-size: 0.72rem;
  color: var(--rnal-muted);
  line-height: 1.35;
}

.stats-insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-top: 0.15rem;
}

.stats-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem 0.15rem 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color) 14%, white);
  border: 1px solid color-mix(in srgb, var(--tag-color) 35%, white);
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--rnal-text);
}

.stats-tag__swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--tag-color);
  flex-shrink: 0;
}

.stats-tag__label {
  font-weight: 600;
}

.stats-tag__value {
  font-weight: 700;
  color: var(--tag-color);
}

.stats-table-panel {
  margin-top: 1rem;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 1rem;
}

.stats-table-panel h3,
.stats-table-panel__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.stats-select {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--rnal-border);
  font-size: 0.85rem;
  background: var(--rnal-surface);
}

.chart-panel__title--with-control .stats-select {
  width: auto;
  min-width: 10rem;
  max-width: 100%;
  flex: 0 1 14rem;
  margin-bottom: 0;
}

/* Charts */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
}

.chart-panel {
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 320px;
}

.chart-panel--wide {
  grid-column: 1 / -1;
}

.chart-panel h3,
.chart-panel__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.chart-panel__title {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1.35;
  text-align: left;
}

.chart-panel__title-label {
  flex: 1 1 auto;
  min-width: 0;
}

.chart-panel--donut .chart-panel__title {
  justify-content: center;
  text-align: center;
}

.chart-panel__title--with-control {
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.chart-panel__title--with-control > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.stats-table-panel__title {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  font-size: 1rem;
  line-height: 1.35;
}

.chart-panel .info-tip,
.stats-table-panel .info-tip {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.chart-panel h3 sub,
.chart-panel__title sub,
.chart-panel__title-label sub,
.filter-section h4 sub,
.stats-kpi-label sub,
.stats-insight-label sub,
.data-table th sub,
.detail-panel p sub,
.detail-popover__text sub {
  font-size: 0.62em;
  font-weight: 600;
  vertical-align: sub;
  line-height: 1;
  position: static;
}

.chem-label sub {
  font-size: 0.62em;
  font-weight: 600;
  vertical-align: sub;
  line-height: 1;
  position: static;
}

.chart-canvas {
  min-height: 300px;
}

.chart-panel--donut {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.chart-panel--donut h3 {
  text-align: center;
}

.chart-panel--donut .chart-canvas {
  flex: 0 0 340px;
  min-height: 340px;
  height: 340px;
  overflow: visible;
}

#chart-rna-class-pie {
  min-height: 340px;
  height: 340px;
}

#chart-method {
  min-height: 340px;
  height: 340px;
  overflow: visible;
}

.chart-panel--wide.chart-panel--donut .chart-canvas {
  min-height: 340px;
}

.chart-panel--wide .chart-canvas {
  min-height: 320px;
}

#chart-pkd-hist .xtitle,
#chart-pkd-hist .ytitle {
  font-weight: 700 !important;
}

#chart-pkd-hist .xtick text,
#chart-pkd-hist .ytick text {
  font-weight: 700 !important;
  font-size: 14.3px !important;
}

@media (max-width: 520px) {
  .chart-panel--donut {
    min-height: 480px;
  }

  .chart-panel--donut .chart-canvas,
  #chart-rna-class-pie,
  #chart-method,
  .chart-panel--wide.chart-panel--donut .chart-canvas {
    flex-basis: 420px;
    min-height: 420px;
    height: 420px;
  }
}

/* 3D viewer */
.viewer-container {
  width: 100%;
  height: 480px;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  background: #000;
  position: relative;
  overflow: hidden;
}

.viewer-container .msp-plugin {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.viewer-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--rnal-muted);
  background: var(--rnal-bg);
}

/* Search tabs */
.search-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--rnal-border);
}

.search-tab {
  padding: 0.6rem 1.25rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--rnal-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.search-tab.active {
  color: var(--rnal-primary);
  border-bottom-color: var(--rnal-primary);
  font-weight: 600;
}

.search-panel { display: none; }
.search-panel.active { display: block; }

/* Submit form */
.submit-form {
  max-width: 640px;
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
}

.submit-intro {
  margin-top: 0;
  color: var(--rnal-muted);
  font-size: 0.875rem;
}

.submit-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.submit-upload-form .form-group input[type="email"],
.submit-upload-form .form-group input[type="text"],
.submit-upload-form .form-group textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  font: inherit;
}

.submit-explanation-list {
  margin: 1.25rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rnal-border);
}

.submit-explanation-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.submit-muted {
  color: var(--rnal-muted);
  font-size: 0.8125rem;
  margin: 0 0 0.75rem;
}

.submit-explanation-row {
  margin-bottom: 0.75rem;
}

.submit-explanation-row label {
  display: block;
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
}

.required-mark {
  color: #dc2626;
}

.submit-fields-panel {
  margin-top: 2rem;
}

.submit-fields-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--rnal-deep);
  margin-bottom: 0.75rem;
}

#submit-result {
  margin-top: 1rem;
}

.submit-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.submit-hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--rnal-muted, #64748b);
  max-width: 42rem;
}

.submit-hint--error {
  color: #991b1b;
  font-weight: 600;
}

.submit-hint--ok {
  color: #065f46;
  font-weight: 600;
}

/* Correct data page */
.correct-page-header {
  margin-bottom: 1.25rem;
}

.correct-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.correct-layout .submit-form {
  max-width: none;
}

.correct-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
}

.correct-subheading {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
}

.correct-sidebar {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: calc(100vh - 2rem);
}

.correct-sidebar-hint {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px dashed var(--rnal-border);
  border-radius: var(--radius);
  background: var(--rnal-bg);
  color: var(--rnal-muted);
  font-size: 0.8125rem;
}

.correct-sidebar-hint p {
  margin: 0;
}

.correct-search-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.correct-search-input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  font: inherit;
}

.correct-search-results {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 0.15rem;
}

.correct-results-note {
  margin: 0.35rem 0 0;
}

.correct-result-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  background: var(--rnal-bg);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.correct-result-item:hover {
  border-color: var(--rnal-accent);
  background: var(--rnal-surface);
}

.correct-result-item.is-selected {
  border-color: var(--rnal-accent);
  background: color-mix(in srgb, var(--rnal-accent) 10%, var(--rnal-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rnal-accent) 35%, transparent);
}

.correct-result-item__title {
  display: block;
  font-weight: 600;
}

.correct-result-meta {
  display: block;
  margin-top: 0.2rem;
  color: var(--rnal-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.correct-main {
  min-height: 420px;
}

.correct-empty-state,
.correct-entry-panel {
  display: none;
}

.correct-empty-state.is-active,
.correct-entry-panel.is-active {
  display: block;
}

.correct-empty-state.is-active {
  display: flex;
}

.correct-empty-state[hidden],
.correct-entry-panel[hidden] {
  display: none !important;
}

.correct-main--selected {
  min-height: 0;
}

.correct-empty-state {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 420px;
  padding: 2rem 1.5rem;
  color: var(--rnal-muted);
}

.correct-empty-state__icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--rnal-bg);
  border: 1px solid var(--rnal-border);
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.correct-empty-state h2 {
  margin: 0 0 0.35rem;
  color: var(--rnal-text);
  font-size: 1.125rem;
}

.correct-empty-state p {
  margin: 0;
  max-width: 34ch;
  font-size: 0.875rem;
}

.correct-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.correct-entry-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.correct-summary-card {
  margin-top: 0.65rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  background: var(--rnal-bg);
}

.correct-summary-card__title {
  font-weight: 600;
}

.correct-summary-card__meta {
  margin-top: 0.2rem;
  color: var(--rnal-muted);
  font-size: 0.8125rem;
}

.correct-summary-card__id {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--rnal-muted);
  word-break: break-all;
}

.correct-snapshot-wrap {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rnal-border);
}

.correct-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem 1rem;
}

.correct-snapshot-item {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  background: var(--rnal-bg);
}

.correct-snapshot-item__label {
  font-size: 0.75rem;
  color: var(--rnal-muted);
  font-weight: 500;
}

.correct-snapshot-item__value {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  word-break: break-word;
}

.correct-proposed-panel {
  margin: 1.25rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rnal-border);
}

.correct-proposed-panel summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.correct-proposed-fields {
  display: grid;
  gap: 0.5rem;
}

.correct-proposed-row input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  font: inherit;
}

.correct-result.success,
.correct-status.success {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: #d1fae5;
  color: #065f46;
  font-size: 0.875rem;
}

.correct-result.error,
.correct-status.error {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.875rem;
}

@media (max-width: 900px) {
  .correct-layout {
    grid-template-columns: 1fr;
  }

  .correct-sidebar {
    position: static;
    max-height: none;
    min-height: 0;
  }

  .correct-search-results {
    max-height: 280px;
  }

  .correct-main,
  .correct-empty-state {
    min-height: 0;
  }
}

.admin-pre-wrap {
  white-space: pre-wrap;
}

.form-group input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px dashed var(--rnal-border);
  border-radius: var(--radius);
}

.validation-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.validation-result.success { background: #d1fae5; color: #065f46; }
.validation-result.error { background: #fee2e2; color: #991b1b; }
.validation-result.info { background: #dbeafe; color: #1e40af; }

/* API docs */
.api-endpoint {
  background: var(--rnal-bg);
  border: 1px solid var(--rnal-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.api-endpoint .method {
  display: inline-block;
  background: var(--rnal-primary);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 0.5rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--rnal-muted);
}

.complex-grid:has(> .empty-state:only-child),
.card-grid:has(> .empty-state:only-child) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

.complex-grid > .empty-state:only-child,
.card-grid > .empty-state:only-child {
  width: 100%;
}

.version-note {
  text-align: center;
  color: var(--rnal-muted);
  font-size: 0.875rem;
  margin-top: 2rem;
}

/* Help page */
.help-page__header {
  margin-bottom: 1.5rem;
}

.help-page__lead {
  max-width: 52rem;
  color: var(--rnal-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.help-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.help-toc {
  min-height: 0;
}

.help-toc__card {
  position: sticky;
  top: calc(var(--site-nav-offset) + 0.75rem);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--site-nav-offset) - 1.5rem);
  background: var(--rnal-surface);
  border: 1px solid var(--rnal-border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.help-toc__title {
  margin: 0 0 0.75rem;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rnal-deep);
}

.help-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  min-height: 0;
}

.help-toc__list a {
  display: block;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border-left: 3px solid transparent;
  color: var(--rnal-text);
  font-size: 0.88rem;
  line-height: 1.45;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.help-toc__list a:hover {
  background: rgba(27, 108, 168, 0.08);
  color: var(--rnal-primary);
  text-decoration: none;
}

.help-toc__list a.is-active {
  background: rgba(27, 108, 168, 0.12);
  border-left-color: var(--rnal-primary);
  color: var(--rnal-primary);
  font-weight: 600;
}

.help-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.help-section {
  scroll-margin-top: var(--help-scroll-offset);
}

.help-section h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rnal-deep);
}

.help-section__intro {
  margin: 0 0 1rem;
  color: var(--rnal-muted);
  font-size: 0.92rem;
}

.help-table-wrap {
  border: 1px solid var(--rnal-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

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

.help-field-table thead th {
  text-align: left;
  padding: 0.7rem 0.9rem;
  background: #f8fafc;
  color: var(--rnal-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rnal-border);
}

.help-field-table td {
  padding: 0.72rem 0.9rem;
  vertical-align: top;
  line-height: 1.55;
  border-bottom: 1px solid var(--rnal-border);
}

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

.help-field-table td:first-child {
  width: 28%;
  min-width: 9rem;
  font-weight: 600;
  color: var(--rnal-deep);
  background: rgba(248, 250, 252, 0.65);
  border-right: 1px solid var(--rnal-border);
}

.help-field-table tr:hover td {
  background: rgba(27, 108, 168, 0.03);
}

.help-field-table tr:hover td:first-child {
  background: rgba(27, 108, 168, 0.05);
}

.help-section--methods .help-method {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rnal-border);
}

.help-section--methods .help-method:last-of-type {
  border-bottom: none;
}

.help-method h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rnal-primary);
}

.help-method p {
  margin: 0 0 0.55rem;
  color: var(--rnal-text);
  font-size: 0.9rem;
  line-height: 1.65;
}

.help-method p:last-child {
  margin-bottom: 0;
}

.help-callout {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(27, 108, 168, 0.08), rgba(11, 37, 69, 0.04));
  border: 1px solid rgba(27, 108, 168, 0.18);
}

.help-callout h3 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--rnal-deep);
}

.help-callout p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--rnal-text);
}

@media (max-width: 900px) {
  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-toc__card {
    position: static;
    max-height: none;
  }

  .help-field-table td:first-child {
    width: 36%;
  }
}

@media (max-width: 640px) {
  .help-field-table,
  .help-field-table tbody,
  .help-field-table tr,
  .help-field-table td {
    display: block;
    width: 100%;
  }

  .help-field-table thead {
    display: none;
  }

  .help-field-table tr {
    border-bottom: 1px solid var(--rnal-border);
  }

  .help-field-table td {
    border: none;
    padding: 0.55rem 0.85rem;
  }

  .help-field-table td:first-child {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--rnal-border);
    padding-bottom: 0.35rem;
    background: #f8fafc;
  }

  .help-field-table td:last-child {
    padding-top: 0.35rem;
    padding-bottom: 0.85rem;
  }
}

/* ── Usage Guide modal ─────────────────────────────────────────────── */

body.ee-ug-open {
  overflow: hidden;
}

.ee-ug-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(11, 37, 69, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ee-ug-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.ee-ug-dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--rnal-surface);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(11, 37, 69, 0.22);
  overflow: hidden;
}

.ee-ug-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--rnal-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ee-ug-close:hover {
  background: var(--rnal-bg);
  color: var(--rnal-text);
}

.ee-ug-welcome {
  padding: 2rem 2rem 1.5rem;
  overflow-y: auto;
}

.ee-ug-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rnal-primary);
}

.ee-ug-title {
  margin: 0 0 0.65rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rnal-deep);
}

.ee-ug-lead {
  margin: 0 0 1.25rem;
  color: var(--rnal-muted);
  line-height: 1.55;
  max-width: 52ch;
}

.ee-ug-highlights {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.ee-ug-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--rnal-text);
}

.ee-ug-highlights li::before {
  content: "✓";
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(27, 108, 168, 0.12);
  color: var(--rnal-primary);
  font-size: 0.7rem;
  font-weight: 700;
}

.ee-ug-welcome-progress,
.ee-ug-progress-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.ee-ug-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: var(--rnal-border);
  overflow: hidden;
}

.ee-ug-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--rnal-primary);
  transform-origin: left;
  transition: width 0.25s ease;
}

.ee-ug-progress-label {
  font-size: 0.78rem;
  color: var(--rnal-muted);
  white-space: nowrap;
}

.ee-ug-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ee-ug-pref {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--rnal-muted);
  cursor: pointer;
}

.ee-ug-workspace {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.ee-ug-workspace-header {
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid var(--rnal-border);
}

.ee-ug-workspace-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rnal-deep);
}

.ee-ug-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rnal-border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
}

.ee-ug-search:focus {
  outline: 2px solid rgba(27, 108, 168, 0.35);
  border-color: var(--rnal-primary);
}

.ee-ug-workspace-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.ee-ug-section-nav {
  border-right: 1px solid var(--rnal-border);
  padding: 0.75rem 0;
  overflow-y: auto;
}

.ee-ug-section-btn {
  display: block;
  width: 100%;
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--rnal-muted);
  cursor: pointer;
  border-left: 3px solid transparent;
}

.ee-ug-section-btn:hover {
  background: var(--rnal-bg);
  color: var(--rnal-text);
}

.ee-ug-section-btn.is-active {
  color: var(--rnal-primary);
  background: rgba(27, 108, 168, 0.06);
  border-left-color: var(--rnal-primary);
  font-weight: 600;
}

.ee-ug-steps-wrap {
  padding: 0.75rem 1rem 1rem;
  overflow-y: auto;
}

.ee-ug-section-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(27, 108, 168, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(27, 108, 168, 0.08), rgba(27, 108, 168, 0.03));
}

.ee-ug-section-banner__copy {
  min-width: 0;
}

.ee-ug-section-banner__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--rnal-deep);
}

.ee-ug-section-banner__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--rnal-muted);
  line-height: 1.45;
}

.ee-ug-section-banner .btn-primary {
  flex-shrink: 0;
  white-space: nowrap;
}

.ee-ug-steps {
  display: grid;
  gap: 0.65rem;
}

.ee-ug-step-card {
  border: 1px solid var(--rnal-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: var(--rnal-surface);
  transition: border-color 0.15s ease;
}

.ee-ug-step-card.is-completed {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.03);
}

.ee-ug-step-card.is-highlighted {
  border-color: var(--rnal-primary);
  box-shadow: 0 0 0 2px rgba(27, 108, 168, 0.15);
}

.ee-ug-step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.ee-ug-step-check {
  flex-shrink: 0;
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--rnal-primary);
  cursor: pointer;
}

.ee-ug-step-title-row {
  flex: 1;
  min-width: 0;
}

.ee-ug-step-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rnal-text);
}

.ee-ug-step-priority {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.ee-ug-step-priority--essential {
  background: rgba(27, 108, 168, 0.12);
  color: var(--rnal-primary);
}

.ee-ug-step-priority--daily {
  background: rgba(224, 122, 95, 0.12);
  color: var(--rnal-ligand);
}

.ee-ug-step-priority--optional {
  background: var(--rnal-bg);
  color: var(--rnal-muted);
}

.ee-ug-step-summary {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: var(--rnal-muted);
  line-height: 1.45;
}

.ee-ug-step-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.ee-ug-step-more {
  margin-top: 0.5rem;
}

.ee-ug-step-more summary {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rnal-primary);
  cursor: pointer;
}

.ee-ug-step-body {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--rnal-muted);
  line-height: 1.5;
}

.ee-ug-step-tips {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--rnal-muted);
}

.ee-ug-next-action {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(27, 108, 168, 0.06);
  font-size: 0.84rem;
  color: var(--rnal-text);
}

.ee-ug-workspace-footer {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--rnal-border);
  display: flex;
  gap: 0.5rem;
}

.site-nav-link.ee-open-usage-guide {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.site-nav-guide-wrap {
  position: relative;
  display: inline-flex;
}

.site-nav-guide-trigger {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #ffffff;
  -webkit-appearance: none;
  appearance: none;
}

.site-nav-guide-trigger:hover,
.site-nav-guide-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.site-nav-guide-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.site-nav-guide-trigger::after {
  content: "▾";
  margin-left: 0.35rem;
  font-size: 0.72rem;
  opacity: 0.75;
}

.site-nav-guide-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 1200;
  min-width: 15rem;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid #dde4ec;
  background: #fff;
  box-shadow: 0 12px 32px rgba(11, 37, 69, 0.14);
}

.site-nav-guide-menu__item {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--rnal-deep);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.site-nav-guide-menu__item:hover,
.site-nav-guide-menu__item:focus-visible {
  background: rgba(27, 108, 168, 0.08);
}

.site-nav-guide-menu__divider {
  height: 1px;
  margin: 0.35rem 0.25rem;
  background: #e8edf3;
}

.site-nav-guide-menu__item--full {
  font-weight: 600;
  color: var(--rnal-primary);
}

.ee-ug-catalog {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.ee-ug-catalog-btn {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dde4ec;
  border-radius: 10px;
  background: #fff;
  color: var(--rnal-deep);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}

.ee-ug-catalog-btn:hover,
.ee-ug-catalog-btn:focus-visible {
  border-color: rgba(27, 108, 168, 0.35);
  background: rgba(27, 108, 168, 0.06);
}

.ee-ug-catalog-btn--full {
  font-weight: 600;
  color: var(--rnal-primary);
  border-color: rgba(27, 108, 168, 0.28);
  background: rgba(27, 108, 168, 0.05);
}

.ee-ug-catalog-item--full {
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .ee-ug-section-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .ee-ug-section-banner .btn-primary {
    width: 100%;
  }

  .site-nav-guide-menu {
    right: auto;
    left: 0;
    min-width: 12.5rem;
  }

  .ee-ug-workspace-body {
    grid-template-columns: 1fr;
  }

  .ee-ug-section-nav {
    display: flex;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--rnal-border);
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .ee-ug-section-btn {
    white-space: nowrap;
    border-left: none;
    border-radius: 99px;
    padding: 0.4rem 0.75rem;
  }

  .ee-ug-section-btn.is-active {
    background: var(--rnal-primary);
    color: #fff;
    border-left-color: transparent;
  }
}

/* ── App tour (Driver.js skin) ─────────────────────────────────────── */

body.ee-tour-active {
  overflow: hidden;
}

.ee-tour-dummy {
  position: fixed;
  left: 50%;
  top: 45%;
  width: 2px;
  height: 2px;
  pointer-events: none;
  opacity: 0;
}

.driver-overlay,
.driver-overlay-animated,
.driver-active-element,
.driver-popover {
  transition: none !important;
  animation: none !important;
}

.driver-overlay {
  z-index: 100050 !important;
}

.driver-popover.ee-driver-popover {
  z-index: 100160 !important;
  max-width: min(360px, calc(100vw - 2rem));
  border-radius: 12px;
  border: 1px solid var(--rnal-border);
  box-shadow: 0 16px 48px rgba(11, 37, 69, 0.2);
  font-family: Inter, system-ui, sans-serif;
}

.driver-active-element {
  outline: 3px solid rgba(16, 185, 129, 0.95) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.18), 0 0 24px rgba(16, 185, 129, 0.12) !important;
}

.ee-tour-popover-desc {
  display: grid;
  gap: 0.5rem;
}

.ee-tour-progress-track {
  height: 4px;
  border-radius: 99px;
  background: var(--rnal-border);
  overflow: hidden;
}

.ee-tour-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.95);
  transform: scaleX(var(--ee-tour-p, 0));
  transform-origin: left;
  transition: transform 0.2s ease;
}

.ee-tour-step-chip {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rnal-muted);
}

.ee-tour-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--rnal-text);
}

.ee-tour-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--rnal-muted);
  font-style: italic;
}

.ee-driver-popover .driver-popover-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rnal-deep);
}

.ee-driver-popover .driver-popover-footer {
  margin-top: 0.75rem;
}

.ee-driver-popover .driver-popover-prev-btn,
.ee-driver-popover .driver-popover-next-btn {
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  background: var(--rnal-primary);
  color: #fff;
  border: none;
  text-shadow: none;
}

.ee-driver-popover .driver-popover-next-btn:hover,
.ee-driver-popover .driver-popover-next-btn:focus {
  background: #155a8a;
  color: #fff;
}

.ee-driver-popover .driver-popover-prev-btn {
  background: var(--rnal-surface);
  color: var(--rnal-text);
  border: 1px solid var(--rnal-border);
}

.ee-driver-popover .driver-popover-prev-btn:hover,
.ee-driver-popover .driver-popover-prev-btn:focus {
  background: var(--rnal-bg);
  color: var(--rnal-text);
  border-color: var(--rnal-border);
}

.ee-driver-popover .driver-popover-prev-btn.driver-popover-btn-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.ee-driver-popover .driver-popover-close-btn {
  color: var(--rnal-muted);
}
