:root {
  --bg: #0b0d14;
  --bg-alt: #10131e;
  --surface: #151927;
  --surface-2: #1b2133;
  --surface-hover: #212840;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #f3f4f8;
  --text-muted: #9ba3b8;
  --text-dim: #6f7890;

  --cyan: #00e5ff;
  --cyan-soft: rgba(0, 229, 255, 0.12);
  --amber: #ffb300;
  --amber-soft: rgba(255, 179, 0, 0.14);
  --rose: #ff5ca8;
  --rose-soft: rgba(255, 92, 168, 0.14);
  --violet: #9b87ff;
  --violet-soft: rgba(155, 135, 255, 0.14);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.14);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-nebula {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 14% -8%, rgba(124, 92, 255, 0.18), transparent 65%),
    radial-gradient(740px 480px at 88% 8%, rgba(0, 229, 255, 0.09), transparent 62%),
    radial-gradient(600px 420px at 55% 100%, rgba(255, 92, 168, 0.06), transparent 60%);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(148, 163, 184, 0.11);
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  color: #dbe3f7;
}

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

.c-cyan { color: var(--cyan); }
.c-amber { color: var(--amber); }
.c-rose { color: var(--rose); }
.muted { color: var(--text-muted); }

.container {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 20, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1d2238, #121524);
  border: 1px solid rgba(155, 135, 255, 0.32);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 0.96rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-text span { font-size: 0.74rem; color: var(--text-muted); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 9px;
  transition: color 0.16s, background 0.16s;
}
.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(155, 135, 255, 0.15);
  border: 1px solid rgba(155, 135, 255, 0.35);
  padding: 8px 14px;
  border-radius: 10px;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s;
}
.header-cta:hover {
  background: rgba(155, 135, 255, 0.25);
  border-color: rgba(155, 135, 255, 0.55);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 44px 0 32px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.status-pill, .meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}
.status-pill {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.09);
}
.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.hero-lead {
  margin: 0 0 28px;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 1.03rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  background: linear-gradient(180deg, rgba(27, 33, 51, 0.85), rgba(21, 25, 39, 0.94));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi-primary {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 12px 34px rgba(0, 229, 255, 0.07);
}
.kpi-label {
  font-size: 0.77rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-value-sm { font-size: 1.55rem; padding-top: 4px; }
.kpi-unit { font-size: 0.96rem; font-weight: 500; color: var(--text-muted); }
.kpi-sub { font-size: 0.88rem; font-weight: 600; }
.kpi-foot { font-size: 0.8rem; color: var(--text-dim); margin-top: auto; padding-top: 4px; }

.notice-banner {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 179, 0, 0.07);
  border: 1px solid rgba(255, 179, 0, 0.25);
  color: #e6dfd0;
  font-size: 0.89rem;
}
.notice-icon {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 179, 0, 0.2);
  color: var(--amber);
  margin-top: 2px;
}

