:root {
  --bg: #eef3f9;
  --panel: #ffffff;
  --ink: #0a1a2f;
  --muted: #5b6f89;
  --line: #dbe4f0;
  --primary: #0f5fbf;
  --primary-dark: #0a4d9f;
  --accent: #2a9df4;
  --ok: #0f8d6d;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #e9f2ff 0%, #f6f9fe 48%, #edf2f9 100%);
  min-height: 100vh;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: rgba(15, 95, 191, 0.2);
  top: -80px;
  left: -40px;
}

.orb-2 {
  width: 360px;
  height: 360px;
  background: rgba(42, 157, 244, 0.2);
  right: -80px;
  top: 120px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  isolation: isolate;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(4, 22, 46, 0.92);
  backdrop-filter: blur(8px);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-family: "Space Grotesk", sans-serif;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.site-header nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-header a {
  color: #d7e7ff;
  text-decoration: none;
  font-weight: 500;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 7px;
}

.site-header nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.site-header a.active {
  color: #fff;
  box-shadow: inset 0 -2px 0 #75b8ff;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1260px, 94vw);
  margin: 24px auto 48px;
}

.hero {
  width: 100%;
  background: linear-gradient(135deg, #0f5fbf 0%, #0a4d9f 64%, #0b3a78 100%);
  color: #fff;
  border-radius: 12px;
  padding: 24px 24px 20px;
  box-shadow: 0 12px 28px rgba(3, 22, 49, 0.18);
  animation: fade-up 360ms ease-out;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  opacity: 0.85;
}

.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  margin: 8px 0 10px;
  line-height: 1.15;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.subtitle {
  margin: 0 0 18px;
  color: #dbe9ff;
  max-width: 760px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-hint {
  margin: 12px 0 0;
  color: #dbe9ff;
}

.hero-hint a {
  color: #fff;
  font-weight: 700;
}

.primary-action,
.secondary-action,
.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 700;
}

.primary-action {
  background: #fff;
  color: #0a4d9f;
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: #fff;
}

.icon-action {
  width: 42px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: #fff;
}

.github-action {
  width: auto;
  gap: 6px;
  padding: 8px 12px;
}

.github-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #eaf4ff;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
}

.github-stars::before {
  content: "";
  width: 13px;
  height: 13px;
  background: currentColor;
  clip-path: polygon(50% 0, 61% 34%, 98% 34%, 68% 55%, 79% 90%, 50% 69%, 21% 90%, 32% 55%, 2% 34%, 39% 34%);
}

.github-stars.is-hidden {
  display: none;
}

.icon-action:hover,
.secondary-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.primary-action:hover {
  background: #eaf4ff;
}

.db-date {
  margin: 0 0 14px;
  color: #d6e7ff;
  font-size: 0.92rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  min-height: 58px;
  padding: 7px 9px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-label {
  font-size: 0.72rem;
  color: #d7e8ff;
  white-space: nowrap;
}

.stat-val {
  margin-top: 2px;
  font-size: 1.05rem;
  font-weight: 700;
}

.light-stats .stat-card {
  background: #f4f8ff;
  border-color: #d8e5f6;
}

.light-stats .stat-label {
  color: var(--muted);
}

.light-stats .stat-val {
  color: var(--ink);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.home-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(21, 43, 77, 0.06);
}

.home-panel h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
}

.home-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.home-banner {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f7fbff;
  box-shadow: 0 8px 22px rgba(21, 43, 77, 0.06);
  height: clamp(270px, 36vw, 450px);
}

.home-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin-bottom: 4px;
}

.search-panel {
  width: 100%;
  margin: 14px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 22px rgba(21, 43, 77, 0.08);
}

.search-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.18fr);
  gap: 8px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  border: 1px solid #c6d6ec;
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 10px;
  background: #fbfdff;
}

#searchInput {
  min-height: 42px;
  font-size: 1rem;
}

button {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

#searchBtn {
  min-height: 42px;
}

button:hover {
  background: var(--primary-dark);
}

.results {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

thead th {
  text-align: left;
  padding: 12px;
  background: #f2f7ff;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.sort-btn {
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.sort-btn:hover {
  background: transparent;
  color: #0f5fbf;
}

.sort-btn.active {
  color: #0f5fbf;
}

.sort-indicator {
  font-size: 0.78rem;
  color: #7292ba;
}

.sort-btn.active .sort-indicator {
  color: #0f5fbf;
}

tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf2fb;
  vertical-align: top;
}

tbody tr:hover {
  background: #f5f9ff;
}

.pdb-btn {
  background: transparent;
  color: var(--primary);
  padding: 0;
  font-weight: 700;
  margin-right: 6px;
}

.tag {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8f6f0;
  color: var(--ok);
  font-size: 0.74rem;
  font-weight: 600;
  margin-right: 4px;
}

.dl-link,
.ext-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.ext-link {
  font-size: 0.82rem;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

#gotoPageInput {
  width: 88px;
  padding: 8px 10px;
}

#pageInfo {
  color: var(--muted);
  min-width: 110px;
  text-align: center;
}

