:root {
  color-scheme: light;
  --paper: #f4f5f0;
  --surface: #ffffff;
  --ink: #192720;
  --muted: #6e7b73;
  --line: #dce2db;
  --green: #165d48;
  --green-dark: #0f3f32;
  --green-pale: #e8f0e8;
  --lime: #d9e9a8;
  --rust: #c76d4d;
  --video: #101713;
  --radius: 10px;
  font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.5; }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: var(--green); text-underline-offset: 3px; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid #97b66a;
  outline-offset: 3px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.topbar {
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(28px, calc((100vw - 1440px) / 2)); border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .54);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px;
  background: var(--green); color: #fff; font-family: Georgia, serif; font-size: 23px; font-weight: 700;
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 14px; letter-spacing: .01em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.topbar-note { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rust); }

.page-shell { width: min(1440px, 100%); margin: 0 auto; padding: 45px 28px 28px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: 0 0 32px; }
.eyebrow { margin: 0; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .15em; line-height: 1.4; }
.intro h1 { margin: 12px 0 11px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 4.1vw, 54px); font-weight: 500; letter-spacing: -.045em; line-height: 1.03; }
.intro h1 em { color: var(--green); font-weight: 400; }
.intro-text { max-width: 550px; margin: 0; color: var(--muted); font-size: 14px; }
.dataset-stats { display: flex; align-items: center; gap: 27px; padding-bottom: 4px; }
.stat { display: grid; gap: 2px; min-width: 50px; }
.stat strong { font-family: Georgia, serif; font-size: 25px; font-weight: 500; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 11px; }

