:root {
  --bg: #080a0f;
  --panel: #121620;
  --panel-strong: #171c28;
  --ink: #f6f8fb;
  --muted: #97a3b6;
  --line: rgba(148, 163, 184, 0.22);
  --line-soft: rgba(148, 163, 184, 0.14);
  --rail: #0b0f18;
  --accent: #6ea8fe;
  --accent-2: #5eead4;
  --accent-soft: rgba(110, 168, 254, 0.16);
  --good: #0f766e;
  --warn: #b45309;
  --radius: 6px;
  --app-bg:
    radial-gradient(circle at 74% 12%, rgba(110, 168, 254, 0.2), transparent 28%),
    radial-gradient(circle at 24% 88%, rgba(94, 234, 212, 0.12), transparent 30%),
    linear-gradient(135deg, #080a0f 0%, #10141f 54%, #151826 100%);
  --glass: rgba(18, 22, 32, 0.72);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--app-bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #070a11 0%, #0e1524 52%, #111827 100%);
  color: #cbd5e1;
  font-size: 14px;
}

.shell {
  min-height: 100vh;
  display: block;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--rail);
  color: #d1d5db;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 16px 10px;
}

.mark {
  width: 34px;
  height: 34px;
  border: 1px solid #4b5563;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.rail-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--radius);
  color: #cbd5e1;
  background: #1f2937;
  display: grid;
  place-items: center;
}

.rail-button.active {
  background: var(--accent);
  color: #fff;
}

.rail-spacer {
  flex: 1;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-height: 100vh;
}

.content-full {
  grid-template-columns: minmax(0, 1fr);
}

.main {
  min-width: 0;
  padding: 22px 24px 32px;
}

.home-mode .main {
  padding: 0;
}

.inspector {
  border-left: 1px solid var(--line);
  background: var(--panel);
  min-width: 0;
  padding: 22px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.topbar,
.section-head,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  margin-bottom: 0;
}

h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.link-button,
.primary-button,
.secondary-button {
  min-height: 36px;
  border-radius: var(--radius);
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  background: var(--panel-strong);
}

.back-button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #475467;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  font-weight: 700;
}

.back-button:hover,
.back-button:focus {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  outline: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.video-home {
  min-height: 100vh;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 20%, rgba(37, 99, 235, 0.26), transparent 30%),
    radial-gradient(circle at 28% 80%, rgba(20, 184, 166, 0.14), transparent 28%),
    linear-gradient(135deg, #070a11 0%, #0e1524 52%, #111827 100%);
  color: #f8fafc;
  padding: 22px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 20px;
}

.video-home-nav,
.video-home-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.video-home-nav div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.video-home-nav button,
.video-home-nav a {
  border: 0;
  padding: 0;
  background: transparent;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
}

.video-home-copy {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}

.video-home-copy .eyebrow {
  color: #9ca3af;
  grid-column: 1 / -1;
  margin: 0;
}

.video-home-copy h1 {
  max-width: 620px;
  color: #fff;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
}

.video-home-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.video-home-metrics span {
  color: #9ca3af;
  font-size: 12px;
}

.video-home-metrics strong {
  display: block;
  color: #fff;
  font-size: 22px;
  line-height: 1.1;
}

.video-browse-bar {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.44);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px 8px 14px;
  font-size: 13px;
}

.video-browse-bar div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-browse-bar button {
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  padding: 0 10px;
  font-size: 12px;
}

.video-browse-bar button:hover,
.video-browse-bar button:focus,
.video-browse-bar button.active {
  border-color: rgba(94, 234, 212, 0.56);
  background: rgba(94, 234, 212, 0.12);
  color: #ffffff;
  outline: none;
}

.video-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.video-card {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: var(--preview);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 0;
  color: #fff;
  text-align: left;
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.video-card.featured {
  grid-row: auto;
  min-height: 0;
}

.video-card:hover,
.video-card:focus {
  z-index: 2;
  transform: translateY(-3px) scale(1.015);
  border-color: color-mix(in srgb, var(--accent) 70%, #fff);
  box-shadow: 0 26px 80px rgba(37, 99, 235, 0.28);
  filter: saturate(1.1) brightness(1.04);
  outline: none;
}

.video-surface {
  position: absolute;
  inset: 0;
}

.preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.video-surface::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 5px;
}

.video-surface::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 22%;
  top: 42%;
  height: 3px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  transform: rotate(-15deg);
}

