@import "./design-tokens.css";
* { box-sizing: border-box; }
html, body, button, input, select, textarea, th, td, a, span, div, p, li, label {
  font-family: var(--fontFamily);
}
body {
  margin: 0;
  font-family: var(--fontFamily);
  color: var(--textPrimary);
  background:
    radial-gradient(ellipse at 18% 8%, rgba(255, 223, 120, 0.26), transparent 34%),
    radial-gradient(ellipse at 84% 14%, rgba(255, 239, 189, 0.24), transparent 32%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #fff4cf 0%, #fff8df 30%, #fffbf0 64%, #fffdf7 100%);
  overflow-x: hidden;
  line-height: 1.55;
}
body[data-mode="dark"] {
  --textPrimary: #F2F2F0;
  --textSecondary: #A6A6A2;
  --textAccent: #E5C15A;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(93, 145, 117, 0.18), transparent 34%),
    radial-gradient(ellipse at 84% 14%, rgba(91, 126, 118, 0.16), transparent 32%),
    linear-gradient(180deg, #07100d 0%, #0b1512 34%, #0f1916 70%, #101a17 100%);
}
#app { min-height: 100vh; display: flex; flex-direction: column; }
#app > main { flex: 1; }
.black-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #000000;
  color: #ffffff;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  flex-wrap: wrap;
}
.black-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 0;
  transition: all .15s ease;
}
.black-nav a img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.black-nav .gznl-rdc-link img {
  filter: none;
  opacity: 1;
}
.black-nav .black-nav-brand { padding: 2px 8px; margin-right: 6px; }
.black-nav .black-nav-brand img { width: 106px; height: auto; }
.black-nav a:hover {
  background: #ffffff;
  color: var(--textPrimary);
  border-color: #ffffff;
  text-decoration: none;
}
.black-nav a:hover img {
  filter: brightness(0);
  opacity: 1;
}
.black-nav .gznl-rdc-link:hover img {
  filter: invert(1) sepia(1) saturate(8) hue-rotate(300deg) brightness(0.88) contrast(1.08);
}

.top-nav {
  position: sticky; top: 37px; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.top-nav .brand {
  font-family: var(--fontFamily);
  font-weight: var(--fontWeightHeading);
  letter-spacing: var(--trackingWide);
}
.top-nav nav { display: flex; gap: 14px; }
.top-nav a {
  color: var(--textPrimary);
  text-decoration: none;
  font-weight: var(--fontWeightStrong);
  letter-spacing: var(--trackingNormal);
}
.theme-controls { display: flex; align-items: center; gap: 12px; }
.theme-controls label { font-size: .9rem; color: var(--textSecondary); display: grid; gap: 4px; }
select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--textPrimary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dropdown-caret {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transform-origin: center;
  transition: transform 0.16s ease;
}

.nav-dropdown.open .dropdown-caret {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--textPrimary);
  border: none;
  text-align: left;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  padding: 14px 20px;
  border-radius: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item:hover {
  background: var(--primarySoft);
  color: var(--textAccent);
}

main { max-width: var(--page-max-width); margin: 0 auto; padding: 20px; }
main.page-home,
main.page-detail,
main.page-structure,
main.page-download,
main.page-download-sequences,
main.page-publications,
main.page-sequence-detail,
main.page-help,
main.page-annojoin-atlas {
  padding-top: 0;
}

main.page-sequence-detail {
  width: min(100%, var(--page-max-width));
  max-width: var(--page-max-width);
  margin: 0 auto;
  background: transparent;
}

.page-annojoin-atlas {
  display: grid;
  gap: 12px;
}

.page-annojoin-master-table {
  width: min(100%, var(--page-max-width));
  max-width: var(--page-max-width);
}

.annojoin-table-heading {
  padding: 0 0 2px;
}

.annojoin-table-heading h1 {
  margin: 0 0 6px;
  color: var(--textPrimary);
  font-size: 1.65rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.annojoin-table-heading p {
  margin: 0;
}

.annojoin-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.annojoin-table-toolbar input {
  min-height: 34px;
  width: min(380px, 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 10px;
  color: var(--textPrimary);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.annojoin-table-toolbar input:focus,
#annojoin-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accentSoft);
}

.annojoin-pagination label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--textPrimary);
  font-size: 0.82rem;
}

.annojoin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  color: var(--textSecondary);
  font-size: 0.86rem;
}

.annojoin-pagination div {
  display: inline-flex;
  gap: 8px;
}

.annojoin-pagination select {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--textPrimary);
}

.annojoin-table-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--textSecondary);
  font-size: 0.86rem;
}

.annojoin-table-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 12px;
  align-items: start;
}

.annojoin-master-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  background: var(--surface);
}

.annojoin-master-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.annojoin-master-table th,
.annojoin-master-table td {
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.annojoin-master-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surfaceAlt);
  color: var(--textPrimary);
  font-weight: var(--fontWeightStrong);
  white-space: nowrap;
}

.annojoin-master-table td {
  max-width: 260px;
  color: var(--textPrimary);
  overflow-wrap: anywhere;
}

.annojoin-master-table tbody tr:hover {
  background: var(--surfaceAlt);
}

.annojoin-master-table td { white-space: nowrap; }
.annojoin-master-table th:nth-child(2),
.annojoin-master-table td:nth-child(2) { position: sticky; left: 0; background: var(--surface, #fff); z-index: 2; }
.annojoin-master-table th:nth-child(2) { z-index: 3; }
.annojoin-scroll-hint { border: var(--panel-card-border); border-radius: 6px; padding: 6px 10px; margin-bottom: 8px; font-size: 0.9em; color: var(--textSecondary); }
.annojoin-scroll-hint[hidden] { display: none; }
.annojoin-scroll-hint-dismiss { margin-left: 8px; border: none; background: transparent; cursor: pointer; font-size: 1em; line-height: 1; }

.annojoin-field-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  cursor: pointer;
}

.annojoin-field-link:hover {
  color: var(--textAccent);
  text-decoration-color: var(--primary);
}

.annojoin-parent-group-row td,
.annojoin-child-group-row td {
  padding: 5px 8px;
  white-space: nowrap;
}

.annojoin-parent-group-row td {
  background: var(--backgroundStrong);
  color: var(--textPrimary);
  font-weight: var(--fontWeightStrong);
  box-shadow: inset 3px 0 0 var(--accent);
}

.annojoin-child-group-row td {
  background: var(--surfaceAlt);
  color: var(--textPrimary);
  padding-left: 20px;
}

.annojoin-parent-group-row.is-expanded-group td,
.annojoin-child-group-row.is-expanded-group td {
  background: var(--primarySoft);
  box-shadow: inset 3px 0 0 var(--primary);
}

.annojoin-case-row.is-in-expanded-group td {
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.annojoin-case-row.is-in-expanded-group:hover td {
  background: var(--surfaceAlt);
}

.annojoin-group-overflow-row td {
  text-align: center;
  background: var(--surfaceAlt);
  color: var(--textSecondary);
}

.annojoin-group-overflow-row span {
  margin-left: 8px;
}

.annojoin-group-row-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.annojoin-parent-group-row button,
.annojoin-child-group-row button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--textPrimary);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.annojoin-parent-group-row button:hover,
.annojoin-child-group-row button:hover,
.annojoin-parent-group-row button:focus-visible,
.annojoin-child-group-row button:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: var(--primarySoft);
}

.annojoin-parent-group-row span,
.annojoin-child-group-row small {
  flex: none;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--textSecondary);
  font-size: 0.72rem;
  font-weight: var(--fontWeightRegular);
}

.annojoin-case-row.is-hidden-by-group {
  display: none;
}

.annojoin-detail-sidebar {
  position: sticky;
  top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radiusPanel);
  background: var(--surface);
  box-shadow: var(--shadowSoft);
  padding: 12px;
}

.annojoin-detail-sidebar-empty {
  background: var(--surfaceAlt);
  border-style: dashed;
}

.annojoin-detail-sidebar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.annojoin-detail-sidebar h2 {
  margin: 0;
  color: var(--textPrimary);
  font-size: 1.1rem;
}

.annojoin-detail-sidebar h3 {
  margin: 12px 0 6px;
  color: var(--textPrimary);
  font-size: 0.92rem;
}

.annojoin-detail-sidebar dl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
  font-size: 0.82rem;
}

.annojoin-detail-sidebar dt {
  color: var(--textSecondary);
}

.annojoin-detail-sidebar dd {
  margin: 0;
  color: var(--textPrimary);
  overflow-wrap: anywhere;
}

/* Per-profile LSS evidence rows (one profile each) */
.annojoin-lss-evidence-slot {
  margin-top: 12px;
}

.annojoin-lss-evidence-row {
  padding: 8px 0;
  border-top: 1px solid var(--borderSubtle, rgba(127, 127, 127, 0.25));
}

.annojoin-lss-evidence-row:first-of-type {
  border-top: none;
}

/* Confidence segments */
.annojoin-confidence-seg {
  display: inline-block;
  margin-right: 4px;
  margin-bottom: 2px;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surfaceAlt);
  color: var(--textPrimary);
  font-size: 0.78rem;
}

/* Technique family badges */
.annojoin-family-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-weight: 600; font-size: 0.82em; margin-right: 3px; }
.annojoin-family-badge-A { color: var(--family-a); background: var(--family-a-bg); }
.annojoin-family-badge-B { color: var(--family-b); background: var(--family-b-bg); }
.annojoin-family-badge-C { color: var(--family-c); background: var(--family-c-bg); }
.annojoin-family-badge-D { color: var(--family-d); background: var(--family-d-bg); }
.annojoin-technique-empty { color: var(--textMuted, #999); }
.annojoin-help-tooltip { position: relative; display: inline-block; margin-left: 4px; cursor: help; }
.annojoin-help-icon { font-size: 0.85em; opacity: 0.6; }
.annojoin-help-bubble { display: none; position: absolute; z-index: 5; left: 0; top: 130%; border: 1px solid var(--border); border-radius: 6px; background: var(--surface, #fff); padding: 6px 10px; white-space: normal; width: max-content; max-width: 240px; font-weight: 400; font-size: 0.82rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.annojoin-help-tooltip:hover .annojoin-help-bubble,
.annojoin-help-tooltip:focus-within .annojoin-help-bubble { display: block; }
/* header tooltips live inside the overflow-x:auto scroll wrap; right-align to avoid right-edge clip, downward drop stays within the populated tbody box */
.annojoin-master-table thead .annojoin-help-bubble { right: 0; left: auto; }

/* Filter chips */
.annojoin-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}

.annojoin-filter-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 6px 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--primarySoft);
  color: var(--textPrimary);
  font-size: 0.8rem;
}

.annojoin-filter-chip button[data-annojoin-chip-remove] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--textSecondary);
  line-height: 1;
  cursor: pointer;
}

.annojoin-filter-chip button[data-annojoin-chip-remove]:hover {
  background: var(--border);
  color: var(--textPrimary);
}

.annojoin-filter-chip button[data-annojoin-chip-remove]:focus-visible {
  outline: none;
  background: var(--border);
  color: var(--textPrimary);
  box-shadow: 0 0 0 2px var(--accentSoft);
}

button[data-annojoin-clear-all] {
  background: none;
  border: none;
  padding: 0;
  color: var(--textAccent);
  font-size: 0.8rem;
  cursor: pointer;
}

button[data-annojoin-clear-all]:hover {
  text-decoration: underline;
}

/* Search-mode banner */
.annojoin-search-mode-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surfaceAlt);
}

.annojoin-search-mode-note {
  margin: 0;
  color: var(--textSecondary);
  font-size: 0.82rem;
}

/* Index load status banner (loading / error) */
.annojoin-table-status {
  margin: 6px 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 4px;
  background: var(--surfaceAlt);
}

.annojoin-table-status p {
  margin: 0;
  color: var(--textSecondary);
  font-size: 0.86rem;
}

.annojoin-table-status[data-status-tone="error"] p {
  color: var(--textPrimary);
}

.annojoin-status-row td {
  text-align: center;
  padding: 28px 16px;
  color: var(--textSecondary);
}

/* Empty search row */
.annojoin-empty-search-row td {
  text-align: center;
  padding: 28px 16px;
  color: var(--textSecondary);
}

.annojoin-empty-search-row td p {
  margin: 0 0 12px;
}

.annojoin-profile-trace-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  background: var(--surfaceAlt);
}

.annojoin-profile-trace-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  table-layout: fixed;
}

.annojoin-profile-trace-list th,
.annojoin-profile-trace-list td {
  padding: 6px 7px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.annojoin-profile-trace-list th {
  color: var(--textSecondary);
  font-weight: var(--fontWeightStrong);
  background: var(--surface);
}

.annojoin-profile-trace-list td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annojoin-sequence-box {
  max-height: 160px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surfaceAlt);
  color: var(--textPrimary);
  white-space: pre-wrap;
}

.annojoin-chain-scroll {
  max-height: 180px;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surfaceAlt);
}

.annojoin-confidence-explainer-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--textAccent, var(--textPrimary));
  font-weight: 600;
}

.annojoin-confidence-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 22px 48px;
  color: var(--textPrimary);
}

.annojoin-confidence-article-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.annojoin-confidence-article-body h2 {
  margin: 26px 0 8px;
}

.annojoin-confidence-article-body p {
  line-height: 1.6;
}

.annojoin-confidence-legend {
  margin: 8px 0 4px;
  padding-left: 20px;
  line-height: 1.7;
}

/* ============================================================
   ANNOJOIN confidence article — figures, charts & two-layer text
   (W3-T1). All colors bound to design tokens so light + dark
   themes both read correctly; dark overrides grouped at the end
   of this block. Each contracted class is defined exactly once.
   ============================================================ */

/* --- Figure scaffold (mirrors .article-figure but token-bound) --- */
.annojoin-confidence-figure {
  margin: 28px 0 22px;
  display: grid;
  gap: 12px;
}

.annojoin-confidence-figure svg {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radiusPanel);
}

.annojoin-confidence-figure figcaption {
  margin: 0;
  color: var(--textMuted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.annojoin-confidence-figure-cite {
  margin: 0;
  color: var(--textAccent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
}

/* --- Two-layer text: plain explainer + deep technical inset --- */
.annojoin-confidence-plain {
  line-height: 1.65;
  color: var(--textPrimary);
}

.annojoin-confidence-deep {
  margin: 14px 0 18px;
  padding: 14px 18px;
  background: var(--surfaceAlt);
  border-left: 3px solid var(--accent);
  border-radius: var(--radiusPanel);
  line-height: 1.6;
  color: var(--textSecondary);
}

.annojoin-confidence-deep-label {
  display: block;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--textAccent);
}

/* --- Badge: family + tier pill --- */
.annojoin-confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--textPrimary);
}