.detail {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.detail h2 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
}

.detail h3 {
  margin: 16px 0 8px;
}

.detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  background: #ebf3ff;
  color: #084ea2;
  border: 1px solid #c9ddfa;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}

.detail-links {
  display: flex;
  gap: 12px;
}

.db-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #d3e3fb;
  color: #20528f;
  background: #f0f6ff;
  font-size: 0.82rem;
  font-weight: 600;
}

.tab-row {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-top: 12px;
  padding-bottom: 10px;
}

.tab-btn {
  background: #eef4ff;
  color: #17447f;
  border: 1px solid #d3e1f8;
}

.tab-btn.active {
  background: #0f5fbf;
  color: #fff;
  border-color: #0f5fbf;
}

.tab-content {
  margin-top: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px 16px;
  margin-bottom: 14px;
}

.detail-grid-full {
  grid-column: 1 / -1;
}

.hash-list code {
  display: inline;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.kv,
.muted {
  color: var(--muted);
}

.flat-list {
  margin: 8px 0;
  padding-left: 18px;
}

.cite-links {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.dense-table {
  min-width: 1000px;
}

.dense-table td code {
  font-family: var(--mono);
  font-size: 0.72rem;
}

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

.usage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdff;
}

.usage-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.usage-value {
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 700;
}

.usage-updated {
  margin: 10px 0 0;
  font-size: 0.86rem;
}

.status-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.status-card {
  margin-top: 0;
}

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

.status-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdff;
}

.status-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.status-value {
  margin-top: 4px;
  font-size: 1.22rem;
  font-weight: 700;
}

.cite-table {
  table-layout: fixed;
}

.cite-table th:nth-child(1),
.cite-table td:nth-child(1) {
  width: 42%;
}

.cite-table th:nth-child(2),
.cite-table td:nth-child(2) {
  width: 24%;
}

.cite-table th:nth-child(3),
.cite-table td:nth-child(3) {
  width: 10%;
}

.cite-table th:nth-child(4),
.cite-table td:nth-child(4),
.cite-table th:nth-child(5),
.cite-table td:nth-child(5) {
  width: 12%;
}

.cite-table td,
.cite-table th,
.cite-table td a {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nonpoly-table {
  table-layout: fixed;
}

.nonpoly-table th:nth-child(1),
.nonpoly-table td:nth-child(1) {
  width: 12%;
}

.nonpoly-table th:nth-child(2),
.nonpoly-table td:nth-child(2) {
  width: 16%;
}

.nonpoly-table th:nth-child(3),
.nonpoly-table td:nth-child(3) {
  width: 72%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #c9dcf8;
  background: #eef5ff;
  color: #18509f;
  margin-right: 4px;
  margin-bottom: 4px;
  font-size: 0.75rem;
}

.cluster-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #c9dcf8;
  background: #eef5ff;
  color: #18509f;
}

.cluster-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  max-height: 132px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #dbe6f6;
  border-radius: 10px;
  background: #fbfdff;
}

.cluster-members::-webkit-scrollbar {
  width: 8px;
}

.cluster-members::-webkit-scrollbar-track {
  background: #eef4ff;
  border-radius: 999px;
}

.cluster-members::-webkit-scrollbar-thumb {
  background: #bfd4f4;
  border-radius: 999px;
}

.cluster-members::-webkit-scrollbar-thumb:hover {
  background: #a9c4eb;
}

.cluster-member-btn {
  background: #f2f7ff;
  color: #18509f;
  border: 1px solid #d1e1f8;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.cluster-member-btn:hover {
  background: #e7f1ff;
}

.cluster-member-btn.active {
  background: #0f5fbf;
  border-color: #0f5fbf;
  color: #fff;
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.viewer-actions-left,
.viewer-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewer-actions-right {
  margin-left: auto;
  justify-content: flex-end;
}

.viewer-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  background: #0f5fbf;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.viewer-link:hover {
  background: #0a4d9f;
}


.viewer3d {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.viewer3d-static,
.viewer3d-local {
  overflow: hidden;
}

.viewer3d-local {
  position: relative;
}

.viewer-status {
  color: var(--muted);
  font-weight: 600;
}

.viewer-status-error {
  color: #b42318;
}

.structure-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
}