.video-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(2, 6, 23, 0.78));
}

.video-card-meta {
  position: absolute;
  z-index: 1;
  left: 12px;
  right: 12px;
  bottom: 11px;
  display: grid;
  gap: 3px;
}

.video-card-meta strong,
.video-card-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card-meta strong {
  font-size: 14px;
}

.video-card-meta small {
  color: #dbeafe;
  font-size: 11px;
}

.catalog-page {
  min-height: 100vh;
  padding: 22px 28px 34px;
}

.dark-page {
  background:
    radial-gradient(circle at 76% 10%, rgba(37, 99, 235, 0.24), transparent 30%),
    linear-gradient(135deg, #070a11 0%, #0e1524 52%, #111827 100%);
  color: #f8fafc;
}

.catalog-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 38px;
}

.catalog-nav > div {
  display: flex;
  align-items: center;
  gap: 18px;
}

.catalog-nav button,
.catalog-nav a {
  border: 0;
  background: transparent;
  color: #aab6c7;
  text-decoration: none;
  font-weight: 700;
  padding: 0;
}

.catalog-nav button.active {
  color: #fff;
}

.catalog-header {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 0.8fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.catalog-header h1 {
  color: #fff;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.96;
}

.dark-page .eyebrow,
.dark-page .small {
  color: #9ca3af;
}

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

.catalog-metrics span {
  color: #9ca3af;
  font-size: 12px;
}

.catalog-metrics strong {
  display: block;
  color: #fff;
  font-size: 24px;
  line-height: 1.1;
}

.catalog-list {
  margin-top: 14px;
}

.dark-page .toolbar {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.44);
  padding: 10px;
}

.bundle-button {
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.bundle-button:hover,
.bundle-button:focus {
  border-color: var(--accent);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
  outline: none;
}

.dark-page .input,
.dark-page .select {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.62);
  color: #e5e7eb;
}

.dark-page .input::placeholder {
  color: #8f98a8;
}

.dark-page .empty-state {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  color: rgba(226, 232, 240, 0.72);
  padding: 24px;
  text-align: center;
}

.dark-page .dataset-row,
.dark-page .bundle-card {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.58);
  color: #f8fafc;
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.18);
}

.dark-page .dataset-row:hover,
.dark-page .dataset-row.selected,
.dark-page .bundle-card:hover,
.dark-page .bundle-card:focus {
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: 0 26px 80px rgba(37, 99, 235, 0.2);
}

.dark-page .dataset-meta,
.dark-page .dataset-stats,
.dark-page .metric-label {
  color: #9ca3af;
}

.dark-page .badge.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.dark-page .badge {
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
}

.dark-page .thumb {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.dark-page .bundle-grid {
  margin-top: 20px;
}

.dark-page .bundle-card {
  min-height: 180px;
  padding: 22px;
}

.detail-stage {
  min-height: calc(100vh - 44px);
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto auto;
  gap: 12px;
}

.detail-stage-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-stage-nav > div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail-nav-link {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-weight: 700;
  text-decoration: none;
}

.detail-nav-link:hover,
.detail-nav-link:focus {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  outline: none;
}

.detail-video-wrap {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}

.detail-video-wrap h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 52px);
}

.dataset-hero {
  width: min(1180px, 100%);
  margin: 8px auto 0;
  display: grid;
  gap: 18px;
}

.dataset-hero h1 {
  max-width: 820px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
}

.dataset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dataset-tags span {
  min-height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
}

.dataset-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dataset-metric-grid div {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(18, 22, 32, 0.74);
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 20px;
}

.dataset-metric-grid span,
.section-label,
.dataset-access p,
.dataset-access small,
.preview-caption span {
  color: var(--muted);
}

.dataset-metric-grid strong {
  color: #f8fafc;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 600;
  line-height: 1;
}