.annojoin-confidence-badge-family {
  background: var(--primarySoft);
}

.annojoin-confidence-badge-tier {
  background: var(--accentSoft);
}

/* --- Charts: real-data figure wrappers --- */
.annojoin-confidence-chart {
  margin: 18px 0;
  display: grid;
  gap: 10px;
}

.annojoin-confidence-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.82rem;
  color: var(--textSecondary);
}

.annojoin-confidence-chart-legend > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.annojoin-confidence-chart-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

/* --- Hard-cap caveat callout --- */
.annojoin-confidence-caveat {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--primarySoft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radiusPanel);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--textPrimary);
}

/* --- Dark theme overrides (tokens stay light-mode values here,
   so surfaces/text/muted swatches need explicit dark tweaks,
   following the body[data-mode="dark"] pattern at styles.css:4572+) --- */
body[data-mode="dark"] .annojoin-confidence-figure svg {
  background: rgba(17, 26, 23, 0.92);
  border-color: rgba(125, 212, 170, 0.16);
}

body[data-mode="dark"] .annojoin-confidence-figure figcaption {
  color: var(--textSecondary);
}

body[data-mode="dark"] .annojoin-confidence-figure-cite {
  color: var(--textAccent);
}

body[data-mode="dark"] .annojoin-confidence-plain,
body[data-mode="dark"] .annojoin-confidence-caveat,
body[data-mode="dark"] .annojoin-confidence-badge {
  color: var(--textPrimary);
}

body[data-mode="dark"] .annojoin-confidence-deep,
body[data-mode="dark"] .annojoin-confidence-chart-legend {
  color: var(--textSecondary);
}

body[data-mode="dark"] .annojoin-confidence-deep {
  background: rgba(17, 26, 23, 0.92);
  border-left-color: #2F8F6B;
}

body[data-mode="dark"] .annojoin-confidence-deep-label {
  color: var(--textAccent);
}

body[data-mode="dark"] .annojoin-confidence-caveat {
  background: rgba(26, 87, 50, 0.32);
}

body[data-mode="dark"] .annojoin-confidence-badge-family {
  background: rgba(26, 87, 50, 0.42);
}

body[data-mode="dark"] .annojoin-confidence-badge-tier {
  background: rgba(124, 163, 49, 0.36);
}

@media (max-width: 980px) {
  .annojoin-table-layout {
    grid-template-columns: 1fr;
  }

  .annojoin-detail-sidebar {
    position: static;
  }

  /* collapse the chart legends to a single column */
  .annojoin-confidence-chart-legend {
    flex-direction: column;
    gap: 6px;
  }
}

.annojoin-hero,
.annojoin-panel,
.annojoin-detail-summary {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadowSoft);
  padding: 22px;
}

.annojoin-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.annojoin-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.annojoin-panel-heading h2,
.annojoin-detail-summary h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.annojoin-searchbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.annojoin-searchbar input {
  width: min(520px, 100%);
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--textPrimary);
  background: var(--surface);
}

.annojoin-case-groups {
  display: grid;
  gap: 14px;
}

.annojoin-case-group,
.annojoin-child-group {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.annojoin-case-group summary,
.annojoin-child-group summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  color: var(--textPrimary);
  font-weight: var(--fontWeightStrong);
}

.annojoin-child-group {
  margin: 8px 0 0;
  padding-left: 14px;
}

.annojoin-child-group summary {
  color: var(--textSecondary);
  font-size: 0.94rem;
}

.annojoin-case-main {
  display: block;
  max-width: 34ch;
  overflow-wrap: anywhere;
  font-weight: var(--fontWeightStrong);
  line-height: 1.35;
}

.annojoin-case-table small {
  display: block;
  max-width: 36ch;
  margin-top: 3px;
  color: var(--textSecondary);
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.annojoin-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.annojoin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 9px;
  background: var(--surfaceAlt);
  color: var(--textSecondary);
  font-size: 0.9rem;
  font-weight: var(--fontWeightStrong);
}

.annojoin-detail-grid,
.annojoin-filter-grid,
.annojoin-residue-map,
.annojoin-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.annojoin-filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--textSecondary);
  font-size: 0.9rem;
  font-weight: var(--fontWeightStrong);
}

.annojoin-filter-grid input {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--textPrimary);
}

.annojoin-metric {
  display: grid;
  gap: 4px;
  min-height: 84px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--surfaceAlt);
}

.annojoin-metric span,
.annojoin-metric small {
  color: var(--textSecondary);
  font-size: 0.85rem;
}

.annojoin-metric strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.annojoin-preset {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: var(--surfaceAlt);
}

.annojoin-preset h3,
.annojoin-preset p {
  margin: 0;
}

.annojoin-preset code,
.annojoin-residue-map code,
.page-annojoin-atlas code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.annojoin-reactivity-track {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 118px;
  min-width: 0;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eef3ee 100%);
  overflow: hidden;
}

.annojoin-reactivity-bar {
  flex: 1 1 8px;
  min-width: 5px;
  max-width: 18px;
  border-radius: 4px 4px 2px 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.annojoin-pair-arc-view,
.annojoin-structure-color-preview {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.annojoin-structure-viewer {
  display: grid;
  gap: 8px;
  width: min(100%, 720px);
}

.annojoin-structure-canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 240px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdfb;
  cursor: grab;
  touch-action: none;
}

.annojoin-structure-canvas:active {
  cursor: grabbing;
}

.annojoin-structure-viewer-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  color: var(--textSecondary);
  font-size: 0.88rem;
}

.annojoin-pair-arc-svg {
  width: 100%;
  max-width: 620px;
  height: 150px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdfb;
}

.annojoin-pair-arc-svg path {
  fill: none;
  stroke: #2f6f8f;
  stroke-width: 3;
}

.annojoin-pair-arc-svg line {
  stroke: #8fa098;
  stroke-width: 2;
}

.annojoin-arc-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--textSecondary);
  font-size: 0.88rem;
}

.annojoin-arc-labels span {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  background: var(--surfaceAlt);
}

.annojoin-color-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdfb;
}

.annojoin-color-swatch {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(20, 34, 28, 0.14);
  border-radius: 6px;
}

.annojoin-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 14px;
}

@media (max-width: 720px) {
  .annojoin-panel-heading,
  .annojoin-searchbar {
    align-items: stretch;
    flex-direction: column;
  }
}

main.page-home {
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
}

main.page-detail .bundle-home-header,
main.page-structure .bundle-home-header,
main.page-download .bundle-home-header,
main.page-download-sequences .bundle-home-header,
main.page-publications .bundle-home-header,
main.page-sequence-detail .bundle-home-header,
main.page-help .bundle-home-header {
  margin-bottom: 30px;
}

.bundle-wide-card {
  width: var(--feature-card-width);
  max-width: var(--feature-card-width);
}

main.page-sequence-detail > .sequence-detail-card,
main.page-detail > .card,
main.page-structure > .card,
main.page-download > .card,
main.page-download-sequences > .card,
main.page-publications > .card,
main.page-help > .card {
  margin: 0 auto 16px;
}

main.page-sequence-detail > .sequence-detail-card,
main.page-detail > .card,
main.page-structure > .card,
main.page-download > .card,
main.page-download-sequences > .card,
main.page-publications > .card,
main.page-help > .card,
.bundle-hero-card {
  width: var(--feature-card-width);
  max-width: var(--feature-card-width);
  border-radius: var(--panel-card-radius);
  background: var(--panel-card-bg);
  border: var(--panel-card-border);
  box-shadow: var(--panel-card-shadow);
}

main.page-detail .card,
main.page-structure .card,
main.page-download .card,
main.page-download-sequences .card,
main.page-publications .card,
main.page-sequence-detail .card,
main.page-help .card {
  border: var(--panel-card-border);
  box-shadow: var(--panel-card-shadow);
  border-radius: var(--panel-card-radius);
  background: var(--panel-card-bg);
}

main.page-detail .card::before,
main.page-structure .card::before,
main.page-download .card::before,
main.page-download-sequences .card::before,
main.page-publications .card::before,
main.page-sequence-detail .card::before,
main.page-help .card::before {
  display: none;
}

main > section { margin-bottom: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radiusCard);
  padding: 22px;
  box-shadow: var(--shadowSoft);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(199, 227, 107, 0.8), rgba(47, 143, 107, 0.35), transparent);
}
.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 18px;
}
.hero h1,
.download-card h1,
.sequence-detail-header h1,
.dashboard-home h1 {
  margin-top: 0;
  font-family: var(--fontFamily);
  font-weight: var(--fontWeightHeading);
  letter-spacing: var(--trackingTight);
}
.hero h1 { font-size: 2.4rem; }
.actions { display:flex; gap:10px; margin-top:10px; }
button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 16px;
  font-family: inherit;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--onPrimary);
  font-weight: var(--fontWeightStrong);
  letter-spacing: var(--trackingNormal);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(23, 75, 58, 0.16);
}
button:hover { background: linear-gradient(135deg, var(--primaryHover) 0%, var(--primary) 100%); }
button.ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--textAccent);
  border-color: rgba(23, 75, 58, 0.14);
  box-shadow: none;
}
.nav-btn {
  background: transparent;
  color: var(--textPrimary);
  border: 1px solid transparent;
  font-size: 18px;
  font-weight: var(--fontWeightStrong);
  letter-spacing: var(--trackingNormal);
}
.nav-btn:hover { background: var(--primarySoft); color: var(--textAccent); }
.nav-btn.active { background: var(--primarySoft); color: var(--textAccent); border-color: rgba(23, 75, 58, 0.12); }
.hero-metrics { display: grid; gap: 10px; }
.hero-metrics div {
  background: linear-gradient(180deg, rgba(199, 227, 107, 0.22) 0%, rgba(255, 255, 255, 0.96) 100%);
  border: 1px solid rgba(23, 75, 58, 0.08);
  border-radius: 16px;
  padding: 14px;
  display: grid;
}
.hero-metrics strong { font-size: 1.4rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px,1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stats-grid.compact { grid-template-columns: repeat(4, minmax(130px,1fr)); margin-bottom: 0; }
.stats-grid h3 { margin: 0 0 6px; }
.mini-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(23, 75, 58, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(228, 239, 232, 0.9) 100%);
}
.mini-card span { color: var(--textSecondary); font-size: .9rem; }
.split { display:grid; grid-template-columns: 280px 1fr; gap: 16px; margin-bottom: 18px; }
.grid.two-col { display:grid; grid-template-columns: 280px 1fr; gap: 16px; margin-bottom: 18px; }
.page-browse .search-box,
.page-detail .search-box { max-width: 100%; }
ul { padding-left: 18px; }
table { width:100%; border-collapse: separate; border-spacing: 0; }
th, td { border-bottom: 1px solid rgba(214, 224, 216, 0.8); padding: 14px 12px; text-align:left; }
th {
  font-size: 0.82rem;
  letter-spacing: var(--trackingWide);
  text-transform: uppercase;
  color: var(--textMuted);
  font-weight: var(--fontWeightStrong);
}
td {
  font-weight: var(--fontWeightRegular);
  letter-spacing: var(--trackingNormal);
}
tbody tr {
  transition: background 0.18s ease, transform 0.18s ease;
}
tbody tr:hover {
  background: linear-gradient(90deg, rgba(199, 227, 107, 0.12), rgba(47, 143, 107, 0.04));
}
.detail-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.dashboard-home h1 {
  margin: 0;
  text-align: left;
  font-size: 1.9rem;
  color: var(--textAccent);
}

.dashboard-home.card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.dashboard-home.card::before {
  display: none;
}

.database-intro-panel {
  display: block;
  margin-bottom: 28px;
  padding: 12px 0 20px;
}

.database-intro-stage {
  position: relative;
  min-height: 380px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.database-intro-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
  padding: 24px 20px;
  max-width: 1200px;
}

.database-intro-title {
  margin: 0;
  display: block;
}

.database-intro-title > .intro-line {
  display: block;
  max-width: none;
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  line-height: 1;
  font-weight: var(--fontWeightHeading);
  letter-spacing: -0.04em;
  color: var(--textPrimary);
}

.database-intro-subtitle {
  margin: 0;
  font-size: clamp(0.92rem, 1.2vw, 1.1rem);
  line-height: 1.3;
  font-weight: var(--fontWeightRegular);
  letter-spacing: -0.02em;
  color: var(--textSecondary);
}

.intro-line {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  white-space: normal;
  max-width: 100%;
}

.intro-line-subtitle {
  gap: 0;
}

.intro-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);
  background: linear-gradient(90deg, #163b31 0%, #1f5d4d 38%, #2f8f6b 72%, #7fbf88 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: introLetterReveal 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--char-index) * 0.045s);
  will-change: transform, opacity, filter;
}

.database-intro-subtitle .intro-letter {
  background: linear-gradient(90deg, rgba(32, 79, 63, 0.96) 0%, rgba(47, 111, 87, 0.94) 52%, rgba(121, 175, 130, 0.9) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.database-intro-orbit {
  position: absolute;
  inset: auto;
  border: 18px solid transparent;
  border-radius: 45% 55% 48% 52% / 58% 42% 58% 42%;
  opacity: 0.28;
  filter: saturate(0.88);
  animation: introFloat 11s ease-in-out infinite;
}

.orbit-a {
  left: 50%;
  top: 16px;
  width: 300px;
  height: 300px;
  margin-left: -70px;
  border-color: rgba(241, 177, 132, 0.62);
  transform: rotate(24deg);
}

.orbit-b {
  left: 50%;
  top: 102px;
  width: 320px;
  height: 220px;
  margin-left: -120px;
  border-color: rgba(122, 188, 166, 0.58);
  transform: rotate(-28deg);
  animation-delay: -3s;
}

.orbit-c {
  left: 50%;
  top: 118px;
  width: 190px;
  height: 190px;
  margin-left: -30px;
  border-width: 10px;
  border-color: rgba(47, 143, 107, 0.16);
  transform: rotate(15deg);
  animation-delay: -6s;
}

.database-intro-node {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(228,239,232,0.7));
  box-shadow: 0 10px 24px rgba(23, 75, 58, 0.08);
  animation: introPulse 6s ease-in-out infinite;
}

.node-a {
  left: 50%;
  top: 82px;
  margin-left: 122px;
  width: 18px;
  height: 18px;
}

.node-b {
  left: 50%;
  top: 224px;
  margin-left: 168px;
  width: 12px;
  height: 12px;
  animation-delay: -2s;
}

.node-c {
  left: 50%;
  top: 272px;
  margin-left: -12px;
  width: 24px;
  height: 24px;
  animation-delay: -4s;
}

@keyframes introLetterReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes introFloat {
  0%, 100% {
    transform: translateY(0) rotate(22deg);
  }
  50% {
    transform: translateY(10px) rotate(30deg);
  }
}

@keyframes introPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.14);
    opacity: 1;
  }
}