.pair-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.pair-list {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #f8fbff;
}

.pair-list-horizontal {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: stretch;
}

.pair-card {
  width: auto;
  min-width: 210px;
  text-align: left;
  margin-bottom: 0;
  background: #fff;
  color: var(--ink);
  border: 1px solid #d5e3f7;
}

.pair-card.active {
  border-color: #0f5fbf;
  box-shadow: 0 0 0 2px rgba(15, 95, 191, 0.12);
}

.pair-id {
  font-weight: 700;
}

.pair-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.pair-detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.interface-detail-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5eefc;
}

.alignment-wrap {
  display: grid;
  gap: 8px;
}

.align-block {
  border: 1px solid #d6e4fa;
  border-radius: 12px;
  padding: 10px;
  background: #ffffff;
  overflow-x: auto;
  box-shadow: 0 4px 12px rgba(11, 40, 88, 0.05);
}

.align-title {
  font-size: 0.82rem;
  color: #2b568f;
  margin-bottom: 8px;
  font-weight: 600;
}

.align-line {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.single-track {
  align-items: start;
}

.align-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.aa-track {
  font-family: var(--mono);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow-x: auto;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

.aa {
  display: inline-block;
  width: 0.78rem;
  text-align: center;
  border-radius: 2px;
  position: relative;
}

.contact {
  outline: 1px solid #0f5fbf;
  outline-offset: -1px;
}

.mod-aa {
  border-bottom: 2px dotted #8a4dd7;
  cursor: help;
}

.mod-popover {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: #18283d;
  color: #fff;
  font-size: 0.72rem;
  padding: 4px 6px;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  max-width: min(60vw, 440px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-box {
  border: 1px solid #d7e4f7;
  background: #f7fbff;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.legend-items {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.expand-row {
  margin-top: 8px;
}

.chain-panel {
  border: 1px solid #dce8fa;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  background: #fbfdff;
}

.chain-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed #d3e0f5;
}

.af3-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 12px;
  align-items: start;
}

.af3-controls,
.af3-output {
  margin-bottom: 0;
}

.af3-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.af3-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.af3-toggle-row,
.af3-action-row,
.af3-output-actions,
.af3-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.af3-toggle-row {
  margin-top: 10px;
}

.af3-toggle-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
}

.af3-toggle-row input,
.af3-chain-option input {
  width: 16px;
  min-height: 16px;
}

.af3-chain-grid {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.af3-chain-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: start;
  border: 1px solid #d6e4fa;
  border-radius: 10px;
  padding: 9px;
  background: #fff;
}

.af3-chain-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.af3-chain-title {
  font-weight: 700;
}

.af3-chain-meta {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.af3-action-row {
  justify-content: flex-end;
  margin-top: 10px;
}

.af3-output-actions {
  margin-left: auto;
}

.af3-output-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.af3-summary {
  margin-bottom: 8px;
  color: #20528f;
  font-size: 0.84rem;
  font-weight: 600;
}

.af3-summary span,
.af3-warnings div {
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef5ff;
  border: 1px solid #d4e4fa;
}

.af3-warnings {
  display: grid;
  gap: 5px;
  margin-bottom: 8px;
  color: #9a3412;
  font-size: 0.84rem;
}

.af3-warnings div {
  border-color: #fed7aa;
  background: #fff7ed;
}

.af3-json {
  min-height: 360px;
  max-height: 560px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid #d6e4fa;
  border-radius: 10px;
  background: #091827;
  color: #eaf4ff;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

.ss-h {
  color: #c41f1f;
}

.ss-e {
  color: #c68a00;
}

.ss-c {
  color: #007d7a;
}

.ss-x {
  color: #7f8898;
}

.about {
  margin-top: 14px;
  color: var(--muted);
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1260px, 94vw);
  margin: 0 auto 28px;
  border-top: 1px solid #d4e0f2;
  padding-top: 14px;
}

.footer-inner {
  color: #4f6481;
  font-size: 0.9rem;
}

.footer-main {
  margin: 0;
  font-weight: 600;
}

.footer-sub {
  margin: 6px 0 0;
  line-height: 1.5;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
  }

  .site-header nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  .site-header nav a {
    min-height: 32px;
    padding: 5px 7px;
  }
}

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

  .search-main-row,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .usage-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

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

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

  .pair-layout {
    grid-template-columns: 1fr;
  }

  .af3-layout,
  .af3-field-grid {
    grid-template-columns: 1fr;
  }

  .viewer3d {
    height: 420px;
  }

  .viewer-actions-right {
    margin-left: 0;
    justify-content: flex-start;
  }

  .site-footer {
    margin-bottom: 18px;
  }
}