.dataset-access {
  max-width: 620px;
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.access-toggle {
  width: fit-content;
  border: 0;
  background: transparent;
  color: #e5e7eb;
  padding: 0;
  font-weight: 800;
}

.dataset-access p,
.dataset-access small {
  margin: 0;
  font-size: 13px;
}

.access-command,
.reference-row {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.access-command code,
.reference-row code {
  min-width: 0;
  color: #e5e7eb;
  overflow-wrap: anywhere;
}

.access-command button,
.reference-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 10, 15, 0.54);
  color: #f8fafc;
  padding: 0 10px;
}

.dataset-overview-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 40px;
  align-items: start;
}

.dataset-description {
  display: grid;
  gap: 34px;
}

.dataset-description section {
  display: grid;
  gap: 12px;
}

.dataset-description p {
  max-width: 760px;
  margin: 0;
  color: #e5e7eb;
  font-size: 16px;
  line-height: 1.58;
}

.metadata-list {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
}

.metadata-list dt {
  color: var(--muted);
}

.metadata-list dd {
  margin: 0;
  color: #e5e7eb;
}

.dataset-preview-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 10px;
}

.dataset-preview-panel .detail-video {
  width: 100%;
  max-height: none;
}

.preview-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #f8fafc;
  font-size: 12px;
}

.detail-video {
  width: min(980px, 100%);
  min-height: 0;
  aspect-ratio: 16 / 9;
  max-height: 47vh;
  border-radius: 10px;
  background: #0f172a;
  padding: 12px;
  position: relative;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  cursor: pointer;
}

.detail-video-player {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 6px;
  background: #020617;
  object-fit: contain;
  overflow: hidden;
}

.detail-video-controls {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.detail-video.controls-visible .detail-video-controls,
.detail-video:focus-within .detail-video-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.detail-video-controls button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #f8fafc;
  padding: 0 12px;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.detail-video-controls button:hover,
.detail-video-controls button:focus {
  border-color: rgba(255, 255, 255, 0.34);
  outline: none;
}

.detail-video-controls .video-icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.video-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.play-icon {
  width: 17px;
  height: 17px;
}

.pause-shape {
  display: none;
}

.play-toggle.is-playing .play-shape {
  display: none;
}

.play-toggle.is-playing .pause-shape {
  display: block;
}

.volume-icon {
  width: 19px;
  height: 19px;
}

.volume-icon .sound-wave,
.volume-icon .mute-mark {
  fill: none;
}

.mute-toggle .mute-mark {
  display: none;
}

.mute-toggle.is-muted .sound-wave {
  display: none;
}

.mute-toggle.is-muted .mute-mark {
  display: block;
}

.video-scrubber {
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.68);
  color: #f8fafc;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.video-scrubber span {
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.video-scrubber input {
  width: 100%;
  min-width: 0;
  accent-color: #60a5fa;
  cursor: pointer;
}

.detail-video-frame {
  min-height: 0;
  height: 100%;
  border-radius: 6px;
  background: var(--preview);
  position: relative;
  overflow: hidden;
}

.detail-video-frame::before,
.detail-video-frame::after {
  content: "";
  position: absolute;
  height: 4px;
  background: rgba(255, 255, 255, 0.58);
  border-radius: 999px;
}

.detail-video-frame::before {
  width: 34%;
  left: 18%;
  top: 38%;
  transform: rotate(-15deg);
}

.detail-video-frame::after {
  width: 28%;
  right: 18%;
  bottom: 34%;
  transform: rotate(23deg);
}

.detail-video-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #f8fafc;
}

.detail-video-placeholder span,
.detail-video-placeholder small {
  position: relative;
  z-index: 1;
}

.detail-video-placeholder span {
  font-weight: 800;
}

.detail-video-placeholder small {
  color: #cbd5e1;
}

.detail-video-overlay {
  position: absolute;
  left: 24px;
  top: 24px;
  color: #fff;
  text-align: left;
  display: grid;
  gap: 4px;
}

.detail-video-overlay span {
  color: #dbeafe;
  font-size: 12px;
}