.dashboard-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}

.dashboard-section-heading p {
  margin: 0;
  max-width: 44ch;
  color: var(--textSecondary);
  line-height: 1.55;
}

.dashboard-filter-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(234, 243, 236, 0.92) 0%, rgba(244, 248, 244, 0.88) 100%);
  border: 1px solid rgba(23, 75, 58, 0.08);
}

.dashboard-filter-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.dashboard-filter-info {
  display: flex;
  align-items: center;
}

.dashboard-filter-info strong {
  font-size: 0.98rem;
  color: var(--textPrimary);
}

.dashboard-filter-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.dashboard-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dashboard-filter-tag,
.dashboard-filter-reset,
.dashboard-filter-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(23, 75, 58, 0.12);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--textPrimary);
  font-size: 0.9rem;
  box-shadow: none;
}

.dashboard-filter-tag {
  border-color: color-mix(in srgb, var(--filter-color, #7CCFA2) 60%, white);
  color: color-mix(in srgb, var(--filter-color, #7CCFA2) 55%, #10281f);
  background: color-mix(in srgb, var(--filter-color, #7CCFA2) 12%, white);
}

.dashboard-filter-tag-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 3px solid color-mix(in srgb, var(--filter-color, #7CCFA2) 65%, white);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.dashboard-filter-export {
  background: #2cab49;
  border-color: #2cab49;
  color: #fff;
}

.dashboard-filter-reset {
  background: #e83e4f;
  border-color: #e83e4f;
  color: #fff;
}

.dashboard-filter-tag:hover,
.dashboard-filter-reset:hover,
.dashboard-filter-export:hover {
  background: var(--primarySoft);
  color: var(--textAccent);
}

.dashboard-filter-export:hover {
  background: #249640;
  border-color: #249640;
  color: #fff;
}

.dashboard-filter-reset:hover {
  background: #d23242;
  border-color: #d23242;
  color: #fff;
}

.dashboard-filter-empty {
  color: var(--textMuted);
  font-size: 0.92rem;
}

.dashboard-home-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
  gap: 20px;
  margin-bottom: 22px;
}

.dashboard-panel,
.dashboard-table-card,
.dashboard-summary-card {
  border: 1px solid var(--border);
  border-radius: var(--radiusCard);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(251, 254, 252, 0.94) 100%);
  box-shadow: var(--shadowSoft);
}

.dashboard-panel,
.dashboard-table-card {
  padding: 18px 20px;
}

.dashboard-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-home-panels .dashboard-panel:first-child {
  padding-right: 16px;
  border-right: 1px solid rgba(23, 75, 58, 0.1);
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-panel-header h2 {
  margin: 0;
  color: var(--textPrimary);
  font-size: 1.25rem;
  font-family: var(--fontFamily);
}

.dashboard-panel-note {
  color: var(--textSecondary);
  font-size: 0.88rem;
  white-space: nowrap;
}

.dashboard-year-chart {
  position: relative;
  min-height: 220px;
  padding: 8px 0 0;
  overflow-x: auto;
}

.dashboard-year-plot {
  min-width: 920px;
  height: 190px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22px, 1fr));
  align-items: end;
  gap: 12px;
  padding: 8px 0 0;
  background-image:
    linear-gradient(to top, rgba(20, 34, 28, 0.08) 1px, transparent 1px),
    linear-gradient(to top, rgba(20, 34, 28, 0.08) 1px, transparent 1px),
    linear-gradient(to top, rgba(20, 34, 28, 0.08) 1px, transparent 1px),
    linear-gradient(to right, rgba(20, 34, 28, 0.05) 1px, transparent 1px);
  background-size: 100% 25%, 100% 50%, 100% 75%, 20% 100%;
  background-position: 0 100%, 0 100%, 0 100%, 0 0;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(20, 34, 28, 0.12);
}

.dashboard-year-bar-wrap {
  display: grid;
  grid-template-rows: 18px 1fr auto;
  gap: 6px;
  justify-items: center;
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0;
  cursor: pointer;
  box-shadow: none !important;
  min-width: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.dashboard-year-bar-wrap:disabled {
  cursor: default;
}

.dashboard-year-bar-wrap:focus,
.dashboard-year-bar-wrap:active,
.dashboard-year-bar-wrap:hover {
  background: transparent !important;
  outline: none;
  box-shadow: none !important;
  border-color: transparent !important;
}

.dashboard-year-bar-track {
  width: 18px;
  max-width: 18px;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.dashboard-year-bar {
  width: 100%;
  max-width: 18px;
  border-radius: 3px 3px 0 0;
  box-shadow: none;
  opacity: 0.95;
}

.dashboard-year-bar-wrap:hover .dashboard-year-bar-track,
.dashboard-year-bar-wrap.active .dashboard-year-bar-track {
  transform: translateY(-2px);
}

.dashboard-year-bar-wrap:focus-visible .dashboard-year-bar-track,
.dashboard-year-bar-wrap.active .dashboard-year-bar-track {
  border: 2px solid var(--year-color, rgba(23, 75, 58, 0.85));
}

.dashboard-year-bar-wrap.active .dashboard-year-bar,
.dashboard-year-bar-wrap:focus-visible .dashboard-year-bar {
  opacity: 0;
}

.dashboard-year-bar-wrap.is-empty .dashboard-year-bar-track {
  background: transparent;
}

.dashboard-year-bar-wrap.is-empty .dashboard-year-bar {
  opacity: 0.55;
  box-shadow: none;
}

.dashboard-year-bar-wrap.is-empty strong,
.dashboard-year-bar-wrap.is-empty span {
  color: var(--textMuted);
}

.dashboard-year-bar-wrap.active strong,
.dashboard-year-bar-wrap.active span {
  color: var(--textAccent);
}

.dashboard-year-bar-wrap strong,
.dashboard-year-bar-wrap span {
  color: var(--textSecondary);
  font-size: 0.78rem;
}

.dashboard-year-bar-wrap strong {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.dashboard-category-layout {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
}

.dashboard-donut-shell {
  display: grid;
  place-items: center;
}

.dashboard-donut {
  width: 156px;
  height: 156px;
  overflow: visible;
}

.dashboard-donut-hole {
  fill: #fbfefc;
  stroke: #dfeadf;
  stroke-width: 1;
}

.dashboard-donut-segment {
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, stroke 0.18s ease;
  transform-origin: 90px 90px;
}

.dashboard-donut-segment:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

.dashboard-donut-segment.active {
  stroke: color-mix(in srgb, var(--segment-color, #8FC8BE) 80%, #4f6259);
  stroke-width: 2.5;
  opacity: 1;
}

.dashboard-category-list {
  display: grid;
  gap: 8px;
}

.dashboard-category-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--textPrimary);
  font-size: 0.94rem;
  background: transparent;
  border: 0;
  border-radius: 14px;
  padding: 7px 10px;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.dashboard-category-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.dashboard-category-item:hover,
.dashboard-category-item.active {
  background: color-mix(in srgb, var(--category-color, #8FC8BE) 16%, white);
  transform: translateX(2px);
}

.dashboard-category-item.active strong,
.dashboard-category-item.active span {
  color: var(--textAccent);
}

.dashboard-home-table th {
  color: var(--textMuted) !important;
  font-weight: 700;
  background: linear-gradient(180deg, #f7fbf8 0%, #eef4ee 100%);
  font-size: 0.92rem;
}

.dashboard-home-table td {
  color: var(--textPrimary);
  font-size: 0.94rem;
}

.dashboard-empty-cell {
  padding: 22px 16px !important;
  text-align: center;
  color: var(--textSecondary);
}

.dashboard-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.dashboard-structure-card {
  margin-top: 24px;
  padding: 18px 20px 20px;
  border: 1px solid rgba(23, 75, 58, 0.1);
  border-radius: var(--radiusCard);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248, 251, 247, 0.96) 100%);
  box-shadow: var(--shadowSoft);
}

.dashboard-structure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard-structure-chip {
  border: 1px solid rgba(23, 75, 58, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: var(--textAccent);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
}

.dashboard-structure-chip.active,
.dashboard-structure-chip:hover {
  background: var(--primarySoft);
  color: var(--textAccent);
}

.dashboard-structure-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  color: var(--textPrimary);
}

.dashboard-structure-meta strong {
  font-size: 1.05rem;
}

.dashboard-structure-meta span {
  color: var(--textSecondary);
  font-size: 0.92rem;
}

.dashboard-structure-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.dashboard-structure-split.secondary-missing {
  grid-template-columns: 1fr;
}

.dashboard-secondary-viewer,
.dashboard-structure-viewer {
  width: 100%;
  min-height: 520px;
  border: 1px solid #dfeadf;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.dashboard-secondary-viewer {
  padding: 0;
}

.dashboard-secondary-viewer[hidden] {
  display: none !important;
}

.home-secondary-forna-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  height: 100%;
  padding: 28px 28px 24px;
}

.home-secondary-forna-copy {
  display: grid;
  gap: 10px;
}

.home-secondary-forna-copy h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--textPrimary);
  line-height: 1.2;
}

.home-secondary-forna-copy p {
  margin: 0;
  color: var(--textSecondary);
  font-size: 0.98rem;
}

.home-secondary-forna-frame {
  border: 3px solid #2d7bd4;
  border-radius: 22px;
  background: #ffffff;
  min-height: 380px;
  padding: 16px;
  overflow: hidden;
}

.home-secondary-forna-host {
  width: 100%;
  height: 100%;
  min-height: 344px;
}

.home-secondary-forna-host svg {
  width: 100%;
  height: 100%;
}

.home-secondary-forna-note {
  color: var(--textSecondary);
  font-size: 0.98rem;
}

#home-structure-viewer .msp-plugin {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: 520px !important;
  max-width: 100% !important;
}

#home-structure-viewer .msp-layout-root,
#home-structure-viewer .msp-layout-standard,
#home-structure-viewer canvas {
  position: relative !important;
  inset: auto !important;
}

#home-structure-viewer .msp-layout-standard {
  border: 0;
  height: 520px !important;
}

.dashboard-summary-card {
  padding: 6px 0 0;
  text-align: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-summary-card span {
  display: block;
  color: var(--textSecondary);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.dashboard-summary-card strong {
  color: var(--textAccent);
  font-size: 1.65rem;
}

.download-card {
  padding: 22px 26px 18px;
}

.download-card::before {
  display: none;
}

.download-card h1 {
  margin: 0 0 10px;
  font-size: 2.2rem;
}

.download-intro {
  margin: 0 0 18px;
  font-size: 1.05rem;
  line-height: 1.55;
}

.download-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.browse-toolbar .browse-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 42px;
  padding: 0 18px;
  margin: 0;
  border: 1px solid rgba(218, 173, 95, 0.42) !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  background-image: none !important;
  color: var(--textAccent) !important;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none !important;
  text-transform: none;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.browse-toolbar .browse-action-btn:hover {
  background: #fff2d0 !important;
  background-image: none !important;
  color: var(--textAccent) !important;
}

.browse-toolbar .browse-action-btn.is-disabled,
.browse-toolbar .browse-action-btn[aria-disabled="true"] {
  border-color: #e1e1e8 !important;
  color: var(--textSecondary) !important;
  background: #fbfbfd !important;
  background-image: none !important;
  cursor: not-allowed;
  pointer-events: none;
}

.download-search {
  min-width: 280px;
  flex: 1 1 280px;
  border: 1px solid rgba(227, 191, 92, 0.24);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  background: rgba(255, 253, 246, 0.96);
  color: var(--textPrimary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.download-outline-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(227, 191, 92, 0.24);
  border-radius: 999px;
  background: rgba(255, 251, 239, 0.92);
  color: var(--textSecondary);
  padding: 13px 18px;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}

.download-outline-btn:hover {
  background: #fff2bf;
  color: var(--textSecondary);
}

.download-outline-btn:disabled {
  border-color: #e1e1e8;
  color: var(--textSecondary);
  background: #fbfbfd;
  cursor: not-allowed;
}

.download-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(227, 191, 92, 0.24);
  background: rgba(255, 255, 255, 0.9);
}

.download-table thead {
  background: linear-gradient(135deg, #e4b84d 0%, #f3cf6f 52%, #f8e29d 100%);
}

.download-table thead th {
  color: #fff;
  border-bottom: none;
  padding: 14px 12px;
  white-space: nowrap;
}

.download-table tbody td {
  padding: 14px 12px;
  white-space: nowrap;
}

.download-table tbody td:nth-child(3) {
  white-space: normal;
  min-width: 320px;
  line-height: 1.45;
}

.download-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(255, 236, 180, 0.34), rgba(255, 248, 219, 0.18));
}

.download-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.download-table .sequence-link {
  color: var(--textSecondary);
  font-weight: 700;
  text-decoration: none;
}

.download-table .sequence-link:hover {
  color: var(--textPrimary);
  text-decoration: underline;
}

.entry-table-card {
  display: grid;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.entry-table-card::before {
  display: none !important;
}

.entry-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(227, 191, 92, 0.3);
  background: transparent;
}

.entry-table {
  min-width: 980px;
  background: transparent;
  table-layout: fixed;
}

.entry-table thead {
  background: linear-gradient(135deg, #e4b84d 0%, #f3cf6f 52%, #f8e29d 100%);
}

.entry-table thead th {
  color: #fff;
  border-bottom: none;
  white-space: nowrap;
}

.entry-table tbody td {
  background: rgba(255, 255, 255, 0.9);
}

.entry-table th:nth-child(1),
.entry-table td:nth-child(1) { width: 68px; text-align: center; }
.entry-table th:nth-child(2),
.entry-table td:nth-child(2) { width: 260px; }
.entry-table th:nth-child(3),
.entry-table td:nth-child(3) { width: 180px; }
.entry-table th:nth-child(4),
.entry-table td:nth-child(4) { width: 320px; }
.entry-table th:nth-child(5),
.entry-table td:nth-child(5) { width: 120px; }
.entry-table th:nth-child(6),
.entry-table td:nth-child(6) { width: 190px; }
.entry-table th:nth-child(7),
.entry-table td:nth-child(7) { width: 110px; }

.browse-select {
  width: 18px;
  height: 18px;
}

.entry-table-empty {
  text-align: center;
  color: var(--textMuted);
  padding: 28px 12px;
}

.entry-sequence {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.sequence-preview {
  display: inline-block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.download-footnote {
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
  color: var(--textSecondary);
  font-size: 0.98rem;
}

.sequence-detail-card {
  display: block;
  margin-top: 18px;
  padding: 30px 34px 34px;
}

.sequence-detail-header {
  margin-bottom: 0;
  padding: 8px 0 28px;
  border: 0;
  border-bottom: 1px solid rgba(227, 191, 92, 0.22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.sequence-detail-back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  color: var(--textSecondary);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.sequence-detail-back:hover {
  text-decoration: underline;
}

.sequence-detail-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 32px;
  align-items: end;
}

.sequence-detail-kicker {
  margin: 0 0 10px;
  color: var(--textAccent);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sequence-detail-header h1 {
  margin: 0 0 12px;
  max-width: 920px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.08;
  color: var(--textPrimary);
}

.sequence-detail-header p {
  margin: 0;
  max-width: 920px;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--textSecondary);
}

.sequence-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
  margin: 0;
}

.sequence-detail-meta div {
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(227, 191, 92, 0.18);
}

.sequence-detail-meta dt {
  margin-bottom: 4px;
  color: var(--textMuted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sequence-detail-meta dd {
  margin: 0;
  color: var(--textPrimary);
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sequence-detail-panel {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 26px 0 28px;
  margin-bottom: 0;
  position: relative;
  border-bottom: 0;
}

.sequence-detail-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 191, 92, 0.22) 16%, rgba(227, 191, 92, 0.14) 84%, transparent);
  opacity: 1;
  pointer-events: none;
}

.sequence-detail-panel:last-child::after {
  display: none;
}

.sequence-detail-panel h2 {
  position: relative;
  margin: 0 0 18px;
  font-size: 1.28rem;
  color: var(--textSecondary);
}

.sequence-detail-rule {
  display: none;
}

.sequence-detail-timeline-panel {
  padding-bottom: 32px;
}

.sequence-detail-timeline {
  --timeline-track-x: 30px;
  --timeline-track-width: 4px;
  position: relative;
  display: grid;
  gap: 14px;
  max-width: 1080px;
  padding: 18px 0 20px 168px;
}

.sequence-detail-timeline::before {
  content: "";
  position: absolute;
  left: var(--timeline-track-x);
  top: 0;
  bottom: 0;
  width: var(--timeline-track-width);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(227, 191, 92, 0.34), rgba(214, 162, 46, 0.82), rgba(227, 191, 92, 0.28));
}

.sequence-detail-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  min-height: 118px;
}

.sequence-detail-timeline-item::before {
  content: "";
  position: absolute;
  left: calc(var(--timeline-track-x) + (var(--timeline-track-width) / 2) - 168px);
  top: 34px;
  width: 24px;
  height: 24px;
  border: 5px solid #d29f2a;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 0 rgba(210, 159, 42, 0);
  transform: translate(-50%, -50%);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.sequence-detail-timeline-item::after {
  content: "";
  position: absolute;
  left: 118px;
  top: 25px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #efc466;
  box-shadow: 0 0 0 6px rgba(239, 196, 102, 0.18);
  z-index: 2;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.sequence-detail-timeline-item time {
  color: var(--textSecondary);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding-top: 17px;
  text-align: right;
}

.sequence-detail-timeline-card {
  min-height: 104px;
  padding: 20px 24px 20px 28px;
  border-left: 5px solid #d29f2a;
  border-radius: 8px;
  background: rgba(255, 252, 243, 0.82);
  box-shadow:
    0 16px 40px rgba(155, 122, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.sequence-detail-timeline-card p {
  margin: 0;
  color: var(--textPrimary);
  font-size: 1.08rem;
  line-height: 1.7;
}

.sequence-detail-timeline-card p::first-letter {
  color: var(--textAccent);
  font-size: 1.22em;
  font-weight: 800;
}

.sequence-detail-timeline-item:hover::before,
.sequence-detail-timeline-item:focus-within::before {
  background: #d29f2a;
  box-shadow: 0 0 0 12px rgba(210, 159, 42, 0.16);
  transform: translate(-50%, -50%) scale(1.12);
}

.sequence-detail-timeline-item:hover::after,
.sequence-detail-timeline-item:focus-within::after {
  background: #f0b451;
  box-shadow: 0 0 0 10px rgba(240, 180, 81, 0.18);
  transform: translateX(-8px) scale(1.12);
}

.sequence-detail-timeline-item:hover .sequence-detail-timeline-card,
.sequence-detail-timeline-item:focus-within .sequence-detail-timeline-card {
  background: rgba(255, 249, 232, 0.92);
  box-shadow:
    0 24px 54px rgba(155, 122, 38, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateX(10px) translateY(-3px);
}

.sequence-detail-placeholder {
  min-height: auto;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  box-shadow:
    0 10px 26px rgba(20, 34, 28, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.sequence-detail-placeholder p {
  margin: 0;
  max-width: 980px;
  color: var(--textPrimary);
  font-size: 1.02rem;
  line-height: 1.75;
}

.sequence-detail-media {
  width: 100%;
  overflow-x: auto;
  display: grid;
  gap: 12px;
}

.sequence-detail-reference-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.sequence-detail-reference-list {
  display: grid;
  gap: 0;
}

.sequence-detail-reference-item {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 20px 0;
  box-shadow: none;
  border-bottom: 1px solid rgba(227, 191, 92, 0.18);
}

.sequence-detail-reference-item:first-child {
  padding-top: 0;
}

.sequence-detail-reference-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sequence-detail-reference-item h3 {
  margin: 0 0 10px;
  color: var(--textPrimary);
  font-size: 1.05rem;
  line-height: 1.45;
}

.sequence-detail-reference-card p {
  margin: 0;
  color: var(--textPrimary);
  line-height: 1.65;
}

.sequence-detail-reference-authors {
  font-size: 0.96rem;
}

.sequence-detail-reference-source {
  margin-top: 6px;
  color: var(--textAccent);
  font-size: 1rem;
}

.sequence-detail-reference-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sequence-detail-reference-link {
  color: var(--textSecondary);
  text-decoration: none;
  font-weight: 600;
}

.sequence-detail-reference-link:hover {
  text-decoration: underline;
}

.sequence-detail-viewer {
  position: relative;
  display: block;
  width: 100%;
  height: 560px;
  min-height: 560px;
  border: 1px solid rgba(227, 191, 92, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  isolation: isolate;
  box-shadow: 0 12px 34px rgba(155, 122, 38, 0.08);
}

.sequence-detail-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.sequence-secondary-layout {
  display: grid;
  gap: 18px;
}

.sequence-secondary-top {
  display: grid;
  gap: 16px;
}

.sequence-secondary-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.sequence-secondary-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.sequence-secondary-block,
.sequence-secondary-card {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  padding: 16px 18px;
  box-shadow:
    0 10px 26px rgba(20, 34, 28, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.sequence-secondary-figure-card {
  margin-top: 18px;
}

.sequence-secondary-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--textAccent);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sequence-secondary-code {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--fontFamily);
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--textPrimary);
}

.sequence-primary-code {
  margin-top: 0;
}

.sequence-nucleotide {
  font-weight: 600;
}

.nucleotide-a {
  color: #e76f51;
}

.nucleotide-u {
  color: #3b82f6;
}

.nucleotide-g {
  color: #2a9d55;
}

.nucleotide-c {
  color: #f4a261;
}

.sequence-secondary-image {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 10px auto 0;
  border-radius: 14px;
  border: 0;
  background: #ffffff;
}

.sequence-secondary-forna-card {
  display: grid;
  gap: 20px;
  padding: 28px 28px 24px;
  border: 1px solid rgba(23, 75, 58, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.sequence-detail-forna-copy {
  display: grid;
  gap: 10px;
}

.sequence-detail-forna-copy h3 {
  margin: 0;
  color: var(--textPrimary);
  font-size: 1.28rem;
  line-height: 1.25;
}

.sequence-detail-forna-copy p,
.sequence-detail-forna-note {
  margin: 0;
  color: var(--textSecondary);
  font-size: 1rem;
  line-height: 1.6;
}

.sequence-detail-forna-frame {
  border: 1px solid rgba(227, 191, 92, 0.24);
  border-radius: 22px;
  background: #ffffff;
  min-height: 420px;
  padding: 16px;
  overflow: hidden;
  box-shadow: none;
}

.sequence-detail-forna-host {
  min-height: 380px;
  width: 100%;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.sequence-detail-forna-host > * {
  display: none !important;
}

.sequence-secondary-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

@media (min-width: 1800px) {
  .sequence-secondary-bottom {
    grid-template-columns: minmax(0, 1.2fr) 320px;
  }
}

@media (max-width: 1100px) {
  .dashboard-filter-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-filter-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-filter-tags {
    justify-content: flex-start;
  }

  .dashboard-filter-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .database-intro-panel {
    padding-bottom: 12px;
  }

  .database-intro-stage {
    min-height: 320px;
  }

  .orbit-a,
  .orbit-b,
  .orbit-c,
  .node-a,
  .node-b,
  .node-c {
    opacity: 0.72;
  }

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

  .dashboard-home-panels {
    grid-template-columns: 1fr;
  }

  .dashboard-home-panels .dashboard-panel:first-child {
    padding-right: 0;
    padding-bottom: 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 75, 58, 0.1);
  }

  .dashboard-structure-split {
    grid-template-columns: 1fr;
  }

  .dashboard-category-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .dashboard-summary-cards {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .dashboard-structure-viewer,
  #home-structure-viewer .msp-plugin,
  #home-structure-viewer .msp-layout-standard {
    min-height: 420px;
    height: 420px !important;
  }
}

@media (max-width: 720px) {
  .dashboard-home h1 {
    font-size: 2rem;
  }

  .database-intro-panel {
    padding-bottom: 8px;
  }

  .database-intro-stage {
    min-height: 280px;
  }

  .database-intro-copy {
    padding: 16px 12px;
  }

  .database-intro-title > .intro-line {
    max-width: none;
    font-size: clamp(1.35rem, 6vw, 2rem);
  }

  .dashboard-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-year-chart {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  }

  .dashboard-summary-cards {
    grid-template-columns: 1fr;
  }
}

.sequence-secondary-card-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sequence-secondary-card h3 {
  margin: 0;
  color: var(--textPrimary);
  font-size: 1.08rem;
}

.sequence-secondary-heatmap-card {
  background: #fff;
}

.sequence-secondary-heatmap-host {
  border: 1px solid #e6efe8;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.sequence-secondary-heatmap-scroll {
  width: 100%;
  overflow: auto;
  display: flex;
  justify-content: center;
}

.sequence-secondary-heatmap-stage {
  position: relative;
  width: max-content;
  padding: 14px;
  background: #fff;
}

.sequence-secondary-heatmap-canvas {
  display: block;
  max-width: none;
}

.sequence-secondary-heatmap-tooltip {
  position: absolute;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(18, 24, 27, 0.92);
  color: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  z-index: 4;
}

.sequence-secondary-heatmap-tooltip div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.sequence-secondary-heatmap-tooltip div + div {
  margin-top: 6px;
}

.sequence-secondary-heatmap-tooltip span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--textSecondary);
}

.sequence-secondary-heatmap-tooltip strong {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
}

.sequence-secondary-meta {
  margin: 0;
  display: grid;
  gap: 10px;
}

.sequence-secondary-meta div {
  display: grid;
  gap: 2px;
}

.sequence-secondary-meta dt {
  color: var(--textSecondary);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sequence-secondary-meta dd {
  margin: 0;
  color: var(--textPrimary);
  font-weight: 500;
}

.sequence-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sequence-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #207F4C;
  border-radius: 10px;
  color: var(--textAccent);
  text-decoration: none;
  font-weight: 600;
  background: #fff;
}

.sequence-secondary-link:hover {
  background: #edf8f1;
}

.sequence-secondary-footnote {
  margin: 10px 0 0;
  color: var(--textSecondary);
  line-height: 1.55;
  font-size: 0.93rem;
}

.search-row { display: flex; gap: 8px; flex-wrap: wrap; }
.search-row input {
  min-width: 280px;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--textPrimary);
}

.full-width-image { padding: 8px; }
.search-box { max-width: 980px; margin: 0 auto; }
.search h1 { margin: 0 0 8px; }
.search .i { display: flex; align-items: center; gap: 10px; }
.search .i img { width: 28px; height: 28px; }
.google-search-container { margin-top: 14px; }
.search-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadowSoft);
}
.search-icon { display: inline-flex; cursor: pointer; }
.google-search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 1rem;
  background: transparent;
  color: var(--textPrimary);
}
.search-results-wrapper { position: relative; }
.search-results-container {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  max-height: 300px;
  overflow: auto;
}
.search-result-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--textPrimary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--primarySoft); color: var(--textAccent); }
.search-result-item.muted { color: var(--textSecondary); }
.tip { color: var(--textAccent); text-decoration: none; }
.tip:hover { text-decoration: underline; }

.viz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.viz-card h3 { margin-top: 0; }
.viz-card p {
  color: var(--textSecondary);
}

.viewer3d, .scatter, .bars {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(228,239,232,0.82) 100%);
  padding: 8px;
}
.viewer3d svg { width: 100%; height: 130px; }

.pocket-wrap {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--primarySoft));
  height: 130px;
  position: relative;
  overflow: hidden;
}
.pocket {
  width: 130px;
  height: 90px;
  background: color-mix(in srgb, var(--primary) 35%, transparent);
  border: 2px dashed var(--primary);
  border-radius: 50% 40% 60% 45%;
  position: absolute;
  left: 20px;
  top: 20px;
}
.ligand {
  position: absolute;
  right: 24px;
  top: 45px;
  background: var(--accent);
  color: var(--onPrimary);
  border-radius: 999px;
  font-size: .8rem;
  padding: 6px 10px;
}

.pie {
  margin-top: 8px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--border);
}

.bars {
  height: 130px;
  display: flex;
  align-items: end;
  gap: 8px;
}
.bars span {
  flex: 1;
  background: var(--accent);
  border-radius: 7px 7px 0 0;
}

.scatter {
  position: relative;
  height: 130px;
}
.scatter span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 90%, transparent);
}

