:root {
  color-scheme: light;
  --ink: #152536;
  --muted: #617184;
  --line: #dce5ea;
  --surface: #ffffff;
  --canvas: #f2f6f8;
  --navy: #173b57;
  --navy-deep: #102d44;
  --teal: #0f766e;
  --teal-soft: #dff4ef;
  --blue-soft: #e5f0fa;
  --amber: #b46709;
  --amber-soft: #fff1d6;
  --shadow: 0 18px 50px rgba(16, 45, 68, 0.08);
  --radius-lg: 20px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 2%, rgba(23, 101, 125, 0.09), transparent 23rem),
    var(--canvas);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.public-nav {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 10px clamp(20px, 4vw, 56px);
}

.public-nav a {
  color: var(--primary);
  font-size: 0.9rem;
  text-decoration: none;
}

.public-nav a:hover {
  text-decoration: underline;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 64px);
  color: #fff;
  background: linear-gradient(112deg, var(--navy-deep), #17475d 64%, #176a70);
  box-shadow: 0 10px 30px rgba(8, 40, 57, 0.2);
}

.brand, .top-actions, .search-toolbar, .result-meta, .drawer-header {
  display: flex;
  align-items: center;
}

.brand { gap: 14px; }
.brand-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.unofficial-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand h1 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: 0.02em; }
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 13px;
  font-family: Georgia, serif;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.eyebrow, .section-kicker {
  margin: 0 0 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.top-actions { gap: 12px; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(7, 31, 43, 0.25);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #68e0b8;
  box-shadow: 0 0 0 4px rgba(104, 224, 184, 0.12);
}

.button {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .tab-button:focus-visible, .icon-button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(24, 135, 150, 0.22);
  outline-offset: 2px;
}
.button-primary { color: #fff; background: var(--teal); box-shadow: 0 6px 14px rgba(15, 118, 110, 0.18); }
.button-primary:hover { background: #0b665f; }
.button-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.38); background: rgba(255, 255, 255, 0.1); }

.page-shell {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.source-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid #c8dcdf;
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-md);
  background: #f5faf9;
}
.source-notice strong { color: var(--navy-deep); }
.source-notice p { margin: 3px 0 0; color: var(--muted); }
.source-notice a, .footer-links a { color: var(--teal); font-weight: 700; text-decoration: none; }
.source-notice a { flex: 0 0 auto; }
.source-notice a:hover, .footer-links a:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); background: #eaf0f3; }
.footer-content { width: min(1480px, calc(100% - 40px)); margin: 0 auto; padding: 25px 0 30px; }
.footer-content > strong { color: var(--navy-deep); }
.footer-content p { max-width: 1100px; margin: 7px 0 0; font-size: 12px; }
.footer-content .contact-notice {
  max-width: fit-content;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid #c6dcd9;
  border-radius: 8px;
  color: var(--navy-deep);
  background: #f4faf9;
}
.contact-notice a { color: var(--teal); font-weight: 700; text-decoration: none; }
.contact-notice a:hover { text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font-size: 12px; }
.drawer-header .section-kicker { color: var(--teal); }

.query-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.tab-list {
  display: flex;
  gap: 4px;
  padding: 8px 22px 0;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}
.tab-button {
  position: relative;
  padding: 14px 18px 15px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}
.tab-button::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.tab-button.is-active { color: var(--navy-deep); }
.tab-button.is-active::after { background: var(--teal); }
.tab-panel { padding: 22px; }
.is-hidden { display: none !important; }
.capability-intro {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 16px;
}
.capability-intro strong { color: var(--navy-deep); font-size: 17px; }
.capability-intro span { color: var(--muted); font-size: 13px; }