.workspace { display: grid; grid-template-columns: 255px minmax(0, 1fr); gap: 20px; align-items: start; }
.sidebar, .library { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sidebar { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 20px 14px 17px; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 13px; }
.sidebar-count, .filter-count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11px; }
.all-filter, .category-toggle, .label-filter {
  width: 100%; display: flex; align-items: center; border: 0; background: transparent; text-align: left; cursor: pointer;
}
.all-filter { min-height: 42px; gap: 10px; padding: 0 10px; border-radius: 7px; font-size: 13px; font-weight: 700; }
.all-filter.is-active { background: var(--green-pale); color: var(--green-dark); }
.all-icon { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 5px; font-size: 13px; }
.all-filter .filter-count { margin-left: auto; }
.category-list { display: grid; gap: 6px; margin-top: 14px; }
.category-section { padding-top: 6px; border-top: 1px solid #edf0eb; }
.category-toggle { gap: 7px; padding: 10px 6px 5px; font-size: 11px; font-weight: 800; }
.category-toggle .chevron { color: #99a39b; font-size: 16px; line-height: 1; }
.category-toggle[aria-pressed="true"] .category-name { color: var(--green-dark); }
.category-toggle .filter-count { margin-left: auto; }
.category-labels { display: grid; gap: 2px; padding: 1px 0 5px 17px; }
.category-labels.is-collapsed { display: none; }
.label-filter { justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 5px; color: #46554c; font-size: 12px; }
.label-filter:hover { background: #f4f7f3; }
.label-filter.is-selected { background: var(--green-pale); color: var(--green-dark); font-weight: 700; }
.sidebar-hint { margin: 15px 6px 0; padding-top: 13px; border-top: 1px solid #edf0eb; color: var(--muted); font-size: 10px; line-height: 1.55; }

.library { min-width: 0; overflow: hidden; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; padding: 22px 24px 18px; }
.library-heading h2 { margin: 5px 0 3px; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; letter-spacing: -.025em; line-height: 1.1; }
.library-subtitle { margin: 0; color: var(--muted); font-size: 12px; }
.library-filters { display: flex; align-items: center; gap: 8px; }
.search-field { height: 38px; width: min(310px, 29vw); display: flex; align-items: center; gap: 8px; padding: 0 9px 0 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.search-icon { color: #6d7d72; font-size: 21px; line-height: 1; transform: rotate(-15deg); }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-field input::placeholder { color: #98a29a; }
.search-field kbd { min-width: 18px; border: 1px solid #e4e8e2; border-radius: 3px; color: #8b968d; text-align: center; font-size: 10px; }
.split-field select, .speed-control select {
  height: 38px; padding: 0 25px 0 10px; border: 1px solid var(--line); border-radius: 6px;
  color: #526057; background-color: #fff; font-size: 11px; cursor: pointer;
}

.viewer { margin: 0 24px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.video-stage { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 8.6; min-height: 230px; background: var(--video); }
.video-stage::before, .video-stage::after { position: absolute; content: ""; pointer-events: none; }
.video-stage::before { inset: 16px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 3px; }
.video-stage::after { top: 50%; left: 50%; width: 1px; height: 40px; background: rgba(217, 233, 168, .14); transform: translate(-50%, -50%); }
.video-stage video { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--video); }
.player-empty { position: relative; z-index: 1; display: grid; justify-items: center; gap: 7px; color: rgba(255, 255, 255, .78); font-size: 11px; }
.player-empty strong { color: #f4f5f0; font-size: 13px; font-weight: 650; }
.player-empty > span:last-child { color: #aeb8b0; }
.play-mark { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 3px; padding-left: 2px; border: 1px solid rgba(217, 233, 168, .5); border-radius: 50%; color: var(--lime); font-size: 12px; }
.stage-index { position: absolute; z-index: 2; top: 14px; left: 15px; padding: 5px 8px; border: 1px solid rgba(255, 255, 255, .23); border-radius: 4px; color: #f2f4ed; background: rgba(10, 18, 13, .65); font-size: 10px; font-variant-numeric: tabular-nums; }
.viewer-details { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 91px; padding: 15px 17px; background: #fff; }
.active-video-copy { min-width: 0; }
.active-video-copy .eyebrow { color: #79887f; font-size: 9px; }
.active-video-copy h3 { margin: 3px 0 1px; font-family: Georgia, serif; font-size: 20px; font-weight: 500; line-height: 1.2; }
.video-meta { margin: 0; color: var(--muted); font-size: 11px; }
.viewer-controls { display: flex; align-items: center; gap: 7px; }
.speed-control { display: flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--muted); font-size: 10px; }
.speed-control select { height: 34px; padding-right: 20px; }
.icon-button { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 6px; color: var(--green-dark); background: white; font-size: 17px; cursor: pointer; }
.icon-button:hover:not(:disabled) { border-color: #9eb7a6; background: #f5f8f3; }
.icon-button:disabled { color: #afb8b0; cursor: not-allowed; }
.next-button { border-color: var(--green); color: #fff; background: var(--green); }
.next-button:hover:not(:disabled) { border-color: var(--green-dark); background: var(--green-dark); }
.player-error { margin: 0; padding: 10px 17px; border-top: 1px solid #f0d7ce; color: #9a422d; background: #fff6f2; font-size: 12px; }

.clip-library { padding: 25px 24px 20px; }
.clip-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.clip-heading h3 { margin: 4px 0 0; font-size: 15px; font-weight: 700; }
.result-count { margin: 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.clip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.clip-card {
  min-width: 0; min-height: 75px; display: flex; align-items: center; gap: 10px; padding: 10px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: left; cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.clip-card:hover { border-color: #9cb8a3; background: #fbfcfa; }
.clip-card.is-playing { border-color: var(--green); background: #f1f6f0; box-shadow: inset 3px 0 var(--green); }
.clip-number { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 5px; color: #52645a; background: #eef2ed; font-size: 9px; font-weight: 800; font-variant-numeric: tabular-nums; }
.clip-card.is-playing .clip-number { color: var(--green-dark); background: #dce9da; }
.clip-main { min-width: 0; display: grid; gap: 2px; }
.clip-label { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.clip-id { color: #8a958d; font-size: 9px; font-variant-numeric: tabular-nums; }
.clip-trailing { display: grid; justify-items: end; gap: 3px; margin-left: auto; }
.split-pill { padding: 2px 5px; border-radius: 3px; color: #53645a; background: #f0f2ef; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.split-pill[data-split="val"] { color: #765d2c; background: #f7f0df; }
.split-pill[data-split="test"] { color: #674d6f; background: #f2eaf4; }
.clip-duration { color: #89948c; font-size: 9px; font-variant-numeric: tabular-nums; }
.empty-results { display: grid; justify-items: center; gap: 3px; padding: 44px 12px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); font-size: 12px; }
.empty-results strong { color: var(--ink); font-size: 14px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; color: var(--muted); font-size: 11px; }
.page-button { min-height: 33px; padding: 0 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--green-dark); background: white; font-size: 11px; cursor: pointer; }
.page-button:hover:not(:disabled) { border-color: #9cb8a3; background: #f5f8f3; }
.page-button:disabled { color: #abb4ad; cursor: not-allowed; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px 2px 0; color: var(--muted); font-size: 10px; }
.site-footer p { margin: 0; }
.footer-note { text-align: right; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
  .library-heading { align-items: start; flex-direction: column; }
  .library-filters { width: 100%; }
  .search-field { width: auto; flex: 1; }
  .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { height: 62px; padding: 0 17px; }
  .topbar-note { font-size: 9px; }
  .page-shell { padding: 30px 15px 22px; }
  .intro { align-items: start; flex-direction: column; gap: 20px; padding-bottom: 22px; }
  .intro h1 { font-size: 39px; }
  .dataset-stats { gap: 24px; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; padding: 15px 12px; }
  .sidebar-heading { padding-bottom: 8px; }
  .category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
  .category-section { min-width: 0; }
  .category-labels { padding-left: 7px; }
  .sidebar-hint { display: none; }
  .library-heading { padding: 18px 15px 14px; }
  .library-heading h2 { font-size: 24px; }
  .library-filters { align-items: stretch; }
  .search-field { width: auto; }
  .split-field select { max-width: 105px; }
  .viewer { margin: 0 14px; }
  .video-stage { min-height: 195px; aspect-ratio: 16 / 10; }
  .viewer-details { align-items: start; padding: 13px; }
  .viewer-controls { flex-wrap: wrap; justify-content: end; }
  .speed-control { width: 100%; justify-content: end; margin: 0 0 1px; }
  .clip-library { padding: 21px 14px 15px; }
  .clip-grid { gap: 6px; }
  .clip-card { min-height: 68px; gap: 7px; padding: 7px; }
  .clip-number { width: 27px; height: 27px; flex-basis: 27px; }
  .clip-label { font-size: 11px; }
  .site-footer { flex-direction: column; gap: 7px; }
  .footer-note { text-align: left; }
}
@media (max-width: 420px) {
  .category-list { grid-template-columns: 1fr; }
  .clip-grid { grid-template-columns: 1fr; }
  .viewer-details { flex-direction: column; }
  .viewer-controls { width: 100%; justify-content: start; }
  .speed-control { width: auto; justify-content: start; margin-right: auto; }
  .library-filters { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .split-field select { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