.forna-host {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
}

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 4px 8px;
  font-size: .8rem;
  color: var(--textSecondary);
  background: color-mix(in srgb, var(--surface) 90%, var(--primarySoft));
}

/* Molstar容器样式 */
.structure-table #myViewer1 {
  width: 500px !important;
  height: 500px !important;
}
.msp-plugin ::-webkit-scrollbar-thumb { background-color: #474748 !important; }
.msp-plugin .msp-layout-standard { border: 1px solid #EFEFEF; }
.viewerSection1 { padding-top: 0; }
.controlsSection1 { width: 300px; display: flex; float: left; padding: 0; height: 25px; }
#myViewer1 {
  float: left;
  width: 500px;
  height: 500px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

#sequence-detail-molstar .msp-plugin {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: 560px !important;
  max-width: 100% !important;
}

#sequence-detail-molstar .msp-layout-root,
#sequence-detail-molstar .msp-layout-standard,
#sequence-detail-molstar canvas {
  position: relative !important;
  inset: auto !important;
}

#sequence-detail-molstar .msp-layout-standard {
  border: 0;
  height: 560px !important;
}

.page-annojoin-case {
  display: grid;
  gap: 24px;
}

.annojoin-case-hero {
  display: grid;
  gap: 18px;
  padding: 34px 0 4px;
}