/* Sections */
.section {
  padding: 46px 0;
  scroll-margin-top: 68px;
}
.section-alt {
  background: linear-gradient(180deg, rgba(16, 19, 30, 0.88), rgba(11, 13, 20, 0.6));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet);
  margin-bottom: 5px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.38rem, 2.3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.section-desc {
  margin: 0;
  max-width: 540px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Dataset tabs */
.dataset-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.ds-tab {
  appearance: none;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ds-tab:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.ds-tab.active {
  background: linear-gradient(145deg, rgba(0, 229, 255, 0.12), rgba(155, 135, 255, 0.14));
  border-color: rgba(0, 229, 255, 0.52);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.1);
}
.ds-tab strong {
  font-size: 0.83rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds-tab span {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Viewer shell */
.viewer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.stage-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.viewer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-btn {
  appearance: none;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 6px 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.tool-btn:hover { background: var(--surface-hover); border-color: rgba(255, 255, 255, 0.32); }
.tool-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tool-btn-queen {
  background: var(--rose-soft);
  border-color: rgba(255, 92, 168, 0.42);
  color: #ffd3e8;
}
.tool-btn-queen:hover { background: rgba(255, 92, 168, 0.24); }
.tool-btn-ghost {
  margin-left: auto;
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.tool-btn-ghost.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-color: var(--border-strong);
}

.zoom-readout {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-width: 50px;
  text-align: center;
  color: var(--text-muted);
}

.find-form {
  display: flex;
  gap: 6px;
}
.find-form input {
  width: 158px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 6px 10px;
  outline: none;
}
.find-form input:focus { border-color: var(--cyan); }
.find-form input.shake { border-color: var(--rose); }

.viewer-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  user-select: none;
}
.toggle-chip input { accent-color: var(--cyan); margin: 0; }
.chip-cyan { border-color: rgba(0, 229, 255, 0.3); color: #bff8ff; }
.chip-amber { border-color: rgba(255, 179, 0, 0.34); color: #ffe19e; }
.chip-amber input { accent-color: var(--amber); }
.chip-rose { border-color: rgba(255, 92, 168, 0.34); color: #ffc7e2; }
.chip-rose input { accent-color: var(--rose); }
.chip-slate { border-color: rgba(148, 163, 184, 0.34); color: #cbd5e1; }
.chip-neutral { color: var(--text-muted); }

/* Stage viewport */
.stage-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #07090f;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.stage-viewport.dragging { cursor: grabbing; }

.stage-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
}
.stage-canvas.animate {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.stage-canvas img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.stage-canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.stage-hint {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 0.74rem;
  color: rgba(243, 244, 248, 0.8);
  background: rgba(11, 13, 20, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 10px;
  border-radius: 8px;
  pointer-events: none;
}

/* SVG markers */
.ant-marker { cursor: pointer; }
.ant-marker:hover .m-ring { stroke-width: 3.2; }
.ant-marker.selected .m-pulse {
  animation: pulseRing 1.4s ease-out infinite;
}
@keyframes pulseRing {
  0% { opacity: 0.95; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.5); }
}

/* Inspector column */
.inspector-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inspector-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.insp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.insp-series {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--violet);
  background: var(--violet-soft);
  padding: 3px 8px;
  border-radius: 6px;
}
.insp-date { font-size: 0.8rem; color: var(--text-muted); }

.inspector-card h3 {
  margin: 0 0 2px;
  font-size: 1.08rem;
  font-weight: 700;
}
.insp-author {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.insp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.insp-stat {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 8px;
  text-align: center;
}
.insp-stat span {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.insp-stat small { font-size: 0.7rem; color: var(--text-muted); }

.insp-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.insp-meta-list span:first-child { color: var(--text-dim); }
.insp-note {
  margin: 0 0 12px;
  font-size: 0.83rem;
  color: #d6dbea;
  line-height: 1.5;
}
.insp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mini-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #a9f4ff;
}
.mini-link:hover { background: rgba(0, 229, 255, 0.16); text-decoration: none; }

/* Selected point card */
.point-card {
  border-color: rgba(0, 229, 255, 0.24);
  background: linear-gradient(160deg, rgba(21, 25, 39, 0.98), rgba(16, 22, 36, 0.98));
}
.point-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.point-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--cyan-soft);
  color: var(--cyan);
}
.point-badge.is-probable { background: var(--amber-soft); color: var(--amber); }
.point-badge.is-queen { background: var(--rose-soft); color: var(--rose); }
.point-badge.is-soldier { background: var(--violet-soft); color: var(--violet); }
.point-badge.is-doubtful { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }
.point-coords {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
}
.point-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Quick jumps */
.quick-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.85rem;
}
.quick-head span { font-size: 0.76rem; color: var(--text-dim); }
.quick-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 4px;
}
.quick-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.q-pill {
  appearance: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
}
.q-pill:hover { border-color: var(--cyan); background: var(--surface-2); }
.q-pill.q-queen { border-color: rgba(255, 92, 168, 0.45); color: #ffc1df; background: var(--rose-soft); }
.q-pill.q-soldier { border-color: rgba(155, 135, 255, 0.45); color: #ddd6fe; background: var(--violet-soft); }
.q-pill.q-prob { border-color: rgba(255, 179, 0, 0.38); color: #ffe09a; background: rgba(255, 179, 0, 0.08); }
.q-pill.q-doubt { border-color: rgba(148, 163, 184, 0.35); color: #cbd5e1; }

/* Charts & Stats table */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.chart-head h3 { margin: 0; font-size: 1.05rem; }
.chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.swatch-cyan { background: var(--cyan); }
.swatch-amber { background: var(--amber); }
.swatch-violet { background: var(--violet); }

.bars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bar-row {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
}
.bar-row-highlight {
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: 12px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.16);
}
.bar-meta strong { display: block; font-size: 0.88rem; }
.bar-meta span { font-size: 0.76rem; color: var(--text-muted); }

.bar-track {
  height: 28px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
}
.bar-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: #0b0d14;
  white-space: nowrap;
  overflow: hidden;
}
.seg-cyan { background: linear-gradient(90deg, #00c4de, #00e5ff); }
.seg-amber { background: linear-gradient(90deg, #f59e0b, #ffb300); }
.seg-violet { background: linear-gradient(90deg, #7c68ee, #a78bfa); color: #fff; }

.bar-total {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
}

.bar-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  font-size: 0.76rem;
  color: var(--amber);
}
.bar-divider::before, .bar-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 179, 0, 0.25);
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 840px;
}
.stats-table th, .stats-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.stats-table th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}
.stats-table td.num, .stats-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stats-table tbody tr:last-child td { border-bottom: none; }
.stats-table tr.row-muted td { color: var(--text-muted); }
.stats-table tr.row-latest td { background: rgba(0, 229, 255, 0.045); }
.stats-table small { color: var(--text-dim); }

.tag-warn {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
  margin-right: 4px;
}
.table-footnote {
  margin: 10px 4px 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Observation cards */
.obs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.obs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.obs-card-featured {
  border-color: rgba(0, 229, 255, 0.32);
}
.obs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.obs-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--violet);
}
.obs-head h3 { margin: 4px 0 0; font-size: 1.15rem; }
.obs-total {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 10px;
  background: var(--cyan-soft);
  color: var(--cyan);
  white-space: nowrap;
}

.obs-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.obs-metrics > div {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.obs-metrics span { font-size: 0.73rem; color: var(--text-dim); }
.obs-metrics strong { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.obs-metrics small { font-size: 0.73rem; color: var(--text-muted); }

.obs-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: #d3d9ea;
}
.obs-actions {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.btn-secondary {
  appearance: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0b0d14;
  background: var(--cyan);
  border: none;
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
}
.btn-secondary:hover { filter: brightness(1.08); }
.btn-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 7px 13px;
}
.btn-link:hover { background: var(--surface-hover); text-decoration: none; }

/* Methodology */
.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.method-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.method-card h3 { margin: 0 0 14px; font-size: 1.08rem; }
.steps-list, .rules-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: #d6dceb;
}

/* Tasks, Passport & Archive */
.bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.panel-card h3 { margin: 0 0 14px; font-size: 1.06rem; }

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.89rem;
}
.task-done {
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.16);
  color: var(--text-muted);
}
.task-done .check { color: var(--green); font-weight: 800; }
.task-open {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--text);
}
.task-open .check { color: var(--cyan); font-weight: 800; }
.panel-note { margin: 12px 0 0; font-size: 0.81rem; color: var(--text-dim); }

.passport-dl {
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.passport-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}
.passport-dl dt { color: var(--text-muted); }
.passport-dl dd { margin: 0; text-align: right; }

.decision-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #cfd5e6;
}

.archive-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.archive-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.archive-head h3 { margin: 0; font-size: 1.05rem; }
.archive-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.archive-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.16s, background 0.16s;
}
.archive-item:hover {
  border-color: rgba(0, 229, 255, 0.45);
  background: var(--surface-2);
  text-decoration: none;
}
.arch-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--violet);
}
.archive-item strong { font-size: 0.86rem; }
.archive-item small { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0 32px;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1120px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dataset-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .viewer-shell { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .site-nav { display: none; }
  .obs-grid, .method-grid, .bottom-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .bar-total { text-align: left; }
  .dataset-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .obs-metrics { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .find-form input { width: 126px; }
  .stage-hint { display: none; }
}