.detail-video-overlay strong {
  font-size: 18px;
}

.detail-info-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 0.13fr)) minmax(240px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.detail-tabs {
  width: min(1180px, 100%);
  justify-self: center;
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin: 0 auto;
}

.detail-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px 2px 9px;
  font-weight: 700;
}

.detail-tabs button.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.detail-stat,
.detail-meta,
.detail-compact-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.detail-stat {
  padding: 11px 12px;
}

.detail-stat strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.detail-stat span,
.detail-meta span {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta {
  padding: 11px 12px;
  display: grid;
  align-content: center;
  gap: 3px;
}

.detail-bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr;
  gap: 10px;
}

.detail-compact-card {
  min-height: 112px;
  padding: 12px;
  overflow: hidden;
}

.detail-compact-card h3 {
  margin-bottom: 8px;
}

.compact-topic-row,
.compact-run-row {
  display: grid;
  gap: 6px;
}

.compact-topic-row span,
.compact-run-row span {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  border-top: 1px solid var(--line-soft);
  padding-top: 5px;
}

.compact-topic-row strong,
.compact-run-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-topic-row small,
.compact-run-row small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.command-card code {
  display: block;
  border-radius: 6px;
  background: #0f172a;
  color: #e5e7eb;
  padding: 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.unified-panel,
.segments-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151821;
  color: #f8fafc;
  overflow: hidden;
}

.overview-panel {
  padding: 0;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 0.14fr)) minmax(240px, 1fr);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.overview-metrics div {
  min-height: 66px;
  padding: 13px 16px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  display: grid;
  align-content: center;
  gap: 3px;
}

.overview-metrics div:last-child {
  border-right: 0;
}

.overview-metrics strong {
  color: #f8fafc;
  font-size: 22px;
  line-height: 1.1;
}

.overview-metrics span,
.overview-data-grid span {
  color: #9aa4b2;
  font-size: 12px;
}

.overview-data-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
}