.annojoin-case-hero h1 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
}

.annojoin-case-hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.annojoin-case-hero-note {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(23, 75, 58, 0.1);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(244, 249, 245, 0.96) 100%);
}

.annojoin-case-hero-note strong,
.annojoin-case-metric strong {
  color: var(--text);
}

.annojoin-case-hero-note span,
.annojoin-case-metric span {
  color: var(--textSecondary);
}

.annojoin-case-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.annojoin-case-shell-main {
  display: grid;
  gap: 20px;
}

.annojoin-case-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(23, 75, 58, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.annojoin-case-panel-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: end;
}

.annojoin-case-panel-head .technology-kicker {
  grid-column: 1 / -1;
  margin: 0;
}

.annojoin-case-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  letter-spacing: 0;
}

.annojoin-case-panel-head span {
  color: var(--textSecondary);
  font-size: 0.86rem;
}

.annojoin-case-evidence-panel {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.annojoin-chain-identity {
  gap: 16px;
}

.annojoin-chain-group {
  display: grid;
  gap: 8px;
}

.annojoin-chain-group-head {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
}

.annojoin-chain-group-head.is-verified {
  background: rgba(40, 160, 90, 0.18);
  color: var(--textAccent);
}

.annojoin-chain-group-head.is-declared {
  background: rgba(201, 146, 12, 0.18);
  color: var(--textSecondary);
}

.annojoin-chain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.annojoin-chain-table td {
  padding: 8px 10px;
  border-top: 1px solid rgba(23, 75, 58, 0.1);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.annojoin-chain-id {
  width: 48px;
  color: var(--text);
}

.annojoin-chain-name {
  color: var(--text);
}

.annojoin-chain-meta {
  display: block;
  margin-top: 2px;
  color: var(--textSecondary);
  font-size: 0.82rem;
  font-weight: 400;
}

.annojoin-chain-ids {
  text-align: right;
  color: var(--textSecondary);
  white-space: nowrap;
}

.annojoin-case-metric {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(23, 75, 58, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
}

.annojoin-case-copy {
  margin: 0;
  color: var(--textSecondary);
  line-height: 1.7;
}

.annojoin-case-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.annojoin-tier-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(32, 127, 76, 0.1);
  color: var(--textAccent);
  font-size: 0.85rem;
  font-weight: 700;
}

.annojoin-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.annojoin-focus-grid div,
.annojoin-provenance-grid div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 75, 58, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.annojoin-focus-grid dt,
.annojoin-provenance-grid span {
  margin: 0;
  color: var(--textAccent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.annojoin-focus-grid dd,
.annojoin-provenance-grid strong {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.annojoin-focus-empty,
.annojoin-evidence-empty,
.annojoin-workbench-empty {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(23, 75, 58, 0.2);
  border-radius: 10px;
  background: rgba(246, 249, 247, 0.92);
}

.annojoin-family-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.annojoin-family-filter {
  border: 1px solid rgba(23, 75, 58, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--textSecondary);
  font: inherit;
  padding: 8px 14px;
  cursor: pointer;
}

.annojoin-family-filter.is-active {
  border-color: rgba(32, 127, 76, 0.36);
  background: rgba(32, 127, 76, 0.12);
  color: var(--textAccent);
}

.annojoin-evidence-list {
  display: grid;
  gap: 10px;
  max-height: 960px;
  overflow: auto;
}

.annojoin-evidence-row {
  display: grid;
  gap: 6px;
  justify-items: start;
  width: 100%;
  border: 1px solid rgba(23, 75, 58, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.annojoin-evidence-row.is-selected {
  border-color: rgba(32, 127, 76, 0.38);
  box-shadow: 0 0 0 2px rgba(32, 127, 76, 0.1);
  background: linear-gradient(180deg, rgba(248, 252, 249, 0.96) 0%, rgba(238, 246, 240, 0.96) 100%);
}

.annojoin-evidence-row strong,
.annojoin-evidence-row small {
  overflow-wrap: anywhere;
}

.annojoin-evidence-row small {
  color: var(--textSecondary);
  line-height: 1.5;
}

.annojoin-evidence-family,
.annojoin-evidence-tier {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(32, 127, 76, 0.08);
  color: var(--textAccent);
  font-size: 0.78rem;
  font-weight: 700;
}

.annojoin-case-workbench-frame {
  min-height: 1180px;
  width: 100%;
  border: 1px solid rgba(23, 75, 58, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.annojoin-case-provenance summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

.annojoin-provenance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.annojoin-provenance-list {
  margin: 14px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.annojoin-provenance-list code {
  color: var(--textPrimary);
  font-family: var(--fontFamily);
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .annojoin-case-hero-meta,
  .annojoin-case-shell-grid,
  .annojoin-focus-grid,
  .annojoin-provenance-grid {
    grid-template-columns: 1fr;
  }

  .annojoin-case-workbench-frame {
    min-height: 920px;
  }
}

.mini-note {
  margin-top: 8px;
  color: var(--textSecondary);
  font-size: .9rem;
}

.pdb-fallback {
  margin: 8px 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--primarySoft));
  color: var(--textPrimary);
  overflow: auto;
}

.dashboard-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(240, 245, 240, 0.9) 100%);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(23, 75, 58, 0.08);
}
.chart-container.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-wrapper, .analysis-wrapper, .data-table-section, .filter-controls, .data-summary {
  border: 1px solid rgba(23, 75, 58, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* remove outlines for Year/Category blocks per request */
#V-HIST-001,
#V-PIE-001,
#V-TABLE-001 {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}
.chart-header, .filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.chart-title, .filter-title {
  margin: 0;
  font-family: var(--fontFamily);
  font-size: 1.15rem;
}
.chart-info { color: var(--textSecondary); font-size: .85rem; }

.bar-chart {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: 10px;
  align-items: end;
}
.bar {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 85%, var(--primarySoft));
  display: grid;
  align-items: end;
  height: 100%;
  cursor: pointer;
  padding: 6px;
}
.bar.active { box-shadow: inset 0 0 0 2px var(--primary); }
.bar-fill {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--accent);
  min-height: 6px;
}
.bar-label {
  display: block;
  font-size: .8rem;
  margin-top: 6px;
  color: var(--textSecondary);
}

.pie-layout { display: grid; grid-template-columns: 190px 1fr; gap: 10px; align-items: center; }
.pie-svg { width: 180px; height: 180px; }
.pie-sector { cursor: pointer; opacity: .92; transition: transform .12s ease, opacity .12s ease; transform-origin: 90px 90px; }
.pie-sector:hover { opacity: 1; transform: scale(1.02); }
.pie-sector.active { stroke: var(--textPrimary); stroke-width: 2; }
.pie-legend { display: grid; gap: 6px; }
.legend-item {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: left;
  color: var(--textPrimary);
  cursor: pointer;
}
.legend-item.active { box-shadow: inset 0 0 0 2px var(--primary); }
.legend-item .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }

.filter-actions { display: flex; gap: 8px; }
.filter-btn {
  border: 1px solid rgba(23, 75, 58, 0.1);
  background: rgba(255, 255, 255, 0.84);
  color: var(--textPrimary);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: none;
}
.filter-btn:hover { background: var(--primarySoft); color: var(--textAccent); }
.filter-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.table-container { overflow-x: auto; }
.table-responsive table { min-width: 860px; }
.table-responsive {
  border: 1px solid rgba(23, 75, 58, 0.08);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

#dataTable thead {
  background: linear-gradient(180deg, #f8fbf8 0%, #edf3ee 100%);
}

#dataTable th {
  padding-top: 16px;
  padding-bottom: 16px;
}

#dataTable tbody tr {
  position: relative;
}

#dataTable tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.summary-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-card {
  border: 1px solid rgba(23, 75, 58, 0.08);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(228,239,232,0.6) 100%);
}
.summary-label { color: var(--textSecondary); font-size: .85rem; }
.summary-count, .summary-percentage { font-size: 1.3rem; font-weight: 700; color: var(--textAccent); }

#ms-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.black-footer {
  margin-top: 28px;
  background: #000000;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.black-footer-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 18px 20px 20px;
  display: flex;
  align-items: stretch;
}
.black-footer a {
  color: #ffffff;
  text-decoration: none;
  font-size: .9rem;
}
.black-footer a:hover { text-decoration: underline; }
.black-footer .sep { opacity: .45; }
.footer-stack {
  display: grid;
  gap: 10px;
  width: 100%;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
}
.footer-heading {
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}
.footer-domain {
  overflow-wrap: anywhere;
}
.footer-address {
  align-items: flex-start;
}
.footer-address-text {
  max-width: 74ch;
  line-height: 1.6;
}
.footer-bundle a[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .hero, .split, .grid.two-col, .detail-grid, .stats-grid, .stats-grid.compact, .viz-grid, .chart-container.two, .summary-cards { grid-template-columns: 1fr; }
  .pie-layout { grid-template-columns: 1fr; }
  .structure-table #myViewer1, #myViewer1 { width: 100% !important; height: 420px !important; }
  .sequence-detail-viewer, #sequence-detail-molstar .msp-plugin, #sequence-detail-molstar .msp-layout-standard { min-height: 420px; height: 420px !important; }
  .sequence-detail-title-row { grid-template-columns: 1fr; align-items: start; gap: 24px; }
  .sequence-secondary-top { grid-template-columns: 1fr; }
  .sequence-secondary-bottom { grid-template-columns: 1fr; }
}

main {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 28px 20px 20px;
}

.hero-subnav {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 28px;
  position: relative;
  z-index: 5;
  background: transparent;
  border-top: none;
  border-bottom: none;
}

.hero-subnav-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  position: relative;
  padding: 0 18px 18px;
  display: flex;
  justify-content: center;
}

.hero-subnav nav {
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  background: rgba(248, 251, 247, 0.38);
  border: 1px solid rgba(214, 224, 216, 0.45);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(23, 75, 58, 0.08);
  backdrop-filter: blur(16px);
}

.subnav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(248, 251, 247, 0.88);
  color: var(--textAccent);
  box-shadow: none;
  border: 1px solid rgba(214, 224, 216, 0.85);
}

.subnav-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.hero-subnav .nav-btn {
  color: var(--textSecondary);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.hero-subnav .nav-btn:hover {
  background: var(--primarySoft);
  color: var(--textAccent);
}

.hero-subnav .nav-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--onPrimary);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(23, 75, 58, 0.14);
}

.nav-btn {
  background: transparent;
  color: var(--textPrimary);
  border: 1px solid transparent;
  font-size: 18px;
  font-weight: 500;
}

.nav-btn:hover {
  background: var(--primarySoft);
  color: var(--textAccent);
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--onPrimary);
  border-color: transparent;
}

.nav-dropdown-menu {
  top: calc(100% + 6px);
}