.search-toolbar { gap: 12px; align-items: end; }
.search-field { position: relative; flex: 1; min-width: 240px; }
.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #8493a1;
  font-size: 21px;
  transform: translateY(-53%) rotate(-18deg);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 43px;
  border: 1px solid #cbd8df;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
}
.search-field input::placeholder { color: #91a0ad; }
.compact-field { min-width: 120px; }
.compact-field span { display: block; margin: 0 0 4px 2px; color: var(--muted); font-size: 11px; }
.compact-field select {
  width: 100%;
  min-height: 44px;
  padding: 8px 34px 8px 11px;
  border: 1px solid #cbd8df;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
}
.result-meta { justify-content: space-between; min-height: 46px; gap: 16px; }
.result-meta p { margin: 0; color: var(--muted); font-size: 13px; }
.check-field { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.check-field input { width: 16px; height: 16px; accent-color: var(--teal); }

.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
.table-wide { overflow-x: hidden; }
.table-wide table { min-width: 0; table-layout: fixed; }
.cap-col-org { width: 23%; }
.cap-col-instrument { width: 19%; }
.cap-col-spec { width: 26%; }
.cap-col-parameter { width: 13%; }
.cap-col-detail-count { width: 7%; }
.cap-col-status { width: 5%; }
.cap-col-action { width: 7%; }
thead { background: #f5f8fa; }
th {
  padding: 11px 14px;
  color: #526779;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
td { padding: 13px 14px; border-bottom: 1px solid #e8eef1; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfc; }
.reg-no { color: var(--navy); font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.org-name { min-width: 280px; font-weight: 600; }
.cell-stack { min-width: 210px; }
.cell-stack strong, .cell-stack span { display: block; }
.cell-stack strong { color: var(--navy); }
.cell-stack span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.muted-cell { color: var(--muted); }
.wrap-cell { min-width: 190px; max-width: 350px; white-space: pre-wrap; overflow-wrap: anywhere; }
.number-cell { font-variant-numeric: tabular-nums; font-weight: 700; }
.action-column { width: 90px; text-align: right; }
.table-action {
  padding: 6px 10px;
  border: 1px solid #bfd0d9;
  border-radius: 8px;
  color: var(--teal);
  background: #fff;
  font-weight: 700;
  white-space: nowrap;
}
.table-action:hover { border-color: var(--teal); background: var(--teal-soft); }
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #12645d;
  background: #e0f3ef;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.history { color: #705c46; background: #eee9e3; }
.history-note { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }

.capability-group-row { transition: background 120ms ease; }
.capability-group-row.is-expanded { background: #f1f9f7; }
.table-wide th, .table-wide td { padding-left: 9px; padding-right: 9px; overflow-wrap: anywhere; }
.table-wide .cell-stack,
.table-wide .instrument-group-cell,
.table-wide .spec-cell,
.table-wide .parameter-summary { min-width: 0; max-width: none; }
.table-wide .action-column { width: auto; padding-left: 5px; padding-right: 5px; text-align: center; }
.table-wide .expand-button { width: 100%; min-width: 0; padding-left: 4px; padding-right: 4px; font-size: 12px; }
.instrument-group-cell { min-width: 240px; max-width: 390px; overflow-wrap: anywhere; }
.instrument-group-cell strong { color: var(--navy-deep); font-size: 14px; }
.spec-cell { min-width: 260px; max-width: 390px; overflow-wrap: anywhere; }
.single-spec { display: block; color: #3c5363; font-size: 12px; line-height: 1.55; }
.spec-details { color: var(--teal); font-size: 12px; }
.spec-details summary { width: fit-content; cursor: pointer; font-weight: 700; }
.spec-details summary:hover { color: var(--navy); }
.spec-list { display: grid; gap: 7px; margin: 9px 0 0; padding: 10px 10px 10px 27px; border: 1px solid #d7e5e4; border-radius: 8px; color: #3c5363; background: #f8fbfb; line-height: 1.45; }
.parameter-summary {
  min-width: 180px;
  color: var(--teal);
  cursor: pointer;
  border-radius: 7px;
}
.parameter-summary strong, .parameter-summary span { display: block; }
.parameter-summary strong { font-size: 13px; }
.parameter-summary span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.parameter-summary:focus-visible { outline: 3px solid rgba(24, 135, 150, 0.22); outline-offset: -4px; }
.expand-button { min-width: 82px; }

.capability-detail-row > td { padding: 0; border-bottom: 1px solid #cddfe0; background: #f5faf9; }
.capability-detail-row:hover { background: transparent; }
.group-detail-panel { width: 100%; min-width: 0; padding: 16px 14px 18px 20px; border-left: 3px solid var(--teal); }
.group-detail-header, .group-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.group-detail-header { margin-bottom: 11px; }
.group-detail-header strong { color: var(--navy-deep); }
.group-detail-meta, .group-detail-footer { color: var(--muted); font-size: 12px; }
.group-detail-table { width: 100%; min-width: 0; overflow-x: hidden; border: 1px solid #d4e2e3; border-radius: 10px; background: #fff; }
.group-detail-table table { min-width: 0; table-layout: fixed; }
.detail-col-parameter { width: 18%; }
.detail-col-spec { width: 18%; }
.detail-col-range { width: 30%; }
.detail-col-uncertainty { width: 24%; }
.detail-col-status { width: 10%; }
.group-detail-table th, .group-detail-table td { padding: 10px 12px; font-size: 12px; }
.group-detail-table .wrap-cell { min-width: 0; max-width: none; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.uncertainty-cell .math-symbol { font-family: "Cambria Math", "Times New Roman", serif; font-style: italic; }
.uncertainty-cell .math-subscript {
  margin-left: 1px;
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 0.72em;
  line-height: 0;
}
.uncertainty-cell .math-power { white-space: nowrap; }
.uncertainty-cell .math-power sup {
  position: relative;
  top: -0.12em;
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 0.72em;
  line-height: 0;
}
.group-detail-table .parameter-group-start td { border-top: 2px solid #b8d8d4; }
.group-detail-table tbody tr:first-child td { border-top: 0; }
.parameter-name strong { color: var(--navy-deep); }
.specification-code strong { color: #3c5363; font-weight: 650; }
.parameter-repeat span, .specification-repeat span { color: #8a9ba7; font-size: 11px; }
.group-detail-footer { min-height: 48px; padding-top: 10px; }
.detail-more-button { min-height: 34px; padding: 5px 12px; color: var(--teal); border-color: #a8ccc7; background: #fff; box-shadow: none; }
.detail-more-button:hover { color: #fff; border-color: var(--teal); background: var(--teal); }

.loading-row td { height: 52px; }
.loading-bar {
  width: 78%;
  height: 11px;
  border-radius: 7px;
  background: linear-gradient(90deg, #edf2f4 25%, #f8fafb 44%, #edf2f4 63%);
  background-size: 300% 100%;
  animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.empty-state { display: grid; justify-items: center; gap: 4px; padding: 48px 20px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 16px; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 7px; min-height: 56px; padding-top: 14px; }
.page-button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d3dfe5;
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
}
.page-button:hover:not(:disabled) { color: var(--teal); border-color: var(--teal); }
.page-button.is-current { color: #fff; border-color: var(--teal); background: var(--teal); }
.page-button:disabled { cursor: default; opacity: 0.4; }
.page-summary { margin: 0 5px; color: var(--muted); font-size: 12px; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(10, 28, 39, 0.34);
  backdrop-filter: blur(2px);
}
.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  width: min(720px, 94vw);
  overflow: hidden;
  background: #f7fafb;
  box-shadow: -24px 0 60px rgba(7, 31, 43, 0.18);
  transform: translateX(102%);
  transition: transform 220ms ease;
}
.detail-drawer.is-open { transform: translateX(0); }
.drawer-header { justify-content: space-between; gap: 20px; min-height: 92px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-header h2 { margin: 2px 0 0; color: var(--navy-deep); font-size: 20px; line-height: 1.35; }
.drawer-actions { display: flex; align-items: center; gap: 8px; }
.detail-copy-button { min-height: 38px; padding: 6px 11px; color: var(--teal); border-color: #a8ccc7; background: #fff; }
.detail-copy-button:hover { color: #fff; background: var(--teal); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; font-size: 25px; line-height: 1; }
.drawer-content { height: calc(100% - 92px); padding: 20px 24px 40px; overflow-y: auto; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.detail-item.wide { grid-column: 1 / -1; }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.detail-item strong { overflow-wrap: anywhere; }
.profile-section h3, .detail-section h3 { margin: 0 0 10px; color: var(--navy-deep); font-size: 15px; }
.profile-grid .detail-item { border-color: #cfe0df; }
.profile-grid .detail-item.wide strong { line-height: 1.65; font-weight: 600; }
.profile-notice {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px dashed #b8d0d1;
  border-radius: 11px;
  color: var(--muted);
  background: #f3f9f8;
}
.profile-notice strong { color: var(--teal); }
.detail-link { display: inline-block; color: var(--teal); font-weight: 700; overflow-wrap: anywhere; }
.detail-link:hover { color: var(--navy); }
.detail-section { margin-top: 22px; }
.institution-ability-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.institution-ability-header h3 { margin: 0; }
.ability-jump-button { min-height: 34px; padding: 6px 11px; font-size: 12px; white-space: nowrap; }
.drawer-instrument-table { overflow-x: hidden; }
.drawer-instrument-table table { width: 100%; min-width: 0; table-layout: fixed; }
.drawer-col-instrument { width: 36%; }
.drawer-col-spec { width: 64%; }
.drawer-instrument-table th, .drawer-instrument-table td { overflow-wrap: anywhere; word-break: break-word; }
.drawer-instrument-name { color: var(--navy-deep); font-weight: 700; }
.drawer-spec-item { display: block; color: #3c5363; line-height: 1.55; }
.drawer-spec-item + .drawer-spec-item { margin-top: 5px; padding-top: 5px; border-top: 1px dashed #d8e3e7; }
.instrument-list-toggle { width: 100%; margin-top: 9px; padding: 9px 12px; border: 1px solid #b9d3d0; border-radius: 9px; color: var(--teal); background: #f4faf9; font-weight: 700; }
.instrument-list-toggle:hover:not(:disabled) { color: #fff; border-color: var(--teal); background: var(--teal); }
.instrument-list-toggle:disabled { cursor: wait; opacity: 0.65; }
.run-list { display: grid; gap: 8px; }
.run-item { display: grid; grid-template-columns: 1fr auto; gap: 5px 16px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.run-item p { grid-column: 1 / -1; margin: 0; color: #a24d3f; font-size: 12px; }
.run-item small { color: var(--muted); }
.mini-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mini-table table { min-width: 600px; }
.mini-table td, .mini-table th { padding: 9px 11px; font-size: 12px; }
.drawer-loading { display: grid; gap: 12px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid #efc0b7;
  border-radius: 11px;
  color: #863b31;
  background: #fff2ef;
  box-shadow: var(--shadow);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .search-toolbar { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .table-wide th, .table-wide td { padding-left: 6px; padding-right: 6px; font-size: 11px; }
  .table-wide .cell-stack span, .table-wide .parameter-summary span { display: none; }
  .table-wide .expand-button { font-size: 11px; white-space: normal; }
  .group-detail-table th, .group-detail-table td { padding: 8px 7px; font-size: 11px; }
  .institution-ability-header { align-items: stretch; flex-direction: column; }
  .ability-jump-button { width: 100%; }
}

@media (max-width: 640px) {
  .topbar { align-items: flex-start; padding: 13px 16px; }
  .top-actions { flex-direction: column; align-items: stretch; }
  .live-badge { display: none; }
  .button-secondary { min-height: 36px; padding: 6px 10px; }
  .page-shell { width: min(100% - 24px, 1480px); padding-top: 24px; }
  .source-notice { align-items: flex-start; flex-direction: column; gap: 10px; }
  .source-notice a { width: 100%; }
  .footer-content { width: min(100% - 24px, 1480px); }
  .tab-list { padding-left: 8px; padding-right: 8px; }
  .tab-button { flex: 1; padding-left: 8px; padding-right: 8px; }
  .tab-panel { padding: 14px; }
  .compact-field { flex: 1; }
  .search-toolbar .button-primary { width: 100%; }
  .result-meta { align-items: flex-start; flex-direction: column; padding: 10px 0; }
  .pagination { justify-content: center; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item.wide { grid-column: auto; }
  .group-detail-panel { padding: 13px 10px 15px 16px; }
  .group-detail-header { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