.overview-data-grid > div {
  min-height: 120px;
  padding: 14px 16px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.overview-data-grid > div:last-child {
  border-right: 0;
}

.overview-data-grid h3 {
  color: #e5e7eb;
}

.overview-data-grid p {
  margin: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 7px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.overview-data-grid p + p {
  margin-top: 7px;
}

.overview-data-grid strong {
  min-width: 0;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-data-grid code {
  display: block;
  border-radius: 6px;
  background: #0b1020;
  color: #e5e7eb;
  padding: 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

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

.runs-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.runs-player {
  width: min(760px, 100%);
}

.runs-player .detail-video {
  width: 100%;
  max-height: 34vh;
}

.segments-table th,
.segments-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

.segments-table th {
  color: #8f98a8;
  font-weight: 700;
}

.segments-table td {
  color: #e5e7eb;
}

.segments-table tr:last-child td {
  border-bottom: 0;
}

.segments-table td:nth-child(3),
.segments-table td:nth-child(4),
.segments-table td:nth-child(5) {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  white-space: nowrap;
}

.segment-row {
  cursor: pointer;
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.segment-row:hover,
.segment-row:focus,
.segment-row.active {
  background: rgba(110, 168, 254, 0.08);
  outline: none;
}

.segment-row.active {
  box-shadow: inset 3px 0 0 var(--accent-2);
}

.run-number {
  color: var(--muted);
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  margin-bottom: 4px;
}

.status-pass {
  min-height: 24px;
  border-radius: 7px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.segments-table td:nth-child(4) {
  white-space: nowrap;
}

.segment-thumb {
  width: 88px;
  height: 44px;
  display: block;
  border-radius: 5px;
  background: var(--preview);
  position: relative;
  overflow: hidden;
}

.segment-video-thumb {
  width: 88px;
  height: 50px;
  display: block;
  border-radius: 5px;
  background: #020617;
  object-fit: cover;
}

.segment-thumb::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 22%;
  top: 50%;
  height: 2px;
  background: rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  transform: rotate(-14deg);
}

.segments-table strong,
.segments-table small {
  display: block;
}

.segments-table small {
  color: #8f98a8;
  margin-top: 3px;
}

.segment-category {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
  padding: 0 10px;
  margin-right: 6px;
  font-size: 12px;
  font-weight: 700;
}

.segment-category.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.analysis-grid {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.analysis-card {
  min-height: 112px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: #10141d;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.analysis-card.wide {
  grid-column: 1 / -1;
}

.analysis-card span,
.analysis-card small {
  color: #9aa4b2;
  font-size: 12px;
}

.analysis-card strong {
  color: #f8fafc;
  font-size: 30px;
  line-height: 1;
}

.analysis-bar,
.topic-bars i {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.analysis-bar i,
.topic-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.topic-bars {
  display: grid;
  gap: 8px;
}

.topic-bars label {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.topic-bars em {
  color: #f8fafc;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orbit-hero {
  min-height: 560px;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 66% 45%, rgba(37, 99, 235, 0.32), transparent 34%),
    radial-gradient(circle at 82% 70%, rgba(20, 184, 166, 0.15), transparent 24%),
    linear-gradient(135deg, #070b14 0%, #111827 52%, #0b1020 100%);
  color: #f8fafc;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 20px;
  padding: 22px;
  position: relative;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.orbit-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 70% 44%, black, transparent 72%);
  pointer-events: none;
}

.orbit-copy,
.orbit-stage {
  position: relative;
  z-index: 1;
}

.orbit-copy {
  display: grid;
  grid-template-rows: auto auto auto auto auto 1fr;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.orbit-nav {
  margin-bottom: 28px;
}

.orbit-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}

.orbit-links button,
.orbit-links a {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  text-decoration: none;
  padding: 0;
}

.orbit-hero .eyebrow,
.orbit-subtitle {
  color: #9ca3af;
}

.orbit-hero h1 {
  max-width: 560px;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.orbit-subtitle {
  max-width: 420px;
  font-size: 15px;
  line-height: 1.5;
}

.orbit-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 560px;
}

.orbit-metrics span {
  color: #9ca3af;
  font-size: 12px;
}

.orbit-metrics strong {
  display: block;
  color: #fff;
  font-size: 21px;
  line-height: 1.1;
}

.orbit-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.orbit-stage {
  min-height: 500px;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 50%;
  transform: rotate(-9deg);
  pointer-events: none;
}

.orbit-ring-outer {
  width: 88%;
  height: 70%;
  left: 5%;
  top: 12%;
}

.orbit-ring-inner {
  width: 64%;
  height: 48%;
  left: 17%;
  top: 23%;
  border-color: rgba(148, 163, 184, 0.16);
}

.orbit-center,
.orbit-tile {
  border: 0;
  color: #fff;
  background: var(--preview);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.34);
  overflow: hidden;
}

.orbit-center {
  position: absolute;
  width: min(42vw, 360px);
  height: 230px;
  left: 42%;
  top: 34%;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  text-align: left;
}

.orbit-center::before,
.orbit-tile::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 5px;
}

.orbit-center::after,
.orbit-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.78));
}

.orbit-center-label {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: grid;
  gap: 4px;
}

.orbit-center-label strong {
  font-size: 18px;
}

.orbit-center-label small {
  color: #dbeafe;
}

.orbit-tile {
  position: absolute;
  width: 128px;
  height: 84px;
  border-radius: 7px;
  transform: translate(-50%, -50%) rotate(var(--tile-rotate));
  text-align: left;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    z-index 180ms ease;
}

.orbit-tile.small {
  width: 106px;
  height: 70px;
  opacity: 0.9;
}

.orbit-tile:hover,
.orbit-tile:focus,
.orbit-tile.selected {
  z-index: 5;
  filter: saturate(1.16) brightness(1.06);
  transform: translate(-50%, -50%) rotate(0deg) scale(1.18);
  box-shadow: 0 28px 90px rgba(37, 99, 235, 0.42);
  outline: 1px solid color-mix(in srgb, var(--accent) 74%, #fff);
}

.orbit-tile span,
.orbit-tile small {
  position: absolute;
  z-index: 2;
  left: 9px;
  right: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orbit-tile span {
  bottom: 22px;
  font-size: 11px;
  font-weight: 700;
}

.orbit-tile small {
  bottom: 8px;
  color: #dbeafe;
  font-size: 9px;
}

.orbit-timeline {
  position: absolute;
  left: 18%;
  right: 5%;
  bottom: 30px;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.74);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1.8fr 1.1fr 0.8fr;
  gap: 9px;
  padding: 12px;
}

.orbit-timeline span {
  height: 100%;
  border-radius: 5px;
}

.metric-card,
.panel,
.dataset-row,
.dataset-card,
.delivery-box,
.bundle-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
}

.metric-card {
  padding: 14px;
}

.metric-value {
  font-size: 24px;
  font-weight: 720;
}

.metric-label {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(110px, 150px));
  gap: 10px;
  margin: 18px 0 14px;
}

.input,
.select {
  width: 100%;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
}

.dataset-list {
  display: grid;
  gap: 10px;
}

.dataset-row {
  padding: 10px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 14px;
  text-align: left;
  color: inherit;
}

.dataset-row:hover,
.dataset-row.selected {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.thumb {
  min-height: 78px;
  border-radius: var(--radius);
  background: #111827;
  position: relative;
  overflow: hidden;
}

.thumb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05070d;
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  pointer-events: none;
}

.thumb-with-video::after {
  inset: 0;
  border-color: rgba(255, 255, 255, 0.18);
}

.dataset-title {
  font-size: 16px;
  font-weight: 720;
}

.dataset-meta {
  color: var(--muted);
  font-size: 12px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.badge {
  border-radius: 999px;
  background: var(--accent-soft);
  color: #1d4ed8;
  padding: 4px 8px;
  font-size: 11px;
}

.badge.neutral {
  background: #eef2f7;
  color: #475569;
}

.dataset-stats {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  align-content: center;
  gap: 5px;
  white-space: nowrap;
}

.preview {
  min-height: 210px;
  background: #0f172a;
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.preview-frame {
  border-radius: 4px;
  min-height: 150px;
  position: relative;
  overflow: hidden;
}

.preview-frame::before,
.preview-frame::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

.preview-frame::before {
  width: 34%;
  height: 3px;
  left: 12%;
  top: 32%;
  transform: rotate(-18deg);
}

.preview-frame::after {
  width: 28%;
  height: 3px;
  right: 15%;
  bottom: 34%;
  transform: rotate(24deg);
}

.timeline {
  display: grid;
  gap: 7px;
}

.timeline-line {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.timeline-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.topic-list,
.run-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.topic,
.run {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 9px;
  display: grid;
  gap: 3px;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.small {
  color: var(--muted);
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  margin-top: 14px;
}

.panel {
  padding: 14px;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

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

.table th,
.table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 8px;
  text-align: left;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.delivery-box {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.file-label {
  justify-self: end;
  min-height: 40px;
  border-radius: var(--radius);
  padding: 0 14px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

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

.delivery-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.delivery-card code {
  border-radius: 6px;
  background: #0f172a;
  color: #e5e7eb;
  padding: 10px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

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

.bundle-card {
  padding: 16px;
}

.hidden {
  display: none !important;
}

/* Unified product skin */
.shell,
.main,
.content {
  background: var(--app-bg);
  color: var(--ink);
}

.video-home,
.dark-page,
.detail-stage {
  background: var(--app-bg);
  color: var(--ink);
}

.detail-stage {
  min-height: 100vh;
  margin: -22px -24px -32px;
  padding: 22px 24px 32px;
}

.video-home-nav,
.catalog-nav,
.detail-stage-nav {
  min-height: 42px;
}

.video-home-nav strong,
.catalog-nav strong {
  color: #ffffff;
  letter-spacing: 0;
}

.video-home-nav button,
.video-home-nav a,
.catalog-nav button,
.catalog-nav a {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-weight: 700;
}

.video-home-nav button:hover,
.video-home-nav button:focus,
.video-home-nav a:hover,
.video-home-nav a:focus,
.catalog-nav button:hover,
.catalog-nav button:focus,
.catalog-nav a:hover,
.catalog-nav a:focus,
.catalog-nav button.active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  outline: none;
}

.link-button,
.secondary-button,
.back-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: #dbe3ef;
}

.link-button:hover,
.link-button:focus,
.secondary-button:hover,
.secondary-button:focus,
.back-button:hover,
.back-button:focus {
  border-color: rgba(110, 168, 254, 0.52);
  background: rgba(110, 168, 254, 0.12);
  color: #ffffff;
  outline: none;
}

.primary-button {
  border-color: rgba(94, 234, 212, 0.72);
  background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
  color: #ffffff;
}

.video-browse-bar,
.dark-page .toolbar,
.toolbar {
  border-color: var(--line);
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.input,
.select,
.dark-page .input,
.dark-page .select {
  border-color: var(--line);
  background: rgba(8, 10, 15, 0.62);
  color: var(--ink);
}

.input::placeholder,
.dark-page .input::placeholder {
  color: #7f8aa0;
}

.catalog-header h1,
.video-home-copy h1,
.detail-video-wrap h1 {
  color: #ffffff;
}

.catalog-header h1 {
  font-size: clamp(40px, 5vw, 64px);
}

.catalog-metrics span,
.video-home-metrics span,
.dark-page .small,
.dark-page .eyebrow,
.detail-video-wrap .eyebrow,
.small,
.eyebrow {
  color: var(--muted);
}

.catalog-metrics strong,
.video-home-metrics strong {
  color: #ffffff;
}

.dataset-row,
.dark-page .dataset-row,
.bundle-card,
.dark-page .bundle-card,
.metric-card,
.panel,
.delivery-card,
.topic,
.run {
  border-color: var(--line);
  background: rgba(18, 22, 32, 0.74);
  color: var(--ink);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.18);
}

.dataset-row:hover,
.dataset-row.selected,
.dark-page .dataset-row:hover,
.dark-page .dataset-row.selected,
.bundle-card:hover,
.bundle-card:focus,
.dark-page .bundle-card:hover,
.dark-page .bundle-card:focus {
  border-color: rgba(110, 168, 254, 0.72);
  background: rgba(23, 28, 40, 0.9);
  box-shadow: 0 24px 80px rgba(37, 99, 235, 0.16);
}

.dataset-meta,
.dataset-stats,
.dark-page .dataset-meta,
.dark-page .dataset-stats,
.metric-label {
  color: var(--muted);
}

.badge,
.dark-page .badge,
.segment-category {
  background: rgba(110, 168, 254, 0.16);
  color: #cfe0ff;
}

.badge.neutral,
.dark-page .badge.neutral,
.segment-category.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.detail-video {
  border: 1px solid var(--line);
  background: #080a0f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.detail-tabs {
  border-bottom-color: var(--line);
}

.detail-tabs button {
  color: var(--muted);
}

.detail-tabs button:hover,
.detail-tabs button:focus {
  color: #ffffff;
  outline: none;
}

.detail-tabs button.active {
  color: #ffffff;
  border-bottom-color: var(--accent-2);
}

.unified-panel,
.segments-panel {
  border-color: var(--line);
  background: rgba(18, 22, 32, 0.9);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.22);
}

.analysis-card {
  border-color: var(--line-soft);
  background: rgba(8, 10, 15, 0.5);
}

.overview-metrics,
.segments-table th,
.segments-table td,
.overview-metrics div,
.overview-data-grid > div,
.overview-data-grid p {
  border-color: var(--line-soft);
}

.overview-metrics span,
.overview-data-grid span,
.segments-table th,
.segments-table small,
.analysis-card span,
.analysis-card small {
  color: var(--muted);
}

.overview-metrics strong,
.overview-data-grid strong,
.overview-data-grid h3,
.segments-table td,
.analysis-card strong,
.topic-bars em {
  color: var(--ink);
}

.analysis-bar,
.topic-bars i,
.timeline-line {
  background: rgba(148, 163, 184, 0.18);
}

.analysis-bar i,
.topic-bars b,
.timeline-line span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.video-card,
.segment-video-thumb,
.preview-video,
.detail-video-player {
  background-color: #05070d;
}

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

  .inspector {
    position: static;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-height: 760px) and (min-width: 900px) {
  .detail-stage {
    gap: 8px;
  }

  .detail-video-wrap h1 {
    font-size: 34px;
    margin-bottom: 6px;
  }

  .detail-video {
    max-height: 42vh;
  }

  .detail-compact-card {
    min-height: 96px;
    padding: 10px;
  }

  .compact-topic-row span:nth-child(n + 4) {
    display: none;
  }
}

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

  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
  }

  .rail-spacer {
    display: none;
  }

  .main,
  .inspector {
    padding: 16px;
  }

  .home-mode .main {
    padding: 0;
  }

  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics,
  .orbit-metrics,
  .video-home-metrics,
  .detail-metrics,
  .bundle-grid,
  .operation-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .dataset-row {
    grid-template-columns: 1fr;
  }

  .dataset-stats {
    text-align: left;
  }

  .video-home {
    min-height: auto;
    padding: 16px;
  }

  .video-home-nav,
  .video-home-actions,
  .catalog-nav,
  .video-browse-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-home-nav div,
  .catalog-nav > div {
    flex-wrap: wrap;
    gap: 12px;
  }

  .catalog-page {
    padding: 16px;
  }

  .catalog-header {
    grid-template-columns: 1fr;
  }

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

  .video-home-copy {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .video-home-copy h1 {
    font-size: 42px;
    line-height: 1;
  }

  .video-gallery {
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-card.featured {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
  }

  .video-card-meta strong {
    font-size: 12px;
  }

  .video-card-meta small {
    font-size: 10px;
  }

  .detail-stage {
    min-height: auto;
    grid-template-rows: auto auto auto auto;
  }

  .detail-stage-nav,
  .detail-stage-nav > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-video-wrap {
    text-align: left;
    justify-items: stretch;
  }

  .detail-video-wrap h1 {
    font-size: 34px;
  }

  .detail-video {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .detail-video-controls {
    left: 16px;
    right: 16px;
    bottom: 16px;
    grid-template-columns: 1fr 1fr;
  }

  .video-scrubber {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .detail-video-controls button {
    grid-row: 2;
    justify-content: center;
  }

  .detail-info-strip,
  .detail-bottom-grid,
  .analysis-grid,
  .delivery-grid,
  .overview-metrics,
  .overview-data-grid {
    grid-template-columns: 1fr;
  }

  .overview-metrics div,
  .overview-data-grid > div {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  }

  .overview-metrics div:last-child,
  .overview-data-grid > div:last-child {
    border-bottom: 0;
  }

  .overview-data-grid p {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .detail-tabs {
    overflow-x: auto;
  }

  .segments-panel {
    overflow-x: auto;
  }

  .segments-table {
    min-width: 720px;
  }

  .topic-bars label {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .compact-topic-row span,
  .compact-run-row span {
    grid-template-columns: 1fr;
  }

  .compact-topic-row small,
  .compact-run-row small {
    white-space: normal;
  }

  .orbit-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 16px;
  }

  .orbit-hero h1 {
    font-size: 34px;
    max-width: 330px;
  }

  .orbit-nav {
    margin-bottom: 6px;
  }

  .orbit-links {
    gap: 10px;
    flex-wrap: wrap;
  }

  .orbit-stage {
    min-height: 390px;
    overflow: hidden;
  }

  .orbit-ring-outer {
    width: 122%;
    height: 68%;
    left: -10%;
    top: 15%;
  }

  .orbit-ring-inner {
    width: 86%;
    height: 45%;
    left: 7%;
    top: 27%;
  }

  .orbit-center {
    width: 230px;
    height: 146px;
    left: 50%;
    top: 45%;
  }

  .orbit-tile {
    width: 86px;
    height: 58px;
  }

  .orbit-tile.small {
    width: 72px;
    height: 50px;
  }

  .orbit-tile span,
  .orbit-tile small {
    display: none;
  }

  .orbit-timeline {
    left: 0;
    right: 0;
    bottom: 8px;
  }
}