@media (max-width: 1200px) {
  main {
    padding: 24px 16px 16px;
  }

  .hero-subnav nav {
    padding-left: 16px;
    padding-right: 16px;
    gap: 14px;
  }

  .hero-subnav-inner {
    max-width: none;
  }

  .black-nav {
    justify-content: center;
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 900px) {
  main {
    padding: 18px 14px 14px;
  }

  .black-nav {
    gap: 6px;
    justify-content: center;
    padding: 8px 10px;
  }

  .black-nav a {
    font-size: 0.78rem;
    padding: 6px 8px;
    gap: 4px;
  }

  .black-nav a img {
    width: 13px;
    height: 13px;
  }

  .hero-subnav {
    margin-top: 0;
  }

  .hero-subnav-inner {
    padding: 0 12px;
  }

  .subnav-menu-toggle {
    display: inline-flex;
    margin: 8px 0;
  }

  .hero-subnav nav {
    display: none;
    width: 100%;
    margin: 0 0 10px;
    padding: 6px;
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(248, 251, 247, 0.98);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .hero-subnav nav.open {
    display: flex;
  }

  .hero-subnav nav::-webkit-scrollbar {
    display: none;
  }

  .hero-subnav .nav-btn,
  .hero-subnav .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    white-space: nowrap;
    font-size: 0.95rem;
    padding: 10px 12px;
    text-align: left;
    border-radius: 10px;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    margin-top: 4px;
    padding: 6px 0 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .nav-dropdown-item {
    font-size: 1rem;
    padding: 12px 16px;
    color: var(--textPrimary);
    border-radius: 10px;
  }

  .nav-dropdown-item:hover {
    background: var(--primarySoft);
    color: var(--textAccent);
  }
}

@media (max-width: 640px) {
  main {
    padding: 16px 12px 12px;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .sequence-detail-card {
    margin-top: 12px;
    padding: 22px 20px 24px;
  }

  .sequence-detail-header {
    padding: 4px 0 22px;
  }

  .sequence-detail-meta {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sequence-detail-panel {
    padding: 24px 0 26px;
  }

  .sequence-detail-timeline {
    --timeline-track-x: 14px;
    --timeline-track-width: 4px;
    gap: 16px;
    padding: 12px 0 16px 42px;
  }

  .sequence-detail-timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
  }

  .sequence-detail-timeline-item::before {
    left: calc(var(--timeline-track-x) + (var(--timeline-track-width) / 2) - 42px);
    top: 17px;
    width: 18px;
    height: 18px;
    border-width: 4px;
  }

  .sequence-detail-timeline-item::after {
    left: -8px;
    top: 69px;
    width: 16px;
    height: 16px;
  }

  .sequence-detail-timeline-item time {
    padding-top: 0;
    text-align: left;
  }

  .sequence-detail-timeline-card {
    padding: 14px 16px;
    min-height: 80px;
  }

  .sequence-secondary-forna-card {
    padding: 22px 18px 20px;
  }

  .sequence-detail-forna-frame {
    min-height: 300px;
    border-width: 3px;
    border-radius: 18px;
  }

  .sequence-detail-forna-host {
    min-height: 264px;
  }

  .sequence-detail-timeline-item:hover .sequence-detail-timeline-card,
  .sequence-detail-timeline-item:focus-within .sequence-detail-timeline-card {
    transform: translateY(-2px);
  }

  .hero h1,
  .download-card h1,
  .sequence-detail-header h1 {
    font-size: 1.85rem;
  }

  .actions {
    flex-wrap: wrap;
  }

  .actions button,
  .download-outline-btn,
  button {
    width: 100%;
  }

  .download-search {
    min-width: 0;
    flex-basis: 100%;
  }

  .download-toolbar {
    gap: 10px;
  }

  .black-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .black-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .hero-subnav nav {
    padding: 6px;
  }

  .hero-subnav .nav-btn,
  .hero-subnav .nav-dropdown-toggle {
    font-size: 0.9rem;
    padding: 8px 9px;
  }

  .sequence-detail-viewer,
  #sequence-detail-molstar .msp-plugin,
  #sequence-detail-molstar .msp-layout-standard {
    min-height: 320px;
    height: 320px !important;
  }
}

.bundle-home-page {
  width: 100%;
  max-width: none;
  padding: 0 0 28px;
}

main.page-detail,
main.page-structure,
main.page-download,
main.page-download-sequences,
main.page-publications,
main.page-help {
  width: 100%;
  max-width: none;
  padding: 0 0 28px;
}

.bundle-home-shell {
  display: grid;
  gap: 30px;
  padding: 0 0 10px;
}

.bundle-home-header {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 20px 0 16px;
  border-top: 1px solid rgba(126, 197, 219, 0.32);
  border-bottom: 0;
  background: #ffffff;
  box-shadow: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bundle-home-header-inner {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.bundle-home-brand,
.bundle-home-topline,
.bundle-home-nav-column {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.bundle-home-brand-column,
.bundle-home-nav-column {
  min-width: 0;
}

.bundle-home-nav-column {
  display: grid;
  gap: 14px;
}

.bundle-home-mark {
  width: 32px;
  height: 60px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(145deg, #e4b84d 0%, #f3cf6f 52%, #f8e29d 100%);
  box-shadow: 0 18px 32px rgba(228, 184, 77, 0.24);
}

.bundle-home-brand-copy {
  display: grid;
  gap: 10px;
  flex: 1;
  min-width: 170px;
}

.bundle-home-bundle-block {
  display: grid;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.bundle-home-bundle-label {
  margin: 0;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--textAccent);
}

.bundle-home-switch-label {
  margin: 0;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--textAccent);
}

.bundle-home-brand-copy p,
.bundle-home-links span,
.bundle-kicker,
.bundle-site-kicker,
.bundle-metric-card p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.72rem;
  color: var(--textAccent);
}

.bundle-home-brand-copy .bundle-home-bundle-label,
.bundle-home-bundle-block .bundle-home-switch-label {
  color: var(--textAccent);
}

.bundle-home-brand-copy h1,
.bundle-hero-copy h2 {
  margin: 0;
  letter-spacing: -0.04em;
  color: var(--textPrimary);
}

.bundle-home-brand-copy h1 {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.4rem;
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bundle-home-brand-copy span,
.bundle-home-links {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  color: var(--textSecondary);
  font-size: 0.78rem;
  line-height: 1.45;
}

.bundle-home-brand-copy span {
  display: block;
}

.bundle-home-switches,
.bundle-home-route-nav,
.bundle-hero-actions,
.bundle-site-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bundle-hero-actions .bundle-hero-primary {
  background: linear-gradient(135deg, #f0c85a 0%, #e0ae24 100%);
  color: var(--textPrimary);
  box-shadow: 0 10px 24px rgba(196, 148, 16, 0.22);
}

.bundle-hero-actions .bundle-hero-primary:hover {
  background: linear-gradient(135deg, #f6d778 0%, #e7b93a 100%);
}

.bundle-switch-pill {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  flex: 1 1 0;
  min-width: 152px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(224, 174, 36, 0.68);
  background: rgba(255, 255, 255, 0.92);
  color: var(--textPrimary);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.bundle-switch-pill strong,
.bundle-switch-pill span {
  display: block;
}

.bundle-switch-pill strong {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.08rem;
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--textPrimary);
  white-space: nowrap;
}

.bundle-switch-pill span {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  margin-top: 5px;
  font-size: 0.76rem;
  color: var(--textSecondary);
  line-height: 1.25;
  font-weight: 500;
  white-space: nowrap;
}

.bundle-switch-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(224, 174, 36, 0.92);
  box-shadow: 0 10px 24px rgba(20, 34, 28, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.bundle-switch-pill:not(.active) {
  background: #ffffff;
}

.bundle-switch-pill:not(.active) strong {
  color: var(--textPrimary);
}

.bundle-switch-pill:not(.active) span {
  color: var(--textSecondary);
}

.bundle-switch-pill.active.tone-gold {
  min-width: 186px;
  border-color: rgba(227, 191, 92, 0.46);
  background: linear-gradient(135deg, rgba(255, 232, 163, 0.95) 0%, rgba(255, 244, 202, 0.96) 52%, rgba(255, 250, 232, 0.98) 100%);
}

.bundle-switch-pill.active.tone-blue {
  border-color: rgba(104, 152, 223, 0.48);
  background: linear-gradient(135deg, rgba(180, 218, 255, 0.95) 0%, rgba(215, 237, 255, 0.96) 52%, rgba(242, 249, 255, 0.98) 100%);
}

.bundle-switch-pill.active.tone-green {
  border-color: rgba(68, 179, 103, 0.44);
  background: linear-gradient(135deg, rgba(171, 233, 180, 0.95) 0%, rgba(212, 246, 210, 0.96) 52%, rgba(241, 252, 239, 0.98) 100%);
}

.bundle-switch-pill.active.tone-violet {
  border-color: rgba(170, 119, 226, 0.44);
  background: linear-gradient(135deg, rgba(219, 188, 255, 0.95) 0%, rgba(236, 215, 255, 0.96) 52%, rgba(248, 241, 255, 0.98) 100%);
}

.bundle-switch-pill.active {
  box-shadow: 0 12px 26px rgba(20, 34, 28, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.bundle-home-switches {
  width: 100%;
  flex-wrap: wrap;
  align-items: stretch;
  max-width: 100%;
}

.bundle-home-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.bundle-home-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 12px 16px;
  padding-right: 0;
}

.bundle-home-meta {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  position: absolute;
  top: 14px;
  right: 20px;
}

.bundle-home-domain {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  color: var(--textSecondary);
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.bundle-home-route-nav {
  width: 100%;
  max-width: 100%;
  justify-content: flex-end;
  gap: 18px;
  margin: 0;
  padding-top: 0;
  position: relative;
  left: 220px;
}

.bundle-home-route-nav .nav-btn {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  padding: 9px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--textPrimary);
  font-size: 1.08rem;
  min-width: 72px;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bundle-home-route-nav .nav-btn.active,
.bundle-home-route-nav .nav-btn:hover {
  background: #fff2bf;
  border-color: rgba(227, 191, 92, 0.42);
  color: var(--textSecondary);
}

.mode-toggle {
  flex: 0 1 auto;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--textAccent);
  border-color: rgba(218, 173, 95, 0.42);
  box-shadow: none;
  white-space: nowrap;
  font-weight: 700;
}

.mode-toggle:hover {
  background: #fff2d0;
  color: var(--textAccent);
}

body[data-mode="dark"] .bundle-home-header {
  background: rgba(9, 15, 13, 0.96);
  border-top-color: rgba(125, 212, 170, 0.18);
}

body[data-mode="dark"] .bundle-home-brand-copy h1,
body[data-mode="dark"] .bundle-home-route-nav .nav-btn,
body[data-mode="dark"] .bundle-switch-pill strong,
body[data-mode="dark"] .bundle-hero-copy h2,
body[data-mode="dark"] .bundle-metric-card strong {
  color: var(--textPrimary);
}

body[data-mode="dark"] .bundle-home-brand-copy span,
body[data-mode="dark"] .bundle-home-domain,
body[data-mode="dark"] .bundle-switch-pill span,
body[data-mode="dark"] .bundle-hero-summary,
body[data-mode="dark"] .bundle-hero-detail,
body[data-mode="dark"] .bundle-metric-card span {
  color: var(--textSecondary);
}

body[data-mode="dark"] .bundle-hero-card,
body[data-mode="dark"] .bundle-metric-card,
body[data-mode="dark"] main.page-detail .card,
body[data-mode="dark"] main.page-structure .card,
body[data-mode="dark"] main.page-download .card,
body[data-mode="dark"] main.page-download-sequences .card,
body[data-mode="dark"] main.page-publications .card,
body[data-mode="dark"] main.page-sequence-detail .card,
body[data-mode="dark"] main.page-help .card {
  background: rgba(17, 26, 23, 0.92);
  border-color: rgba(125, 212, 170, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}

body[data-mode="dark"] .bundle-switch-pill:not(.active) {
  background: linear-gradient(180deg, rgba(21, 31, 28, 0.98) 0%, rgba(17, 26, 23, 0.96) 100%);
  border-color: rgba(105, 124, 115, 0.72);
}

body[data-mode="dark"] .bundle-switch-pill.active.tone-gold {
  background: linear-gradient(135deg, rgba(109, 83, 17, 0.92) 0%, rgba(152, 118, 31, 0.9) 50%, rgba(83, 62, 13, 0.94) 100%);
}

body[data-mode="dark"] .bundle-switch-pill.active.tone-blue {
  background: linear-gradient(135deg, rgba(34, 67, 105, 0.92) 0%, rgba(48, 96, 153, 0.9) 50%, rgba(23, 47, 73, 0.94) 100%);
}

body[data-mode="dark"] .bundle-switch-pill.active.tone-green {
  background: linear-gradient(135deg, rgba(26, 87, 50, 0.92) 0%, rgba(44, 124, 72, 0.9) 50%, rgba(20, 62, 38, 0.94) 100%);
}

body[data-mode="dark"] .bundle-switch-pill.active.tone-violet {
  background: linear-gradient(135deg, rgba(72, 45, 112, 0.92) 0%, rgba(102, 70, 157, 0.9) 50%, rgba(43, 28, 69, 0.94) 100%);
}

body[data-mode="dark"] .bundle-home-route-nav .nav-btn.active,
body[data-mode="dark"] .bundle-home-route-nav .nav-btn:hover {
  background: rgba(125, 212, 170, 0.16);
  border-color: rgba(125, 212, 170, 0.34);
  color: var(--textAccent);
}

body[data-mode="dark"] .mode-toggle {
  background: rgba(125, 212, 170, 0.08);
  color: var(--textAccent);
  border-color: rgba(125, 212, 170, 0.24);
  font-weight: 700;
}

body[data-mode="dark"] .mode-toggle:hover {
  background: rgba(125, 212, 170, 0.14);
}

@media (max-width: 1500px) {
  .bundle-home-header-inner {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }

  .bundle-home-meta {
    justify-content: flex-end;
  }

  .bundle-home-route-nav {
    justify-content: flex-start;
  }
}

.bundle-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 24px;
  padding: 32px;
  margin: 0 auto;
}

.bundle-hero-copy {
  display: grid;
  gap: 18px;
  align-content: start;
}

.bundle-hero-copy h2 {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.02;
  max-width: none;
  white-space: nowrap;
}

.bundle-hero-summary,
.bundle-hero-detail {
  margin: 0;
  color: var(--textPrimary);
  font-size: 1.12rem;
  line-height: 1.65;
  max-width: 44rem;
}

.bundle-hero-detail {
  color: var(--textSecondary);
  font-size: 1rem;
}

.bundle-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bundle-metric-card {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 24px 20px;
  border-radius: 24px;
  border: 1px solid rgba(109, 187, 214, 0.32);
  background: rgba(255, 255, 255, 0.82);
}

.bundle-metric-card strong {
  color: var(--textPrimary);
  font-size: 1.85rem;
  line-height: 1.05;
}

.bundle-metric-card span {
  color: var(--textSecondary);
  line-height: 1.55;
}

.bundle-metric-large {
  grid-column: 1 / -1;
  min-height: 164px;
  background: rgba(255, 255, 255, 0.94);
}

.bundle-metric-large strong {
  font-size: 2.2rem;
}

.bundle-site-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: var(--feature-card-width);
  max-width: var(--feature-card-width);
  margin: 0 auto;
}

.bundle-site-card {
  display: grid;
  gap: 20px;
  min-height: 240px;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(126, 197, 219, 0.25);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 48px rgba(40, 91, 116, 0.08);
}

.bundle-site-visual {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
}

.bundle-site-badge {
  position: absolute;
  left: 18px;
  top: 16px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--textPrimary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.bundle-site-strand,
.bundle-site-orb {
  position: absolute;
  border-radius: 999px;
}

.bundle-site-strand {
  border: 14px solid rgba(255, 255, 255, 0.55);
  opacity: 0.7;
  transform: rotate(-25deg);
}

.bundle-site-strand.strand-a {
  width: 220px;
  height: 86px;
  left: -20px;
  top: 34px;
}

.bundle-site-strand.strand-b {
  width: 240px;
  height: 98px;
  right: -52px;
  bottom: 28px;
  transform: rotate(18deg);
}

.bundle-site-orb {
  width: 170px;
  height: 170px;
  right: -20px;
  top: -16px;
  filter: blur(6px);
  opacity: 0.72;
}

.orb-1 { background: rgba(255, 255, 255, 0.28); }
.orb-2 { background: rgba(171, 255, 239, 0.28); }
.orb-3 { background: rgba(255, 210, 243, 0.28); }

.tone-blue .bundle-site-visual {
  background: linear-gradient(135deg, #6898df 0%, #9ed7ff 100%);
}

.tone-green .bundle-site-visual {
  background: linear-gradient(135deg, #60bb57 0%, #0f9d72 100%);
}

.tone-violet .bundle-site-visual {
  background: linear-gradient(135deg, #9d6bd8 0%, #f1a0ff 100%);
}

.tone-rose .bundle-site-visual {
  background: linear-gradient(135deg, #f7f0ea 0%, #d5e9ff 45%, #ffd7d7 100%);
}

.tone-gold .bundle-site-visual {
  background: linear-gradient(135deg, #f3c85f 0%, #ffe39a 45%, #fff4ca 100%);
}

.bundle-site-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.bundle-site-copy h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--textPrimary);
}

.bundle-site-copy p:last-child {
  margin: 0;
  color: var(--textSecondary);
  line-height: 1.65;
}

.bundle-site-footer {
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.bundle-site-tag {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(223, 245, 248, 0.76);
  color: var(--textAccent);
  font-weight: 700;
  font-size: 0.92rem;
}

.bundle-site-link {
  background: rgba(17, 106, 124, 0.12);
  color: var(--textAccent);
  border-color: rgba(109, 187, 214, 0.35);
  box-shadow: none;
}

.bundle-site-link:hover {
  background: rgba(17, 106, 124, 0.18);
  color: var(--textAccent);
}

@media (max-width: 1100px) {
  .bundle-home-header {
    width: 100%;
    margin-left: 0;
    padding: 22px 0 24px;
  }

  .bundle-home-header-inner {
    grid-template-columns: 1fr;
    width: calc(100% - 40px);
    padding: 0;
  }

  .bundle-home-brand {
    margin: 0 0 8px;
  }

  .bundle-home-topline {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding-right: 0;
  }

  .bundle-home-meta {
    position: absolute;
    top: 14px;
    right: 20px;
    justify-content: flex-end;
  }

  .bundle-home-switches {
    width: 100%;
    flex-wrap: wrap;
  }

  .bundle-switch-pill {
    flex: 1 1 calc(50% - 12px);
  }

  .bundle-home-route-nav {
    justify-content: flex-start;
  }

  .bundle-hero-card {
    grid-template-columns: 1fr;
  }

  .bundle-site-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --feature-card-width: calc(100vw - 24px);
  }

  .bundle-wide-card {
    width: var(--feature-card-width);
    max-width: var(--feature-card-width);
  }

  .bundle-home-page {
    padding-inline: 0;
  }

  .bundle-home-header,
  .bundle-hero-card {
    padding: 22px 18px;
  }

  .bundle-home-header {
    border-radius: 0;
    padding: 22px 0;
  }

  .bundle-home-header-inner {
    width: calc(100% - 24px);
    padding: 0;
  }

  .bundle-hero-card {
    border-radius: 24px;
    width: var(--feature-card-width);
  }

  .bundle-home-route-nav,
  .bundle-hero-actions,
  .bundle-site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .bundle-home-switches {
    flex-direction: column;
  }

  .bundle-home-route-nav .nav-btn,
  .bundle-site-link,
  .bundle-site-tag,
  .bundle-hero-actions button,
  .bundle-switch-pill {
    width: 100%;
    justify-content: center;
  }

  .bundle-hero-copy h2 {
    max-width: none;
    font-size: clamp(2.3rem, 12vw, 3.6rem);
  }

  .bundle-hero-metrics {
    grid-template-columns: 1fr;
  }

  .bundle-site-grid {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
  }

  .bundle-site-card {
    min-height: 0;
  }
}

.technology-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--textAccent);
}

.technology-hero-card,
.technology-detail-hero,
.technology-section-card {
  padding: 28px 30px 30px;
}

.technology-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 28px;
}

.technology-hero-copy,
.technology-summary-panel,
.technology-section-heading,
.technology-note-card,
.technology-step-card {
  display: grid;
}

.technology-hero-copy {
  gap: 16px;
}

.technology-hero-copy h1,
.technology-detail-header h1,
.technology-section-heading h2 {
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--textPrimary);
}

.technology-hero-copy h1 {
  font-size: clamp(2.5rem, 4.6vw, 4.2rem);
  line-height: 0.95;
}

.technology-intro,
.technology-section-heading p,
.technology-note-card p {
  margin: 0;
  color: var(--textSecondary);
  font-size: 1.03rem;
  line-height: 1.72;
}

.technology-intro-secondary {
  color: var(--textSecondary);
}

.technology-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.technology-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(227, 191, 92, 0.24);
  background: rgba(255, 251, 239, 0.92);
  color: var(--textSecondary);
  font-size: 0.92rem;
  font-weight: 600;
}

.technology-summary-panel {
  gap: 16px;
  align-content: start;
}

.technology-summary-card,
.technology-method-card,
.technology-compare-card,
.technology-note-card,
.technology-step-card {
  border-radius: 24px;
  border: var(--panel-card-border);
  background: var(--panel-card-bg);
  box-shadow: 0 12px 30px rgba(155, 122, 38, 0.06);
}

.technology-summary-card {
  padding: 18px 20px;
  display: grid;
  gap: 8px;
}

.technology-summary-card p,
.technology-summary-card span {
  margin: 0;
}

.technology-summary-card p {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--textAccent);
}

.technology-summary-card strong {
  font-size: 1.3rem;
  color: var(--textPrimary);
}

.technology-summary-card span {
  color: var(--textSecondary);
  line-height: 1.55;
}

.technology-section-heading {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}

.technology-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.technology-category-card {
  display: grid;
  gap: 22px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(227, 191, 92, 0.22);
  background: linear-gradient(180deg, rgba(255, 251, 239, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 30px rgba(155, 122, 38, 0.06);
  align-content: start;
}

.technology-category-card:nth-child(n + 3) {
  aspect-ratio: auto;
  min-height: 250px;
}

.technology-category-card-head {
  display: grid;
  gap: 12px;
  align-content: start;
}

.technology-category-card-head h3 {
  margin: 0;
  color: var(--textPrimary);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.technology-category-card-head p:last-child {
  margin: 0;
  color: var(--textSecondary);
  line-height: 1.7;
}

.technology-category-card-body {
  display: grid;
  gap: 12px;
  align-content: start;
}

.technology-category-label-row {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding-top: 12px;
  border-top: 1px solid rgba(19, 35, 49, 0.08);
}

.technology-category-label-row span {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--textPrimary);
}

.technology-method-grid-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.technology-method-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid rgba(227, 191, 92, 0.24);
  background: linear-gradient(180deg, rgba(255, 251, 239, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 28px rgba(155, 122, 38, 0.06);
  color: var(--textSecondary);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.technology-method-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(155, 122, 38, 0.1);
  border-color: rgba(227, 191, 92, 0.36);
}

.technology-method-grid,
.technology-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.technology-method-card {
  padding: 22px 22px 20px;
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.technology-method-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(155, 122, 38, 0.1);
  border-color: rgba(227, 191, 92, 0.34);
}

.technology-method-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--textSecondary);
}

.technology-method-card h3,
.technology-note-card h3,
.technology-compare-card h4 {
  margin: 0;
  color: var(--textPrimary);
  letter-spacing: -0.02em;
}

.technology-method-card h3 {
  font-size: 1.55rem;
}

.technology-method-subtitle {
  margin: 0;
  color: var(--textSecondary);
  line-height: 1.6;
}

.technology-method-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.technology-method-meta div,
.technology-detail-meta div {
  padding-top: 10px;
  border-top: 1px solid rgba(227, 191, 92, 0.16);
}

.technology-method-meta dt,
.technology-detail-meta dt {
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--textAccent);
}

.technology-method-meta dd,
.technology-detail-meta dd {
  margin: 0;
  color: var(--textPrimary);
  line-height: 1.5;
  font-weight: 600;
}

.technology-method-link {
  color: var(--textSecondary);
  font-weight: 700;
}

.technology-compare-card,
.technology-note-card,
.technology-step-card {
  padding: 20px 22px;
}

.technology-compare-card p,
.technology-note-card li,
.technology-reference-list li,
.technology-step-card p {
  color: var(--textSecondary);
  line-height: 1.68;
}

.technology-compare-card p {
  margin: 8px 0 0;
}

.technology-back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  color: var(--textSecondary);
  font-weight: 700;
  text-decoration: none;
}

.technology-back-link:hover {
  text-decoration: underline;
}

.technology-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: end;
}

.technology-detail-header h1 {
  font-size: clamp(2.2rem, 4.3vw, 3.6rem);
}

.technology-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 0;
}

.technology-dual-grid,
.technology-step-grid {
  display: grid;
  gap: 18px;
}

.technology-dual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.technology-step-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.technology-note-card ul,
.technology-reference-list {
  margin: 0;
  padding-left: 18px;
}

.technology-step-card {
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}

.technology-step-index {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3c85f 0%, #ffe39a 48%, #fff3c5 100%);
  color: var(--textSecondary);
  font-weight: 800;
}

.technology-reference-list {
  display: grid;
  gap: 12px;
}

/* ---- 探针科普文章：总览卡片墙 ---- */

.probing-article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.probing-article-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 22px 22px 18px;
  border-radius: 24px;
  border: 1px solid rgba(227, 191, 92, 0.22);
  background: linear-gradient(180deg, rgba(255, 251, 239, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 30px rgba(155, 122, 38, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.probing-article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(155, 122, 38, 0.1);
  border-color: rgba(227, 191, 92, 0.34);
}

.probing-article-card-head h3 {
  margin: 0;
  color: var(--textPrimary);
  font-size: 1.32rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.probing-article-card-summary {
  margin: 0;
  color: var(--textSecondary);
  line-height: 1.66;
  font-size: 0.98rem;
}

.probing-article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(227, 191, 92, 0.16);
}

.probing-article-card-meta span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--textAccent);
}

/* ---- 探针科普文章：单篇阅读页 ---- */

.page-probing-article {
  display: grid;
  gap: 18px;
}

.article-reading-card {
  padding: 36px 40px 30px;
}

.article-reading-body {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.article-section-heading {
  margin: 38px 0 14px;
  color: var(--textPrimary);
  font-size: 1.6rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article-section-heading:first-child {
  margin-top: 0;
}

.article-paragraph {
  margin: 0 0 18px;
  color: var(--textPrimary);
  font-size: 1.06rem;
  line-height: 1.8;
}

.article-paragraph strong {
  color: var(--textPrimary);
}

.article-code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(155, 122, 38, 0.1);
  color: var(--textSecondary);
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.92em;
}

.article-figure {
  margin: 28px 0 22px;
  display: grid;
  gap: 12px;
}

.article-figure img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surfaceAlt);
}

.article-figure-legend {
  margin: 0;
  color: var(--textSecondary);
  font-size: 0.96rem;
  line-height: 1.72;
}

.article-figure-legend strong {
  color: var(--textPrimary);
}

.article-figure-cite {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--textAccent);
}

.article-sibling-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(227, 191, 92, 0.18);
}

.article-sibling-link {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(227, 191, 92, 0.22);
  background: linear-gradient(180deg, rgba(255, 251, 239, 0.96), rgba(255, 255, 255, 0.98));
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.article-sibling-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(155, 122, 38, 0.1);
  border-color: rgba(227, 191, 92, 0.34);
}

.article-sibling-link.next {
  text-align: right;
}

.article-sibling-link span {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--textAccent);
}

.article-sibling-link strong {
  color: var(--textPrimary);
  line-height: 1.4;
}

.article-sibling-spacer {
  display: block;
}

@media (max-width: 1100px) {
  .technology-hero-card,
  .technology-detail-header,
  .technology-section-heading,
  .technology-dual-grid,
  .technology-method-grid,
  .technology-compare-grid,
  .technology-step-grid {
    grid-template-columns: 1fr;
  }

  .technology-category-grid {
    grid-template-columns: 1fr;
  }

  .probing-article-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .technology-hero-card,
  .technology-detail-hero,
  .technology-section-card {
    padding: 22px 18px 24px;
  }

  .technology-method-card,
  .technology-summary-card,
  .technology-note-card,
  .technology-step-card,
  .technology-compare-card {
    padding: 18px 16px;
  }

  .technology-category-card {
    aspect-ratio: auto;
    padding: 20px 18px;
    gap: 18px;
  }

  .technology-category-card:nth-child(n + 3) {
    min-height: 0;
  }

  .technology-category-card-head h3 {
    font-size: 1.55rem;
  }

  .technology-method-grid-buttons {
    grid-template-columns: 1fr;
  }

  .technology-method-pill {
    justify-content: center;
  }

  .article-reading-card {
    padding: 24px 18px 22px;
  }

  .article-section-heading {
    font-size: 1.4rem;
  }

  .article-paragraph {
    font-size: 1.02rem;
  }

  .article-sibling-nav {
    grid-template-columns: 1fr;
  }

  .article-sibling-link.next {
    text-align: left;
  }
}

.page-pdb-case {
  display: grid;
  gap: 18px;
}

.global-search-form {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: min(320px, 100%);
}

.global-search-form input,
.site-search-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
}

.global-search-form button,
.site-search-form button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--primary);
  color: var(--onPrimary);
  font-weight: 700;
}

.site-search-card,
.site-search-layout {
  width: var(--feature-card-width);
  max-width: var(--feature-card-width);
  margin-left: auto;
  margin-right: auto;
}

.site-search-header,
.site-search-form {
  display: grid;
  gap: 14px;
}

.site-search-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.site-search-form {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 18px;
}

.site-search-active,
.site-search-result-tags,
.site-search-saved {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.site-search-active {
  margin-top: 12px;
}

.site-search-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
}

.site-search-filter-card {
  align-self: start;
}

.site-search-filter-card h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-search-filter-group {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.site-search-filter-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.site-search-filter-group > div {
  display: grid;
  gap: 8px;
}

.site-search-filter,
.saved-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface);
  color: var(--text);
}

.site-search-filter.active {
  border-color: var(--primary);
  background: var(--primarySoft);
}

.site-search-filter small {
  color: var(--muted);
}

.site-search-results {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.site-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: var(--surfaceSoft);
}

.site-search-result a,
.saved-search-item a {
  color: var(--textAccent);
  font-weight: 800;
  text-decoration: none;
}

.site-search-result p {
  margin: 6px 0 0;
  color: var(--muted);
}

.site-search-result mark {
  border-radius: 4px;
  background: var(--accentSoft);
  color: var(--text);
}

.site-search-result-tags span {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
}

.saved-search-item button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.pdb-case-title-row,
.pdb-case-status-grid {
  display: grid;
  gap: 14px;
}

.pdb-case-title-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.pdb-case-lede {
  max-width: 860px;
  color: var(--muted);
}

.pdb-case-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 18px;
}

.pdb-case-metric {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: var(--surfaceSoft);
}

.pdb-case-metric span,
.pdb-case-metric small {
  display: block;
  color: var(--muted);
}

.pdb-case-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.25rem;
}

.pdb-case-warning ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.selected-profile {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  background: var(--primarySoft);
}

.pdb-case-track {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 150px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surfaceSoft);
}

.pdb-case-track-bar {
  flex: 1;
  min-width: 10px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

@media (max-width: 720px) {
  .pdb-case-title-row {
    grid-template-columns: 1fr;
  }

  .site-search-header,
  .site-search-form,
  .site-search-layout,
  .site-search-result {
    grid-template-columns: 1fr;
  }

  .global-search-form {
    min-width: 0;
    width: 100%;
  }
}

/* 主页探针文章轮播 */
.home-probing-carousel {
  position: relative;
  margin: 1.5rem 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.home-probing-track {
  position: relative;
  min-height: 420px;
}
.home-probing-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem 3rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  text-decoration: none;
  color: inherit;
}
.home-probing-slide.active {
  opacity: 1;
  visibility: visible;
}
.home-probing-slide-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surfaceAlt);
}
.home-probing-slide-noimg {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  background: var(--surfaceAlt);
}
.home-probing-slide-family {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--textAccent);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.home-probing-slide-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--textPrimary);
}
.home-probing-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.home-probing-prev { left: 0.6rem; }
.home-probing-next { right: 0.6rem; }
.home-probing-nav:hover { background: rgba(0, 0, 0, 0.65); }
.home-probing-dots {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
}
.home-probing-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.home-probing-dot.active { background: var(--accent); }
.home-probing-carousel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.home-probing-empty-note { color: var(--textSecondary); }
@media (max-width: 640px) {
  .home-probing-slide {
    grid-template-columns: 1fr;
    padding: 1.25rem 2.4rem;
  }
}
/* ===== 主页招牌滚动叙事 home-scroll-story（Apple 风重设计，配色/质感限定本区） ===== */
.home-scroll-story {
  width: var(--feature-card-width); max-width: var(--feature-card-width); margin-left: auto; margin-right: auto; padding: 0 24px 24px;
  /* 暖色渐变背景：仅限招牌区，不动全局 body（用户铁律：真站点顶栏与其余页面保留） */
  background:
    radial-gradient(900px 460px at 10% -5%, rgba(255, 223, 120, .30), transparent 60%),
    radial-gradient(760px 420px at 96% 4%, rgba(199, 227, 107, .20), transparent 55%),
    var(--panel-card-bg);
  border-radius: 28px;
}
.home-scroll-story.hss-placeholder { display: none; } /* 缺资产 → 不占位 */

/* hero intro */
.hss-intro { text-align: center; padding: 70px 20px 40px; }
.hss-kicker { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--textAccent); font-weight: 700; margin: 0; }
.hss-headline { font-size: 44px; line-height: 1.05; margin: 14px 0 0; font-weight: 800;
  letter-spacing: -1px; color: var(--textPrimary); }
.hss-headline-grad { color: var(--textAccent); }
.hss-lede { max-width: 540px; margin: 16px auto 0; font-size: 15px;
  color: var(--textSecondary); line-height: 1.6; }
.hss-scrollcue { margin-top: 34px; font-size: 12px; color: var(--textSecondary);
  animation: hss-bob 1.8s ease-in-out infinite; }
@keyframes hss-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* two-column scroll narrative */
.hss-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 40px; align-items: start; }
.hss-sticky { position: sticky; top: 120px; height: calc(100vh - 160px); min-height: 440px;
  display: flex; align-items: center; }
/* glassmorphism card（招牌质感） */
.hss-card { position: relative; width: 100%; height: 100%; border-radius: 30px;
  background: var(--panel-card-bg); border: var(--panel-card-border);
  box-shadow: 0 14px 48px rgba(155, 122, 38, .13); backdrop-filter: blur(8px); overflow: hidden; }
.hss-meta { position: absolute; top: 16px; left: 20px; font-size: 11px;
  color: var(--textSecondary); z-index: 2; }
.hss-tag { position: absolute; top: 16px; right: 20px; font-size: 11px; font-weight: 700;
  color: var(--textAccent); text-transform: uppercase; letter-spacing: .5px; }
.hss-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 48px 24px 40px; opacity: 0; transform: scale(.97);
  transition: opacity .6s ease, transform .6s ease; }
.hss-layer.is-active { opacity: 1; transform: scale(1); }
.hss-snapshot { max-width: 100%; max-height: 100%; object-fit: contain; }
.hss-missing { color: var(--textMuted); font-size: 13px; }

/* per-residue column alignment: signal bar / connector / PDB cell stacked,
   so the connector stays locked between the same residue's bar and cell and
   whole columns wrap together (bars never drift out of alignment with cells).
   Top row is a per-base reactivity bar chart; bottom row the colored chain. */
.hss-alignment { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 380px; }
.hss-aln-key { display: flex; flex-direction: column; gap: 2px; }
.hss-aln-label { font-size: 10px; color: var(--textSecondary); }
.hss-aln-label-pdb::before { content: "→ "; color: var(--textAccent); }
.hss-aln-columns { display: flex; flex-wrap: wrap; gap: 3px; align-items: flex-end; }
.hss-aln-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hss-bar-track { width: 21px; height: 40px; display: flex; align-items: flex-end; justify-content: center; }
.hss-bar { width: 13px; border-radius: 3px 3px 0 0; min-height: 3px; }
.hss-cell { width: 21px; height: 26px; border-radius: 5px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; color: #fff;
  font-family: ui-monospace, monospace; }
.hss-match-tick { height: 10px; line-height: 10px; text-align: center; font-size: 9px; color: var(--textAccent); }

/* legend */
.hss-legend { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--textSecondary); }
.hss-legend-bar { width: 120px; height: 8px; border-radius: 6px;
  background: linear-gradient(90deg, #174B3A, #E6C260, #E8743E); }

/* right scenes */
.hss-scenes { padding: 30px 0 60px; }
.hss-scene { min-height: 78vh; display: flex; flex-direction: column; justify-content: center;
  transition: opacity .5s, transform .5s; }
/* 滚动渐入仅在 JS 接上 observer 后启用（.hss-js）；无 JS 时场景全可读（降级，spec §8） */
@media (min-width: 821px) {
  .home-scroll-story.hss-js .hss-scene { opacity: .35; transform: translateY(18px); }
  .home-scroll-story.hss-js .hss-scene.is-active { opacity: 1; transform: translateY(0); }
}
.hss-scene-num { font-size: 12px; font-weight: 700; color: var(--textAccent); letter-spacing: 1px; }
.hss-scene-title { font-size: 30px; margin: 8px 0 0; letter-spacing: -.5px; color: var(--textPrimary); }
.hss-scene-body { font-size: 15.5px; line-height: 1.7; color: var(--textSecondary);
  margin: 14px 0 0; max-width: 440px; }
.hss-chip { display: inline-block; margin-top: 16px; font-size: 12px;
  background: var(--primarySoft); color: var(--textAccent); padding: 5px 12px;
  border-radius: 980px; font-weight: 600; }

/* closing CTA */
.hss-closing { text-align: center; padding: 50px 20px 90px; }
.hss-closing h2 { font-size: 30px; letter-spacing: -.5px; color: var(--textPrimary); }
.hss-closing p { color: var(--textSecondary); margin-top: 10px; }
.hss-cta { margin-top: 22px; display: inline-block; background: var(--primary); color: var(--onPrimary);
  border: none; cursor: pointer; font-size: 14px; font-weight: 600; padding: 12px 26px;
  border-radius: 980px; }

@media (max-width: 820px) {
  .hss-grid { grid-template-columns: 1fr; gap: 16px; }
  .hss-sticky { position: relative; top: 0; height: 360px; }
  .hss-scene { min-height: auto; opacity: 1; transform: none; padding: 20px 0; }
  .hss-headline { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .hss-layer, .hss-scene { transition: none; }
  .hss-scrollcue { animation: none; }
}

/* === ABOUT PAGE === */
.about-hero {
  width: var(--feature-card-width);
  max-width: var(--feature-card-width);
  margin: 0 auto 28px;
  box-sizing: border-box;
  padding: 28px 32px;
  border-radius: var(--radiusCard);
  background: var(--primarySoft);
  border: 1px solid rgba(47, 143, 107, 0.18);
}
.about-hero-kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--textAccent);
  font-weight: 600;
}
.about-hero h1 {
  margin: 0 0 12px;
  color: var(--textAccent);
  font-family: var(--fontFamily);
}
.about-hero-summary {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--textAccent);
}
.about-hero-detail {
  margin: 0;
  line-height: 1.6;
  opacity: 0.82;
}
.about-section {
  margin: 0 0 22px;
}
.about-section h2 {
  margin: 0 0 16px;
  color: var(--textAccent);
  font-family: var(--fontFamily);
}
.about-prose {
  margin: 0;
  line-height: 1.7;
}
.about-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.about-source-card {
  padding: 18px 20px;
  border-radius: var(--radiusCard);
  background: var(--panel-card-bg);
  border: var(--panel-card-border);
  box-shadow: var(--panel-card-shadow);
}
.about-source-card h3 {
  margin: 0 0 8px;
  color: var(--textAccent);
  font-family: var(--fontFamily);
}
.about-source-card p {
  margin: 0;
  line-height: 1.6;
}
.about-pipeline-figure {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.about-pipeline-svg {
  width: 100%;
  height: auto;
  max-width: 100%;
}
.about-pipe-node {
  fill: var(--primarySoft);
  stroke: var(--accent);
  stroke-width: 1.5;
}
.about-pipe-label {
  fill: var(--primary);
  font-family: var(--fontFamily);
  font-size: 13px;
  font-weight: 600;
}
.about-pipe-arrow {
  stroke: var(--accent);
  stroke-width: 2;
}
.about-pipeline-svg marker path {
  fill: var(--accent);
}
.about-pipeline-note {
  margin: 0;
  line-height: 1.6;
  opacity: 0.85;
}
.about-terms {
  margin: 0;
}
.about-terms dt {
  font-weight: 600;
  color: var(--textAccent);
  margin-top: 14px;
}
.about-terms dt:first-child {
  margin-top: 0;
}
.about-terms dd {
  margin: 4px 0 0;
  line-height: 1.6;
}

/* === STATS PAGE === */
.stats-page { display: flex; flex-direction: column; gap: 1.75rem; }
.stats-head h1 { margin: 0 0 0.4rem; }
.stats-lede { margin: 0; max-width: 60ch; color: var(--textMuted); }
.stats-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
}
.stats-metric {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border: var(--panel-card-border);
  border-radius: 12px;
  background: var(--panel-card-bg, var(--surface));
}
.stats-metric-value { font-size: 1.8rem; font-weight: 700; color: var(--textAccent); line-height: 1.1; }
.stats-metric-label { font-size: 0.85rem; font-weight: 600; color: var(--textPrimary); }
.stats-metric-note { font-size: 0.75rem; color: var(--textMuted); }
.stats-section { display: flex; flex-direction: column; gap: 0.7rem; }
.stats-section h2 { margin: 0; font-size: 1.15rem; color: var(--textAccent); }
.stats-section-lede { margin: 0; max-width: 64ch; color: var(--textMuted); font-size: 0.92rem; }
.stats-footnote { margin: 0; font-size: 0.74rem; color: var(--textMuted); font-style: italic; }
.stats-empty { margin: 0; color: var(--textMuted); }
.stats-tier-chart { width: 100%; max-width: 560px; height: auto; }
.stats-tier-label { font-size: 11px; font-weight: 600; fill: var(--textPrimary); }
.stats-tier-value { font-size: 11px; fill: var(--textMuted); }
.stats-coverage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; max-width: 560px; }
.stats-coverage-row { display: grid; grid-template-columns: 150px 1fr 56px; align-items: center; gap: 0.6rem; }
.stats-coverage-label { font-size: 0.86rem; font-weight: 600; color: var(--textPrimary); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-coverage-track { position: relative; height: 18px; background: var(--surfaceMuted, rgba(0,0,0,0.05)); border-radius: 5px; overflow: hidden; }
.stats-coverage-fill { display: block; height: 100%; background: var(--accent); border-radius: 5px; min-width: 2px; }
.stats-coverage-seg-title { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 0.7rem; font-weight: 700; color: var(--surface); pointer-events: none; }
.stats-coverage-value { font-size: 0.84rem; color: var(--textMuted); text-align: left; }
.stats-threshold-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.92rem; }
.stats-threshold-list strong { color: var(--textAccent); }

/* === PROBING HUB === */
.probing-family-index,
.probing-tech-table,
.probing-glossary {
  margin-top: 28px;
}
.probing-hub-heading {
  margin-bottom: 18px;
}
.probing-hub-heading h2 {
  margin: 4px 0 8px;
  color: var(--textAccent);
  font-weight: var(--fontWeightHeading);
}
.probing-hub-heading p {
  margin: 0;
  color: var(--textSecondary);
  max-width: 72ch;
}
.probing-hub-empty {
  margin: 0;
  color: var(--textSecondary);
  font-style: italic;
}

/* family index */
.probing-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.probing-family-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radiusPanel);
  background: var(--surface);
  text-decoration: none;
  color: var(--textPrimary);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.probing-family-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadowSoft);
  transform: translateY(-2px);
}
.probing-family-card-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--textAccent);
}
.probing-family-card-summary {
  margin: 0;
  font-size: 0.92rem;
  color: var(--textSecondary);
  line-height: 1.5;
}
.probing-family-card-count {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: var(--fontWeightStrong);
  color: var(--textAccent);
}

/* tech comparison table */
.probing-tech-caption strong { color: var(--textAccent); }
.probing-tech-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radiusPanel);
}
.probing-tech-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.probing-tech-grid th,
.probing-tech-grid td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.probing-tech-grid thead th {
  position: sticky;
  top: 0;
  background: var(--primary);
  color: var(--onPrimary);
  font-weight: var(--fontWeightStrong);
  white-space: nowrap;
}
.probing-tech-grid tbody tr:nth-child(even) {
  background: var(--surfaceAlt);
}
.probing-tech-grid tbody tr:hover {
  background: var(--primarySoft);
}
.probing-tech-name { font-weight: var(--fontWeightStrong); color: var(--textPrimary); }
.probing-family-tag {
  display: inline-block;
  min-width: 1.4em;
  text-align: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--onPrimary);
  font-weight: var(--fontWeightStrong);
  font-size: 0.82rem;
}
.probing-family-meaning {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--textSecondary);
}
.probing-tech-article-link { color: var(--textAccent); font-weight: var(--fontWeightStrong); }

/* glossary */
.probing-glossary-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 0;
}
.probing-glossary-term {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radiusPanel);
  background: var(--surface);
}
.probing-glossary-term dt {
  font-weight: var(--fontWeightStrong);
  color: var(--textAccent);
  margin-bottom: 4px;
}
.probing-glossary-term dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--textSecondary);
  line-height: 1.5;
}
